X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fxorg.plugin.inc.php;h=21343d7a3b4b0d19272bee512f2f502c2b9d6905;hb=7b728d84a6c4f39a1ff4bfefee1dae2ceb2180fc;hp=c6f30272173e2eed4e00183f4396839a051256dc;hpb=0337d704b62718d7c77106c0e4c4e26fb02beacf;p=platal.git diff --git a/include/xorg.plugin.inc.php b/include/xorg.plugin.inc.php index c6f3027..21343d7 100644 --- a/include/xorg.plugin.inc.php +++ b/include/xorg.plugin.inc.php @@ -1,6 +1,6 @@ _get_vars)!=1) { - return "

params should be an array

"; - } else { - $args = Array($this->_get_vars[0]=>$params); - } + $args = array($this->_get_vars[0]=>$params); } foreach ($_GET as $key=>$val) { - if (in_array($key,$this->_get_vars) && array_key_exists($key,$args)) { + if ($key == 'p') { + continue; + } + if (in_array($key, $this->_get_vars) && array_key_exists($key, $args)) { continue; } $get[] = urlencode($key) . '=' . urlencode($val); } foreach ($this->_get_vars as $key) { - if (array_key_exists($key,$args)) { + if (array_key_exists($key, $args)) { if ($args[$key]) { $get[] = urlencode($key) . '=' . urlencode($args[$key]); } @@ -102,7 +101,7 @@ class XOrgPlugin } } - return $_SERVER['PHP_SELF'] . '?' . join('&',$get); + return '?' . join('&', $get); } // }}}