@@ 116-125 (lines=10) @@ | ||
113 | // START module - script - item |
|
114 | $module=array(); |
|
115 | // items |
|
116 | foreach ($moduleScriptItem as $key=>$item) { |
|
117 | $module_script_item = explode('-', $item); // news:article.php-storyid news:index.php-storytopic => $module["news"]=array("storyid","storytopic"); |
|
118 | $module_script = explode(':', $module_script_item[0]); // news:article.php => $module_script = array(news,article.php); |
|
119 | if (!isset($module[$module_script[0]])) { |
|
120 | $module[$module_script[0]]["item_name"] = array(); |
|
121 | $module[$module_script[0]]["script"] = array_slice($module_script,1); |
|
122 | } |
|
123 | $module[$module_script[0]]["script"] = array_unique(array_merge($module[$module_script[0]]["script"], array_slice($module_script,1))); |
|
124 | $module[$module_script[0]]["item_name"][] = $module_script_item[1]; |
|
125 | } |
|
126 | // add modules dont have item_name |
|
127 | foreach($modules as $dir) { |
|
128 | if(!isset($module[$dir])) $module[$dir] = null; |
@@ 44-53 (lines=10) @@ | ||
41 | $module=array(); |
|
42 | if (!empty($options[1])) { |
|
43 | $options_views = explode(',', $options[1]); // item views in where claus eg: news-storyid, newbb-topic_id, news-storytopic |
|
44 | foreach ($options_views as $key=>$item) { |
|
45 | $module_script_item = explode('-', $item); // news:article.php-storyid news:index.php-storytopic => $module["news"]=array("storyid","storytopic"); |
|
46 | $module_script = explode(':', $module_script_item[0]); // news:article.php => $module_script = array(news,article.php); |
|
47 | if (!isset($module[$module_script[0]])) { |
|
48 | $module[$module_script[0]]["item_name"] = array(); |
|
49 | $module[$module_script[0]]["script"] = array_slice($module_script,1); |
|
50 | } |
|
51 | $module[$module_script[0]]["script"] = array_unique(array_merge($module[$module_script[0]]["script"], array_slice($module_script,1))); |
|
52 | $module[$module_script[0]]["item_name"][] = $module_script_item[1]; |
|
53 | } |
|
54 | } |
|
55 | $users = ($options[3] != -1) ? explode(",",$options[3]) : array(); |
|
56 | $groups = !empty($options[4]) ? explode(",",$options[4]) : array(); |