From e0c26282a603881e8d2f839d94c28dbbfc57d71b Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 29 Sep 2014 03:34:17 +0200 Subject: scrutinizer documentations issues --- inc/subscription.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/subscription.php') diff --git a/inc/subscription.php b/inc/subscription.php index aab6de926..dbbcbe16a 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -515,7 +515,7 @@ class Subscription { * @author Adrian Lang * * @param string $subscriber_mail The target mail address - * @param array $id The ID + * @param string $id The ID * @param int $lastupdate Time of the last notification * @return bool */ -- cgit v1.2.3 From 59bc3b48fdffb76ee65a4b630be3ffa1f6c20c80 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 29 Sep 2014 21:45:27 +0200 Subject: more scrutinizer issue improvements --- inc/subscription.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/subscription.php') diff --git a/inc/subscription.php b/inc/subscription.php index dbbcbe16a..bad98cf6c 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -454,7 +454,7 @@ class Subscription { global $conf; $file = mediaFN($id); - list($mime, $ext) = mimetype($id); + list($mime, /* $ext */) = mimetype($id); $trep = array( 'MIME' => $mime, -- cgit v1.2.3 From 42ea7f447f39fbc2f79eaaec31f8c10ede59c5d0 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Wed, 1 Oct 2014 11:30:27 +0200 Subject: Many PHPDocs, some unused and dyn declared vars many PHPDocs some unused variables some dynamically declared variables declared --- inc/subscription.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc/subscription.php') diff --git a/inc/subscription.php b/inc/subscription.php index bad98cf6c..58376f2ec 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -444,11 +444,11 @@ class Subscription { * Send the diff for some media change * * @fixme this should embed thumbnails of images in HTML version + * * @param string $subscriber_mail The target mail address * @param string $template Mail template ('uploadmail', ...) * @param string $id Media file for which the notification is * @param int|bool $rev Old revision if any - * @return bool true if successfully sent */ public function send_media_diff($subscriber_mail, $template, $id, $rev = false) { global $conf; @@ -619,6 +619,7 @@ class Subscription { /** * Get a valid message id for a certain $id and revision (or the current revision) + * * @param string $id The id of the page (or media file) the message id should be for * @param string $rev The revision of the page, set to the current revision of the page $id if not set * @return string -- cgit v1.2.3 From 79e79377626799a77c11aa7849cb9c64305590c8 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 7 Jan 2015 10:47:45 +0100 Subject: Remove error supression for file_exists() In an older version of PHP a file_exists() call would issue a warning when the file did not exist. This was fixed in later PHP releases. Since we require PHP 5.3 now, there's no need to supress any error here anymore. This might even give a minor performance boost. --- inc/subscription.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/subscription.php') diff --git a/inc/subscription.php b/inc/subscription.php index 58376f2ec..8b6dcb27e 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -166,7 +166,7 @@ class Subscription { // Handle files. $result = array(); foreach($files as $target => $file) { - if(!@file_exists($file)) continue; + if(!file_exists($file)) continue; $lines = file($file); foreach($lines as $line) { -- cgit v1.2.3 From 34d1de72006386b5ac410123c9a9bd2deaa17677 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 31 Jul 2015 13:17:39 +0200 Subject: removed more deprecated code --- inc/subscription.php | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'inc/subscription.php') diff --git a/inc/subscription.php b/inc/subscription.php index 8b6dcb27e..74bec656d 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -691,19 +691,3 @@ class Subscription { $data['addresslist'] = trim($addresslist.','.implode(',', $result), ','); } } - -/** - * Compatibility wrapper around Subscription:notifyaddresses - * - * for plugins emitting COMMON_NOTIFY_ADDRESSLIST themselves and relying on on this to - * be the default handler - * - * @param array $data event data for - * - * @deprecated 2012-12-07 - */ -function subscription_addresslist(&$data) { - dbg_deprecated('class Subscription'); - $sub = new Subscription(); - $sub->notifyaddresses($data); -} -- cgit v1.2.3