Changeset 5934
- Timestamp:
- 04/12/12 15:18:08 (12 years ago)
- Location:
- trunk
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/csv_import.php
r5915 r5934 58 58 $PSep = '||'; // Pattern-Separator, separats the pattern-replacement-pairs in trans 59 59 $ASep = '|>'; // Assignment-Separator, separats pattern and replacesment 60 $VPre = '|#'; // Value-Prefix, is expanded to \ for ereg_replace60 $VPre = '|#'; // Value-Prefix, is expanded to \ for preg_replace 61 61 $CPre = '|['; $CPreReg = '\|\['; // |{csv-fieldname} is expanded to the value of the csv-field 62 62 $CPos = ']'; $CPosReg = '\]'; // if used together with @ (replacement is eval-ed) value gets autom. quoted … … 244 244 "First example: <b>1${ASep}private${PSep}public</b><br>". 245 245 "This will translate a '1' in the CVS field to 'private' and everything else to 'public'.<p>". 246 "Patterns as well as the replacement can be regular expressions (the replacement is done via ereg_replace). ".246 "Patterns as well as the replacement can be regular expressions (the replacement is done via preg_replace). ". 247 247 "If, after all replacements, the value starts with an '@' the whole value is eval()'ed, so you ". 248 248 "may use all php, phpgw plus your own functions. This is quiet powerfull, but <u>circumvents all ACL</u>.<p>". … … 375 375 if (preg_match("/$pattern/",$val)) 376 376 { 377 // echo "<p>csv_idx='$csv_idx',info='$info',trans_csv=".print_r($trans_csv).", ereg_replace('$pattern','$replace','$val') = ";378 $val = ereg_replace((string) $pattern,str_replace($VPre,'\\',$replace),(string) $val);377 // echo "<p>csv_idx='$csv_idx',info='$info',trans_csv=".print_r($trans_csv).",preg_replace("/$pattern/",'$replace','$val') = "; 378 $val = preg_replace((string) "/$pattern/",str_replace($VPre,'\\',$replace),(string) $val); 379 379 // echo "'$val'</p>"; 380 380 … … 462 462 { 463 463 // convert german DD.MM.YYYY format into ISO YYYY-MM-DD format 464 $values[$date] = ereg_replace('([0-9]{2}).([0-9]{2}).([0-9]{4})','\3-\2-\1',$values[$date]);464 $values[$date] = preg_replace('/([0-9]{2}).([0-9]{2}).([0-9]{4})/','\3-\2-\1',$values[$date]); 465 465 // remove fractures of seconds if present at the end of the string 466 466 if (preg_match('/(.*)\.[0-9]+/',$values[$date],$parts)) $values[$date] = $parts[1]; -
trunk/expressoAdmin1_2/inc/class.functions.inc.php
r5593 r5934 729 729 730 730 /* Retira todos os caracteres que nao sejam 0-9 */ 731 $cpf = ereg_replace("[^0-9]", "", $cpf);731 $cpf = preg_replace('/[^0-9]/', '', $cpf); 732 732 733 733 /*Retorna falso se houver letras no cpf */ -
trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php
r5593 r5934 818 818 { 819 819 //retira caracteres que não são números. 820 $cpf = ereg_replace("[^0-9]", "", $cpf);820 $cpf = preg_replace('/[^0-9]/', '', $cpf); 821 821 822 822 $local_ldap_connection = ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']); -
trunk/expressoAdmin1_2/inc/class.login_algorithm_example.inc.php
r594 r5934 92 92 //Retira acentos e caracteres especiais, e substitui espaço em branco pelo caracter #. 93 93 private function formata_frase($frase) { 94 $frase = ereg_replace("[^a-zA-Z0-9#.]", "",94 $frase = preg_replace('/[^a-zA-Z0-9#.]/', '', 95 95 strtr($frase, "áàãâéêíóôõúüçÁÀÃÂÉÊÍÓÔÕÚÜÇ ", 96 96 "aaaaeeiooouucAAAAEEIOOOUUC#")); -
trunk/expressoMail1_2/inc/class.exporteml.inc.php
r5773 r5934 66 66 $subject = substr($subject, 0, 59); 67 67 68 //$subject = ereg_replace('/', '\'', $subject);68 //$subject = preg_replace('/\//', '\'', $subject); 69 69 $from = "áàâãäéèêëíìîïóòôõöúùûüç?\"!@#$%š&*()-=+Ž`[]{}~^,<>;:/?\\|¹²³£¢¬§ªº° .ÁÀÂÃÄÉÈÊËÍÌÎÏÓÒÔÕÖÚÙÛÜÇ"; 70 70 $to = "aaaaaeeeeiiiiooooouuuuc______________________________________________AAAAAEEEEIIIIOOOOOUUUUC"; -
trunk/expressoMail1_2/login_offline.php
r5912 r5934 339 339 if (count($GLOBALS['phpgw_info']['server']['login_logo_file']) > 0) { 340 340 $logo_config = $GLOBALS['phpgw_info']['server']['login_logo_file']; 341 $logo_config = ereg_replace("phpgwapi/","../phpgwapi/",$logo_config);341 $logo_config = preg_replace('/phpgwapi\//','../phpgwapi/',$logo_config); 342 342 $tmpl->set_var('logo_config',$logo_config); 343 343 } -
trunk/filemanager/inc/after_upload.php
r5327 r5934 28 28 $String = str_replace( "ç", "c", $String ); 29 29 $String = str_replace( "Ã", "C", $String ); 30 $String = ereg_replace( "[áà âã]", "a", $String );31 $String = ereg_replace( "[ÃÃÃÃ]", "A", $String );32 $String = ereg_replace( "[éÚê]", "e", $String );33 $String = ereg_replace( "[ÃÃÃ]", "E", $String );34 $String = ereg_replace( "[Ãìîï]", "i", $String );35 $String = ereg_replace( "[ÃÃÃ]", "I", $String );36 $String = ereg_replace( "[óòÎõ]", "o", $String );37 $String = ereg_replace( "[ÃÃÃÃ]", "O", $String );38 $String = ereg_replace( "[úùû]", "u", $String );39 $String = ereg_replace( "[ÃÃÃ]", "U", $String );30 $String = preg_replace( '/[áà âã]/', "a", $String ); 31 $String = preg_replace( '/[ÃÃÃÃ]/', "A", $String ); 32 $String = preg_replace( '/[éÚê]/', "e", $String ); 33 $String = preg_replace( '/[ÃÃÃ]/', "E", $String ); 34 $String = preg_replace( '/[Ãìîï]/', "i", $String ); 35 $String = preg_replace( '/[ÃÃÃ]/', "I", $String ); 36 $String = preg_replace( '/[óòÎõ]/', "o", $String ); 37 $String = preg_replace( '/[ÃÃÃÃ]/', "O", $String ); 38 $String = preg_replace( '/[úùû]/', "u", $String ); 39 $String = preg_replace( '/[ÃÃÃ]/', "U", $String ); 40 40 41 41 return $String; -
trunk/phpgwapi/inc/class.jscalendar.inc.php
r771 r5934 37 37 '<link rel="stylesheet" type="text/css" media="all" href="'.$this->jscalendar_url.'/calendar-win2k-cold-1.css" title="" /> 38 38 <script type="text/javascript" src="'.$this->jscalendar_url.'/calendar.js"></script> 39 <script type="text/javascript" src="'. ereg_replace('[?&]*click_history=[0-9a-f]*','',$GLOBALS['phpgw']->link('/phpgwapi/inc/jscalendar-setup.php')).'"></script>39 <script type="text/javascript" src="'.preg_replace('/[?&]*click_history=[0-9a-f]*/','',$GLOBALS['phpgw']->link('/phpgwapi/inc/jscalendar-setup.php')).'"></script> 40 40 '; 41 41 } -
trunk/phpgwapi/inc/class.ping.inc.php
r2 r5934 72 72 $packet_tx = str_replace(' packets transmitted','',$values[0]); 73 73 $packet_rx = str_replace(' packets received','',$values[1]); 74 $packet_loss = ereg_replace('% packet loss','',$values[2]);74 $packet_loss = preg_replace('/% packet loss/','',$values[2]); 75 75 76 76 $this->packet_tx = (int)str_replace(' ','',$packet_tx); -
trunk/phpgwapi/inc/class.schema_proc_mysql.inc.php
r2 r5934 242 242 /* The rest of this is used only for SQL->array */ 243 243 $colinfo = explode('(',$oProc->m_odb->f(1)); 244 $prec = ereg_replace('\).*','',$colinfo[1]);244 $prec = preg_replace('/\).*/','',$colinfo[1]); 245 245 $scales = explode(',',$prec); 246 246 -
trunk/phpgwapi/inc/class.schema_proc_pgsql.inc.php
r3614 r5934 378 378 @$oProc->m_odb->query($sql); 379 379 $oProc->m_odb->next_record(); 380 $indexfields = ereg_replace("^CREATE.+\(",'',$oProc->m_odb->f($num));381 $indexfields = ereg_replace("\)$",'',$indexfields);380 $indexfields = preg_replace('/^CREATE.+\(/','',$oProc->m_odb->f($num)); 381 $indexfields = preg_replace('/\)$/','',$indexfields); 382 382 $aIx = explode(',',$indexfields); 383 383 $i = 0; -
trunk/phpgwapi/inc/class.soap_server.inc.php
r5912 r5934 98 98 elseif(preg_match('/.php/',$action)) 99 99 { 100 $this->service = ereg_replace('"|/','',substr(strrchr($action,".php"),4,strlen(strrchr($action,"/"))));100 $this->service = preg_replace('/"|\//','',substr(strrchr($action,".php"),4,strlen(strrchr($action,"/")))); 101 101 } 102 102 $this->debug("got service: $this->service"); … … 116 116 117 117 // does method exist? 118 $test = ereg_replace("\.",'_',$this->methodname);118 $test = preg_replace('/\./','_',$this->methodname); 119 119 if(function_exists($test)) 120 120 { -
trunk/phpgwapi/inc/class.soapmsg.inc.php
r5921 r5934 121 121 //$this->debug(" w/ data $data"); 122 122 // strip headers here 123 //$clean_data = ereg_replace("\r\n","\n", $data);123 //$clean_data = preg_replace('/\r\n/','\n', $data); 124 124 if(preg_match('/^.*\r\n\r\n</',$data)) 125 125 { 126 126 $this->debug("found proper seperation of headers and document"); 127 127 $this->debug("getting rid of headers, stringlen: ".strlen($data)); 128 $clean_data = ereg_replace("^.*\r\n\r\n<","<", $data);128 $clean_data = preg_replace('/^.*\r\n\r\n</','<', $data); 129 129 $this->debug("cleaned data, stringlen: ".strlen($clean_data)); 130 130 } -
trunk/phpgwapi/inc/class.validator.inc.php
r5928 r5934 50 50 function strip_space ($text) 51 51 { 52 return ereg_replace("( |\n|\t|\r)+", '', $text);52 return preg_replace('/( |\n|\t|\r)+/', '', $text); 53 53 } 54 54 -
trunk/phpgwapi/inc/class.vcard.inc.php
r2 r5934 217 217 { 218 218 $field = split(';',$name); 219 $field[0] = ereg_replace("A\.",'',$field[0]);220 $field[0] = ereg_replace("B\.",'',$field[0]);221 $field[0] = ereg_replace("C\.",'',$field[0]);222 $field[0] = ereg_replace("D\.",'',$field[0]);219 $field[0] = preg_replace('/A\./','',$field[0]); 220 $field[0] = preg_replace('/B\./','',$field[0]); 221 $field[0] = preg_replace('/C\./','',$field[0]); 222 $field[0] = preg_replace('/D\./','',$field[0]); 223 223 $values = split(';',$value); 224 224 if($field[1]) -
trunk/phpgwapi/inc/xml_functions.inc.php
r5912 r5934 153 153 if (preg_match('/^([#a-zA-Z0-9]+);/', $top[$i], $regs)) 154 154 { 155 $op .= ereg_replace("^[#a-zA-Z0-9]+;",155 $op .= preg_replace('/^[#a-zA-Z0-9]+;/', 156 156 xmlrpc_lookup_entity($regs[1]), $top[$i]); 157 157 } … … 360 360 break; 361 361 case 'METHODNAME': 362 $GLOBALS['_xh'][$parser]['method']= ereg_replace("^[\n\r\t ]+", "", $GLOBALS['_xh'][$parser]['ac']);362 $GLOBALS['_xh'][$parser]['method']=preg_replace('/^[\n\r\t ]+/', '', $GLOBALS['_xh'][$parser]['ac']); 363 363 break; 364 364 case 'BOOLEAN': -
trunk/reports/inc/class.uireports_cota.inc.php
r5291 r5934 101 101 // Save query 102 102 $varorganizacao = explode(",",$contextsdn); 103 $varorganizacao_nome = trim(strtoupper( ereg_replace("ou=","",$varorganizacao[0])));104 $varorganizacao_nome = trim(strtoupper( ereg_replace("DC=","",$varorganizacao_nome)));103 $varorganizacao_nome = trim(strtoupper(preg_replace('/ou=/','',$varorganizacao[0]))); 104 $varorganizacao_nome = trim(strtoupper(preg_replace('/DC=/','',$varorganizacao_nome))); 105 105 $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 106 106 … … 137 137 if ( trim(strtoupper($varorganizacao_nome)) != trim(strtoupper($sector))) 138 138 { 139 $sectorok = trim(strtoupper( ereg_replace("dc=","",$sector)));140 $sectorok = trim(strtoupper( ereg_replace("DC=","",$sectorok)));139 $sectorok = trim(strtoupper(preg_replace('/dc=/',"",$sector))); 140 $sectorok = trim(strtoupper(preg_replace('/DC=/',"",$sectorok))); 141 141 $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 142 142 } … … 205 205 { 206 206 $grouplist = trim($_POST[setor]); 207 $grouplist = trim( ereg_replace("-","",$grouplist));207 $grouplist = trim(preg_replace('/-/','',$grouplist)); 208 208 $organizacao = trim($_POST[organizacao]); 209 209 $setordn = trim($_POST[setordn]); … … 514 514 515 515 $grouplist = trim($_POST[setor]); 516 $grouplist = trim( ereg_replace("-","",$grouplist));516 $grouplist = trim(preg_replace('/-/','',$grouplist)); 517 517 518 518 $setordn = trim($_POST[setordn]); -
trunk/reports/inc/class.uireports_logon.inc.php
r5291 r5934 67 67 68 68 $grouplist = trim($_POST[setor]); 69 $grouplist = trim( ereg_replace("-","",$grouplist));69 $grouplist = trim(preg_replace('/-/','',$grouplist)); 70 70 71 71 $setordn = trim($_POST[setordn]); … … 286 286 // Save query 287 287 $varorganizacao = explode(",",$contextsdn); 288 $varorganizacao_nome = trim(strtoupper( ereg_replace("ou=","",$varorganizacao[0])));289 $varorganizacao_nome = trim(strtoupper( ereg_replace("DC=","",$varorganizacao_nome)));288 $varorganizacao_nome = trim(strtoupper(preg_replace('/ou=/','',$varorganizacao[0]))); 289 $varorganizacao_nome = trim(strtoupper(preg_replace('/DC=/','',$varorganizacao_nome))); 290 290 $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 291 291 … … 329 329 if ( trim(strtoupper($varorganizacao_nome)) != trim(strtoupper($sector))) 330 330 { 331 $sectorok = trim(strtoupper( ereg_replace("dc=","",$sector)));332 $sectorok = trim(strtoupper( ereg_replace("dc=","",$sectorok)));331 $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sector))); 332 $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sectorok))); 333 333 $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 334 334 } … … 403 403 404 404 $grouplist = trim($_POST[setor]); 405 $grouplist = trim( ereg_replace("-","",$grouplist));405 $grouplist = trim(preg_replace('/-/','',$grouplist)); 406 406 $organizacao = trim($_POST[organizacao]); 407 407 $setordn = trim($_POST[setordn]); -
trunk/reports/inc/class.uireports_maillists.inc.php
r5291 r5934 66 66 67 67 $grouplist = trim($_POST[setor]); 68 $grouplist = trim( ereg_replace("-","",$grouplist));68 $grouplist = trim(preg_replace('/-/','',$grouplist)); 69 69 70 70 $setordn = trim($_POST[setordn]); … … 192 192 // Save query 193 193 $varorganizacao = explode(",",$contextsdn); 194 $varorganizacao_nome = trim(strtoupper( ereg_replace("ou=","",$varorganizacao[0])));195 $varorganizacao_nome = trim(strtoupper( ereg_replace("DC=","",$varorganizacao_nome)));194 $varorganizacao_nome = trim(strtoupper(preg_replace('/ou=/','',$varorganizacao[0]))); 195 $varorganizacao_nome = trim(strtoupper(preg_replace('/DC=/','',$varorganizacao_nome))); 196 196 $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 197 197 … … 235 235 if ( trim(strtoupper($varorganizacao_nome)) != trim(strtoupper($sector))) 236 236 { 237 $sectorok = trim(strtoupper( ereg_replace("dc=","",$sector)));238 $sectorok = trim(strtoupper( ereg_replace("dc=","",$sectorok)));237 $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sector))); 238 $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sectorok))); 239 239 $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 240 240 } … … 301 301 { 302 302 $grouplist = trim($_POST[setor]); 303 $grouplist = trim( ereg_replace("-","",$grouplist));303 $grouplist = trim(preg_replace('/-/','',$grouplist)); 304 304 $organizacao = trim($_POST[organizacao]); 305 305 $setordn = trim($_POST[setordn]); -
trunk/reports/inc/class.uireports_users.inc.php
r5291 r5934 66 66 67 67 $grouplist = trim($_POST[setor]); 68 $grouplist = trim( ereg_replace("-","",$grouplist));68 $grouplist = trim(preg_replace('/-/','',$grouplist)); 69 69 70 70 $setordn = trim($_POST[setordn]); … … 211 211 // Save query 212 212 $varorganizacao = explode(",",$contextsdn); 213 $varorganizacao_nome = trim(strtoupper( ereg_replace("ou=","",$varorganizacao[0])));214 $varorganizacao_nome = trim(strtoupper( ereg_replace("DC=","",$varorganizacao_nome)));213 $varorganizacao_nome = trim(strtoupper(preg_replace('/ou=/','',$varorganizacao[0]))); 214 $varorganizacao_nome = trim(strtoupper(preg_replace('/DC=/','',$varorganizacao_nome))); 215 215 $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 216 216 … … 254 254 if ( trim(strtoupper($varorganizacao_nome)) != trim(strtoupper($sector))) 255 255 { 256 $sectorok = trim(strtoupper( ereg_replace("dc=","",$sector)));257 $sectorok = trim(strtoupper( ereg_replace("dc=","",$sectorok)));256 $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sector))); 257 $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sectorok))); 258 258 $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 259 259 } … … 320 320 { 321 321 $grouplist = trim($_POST[setor]); 322 $grouplist = trim( ereg_replace("-","",$grouplist));322 $grouplist = trim(preg_replace('/-/','',$grouplist)); 323 323 $organizacao = trim($_POST[organizacao]); 324 324 $setordn = trim($_POST[setordn]); -
trunk/reports/inc/class.uireports_usersgroups.inc.php
r5291 r5934 66 66 67 67 $grouplist = trim($_POST[setor]); 68 $grouplist = trim( ereg_replace("-","",$grouplist));68 $grouplist = trim(preg_replace('/-/','',$grouplist)); 69 69 70 70 $setordn = trim($_POST[setordn]); … … 189 189 // Save query 190 190 $varorganizacao = explode(",",$contextsdn); 191 $varorganizacao_nome = trim(strtoupper( ereg_replace("ou=","",$varorganizacao[0])));192 $varorganizacao_nome = trim(strtoupper( ereg_replace("DC=","",$varorganizacao_nome)));191 $varorganizacao_nome = trim(strtoupper(preg_replace('/ou=/','',$varorganizacao[0]))); 192 $varorganizacao_nome = trim(strtoupper(preg_replace('/DC=/','',$varorganizacao_nome))); 193 193 $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 194 194 … … 232 232 if ( trim(strtoupper($varorganizacao_nome)) != trim(strtoupper($sector))) 233 233 { 234 $sectorok = trim(strtoupper( ereg_replace("dc=","",$sector)));235 $sectorok = trim(strtoupper( ereg_replace("dc=","",$sectorok)));234 $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sector))); 235 $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sectorok))); 236 236 $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 237 237 } … … 298 298 { 299 299 $grouplist = trim($_POST[setor]); 300 $grouplist = trim( ereg_replace("-","",$grouplist));300 $grouplist = trim(preg_replace('/-/','',$grouplist)); 301 301 $organizacao = trim($_POST[organizacao]); 302 302 $setordn = trim($_POST[setordn]); -
trunk/workflow/inc/class.BrowserInfo.inc.php
r5928 r5934 271 271 272 272 // clean up extraneous garbage that may be in the name 273 $bd['browser'] = ereg_replace("[^a-z,A-Z]", "", $bd['browser']);273 $bd['browser'] = preg_replace('/[^a-z,A-Z]/', '', $bd['browser']); 274 274 // clean up extraneous garbage that may be in the version 275 $bd['version'] = ereg_replace("[^0-9,.,a-z,A-Z]", "", $bd['version']);275 $bd['version'] = preg_replace('/[^0-9,.,a-z,A-Z]/', '', $bd['version']); 276 276 277 277 // check for AOL … … 280 280 $var = stristr($agent, "AOL"); 281 281 $var = explode(" ", $var); 282 $bd['aol'] = ereg_replace("[^0-9,.,a-z,A-Z]", "", $var[1]);282 $bd['aol'] = preg_replace('/[^0-9,.,a-z,A-Z]/', '', $var[1]); 283 283 } 284 284 -
trunk/workflow/inc/class.utils.php
r795 r5934 389 389 } 390 390 foreach ($jsEvents as $event => $action) 391 $scriptStr .= " $event=\"" . ereg_replace("\"", "'", $action) . "\"";391 $scriptStr .= " $event=\"" . preg_replace("/\"/", "'", $action) . "\""; 392 392 return sprintf("<a href=\"%s\"%s%s%s%s%s%s%s%s>%s</a>", htmlentities($url), 393 393 (!empty($name) ? " name=\"{$name}\"" : ""), -
trunk/workflow/inc/class.utils.string.php
r795 r5934 30 30 */ 31 31 function stripBlank($str, $replace=' ') { 32 return ereg_replace("[[:blank:]]{1,}", $replace, $str);32 return preg_replace('/[[:blank:]]{1,}/', $replace, $str); 33 33 } 34 34 … … 405 405 switch ($filterType) { 406 406 case 'alpha' : 407 return ( ereg_replace("[^a-zA-Z]", $replaceStr, $str));407 return (preg_replace('/[^a-zA-Z]/', $replaceStr, $str)); 408 408 case 'alphalower' : 409 return ( ereg_replace("[^a-z]", $replaceStr, $str));409 return (preg_replace('/[^a-z]/', $replaceStr, $str)); 410 410 case 'alphaupper' : 411 return ( ereg_replace("[^A-Z]", $replaceStr, $str));411 return (preg_replace('/[^A-Z]/', $replaceStr, $str)); 412 412 case 'num' : 413 return ( ereg_replace("[^0-9]", $replaceStr, $str));413 return (preg_replace('/[^0-9]/', $replaceStr, $str)); 414 414 case 'alphanum' : 415 return ( ereg_replace("[^0-9a-zA-Z]", $replaceStr, $str));415 return (preg_replace('/[^0-9a-zA-Z]/', $replaceStr, $str)); 416 416 case 'htmlentities' : 417 return ( ereg_replace("&[[:alnum:]]{0,};", $replaceStr, $str));417 return (preg_replace('/&[[:alnum:]]{0,};/', $replaceStr, $str)); 418 418 case 'blank' : 419 return ( ereg_replace("[[:blank:]]{1,}", $replaceStr, $str));419 return (preg_replace('/[[:blank:]]{1,}/', $replaceStr, $str)); 420 420 default : 421 421 return $str; … … 625 625 */ 626 626 function wrap($str, $num, $breakString="\n") { 627 $str = ereg_replace("([^\r\n])\r\n([^\r\n])", "\\1 \\2", $str);628 $str = ereg_replace("[\r\n]*\r\n[\r\n]*", "\r\n\r\n", $str);629 $str = ereg_replace("[ ]* [ ]*", ' ', $str);627 $str = preg_replace('/([^\r\n])\r\n([^\r\n])/', "\\1 \\2", $str); 628 $str = preg_replace('/[\r\n]*\r\n[\r\n]*/', "\r\n\r\n", $str); 629 $str = preg_replace('/[ ]* [ ]*/', ' ', $str); 630 630 $str = stripslashes($str); 631 631 $processed = ''; -
trunk/workflow/inc/phplot/phplot.php
r5928 r5934 941 941 else { 942 942 // Split the text by its lines, and count them 943 $which_text = ereg_replace("\r", "", $which_text);943 $which_text = preg_replace('/\r/', '', $which_text); 944 944 $str = split("\n", $which_text); 945 945 $nlines = count($str);
Note: See TracChangeset
for help on using the changeset viewer.