From 49af67033ddd333c5a13553438411df4f4f44e85 Mon Sep 17 00:00:00 2001
From: Ghislain Loas <ghislo@sandbox.pergame.net>
Date: Tue, 22 Mar 2016 12:21:38 +0100
Subject: [PATCH] dev #35088 remove useless functions

---
 .../admin/controllers/ProfilController.php       |  8 +-------
 library/ZendAfi/View/Helper/BaseHelper.php       |  8 --------
 library/ZendAfi/View/Helper/Bouton.php           |  2 +-
 library/ZendAfi/View/Helper/BoutonIco.php        |  2 +-
 library/fonctions/string.php                     | 16 ----------------
 5 files changed, 3 insertions(+), 33 deletions(-)

diff --git a/application/modules/admin/controllers/ProfilController.php b/application/modules/admin/controllers/ProfilController.php
index 378af6fd891..be231746ac0 100644
--- a/application/modules/admin/controllers/ProfilController.php
+++ b/application/modules/admin/controllers/ProfilController.php
@@ -585,12 +585,6 @@ class Admin_ProfilController extends ZendAfi_Controller_Action {
 
 
   private function _splitArg($item) {
-    $pos = strpos($item, '=');
-    if ($pos === false)
-      return false;
-
-    $clef = substr($item, 0, $pos);
-    $valeur = substr($item, ($pos+1));
-    return array($clef, $valeur);
+    return explode('=', $item, 2);
   }
 }
\ No newline at end of file
diff --git a/library/ZendAfi/View/Helper/BaseHelper.php b/library/ZendAfi/View/Helper/BaseHelper.php
index 3bc8b926dc5..3d433b00ab2 100644
--- a/library/ZendAfi/View/Helper/BaseHelper.php
+++ b/library/ZendAfi/View/Helper/BaseHelper.php
@@ -45,14 +45,6 @@ class ZendAfi_View_Helper_BaseHelper extends Zend_View_Helper_HtmlElement {
     return $this->view;
   }
 
-  /**
-   * @param string $arg
-   * @return array
-   */
-  public function splitArg($arg) {
-    return explode('=', $arg);
-  }
-
   /**
    * @param string $js_function
    * @return string
diff --git a/library/ZendAfi/View/Helper/Bouton.php b/library/ZendAfi/View/Helper/Bouton.php
index 2db75726761..08544ba83bf 100644
--- a/library/ZendAfi/View/Helper/Bouton.php
+++ b/library/ZendAfi/View/Helper/Bouton.php
@@ -52,7 +52,7 @@ class ZendAfi_View_Helper_Bouton extends ZendAfi_View_Helper_BaseHelper {
     // Recup des paramètres
     for($i=0; $i< count($args); $i++)
     {
-      $attrib = $this->splitArg($args[$i]);
+      $attrib = explode('=', $args[$i], 2);
       switch($attrib[0])
       {
         case"id":$id=$attrib[1]; break;
diff --git a/library/ZendAfi/View/Helper/BoutonIco.php b/library/ZendAfi/View/Helper/BoutonIco.php
index 635213acb68..0e14c0c9066 100644
--- a/library/ZendAfi/View/Helper/BoutonIco.php
+++ b/library/ZendAfi/View/Helper/BoutonIco.php
@@ -34,7 +34,7 @@ class ZendAfi_View_Helper_BoutonIco extends ZendAfi_View_Helper_BaseHelper {
 
     $args[] = func_get_args();
     foreach (func_get_args() as $arg) {
-      $attrib = $this->splitArg($arg);
+      $attrib = explode('=', $arg, 2);
       $name = $attrib[0];
       $value = $attrib[1];
       if (array_key_exists($name, $mapping))
diff --git a/library/fonctions/string.php b/library/fonctions/string.php
index 3e651b17bfd..9f430f8a42c 100644
--- a/library/fonctions/string.php
+++ b/library/fonctions/string.php
@@ -110,22 +110,6 @@ function formatDate($date,$format)
 //////////////////// TOUT LE RESTE C'EST A VERIFIER /////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////////////
 
-function stripAccents($string) {
-  $string = convertFromUtf8($string);
-  $string = htmlentities(strtolower($string), ENT_NOQUOTES);
-  $string = preg_replace("/&(.)(acute|grave|cedil|circ|ring|tilde|uml);/", "$1", $string);
-  return $string;
-}
-
-function splitArg( $arg )
-{
-  $res = explode('&',$arg);
-  foreach($res as $args)
-    {
-      $res2[] = explode('=',$args);
-    }
-  return $res2;
-}
 
 function strRight( $chaine, $n )
 {
-- 
GitLab