diff options
author | friendica <info@friendica.com> | 2012-07-23 17:35:58 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-07-23 17:35:58 -0700 |
commit | b0f1d03a8ad51769c347a2056ce872972380d48f (patch) | |
tree | eb534605cf394edd37e82633921d6fdebfd3bffc /include/plugin.php | |
parent | d8e79061d69b7c1dc2c2b0e50e15e21948950ba2 (diff) | |
download | volse-hubzilla-b0f1d03a8ad51769c347a2056ce872972380d48f.tar.gz volse-hubzilla-b0f1d03a8ad51769c347a2056ce872972380d48f.tar.bz2 volse-hubzilla-b0f1d03a8ad51769c347a2056ce872972380d48f.zip |
convert all network search params to get requests (no url path args)
Diffstat (limited to 'include/plugin.php')
-rw-r--r-- | include/plugin.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/plugin.php b/include/plugin.php index ffa562273..f60a7d296 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -111,7 +111,7 @@ function reload_plugins() { if(! function_exists('register_hook')) { -function register_hook($hook,$file,$function) { +function register_hook($hook,$file,$function,$priority=0) { $r = q("SELECT * FROM `hook` WHERE `hook` = '%s' AND `file` = '%s' AND `function` = '%s' LIMIT 1", dbesc($hook), @@ -121,10 +121,11 @@ function register_hook($hook,$file,$function) { if(count($r)) return true; - $r = q("INSERT INTO `hook` (`hook`, `file`, `function`) VALUES ( '%s', '%s', '%s' ) ", + $r = q("INSERT INTO `hook` (`hook`, `file`, `function`, `priority`) VALUES ( '%s', '%s', '%s', '%s' ) ", dbesc($hook), dbesc($file), - dbesc($function) + dbesc($function), + dbesc($priority) ); return $r; }} @@ -145,7 +146,7 @@ if(! function_exists('load_hooks')) { function load_hooks() { $a = get_app(); $a->hooks = array(); - $r = q("SELECT * FROM `hook` WHERE 1"); + $r = q("SELECT * FROM `hook` WHERE 1 ORDER BY `priority` DESC"); if(count($r)) { foreach($r as $rr) { if(! array_key_exists($rr['hook'],$a->hooks)) |