craigk5n / webcalendar

WebCalendar is a PHP application used to maintain a calendar for a single user or an intranet group of users. It can also be configured as an event calendar.
http://www.k5n.us/webcalendar.php
GNU General Public License v2.0
153 stars 75 forks source link

Remove `abs()` calls from category ID. #350

Closed dmjohnsson23 closed 1 year ago

dmjohnsson23 commented 1 year ago

Two other people have reported this issue as well: #284 and #302

I personally can't think of any good reason why those abs() calls need to be there. I mean, there aren't any negative category IDs, are there? And if there were, why would we want to get the absolute value? I just removed the calls and everything is working well for me, but if there is some weird edge case those calls were meant to solve, let me know.

craigk5n commented 1 year ago

I believe at one time we used a negative category id as a way to mark a category as global. It has since been changed so that a NULL cat_owner field indicates a global category.