projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
backport, bug 421 suppression de tel impossible
[platal.git]
/
include
/
xorg.plugin.inc.php
diff --git
a/include/xorg.plugin.inc.php
b/include/xorg.plugin.inc.php
index
7a4a97c
..
971d5a1
100644
(file)
--- a/
include/xorg.plugin.inc.php
+++ b/
include/xorg.plugin.inc.php
@@
-35,15
+35,15
@@
class XOrgPlugin
{
// {{{ properties
class XOrgPlugin
{
// {{{ properties
-
+
/** have to override, contents the fields names used to drive the plugin */
/** have to override, contents the fields names used to drive the plugin */
- var $_get_vars =
A
rray();
+ var $_get_vars =
a
rray();
/** some polymorphism at low cost, may be used, or not */
var $_callback;
// }}}
// {{{ function XOrgPlugin()
/** some polymorphism at low cost, may be used, or not */
var $_callback;
// }}}
// {{{ function XOrgPlugin()
-
+
/** constructor.
* the constructor override $_get_vars settings by prefixing the names with $prefix
*/
/** constructor.
* the constructor override $_get_vars settings by prefixing the names with $prefix
*/
@@
-58,17
+58,17
@@
class XOrgPlugin
// }}}
// {{{ function get_value()
// }}}
// {{{ function get_value()
-
+
/** transparent access to $_GET, wrt the right $prefix
*/
function get_value($key)
{
/** transparent access to $_GET, wrt the right $prefix
*/
function get_value($key)
{
- return Get::
get
($this->_prefix.$key);
+ return Get::
v
($this->_prefix.$key);
}
// }}}
// {{{ function make_url()
}
// }}}
// {{{ function make_url()
-
+
/** construct an url with the given parameters to drive the plugin.
* leave all other GET params alone
*/
/** construct an url with the given parameters to drive the plugin.
* leave all other GET params alone
*/
@@
-78,31
+78,30
@@
class XOrgPlugin
$args = isset($params) ? $params : Array();
if (!is_array($args)) {
$args = isset($params) ? $params : Array();
if (!is_array($args)) {
- if (count($this->_get_vars)!=1) {
- return "<p class='erreur'>params should be an array</p>";
- } else {
- $args = Array($this->_get_vars[0]=>$params);
- }
+ $args = array($this->_get_vars[0]=>$params);
}
foreach ($_GET as $key=>$val) {
}
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) {
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]);
}
} elseif (Get::has('key')) {
if ($args[$key]) {
$get[] = urlencode($key) . '=' . urlencode($args[$key]);
}
} elseif (Get::has('key')) {
- $get[] = urlencode($key) . '=' . urlencode(Get::
get
($key));
+ $get[] = urlencode($key) . '=' . urlencode(Get::
v
($key));
}
}
}
}
- return
$_SERVER['PHP_SELF'] . '?' . join('&',
$get);
+ return
pl_self() . '?' . join('&',
$get);
}
// }}}
}
// }}}