mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Merge pull request #939 from lonalore/master
Issue #936: Feature request: event triggering after plugin installation/uninstallation...
This commit is contained in:
@@ -1369,6 +1369,7 @@ class e107plugin
|
|||||||
$pref = e107::getPref();
|
$pref = e107::getPref();
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
$mes = e107::getMessage();
|
$mes = e107::getMessage();
|
||||||
|
$event = e107::getEvent();
|
||||||
|
|
||||||
$error = array(); // Array of error messages
|
$error = array(); // Array of error messages
|
||||||
$canContinue = TRUE; // Clear flag if must abort part way through
|
$canContinue = TRUE; // Clear flag if must abort part way through
|
||||||
@@ -1632,6 +1633,26 @@ class e107plugin
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($function == 'install')
|
||||||
|
{
|
||||||
|
$event->trigger('admin_plugin_install', $plug);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($function == 'uninstall')
|
||||||
|
{
|
||||||
|
$event->trigger('admin_plugin_uninstall', $plug);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($function == 'upgrade')
|
||||||
|
{
|
||||||
|
$event->trigger('admin_plugin_upgrade', $plug);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($function == 'refresh')
|
||||||
|
{
|
||||||
|
$event->trigger('admin_plugin_refresh', $plug);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Placeholder.
|
// Placeholder.
|
||||||
@@ -2519,6 +2540,10 @@ class e107plugin
|
|||||||
$text .= "<br /><a class='btn btn-primary' href='".e_PLUGIN.$eplug_folder."/".$eplug_conffile."'>".LAN_CONFIGURE."</a>";
|
$text .= "<br /><a class='btn btn-primary' href='".e_PLUGIN.$eplug_folder."/".$eplug_conffile."'>".LAN_CONFIGURE."</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Event triggering after plugin installation.
|
||||||
|
$event = e107::getEvent();
|
||||||
|
$event->trigger('admin_plugin_install', $plug);
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user