From b3a30c5c8779637f40dfef6840b47bea73af092b Mon Sep 17 00:00:00 2001 From: Rasmus Fuhse <fuhse@data-quest.de> Date: Tue, 20 Jun 2017 11:36:40 +0200 Subject: [PATCH] fixes #75 --- classes/MarketPlugin.class.php | 10 +++------- views/approving/overview.php | 2 +- views/myplugins/overview.php | 6 +++--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/classes/MarketPlugin.class.php b/classes/MarketPlugin.class.php index 9cc8245..2315c07 100755 --- a/classes/MarketPlugin.class.php +++ b/classes/MarketPlugin.class.php @@ -39,25 +39,21 @@ class MarketPlugin extends SimpleORMap { 'on_delete' => 'delete', 'on_store' => 'store' ); + $config['registered_callbacks']['before_store'][] = 'requestReview'; parent::configure($config); } - public function __construct($id = null) - { - $this->registerCallback('before_store', 'requestReview'); - parent::__construct($id); - } - public function requestReview() { if ($this->content['publiclyvisible'] && !$this->content_db['publiclyvisible'] && !$this['approved']) { $messaging = new messaging(); $statement = DBManager::get()->prepare(" - SELECT roles_user.user_id + SELECT roles_user.userid FROM roles INNER JOIN roles_user ON (roles.roleid = roles_user.roleid) WHERE roles.rolename = 'Pluginbeauftragter' "); $statement->execute(); + foreach ($statement->fetchAll(PDO::FETCH_COLUMN, 0) as $beauftragter) { $messaging->sendSystemMessage( $beauftragter, diff --git a/views/approving/overview.php b/views/approving/overview.php index ecd3ac4..7951136 100755 --- a/views/approving/overview.php +++ b/views/approving/overview.php @@ -26,7 +26,7 @@ </td> <td class="actions"> <a href="<?= $controller->url_for('approving/review/' . $marketplugin->getId()) ?>" data-dialog> - <?= Icon::create('assessment') ?> + <?= Icon::create('assessment', 'clickable')->asImg(20) ?> </a> </td> </tr> diff --git a/views/myplugins/overview.php b/views/myplugins/overview.php index 29ea772..9841067 100755 --- a/views/myplugins/overview.php +++ b/views/myplugins/overview.php @@ -15,7 +15,7 @@ <td> <? if ($marketplugin['publiclyvisible'] && !$marketplugin['approved']) : ?> <?= Icon::create('exclaim-circle', 'status-red', ['title' => _("Plugin wurde noch nicht von einem Administrator freigeschaltet."), - 'class' => "text-bottom"]) ?> + 'class' => "text-bottom"])->asImg(20) ?> <? endif; ?> <a href="<?= $controller->url_for('presenting/details/' . $marketplugin->getId()) ?>"> <?= htmlReady($marketplugin['name']) ?> @@ -48,10 +48,10 @@ </td> <td class="actions"> <a href="<?= $controller->url_for('myplugins/edit/' . $marketplugin->getId()) ?>" data-dialog title="<?= _("Plugin-Info bearbeiten") ?>"> - <?= Icon::create('edit') ?> + <?= Icon::create('edit', 'clickable')->asImg(20) ?> </a> <a href="<?= $controller->url_for('myplugins/add_release/' . $marketplugin->getId()) ?>" data-dialog title="<?= _("Neues Release hinzufügen") ?>"> - <?= Icon::create('add') ?> + <?= Icon::create('add', 'clickable')->asImg(20) ?> </a> </td> </tr> -- GitLab