newsflash : split is not explode ....
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Fri, 30 Sep 2005 09:23:26 +0000 (09:23 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Fri, 30 Sep 2005 09:23:26 +0000 (09:23 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@70 839d8a87-29fc-0310-9880-83ba4fa771e5

15 files changed:
bin/emails.broken.php
htdocs.net/groupe/alias-admin.php
htdocs.net/groupe/membres-edit.php
htdocs/TESTS/simpletest/http.php
htdocs/TESTS/simpletest/url.php
htdocs/TESTS/simpletest/web_tester.php
htdocs/auth-groupex.php
htdocs/emails/broken.php
htdocs/emails/redirect.php
htdocs/listes/trombi.php
htdocs/webservices/manageurs.php
include/lists.inc.php
include/newsletter.inc.php
include/user.func.inc.php
include/xnet/mail.inc.php

index c33f69b..9614485 100755 (executable)
@@ -31,7 +31,7 @@ if (($opts['i'] && $opts['i'] == '-') || empty($opts['i'])) {
     $file = $opts['i'];
 }
 
-$emails = split("\n", file_get_contents($file));
+$emails = explode("\n", file_get_contents($file));
 foreach ($emails as $_email) {
     $email = valide_email($_email);
     if (empty($email) || $email=='@') {
index 2ef9b37..26dcab5 100644 (file)
@@ -12,7 +12,7 @@ $lfull = strtolower(Get::get('liste'));
 if (Env::has('add_member')) {
     $add = Env::get('add_member');
     if(strstr($add, '@')) {
-       list($mbox,$dom) = split('@', strtolower($add));
+       list($mbox,$dom) = explode('@', strtolower($add));
     } else {
        $mbox = $add;
        $dom = 'm4x.org';
index 6aca99d..fa13502 100644 (file)
@@ -10,7 +10,7 @@
         if (strpos($email, '@') === false) {
             $email .= '@m4x.org';
         }
-        list($mbox,$dom) = split('@', $email);
+        list($mbox,$dom) = explode('@', $email);
 
         $res = $globals->xdb->query(
                 "SELECT  uid, nom, prenom, email, email AS email2, perms='admin', origine
@@ -42,7 +42,7 @@
 
         if (Env::has('email')) {
             $email = Env::get('email');
-            list(,$fqdn) = split('@', $email);
+            list(,$fqdn) = explode('@', $email);
             $fqdn = strtolower($fqdn);
             if ($fqdn == 'polytechnique.org' || $fqdn == 'melix.org' ||
                 $fqdn == 'm4x.org' || $fqdn == 'melix.net')
index bea9658..8a6ea87 100644 (file)
             $this->_cookies = array();
             $this->_authentication = false;
             $this->_realm = false;
-            foreach (split("\r\n", $headers) as $header_line) {
+            foreach (explode("\r\n", $headers) as $header_line) {
                 $this->_parseHeaderLine($header_line);
             }
         }
          *    @access private
          */
         function _parseCookie($cookie_line) {
-            $parts = split(";", $cookie_line);
+            $parts = explode(";", $cookie_line);
             $cookie = array();
             preg_match('/\s*(.*?)\s*=(.*)/', array_shift($parts), $cookie);
             foreach ($parts as $part) {
                 $this->_setError('Could not parse headers');
                 $this->_headers = &new SimpleHttpHeaders($raw);
             } else {
-                list($headers, $this->_content) = split("\r\n\r\n", $raw, 2);
+                list($headers, $this->_content) = explode("\r\n\r\n", $raw, 2);
                 $this->_headers = &new SimpleHttpHeaders($headers);
             }
         }
             return ! $packet;
         }
     }
-?>
\ No newline at end of file
+?>
index d0378ed..e9f4a15 100644 (file)
             }
             if (preg_match('/(.*?)@(.*)/', $url, $matches)) {
                 $url = $prefix . $matches[2];
-                $parts = split(":", $matches[1]);
+                $parts = explode(":", $matches[1]);
                 return array(
                         urldecode($parts[0]),
                         isset($parts[1]) ? urldecode($parts[1]) : false);
          */
         function _parseRequest($raw) {
             $request = new SimpleQueryString();
-            foreach (split("&", $raw) as $pair) {
+            foreach (explode("&", $raw) as $pair) {
                 if (preg_match('/(.*?)=(.*)/', $pair, $matches)) {
                     $request->add($matches[1], urldecode($matches[2]));
                 } elseif ($pair) {
             return preg_replace('|/\./|', '/', $path);
         }
     }
-?>
\ No newline at end of file
+?>
index baecfa3..d1bacb6 100644 (file)
          *    @access protected
          */
         function _findHeader($compare) {
-            $lines = split("\r\n", $compare);
+            $lines = explode("\r\n", $compare);
             foreach ($lines as $line) {
                 if ($this->_testHeaderLine($line)) {
                     return $line;
          *    @access private
          */
         function _testHeaderLine($line) {
-            if (count($parsed = split(':', $line)) < 2) {
+            if (count($parsed = explode(':', $line)) < 2) {
                 return false;
             }
             list($header, $value) = $parsed;
                     sprintf($message, "Not expecting cookie [$name]"));
         }
     }
-?>
\ No newline at end of file
+?>
index 4c78598..09ec9d4 100644 (file)
@@ -43,7 +43,7 @@ if (!isset($_SESSION['suid'])) {
 /* cree le champs "auth" renvoye au Groupe X */
 function gpex_make_auth($chlg, $privkey, $datafields) {
     global $globals;
-    $fieldarr = split(",",$datafields);
+    $fieldarr = explode(",",$datafields);
     $tohash   = "1$chlg$privkey";
 
     while (list(,$val) = each($fieldarr)) {
@@ -65,7 +65,7 @@ function gpex_make_auth($chlg, $privkey, $datafields) {
 function gpex_make_params($chlg, $privkey, $datafields) {
     global $globals;
     $params   = "&auth=".gpex_make_auth($chlg, $privkey, $datafields);
-    $fieldarr = split(",",$datafields);
+    $fieldarr = explode(",",$datafields);
     while (list(,$val) = each($fieldarr)) {
         if (isset($_SESSION[$val])) {
             $params .= "&$val=".$_SESSION[$val];
index 1710f79..ce6e7b2 100644 (file)
@@ -66,7 +66,7 @@ L'
 } elseif (Post::has('email')) {
     $email = valide_email(Post::get('email'));
 
-    list(,$fqdn) = split('@', $email);
+    list(,$fqdn) = explode('@', $email);
     $fqdn = strtolower($fqdn);
     if ($fqdn == 'polytechnique.org' || $fqdn == 'melix.org' || $fqdn == 'm4x.org' || $fqdn == 'melix.net') {
         $page->assign('neuneu', true);
index cff20d9..61e0710 100644 (file)
@@ -49,7 +49,7 @@ $res = $globals->xdb->query(
         $forlife.'@'.$globals->mail->domain, $forlife.'@'.$globals->mail->domain2);
 $melix = $res->fetchOneCell();
 if ($melix) {
-    list($melix) = split('@', $melix);
+    list($melix) = explode('@', $melix);
     $page->assign('melix',$melix);
 }
 
index 97638fe..8021c65 100644 (file)
@@ -46,7 +46,7 @@ function getList($offset,$limit)
 
     $membres = Array();
     foreach ($members as $member) {
-        list($m) = split('@',$member[1]);
+        list($m) = explode('@',$member[1]);
         $res = $globals->xdb->query("SELECT  prenom,IF(nom_usage='', nom, nom_usage) AS nom, promo, a.alias AS forlife
                                        FROM  auth_user_md5 AS u
                                  INNER JOIN  aliases AS a ON u.user_id = a.id
index 237989b..f24329f 100644 (file)
@@ -22,7 +22,7 @@
 require_once('xorg.inc.php');
 require_once('webservices/manageurs.server.inc.php');
 
-$ips = array_flip(split(' ',$globals->manageurs->authorized_ips));
+$ips = array_flip(explode(' ',$globals->manageurs->authorized_ips));
 if($ips && isset($ips[$_SERVER['REMOTE_ADDR']])){
   $server = xmlrpc_server_create();
 
index 4d438c7..55fca23 100644 (file)
@@ -45,7 +45,7 @@ function list_sort_owners(&$members, $tri_promo = true) {
     $membres = Array();
     
     foreach($members as $mem) {
-        list($m, $dom) = split('@',$mem);
+        list($m, $dom) = explode('@',$mem);
         if ($dom == $globals->mail->domain || $dom == $globals->mail->domain2) {
             $res = $globals->xdb->query('SELECT  prenom,IF(nom_usage="", nom, nom_usage), promo
                                            FROM  auth_user_md5 AS u
index 63e0b2e..9e960d3 100644 (file)
@@ -479,7 +479,7 @@ function subscribe_nl($uid=-1)
  
 function justify($text,$n)
 {
-    $arr = split("\n",wordwrap($text,$n));
+    $arr = explode("\n",wordwrap($text,$n));
     $arr = array_map('trim',$arr);
     $res = '';
     foreach ($arr as $key => $line) {
index 7f440e0..8f4fa6a 100644 (file)
@@ -87,7 +87,7 @@ function get_user_login($data, $get_forlife = false) {
         $data = $data.'@'.$globals->mail->domain;
     }
     
-    list($mbox, $fqdn) = split('@', $data);
+    list($mbox, $fqdn) = explode('@', $data);
     if ($fqdn == $globals->mail->domain || $fqdn == $globals->mail->domain2) {
 
         $res = $globals->xdb->query("SELECT  a.alias
@@ -108,7 +108,7 @@ function get_user_login($data, $get_forlife = false) {
                                  INNER JOIN  virtual USING(vid)
                                       WHERE  alias={?}", $mbox.'@'.$globals->mail->alias_dom);
         if ($redir = $res->fetchOneCell()) {
-            list($alias) = split('@', $redir);
+            list($alias) = explode('@', $redir);
         } else {
             $page->trig("il n'y a pas d'utilisateur avec cet alias");
             $alias = false;
index 9380a79..f1f05d6 100644 (file)
@@ -45,7 +45,7 @@ function get_all_redirects($membres, $mls, &$client)
     foreach ($mls as $ml) {
         if (list(,$members) = $client->get_members($ml)) {
             foreach ($members as $mem) {
-                list($m, $dom) = split('@',$mem[1]);
+                list($m, $dom) = explode('@',$mem[1]);
                 if ($dom == $globals->mail->domain || $dom == $globals->mail->domain2) {
                     $res = $globals->xdb->query('SELECT  prenom, nom, FIND_IN_SET("femme", u.flags) AS sexe
                                                    FROM  auth_user_md5 AS u