From b0f1d03a8ad51769c347a2056ce872972380d48f Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 23 Jul 2012 17:35:58 -0700 Subject: convert all network search params to get requests (no url path args) --- include/group.php | 2 +- include/plugin.php | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/group.php b/include/group.php index 1071f5c78..8aaeb513f 100644 --- a/include/group.php +++ b/include/group.php @@ -226,7 +226,7 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0 'cid' => $cid, 'text' => $rr['name'], 'selected' => $selected, - 'href' => $each."/".$rr['id'], + 'href' => (($each === 'network') ? $each.'?f=&gid='.$rr['id'] : $each."/".$rr['id']), 'edit' => $groupedit, 'ismember' => in_array($rr['id'],$member_of), ); 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)) -- cgit v1.2.3