08-18-2012, 11:10 PM
Okay, I'm tired and in a weird mood. This means that I will do a half dazed skim over and blurt out anything that catches my attention.
Okay, there's absolutely nothing wrong with the plugin, I just need some negative points to stick up for my own enjoyment.
I'm going to bed.
-
Code:
* 1.- You may edit whatever you want to fit your needs without permission. * 3.- You MUST NOT remove any license comments in any file that comes with this plugin pack.
Can I make #1 override #3?
-
PHP Code:
$mark = ougc_markpmasunread_markunread($mybb->input['markunread']); if($mark !== true) { global $lang; $lang->load('ougc_markpmasunread'); switch((int)$mark) { case 1: $message = $lang->ougc_markpmasunread_error_invalidpm; break; case 2: $message = $lang->ougc_markpmasunread_error_alreadyunread; break; case 3: $message = $lang->ougc_markpmasunread_error_userupdate; break; default: $message = $lang->ougc_markpmasunread_error_unkown; break; } error($message); }
Okay, that seemed awkward... Maybe skip the magic numbers and pass back better references?
- I honestly would just chuck the entire contents of the ougc_markpmasunread template into the private_messagebit template - saves a shit-tonne of work, but whatever makes you happy I guess
-
PHP Code:
$return = false; (isset($pmid) && ($pmid = (int)$pmid)) or ($return = true); ($pmid && $pmid > 0) or ($return = true); if($return) { return 1; }
Seems the same as
PHP Code:if(($pmid = (int)@$pmid) > 0) return 1;
Okay, yeah, I'm being pedantic...
- When marking unread, the pmid isn't validated against a user - eg it's possibly to mark someone else's PMs as unread, if you want to be a bored twat with nothing better to do, that is
- Also marking unread doesn't have/check postkeys, but I honestly wouldn't care for it myself
Okay, there's absolutely nothing wrong with the plugin, I just need some negative points to stick up for my own enjoyment.
I'm going to bed.