Skip to content
This repository has been archived by the owner on Nov 9, 2019. It is now read-only.

Commit

Permalink
Fix problem with statistic plugins
Browse files Browse the repository at this point in the history
It was not possible to install new statistic plugins.
  • Loading branch information
laufhannes committed Jan 26, 2015
1 parent f385e47 commit 1f63127
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions inc/plugin/class.PluginStat.php
Expand Up @@ -49,13 +49,8 @@ protected function getDefaultConfigVars() { return array(); }
* @param int $id
*/
public function __construct($id) {
if ($id == parent::$INSTALLER_ID) {
$this->id = $id;
return;
}

if (!is_numeric($id) || $id <= 0) {
Error::getInstance()->addError('An object of class::Plugin must have an ID: <$id='.$id.'>');
if (!is_numeric($id) || ($id <= 0 && $id != parent::$INSTALLER_ID)) {
Error::getInstance()->addError('PluginStat::__construct(): An object of class::Plugin must have an ID: <$id='.$id.'>');
return false;
}

Expand Down Expand Up @@ -262,4 +257,4 @@ static public function getLinkForVariousStats() {

return Plugin::getInstanceFor($array[0])->getLink();
}
}
}

0 comments on commit 1f63127

Please sign in to comment.