diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/exe/css.php | 2 | ||||
-rw-r--r-- | lib/exe/detail.php | 5 | ||||
-rw-r--r-- | lib/exe/js.php | 5 | ||||
-rw-r--r-- | lib/exe/mediamanager.php | 5 | ||||
-rw-r--r-- | lib/plugins/config/core/Loader.php | 4 | ||||
-rw-r--r-- | lib/plugins/popularity/helper.php | 4 | ||||
-rw-r--r-- | lib/plugins/testing/action.php | 5 |
7 files changed, 21 insertions, 9 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php index 88ca42bbd..40de4b828 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -127,7 +127,7 @@ function css_out(){ // plugins decide whether to include the DW default styles. // This can be done by preventing the Default. $media_files['DW_DEFAULT'] = css_filewrapper('DW_DEFAULT'); - trigger_event('CSS_STYLES_INCLUDED', $media_files['DW_DEFAULT'], 'css_defaultstyles'); + Event::createAndTrigger('CSS_STYLES_INCLUDED', $media_files['DW_DEFAULT'], 'css_defaultstyles'); // build the stylesheet foreach ($mediatypes as $mediatype) { diff --git a/lib/exe/detail.php b/lib/exe/detail.php index 7598438b5..a6cffa770 100644 --- a/lib/exe/detail.php +++ b/lib/exe/detail.php @@ -1,4 +1,7 @@ <?php + +use dokuwiki\Extension\Event; + if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); define('DOKU_MEDIADETAIL',1); require_once(DOKU_INC.'inc/init.php'); @@ -12,7 +15,7 @@ $REV = $INPUT->int('rev'); $INFO = array_merge(pageinfo(),mediainfo()); $tmp = array(); -trigger_event('DETAIL_STARTED', $tmp); +Event::createAndTrigger('DETAIL_STARTED', $tmp); //close session session_write_close(); diff --git a/lib/exe/js.php b/lib/exe/js.php index 86927b1c9..7de04b2a1 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -7,8 +7,9 @@ */ use dokuwiki\Cache\Cache; +use dokuwiki\Extension\Event; -if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); +if(!defined('DOKU_INC')) define('DOKU_INC', __DIR__ .'/../../'); if(!defined('NOSESSION')) define('NOSESSION',true); // we do not use a session or authentication here (better caching) if(!defined('NL')) define('NL',"\n"); if(!defined('DOKU_DISABLE_GZIP_OUTPUT')) define('DOKU_DISABLE_GZIP_OUTPUT',1); // we gzip ourself here @@ -75,7 +76,7 @@ function js_out(){ } // Let plugins decide to either put more scripts here or to remove some - trigger_event('JS_SCRIPT_LIST', $files); + Event::createAndTrigger('JS_SCRIPT_LIST', $files); // The generated script depends on some dynamic options $cache = new Cache('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].md5(serialize($files)),'.js'); diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php index 722254423..b43cff745 100644 --- a/lib/exe/mediamanager.php +++ b/lib/exe/mediamanager.php @@ -1,4 +1,7 @@ <?php + +use dokuwiki\Extension\Event; + if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); define('DOKU_MEDIAMANAGER',1); @@ -38,7 +41,7 @@ $AUTH = $INFO['perm']; // shortcut for historical reasons $tmp = array(); - trigger_event('MEDIAMANAGER_STARTED', $tmp); + Event::createAndTrigger('MEDIAMANAGER_STARTED', $tmp); session_write_close(); //close session // do not display the manager if user does not have read access diff --git a/lib/plugins/config/core/Loader.php b/lib/plugins/config/core/Loader.php index 556493350..90ad0f50e 100644 --- a/lib/plugins/config/core/Loader.php +++ b/lib/plugins/config/core/Loader.php @@ -2,6 +2,8 @@ namespace dokuwiki\plugin\config\core; +use dokuwiki\Extension\Event; + /** * Configuration loader * @@ -28,7 +30,7 @@ class Loader { $this->plugins = plugin_list(); $this->template = $conf['template']; // allow plugins to remove configurable plugins - trigger_event('PLUGIN_CONFIG_PLUGINLIST', $this->plugins); + Event::createAndTrigger('PLUGIN_CONFIG_PLUGINLIST', $this->plugins); } /** diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index 50da6d535..4537976ae 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -1,13 +1,13 @@ <?php use dokuwiki\HTTP\DokuHTTPClient; +use dokuwiki\Extension\Event; /** * Popularity Feedback Plugin * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) */ - class helper_plugin_popularity extends Dokuwiki_Plugin { /** @@ -244,7 +244,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin protected function addPluginUsageData(&$data) { $pluginsData = array(); - trigger_event('PLUGIN_POPULARITY_DATA_SETUP', $pluginsData); + Event::createAndTrigger('PLUGIN_POPULARITY_DATA_SETUP', $pluginsData); foreach ($pluginsData as $plugin => $d) { if (is_array($d)) { foreach ($d as $key => $value) { diff --git a/lib/plugins/testing/action.php b/lib/plugins/testing/action.php index d34ef1858..09b84262e 100644 --- a/lib/plugins/testing/action.php +++ b/lib/plugins/testing/action.php @@ -1,4 +1,7 @@ <?php + +use dokuwiki\Extension\Event; + /** * Plugin for testing the test system * @@ -15,7 +18,7 @@ class action_plugin_testing extends DokuWiki_Action_Plugin { public function dokuwikiStarted() { $param = array(); - trigger_event('TESTING_PLUGIN_INSTALLED', $param); + Event::createAndTrigger('TESTING_PLUGIN_INSTALLED', $param); msg('The testing plugin is enabled and should be disabled.',-1); } } |