diff options
Diffstat (limited to 'src/decorators')
-rw-r--r-- | src/decorators/ActionUrlDecorator.php | 16 | ||||
-rw-r--r-- | src/decorators/ArrayMergeDecorator.php | 2 | ||||
-rw-r--r-- | src/decorators/BranchUrlDecorator.php | 12 | ||||
-rw-r--r-- | src/decorators/CallbackDecorator.php | 2 | ||||
-rw-r--r-- | src/decorators/ConcatDecorator.php | 2 | ||||
-rw-r--r-- | src/decorators/Decorator.php | 6 | ||||
-rw-r--r-- | src/decorators/FieldDecorator.php | 2 | ||||
-rw-r--r-- | src/decorators/IfEmptyDecorator.php | 14 | ||||
-rw-r--r-- | src/decorators/RedirectUrlDecorator.php | 12 | ||||
-rw-r--r-- | src/decorators/ReplaceDecorator.php | 2 | ||||
-rw-r--r-- | src/decorators/UrlDecorator.php | 12 |
11 files changed, 43 insertions, 39 deletions
diff --git a/src/decorators/ActionUrlDecorator.php b/src/decorators/ActionUrlDecorator.php index 5cc18850..20228c21 100644 --- a/src/decorators/ActionUrlDecorator.php +++ b/src/decorators/ActionUrlDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin v6.0.0-RC4 + * PHPPgAdmin v6.0.0-RC5 */ namespace PHPPgAdmin\Decorators; @@ -10,27 +10,31 @@ class ActionUrlDecorator extends Decorator { public function __construct($base, $queryVars = null) { - $this->b = $base; + $this->base = $base; if (null !== $queryVars) { - $this->q = $queryVars; + $this->queryVars = $queryVars; } } public function value($fields) { //$this->prtrace($fields); - $url = Decorator::get_sanitized_value($this->b, $fields); + $url = Decorator::get_sanitized_value($this->base, $fields); if (false === $url) { return ''; } - if (!empty($this->q)) { - $queryVars = Decorator::get_sanitized_value($this->q, $fields); + if (!empty($this->queryVars)) { + $queryVars = Decorator::get_sanitized_value($this->queryVars, $fields); $sep = '?'; ksort($queryVars); foreach ($queryVars as $var => $value) { + if (!is_scalar($value)) { + continue; + } + dump($fields, $var, $value); $url .= $sep.Decorator::value_url($var, $fields).'='.Decorator::value_url($value, $fields); $sep = '&'; } diff --git a/src/decorators/ArrayMergeDecorator.php b/src/decorators/ArrayMergeDecorator.php index ee71deec..03c41daf 100644 --- a/src/decorators/ArrayMergeDecorator.php +++ b/src/decorators/ArrayMergeDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin v6.0.0-RC4 + * PHPPgAdmin v6.0.0-RC5 */ namespace PHPPgAdmin\Decorators; diff --git a/src/decorators/BranchUrlDecorator.php b/src/decorators/BranchUrlDecorator.php index e1aa28e4..4b0a2b19 100644 --- a/src/decorators/BranchUrlDecorator.php +++ b/src/decorators/BranchUrlDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin v6.0.0-RC4 + * PHPPgAdmin v6.0.0-RC5 */ namespace PHPPgAdmin\Decorators; @@ -10,22 +10,22 @@ class BranchUrlDecorator extends Decorator { public function __construct($base, $queryVars = null) { - $this->b = $base; + $this->base = $base; if (null !== $queryVars) { - $this->q = $queryVars; + $this->queryVars = $queryVars; } } public function value($fields) { - $url = Decorator::get_sanitized_value($this->b, $fields); + $url = Decorator::get_sanitized_value($this->base, $fields); if (false === $url) { return ''; } - if (!empty($this->q)) { - $queryVars = Decorator::get_sanitized_value($this->q, $fields); + if (!empty($this->queryVars)) { + $queryVars = Decorator::get_sanitized_value($this->queryVars, $fields); $sep = '?'; ksort($queryVars); diff --git a/src/decorators/CallbackDecorator.php b/src/decorators/CallbackDecorator.php index 6487fee7..fb02b8b8 100644 --- a/src/decorators/CallbackDecorator.php +++ b/src/decorators/CallbackDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin v6.0.0-RC4 + * PHPPgAdmin v6.0.0-RC5 */ namespace PHPPgAdmin\Decorators; diff --git a/src/decorators/ConcatDecorator.php b/src/decorators/ConcatDecorator.php index e2ca971f..1bc671a7 100644 --- a/src/decorators/ConcatDecorator.php +++ b/src/decorators/ConcatDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin v6.0.0-RC4 + * PHPPgAdmin v6.0.0-RC5 */ namespace PHPPgAdmin\Decorators; diff --git a/src/decorators/Decorator.php b/src/decorators/Decorator.php index 9620b305..ab9c34f0 100644 --- a/src/decorators/Decorator.php +++ b/src/decorators/Decorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin v6.0.0-RC4 + * PHPPgAdmin v6.0.0-RC5 */ namespace PHPPgAdmin\Decorators; @@ -12,12 +12,12 @@ class Decorator public function __construct($value) { - $this->v = $value; + $this->val = $value; } public function value($fields) { - return $this->v; + return $this->val; } public static function get_sanitized_value(&$var, &$fields, $esc = null) diff --git a/src/decorators/FieldDecorator.php b/src/decorators/FieldDecorator.php index 4d90e399..b8effadc 100644 --- a/src/decorators/FieldDecorator.php +++ b/src/decorators/FieldDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin v6.0.0-RC4 + * PHPPgAdmin v6.0.0-RC5 */ namespace PHPPgAdmin\Decorators; diff --git a/src/decorators/IfEmptyDecorator.php b/src/decorators/IfEmptyDecorator.php index ad7cdfc7..ece3a857 100644 --- a/src/decorators/IfEmptyDecorator.php +++ b/src/decorators/IfEmptyDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin v6.0.0-RC4 + * PHPPgAdmin v6.0.0-RC5 */ namespace PHPPgAdmin\Decorators; @@ -10,20 +10,20 @@ class IfEmptyDecorator extends Decorator { public function __construct($value, $empty, $full = null) { - $this->v = $value; - $this->e = $empty; + $this->val = $value; + $this->empty = $empty; if (null !== $full) { - $this->f = $full; + $this->full = $full; } } public function value($fields) { - $val = Decorator::get_sanitized_value($this->v, $fields); + $val = Decorator::get_sanitized_value($this->val, $fields); if (empty($val)) { - return Decorator::get_sanitized_value($this->e, $fields); + return Decorator::get_sanitized_value($this->empty, $fields); } - return isset($this->f) ? Decorator::get_sanitized_value($this->f, $fields) : $val; + return isset($this->full) ? Decorator::get_sanitized_value($this->full, $fields) : $val; } } diff --git a/src/decorators/RedirectUrlDecorator.php b/src/decorators/RedirectUrlDecorator.php index ea338b38..6a828360 100644 --- a/src/decorators/RedirectUrlDecorator.php +++ b/src/decorators/RedirectUrlDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin v6.0.0-RC4 + * PHPPgAdmin v6.0.0-RC5 */ namespace PHPPgAdmin\Decorators; @@ -10,15 +10,15 @@ class RedirectUrlDecorator extends Decorator { public function __construct($base, $queryVars = null) { - $this->b = $base; + $this->base = $base; if (null !== $queryVars) { - $this->q = $queryVars; + $this->queryVars = $queryVars; } } public function value($fields) { - $url = Decorator::get_sanitized_value($this->b, $fields); + $url = Decorator::get_sanitized_value($this->base, $fields); if (false === $url) { return ''; @@ -26,8 +26,8 @@ class RedirectUrlDecorator extends Decorator //$this->prtrace('url', $url); - if (!empty($this->q)) { - $queryVars = Decorator::get_sanitized_value($this->q, $fields); + if (!empty($this->queryVars)) { + $queryVars = Decorator::get_sanitized_value($this->queryVars, $fields); $sep = '?'; ksort($queryVars); diff --git a/src/decorators/ReplaceDecorator.php b/src/decorators/ReplaceDecorator.php index 5d4eb51d..b1399c96 100644 --- a/src/decorators/ReplaceDecorator.php +++ b/src/decorators/ReplaceDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin v6.0.0-RC4 + * PHPPgAdmin v6.0.0-RC5 */ namespace PHPPgAdmin\Decorators; diff --git a/src/decorators/UrlDecorator.php b/src/decorators/UrlDecorator.php index 29d68ee0..43a57fd3 100644 --- a/src/decorators/UrlDecorator.php +++ b/src/decorators/UrlDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin v6.0.0-RC4 + * PHPPgAdmin v6.0.0-RC5 */ namespace PHPPgAdmin\Decorators; @@ -10,22 +10,22 @@ class UrlDecorator extends Decorator { public function __construct($base, $queryVars = null) { - $this->b = $base; + $this->base = $base; if (null !== $queryVars) { - $this->q = $queryVars; + $this->queryVars = $queryVars; } } public function value($fields) { - $url = Decorator::get_sanitized_value($this->b, $fields); + $url = Decorator::get_sanitized_value($this->base, $fields); if (false === $url) { return ''; } - if (!empty($this->q)) { - $queryVars = Decorator::get_sanitized_value($this->q, $fields); + if (!empty($this->queryVars)) { + $queryVars = Decorator::get_sanitized_value($this->queryVars, $fields); $sep = '?'; ksort($queryVars); |