修订版 | 9342619eb24468640fd8c9fad540ca5c96f1c79f (tree) |
---|---|
时间 | 2014-06-02 06:13:12 |
作者 | henoheno <henoheno> |
Commiter | umorigu |
BugTrack2/182: With php.ini: allow_call_time_pass_reference = Off
@@ -38,7 +38,8 @@ function plugin_ls2_action() | ||
38 | 38 | global $vars, $_ls2_msg_title; |
39 | 39 | |
40 | 40 | $params = array(); |
41 | - foreach (array('title', 'include', 'reverse') as $key) | |
41 | + $keys = array('title', 'include', 'reverse'); | |
42 | + foreach ($keys as $key) | |
42 | 43 | $params[$key] = isset($vars[$key]); |
43 | 44 | |
44 | 45 | $prefix = isset($vars['prefix']) ? $vars['prefix'] : ''; |
@@ -70,8 +71,8 @@ function plugin_ls2_convert() | ||
70 | 71 | } |
71 | 72 | if ($prefix == '') $prefix = strip_bracket($vars['page']) . '/'; |
72 | 73 | |
73 | - foreach ($args as $key => $arg) | |
74 | - plugin_ls2_check_arg($arg, $key, $params); | |
74 | + foreach ($args as $arg) | |
75 | + plugin_ls2_check_arg($arg, $params); | |
75 | 76 | |
76 | 77 | $title = (! empty($params['_args'])) ? join(',', $params['_args']) : // Manual |
77 | 78 | str_replace('$1', htmlsc($prefix), $_ls2_msg_title); // Auto |
@@ -104,7 +105,7 @@ function plugin_ls2_show_lists($prefix, & $params) | ||
104 | 105 | natcasesort($pages); |
105 | 106 | if ($params['reverse']) $pages = array_reverse($pages); |
106 | 107 | |
107 | - foreach ($pages as $page) $params["page_$page"] = 0; | |
108 | + foreach ($pages as $page) $params['page_ ' . $page] = 0; | |
108 | 109 | |
109 | 110 | if (empty($pages)) { |
110 | 111 | return str_replace('$1', htmlsc($prefix), $_ls2_err_nopages); |
@@ -201,7 +202,7 @@ function plugin_ls2_list_push(& $params, $level) | ||
201 | 202 | } |
202 | 203 | |
203 | 204 | // オプションを解析する |
204 | -function plugin_ls2_check_arg($value, $key, & $params) | |
205 | +function plugin_ls2_check_arg($value, & $params) | |
205 | 206 | { |
206 | 207 | if ($value == '') { |
207 | 208 | $params['_done'] = TRUE; |