Ticket #1745: split_removal.patch
| File split_removal.patch, 6.6 kB (added by openhaus, 2 years ago) |
|---|
-
lib/SGL/Config.php
old new 149 149 { 150 150 $ret = false; 151 151 if (is_string($key) && is_scalar($value)) { 152 $aKeys = split('\.', trim($key));152 $aKeys = preg_split('/\./', trim($key)); 153 153 154 154 // it's a static call 155 155 if (isset($aKeys[0]) && isset($aKeys[1])) { … … 455 455 if (empty($str)) { 456 456 return false; 457 457 } 458 $aSplitResult = split('\^', $str);458 $aSplitResult = preg_split('/\^/', $str); 459 459 $aParams = array( 460 460 'moduleName' => null, 461 461 'managerName' => null, -
lib/SGL/HtmlRenderer/SmartyStrategy.php
old new 92 92 { 93 93 if (!is_readable($resourceName)) { 94 94 // parse module_name 95 list($moduleName, $templateName) = split('/', $resourceName);95 list($moduleName, $templateName) = preg_split('#/#', $resourceName); 96 96 $arr = array($moduleName, $templateName); 97 97 $newResourceName = $oSmarty->template_dir . '/' . join('/', $arr); 98 98 if (file_exists($newResourceName)) { -
modules/s9ywrapper/classes/BlogMgr.php
old new 78 78 SGL::logMessage(null, PEAR_LOG_DEBUG); 79 79 80 80 require_once 'HTTP/Request.php'; 81 $phpSelfParts = split('\?', $_SERVER['PHP_SELF']);81 $phpSelfParts = preg_split('(/\?/', $_SERVER['PHP_SELF']); 82 82 $s9yUri = SGL_BASE_URL . '/serendipity/index.php?'.@$phpSelfParts[1]; 83 83 $req = &new HTTP_Request($s9yUri); 84 84 if ($_POST) { -
modules/randommsg/classes/RndMsgMgr.php
old new 146 146 if ($input->msgUpload) { 147 147 $aLines = $this->file2($input->msgFileTmpName); 148 148 } else { 149 $aLines = split($this->crlf, $input->addMsgsText);149 $aLines = preg_split("/".$this->crlf."/", $input->addMsgsText); 150 150 } 151 151 $success = true; 152 152 foreach ($aLines as $rndmsg) { -
modules/navigation/classes/NavigationDAO.php
old new 217 217 } 218 218 // split off anchor if exists 219 219 if (stristr($section['resource_uri'], '#')) { 220 list(,$anchor) = split("#", $section['resource_uri']);220 list(,$anchor) = preg_split('/#/', $section['resource_uri']); 221 221 $section['anchor'] = $anchor; 222 222 } 223 223 } … … 545 545 // intercept a list of constants occuring in quotes, 546 546 // ie 'perms' => "SGL_GUEST, SGL_MEMBER, SGL_ADMIN", 547 547 if (is_string($section['perms'])) { 548 $aConstants = split(',', $section['perms']);548 $aConstants = preg_split('/,/', $section['perms']); 549 549 if (is_array($aConstants)) { 550 550 $aPerms = array(); 551 551 foreach ($aConstants as $myconstant) { … … 626 626 $section['resource_uri'] = 'uriAlias:' . $aliasId.':'.$section['resource_uri']; 627 627 } 628 628 } else { 629 $this->deleteAliasBySectionId($section['section_id']); 629 $this->deleteAliasBySectionId($section['section_id']); 630 630 } 631 631 632 632 // update translations -
modules/navigation/classes/SimpleDriver.php
old new 654 654 // extract anchor and place at end if exists 655 655 if (stristr($url, '#')) { 656 656 $anchorStart = strpos($url, '#'); 657 list(,$anchorFragment) = split('#', $url);657 list(,$anchorFragment) = preg_split('/#/', $url); 658 658 $anchorOffset = (strpos($anchorFragment, '&')) + 1; 659 659 $anchorEnd = $anchorStart + $anchorOffset; 660 660 $namedAnchor = substr($url, $anchorStart, $anchorOffset); -
modules/guestbook/classes/Output.php
old new 38 38 // +---------------------------------------------------------------------------+ 39 39 // $Id: Output.php,v 1.0 2006/07/01 00:26:16 demian Exp $ 40 40 41 class GuestbookOutput 41 class GuestbookOutput 42 42 { 43 43 44 44 /** … … 46 46 * Ex: user@domain.com => <span>user</span>@<!-- -->domain.com 47 47 * 48 48 * @access public 49 * @param string $email 49 * @param string $email 50 50 * @return string $email ofucated 51 51 */ 52 52 function emailObfuscator($email) 53 53 { 54 SGL::logMessage(null, PEAR_LOG_DEBUG); 55 54 SGL::logMessage(null, PEAR_LOG_DEBUG); 55 56 56 $email = str_replace('.','.',$email); // Replace . with . 57 $aEmail = split('@',$email);57 $aEmail = preg_split('/@/',$email); 58 58 $data = '<span>'.$aEmail[0].'</span>@<!-- -->'.$aEmail[1]; 59 60 return $data; 59 60 return $data; 61 61 } 62 62 } 63 63 ?> -
modules/user/classes/RoleMgr.php
old new 355 355 function _parsePermsString($sPerms) 356 356 { 357 357 SGL::logMessage(null, PEAR_LOG_DEBUG); 358 $aTmpPerms = split(':', $sPerms);358 $aTmpPerms = preg_split('/:/', $sPerms); 359 359 if (count($aTmpPerms) > 0) { 360 360 array_pop($aTmpPerms); 361 361 $aPerms = array(); 362 362 foreach ($aTmpPerms as $perm) { 363 363 // chop at caret 364 list($permName, $permId) = split('\^', $perm);364 list($permName, $permId) = preg_split('/\^/', $perm); 365 365 $aPerms[$permId] = $permName; 366 366 } 367 367 } else {
