From d507de9e798db4502730fa4e04a321cadfbec6ed Mon Sep 17 00:00:00 2001
From: Fabian Becker <fabian.becker@uni-tuebingen.de>
Date: Tue, 3 Sep 2013 23:42:21 +0200
Subject: [PATCH] Remove more pre 5.3 compat code

refs #4113
---
 core/DataTable/Filter/SafeDecodeLabel.php | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/core/DataTable/Filter/SafeDecodeLabel.php b/core/DataTable/Filter/SafeDecodeLabel.php
index ecb183c6cb..3a0f222b04 100644
--- a/core/DataTable/Filter/SafeDecodeLabel.php
+++ b/core/DataTable/Filter/SafeDecodeLabel.php
@@ -20,7 +20,7 @@ use Piwik\DataTable\Filter;
 class SafeDecodeLabel extends Filter
 {
     private $columnToDecode;
-    static private $outputHtml = true;
+    private static $outputHtml = true;
 
     /**
      * @param DataTable $table
@@ -37,7 +37,7 @@ class SafeDecodeLabel extends Filter
      * @param string $value
      * @return mixed|string
      */
-    static public function safeDecodeLabel($value)
+    public static function safeDecodeLabel($value)
     {
         if (empty($value)) {
             return $value;
@@ -45,12 +45,8 @@ class SafeDecodeLabel extends Filter
         $raw = urldecode($value);
         $value = htmlspecialchars_decode($raw, ENT_QUOTES);
         if (self::$outputHtml) {
-            // Pre 5.3
-            if (!defined('ENT_IGNORE')) {
-                $style = ENT_QUOTES;
-            } else {
-                $style = ENT_QUOTES | ENT_IGNORE;
-            }
+            // ENT_IGNORE is not good!
+            $style = ENT_QUOTES | ENT_IGNORE;
             // See changes in 5.4: http://nikic.github.com/2012/01/28/htmlspecialchars-improvements-in-PHP-5-4.html
             // Note: at some point we should change ENT_IGNORE to ENT_SUBSTITUTE
             $value = htmlspecialchars($value, $style, 'UTF-8');
-- 
GitLab