summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b6c6382)
raw | patch | inline | side by side (parent: b6c6382)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 26 Jan 2010 09:40:08 +0000 (09:40 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 26 Jan 2010 09:40:08 +0000 (09:40 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15301 594d385d-05f5-0310-b6e9-bd551577e9d8
index 8b7852860eba9a77cccd7761a7b2d72eb56efce3..ebae5e52f7393fd19fcd7bf03632e85fdbd6fac5 100644 (file)
--- a/gosa-core/html/index.php
+++ b/gosa-core/html/index.php
@@ -295,7 +295,7 @@ if (($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])) || $htacces
$ok= true;
if (!$htaccess_authenticated){
$username= $_POST["username"];
- if (!ereg("^[@A-Za-z0-9_.-]+$", $username)){
+ if (!preg_match("/^[@A-Za-z0-9_.-]+$/", $username)){
$message= _("Please specify a valid username!");
$ok= false;
} elseif (mb_strlen($_POST["password"], 'UTF-8') == 0){
index 17acd751de48a23cee5c39ccfc25359b2f49db2b..1f2baab3e41cfef1fa6d308329bb6b7b27c4fcd6 100644 (file)
} else {
$basedn = LDAP::convert($basedn);
}
- return(ereg_replace("[^,]*[,]*[ ]*(.*)", "\\1", $basedn));
+ return(preg_replace("/[^,]*[,]*[ ]*(.*)/", "$1", $basedn));
}
/* Append lines ... */
if(!empty($tmp2)) {
/* check if we need base64_decode for this line */
- if(ereg("::",$tmp2))
+ if(strstr($tmp2, "::") !== false)
{
$encoded = explode("::",$entry);
$attr = trim($encoded[0]);
diff --git a/gosa-core/include/utils/excel/class.writeexcel_formula.inc.php b/gosa-core/include/utils/excel/class.writeexcel_formula.inc.php
index 79a1129acf6b77cea97912a4f7d5943c3207c1c2..f761b74e30a6298caab320ec4b1a6674372c30b4 100644 (file)
default:
// if it's a reference
if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?[0-9]+$/',$token) and
- !ereg("[0-9]",$this->_lookahead) and
+ !preg_match("/[0-9]/",$this->_lookahead) and
($this->_lookahead != ':') and ($this->_lookahead != '.') and
($this->_lookahead != '!')) {
return $token;
}
// If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1)
elseif (preg_match("/^[A-Za-z0-9_]+(\:[A-Za-z0-9_]+)?\![A-Ia-i]?[A-Za-z][0-9]+$/",$token) and
- !ereg("[0-9]",$this->_lookahead) and
+ !preg_match("/[0-9]/",$this->_lookahead) and
($this->_lookahead != ':') and ($this->_lookahead != '.')) {
return $token;
}
// if it's a range (A1:A2)
elseif (preg_match("/^(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+:(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+$/",$token) and
- !ereg("[0-9]",$this->_lookahead)) {
+ !preg_match("/[0-9]/",$this->_lookahead)) {
return $token;
}
// if it's a range (A1..A2)
elseif (preg_match("/^(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+\.\.(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+$/",$token) and
- !ereg("[0-9]",$this->_lookahead)) {
+ !preg_match("/[0-9]/",$this->_lookahead)) {
return $token;
}
// If it's an external range like Sheet1:Sheet2!A1:B2
elseif (preg_match("/^[A-Za-z0-9_]+(\:[A-Za-z0-9_]+)?\!([A-Ia-i]?[A-Za-z])?[0-9]+:([A-Ia-i]?[A-Za-z])?[0-9]+$/",$token) and
- !ereg("[0-9]",$this->_lookahead)) {
+ !preg_match("/[0-9]/",$this->_lookahead)) {
return $token;
}
// If it's an external range like 'Sheet1:Sheet2'!A1:B2
elseif (preg_match("/^'[A-Za-z0-9_ ]+(\:[A-Za-z0-9_ ]+)?'\!([A-Ia-i]?[A-Za-z])?[0-9]+:([A-Ia-i]?[A-Za-z])?[0-9]+$/",$token) and
- !ereg("[0-9]",$this->_lookahead)) {
+ !preg_match("/[0-9]/",$this->_lookahead)) {
return $token;
}
// If it's a number (check that it's not a sheet name or range)
return $token;
}
// If it's a string (of maximum 255 characters)
- elseif (ereg("^\"[^\"]{0,255}\"$",$token)) {
+ elseif (preg_match("/^\"[^\"]{0,255}\"$/",$token)) {
return $token;
}
// if it's a function call
- elseif (eregi("^[A-Z0-9\xc0-\xdc\.]+$",$token) and ($this->_lookahead == "(")) {
+ elseif (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/i",$token) and ($this->_lookahead == "(")) {
return $token;
}
return '';
*/
function _expression()\r {
// If it's a string return a string node
- if (ereg("^\"[^\"]{0,255}\"$", $this->_current_token))\r {
+ if (preg_match("/^\"[^\"]{0,255}\"$/", $this->_current_token))\r {
$result = $this->_createTree($this->_current_token, '', '');
$this->_advance();
return $result;
$result = $this->_createTree($this->_current_token, '', '');
$this->_advance();
return $result;
- }\r elseif (eregi("^[A-Z0-9\xc0-\xdc\.]+$",$this->_current_token))\r {
+ }\r elseif (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/i",$this->_current_token))\r {
// if it's a function call
$result = $this->_func();
return $result;
diff --git a/gosa-plugins/mail/personal/mail/sieve/class_semantics.inc b/gosa-plugins/mail/personal/mail/sieve/class_semantics.inc
index 1c00051c052bb1f477b3eead6c19f9433e7ce445..8c6d05f026c17d26528b2bc09533dee75848e571 100644 (file)
}
// Check if command may appear here
- if (!ereg($this->s_['valid_after'], $prev))
+ if (strstr($prev, $this->s_['valid_after'] === false))
{
# $this->message = 'line '. $line .': "'. $this->command_ .'" may not appear after "'. $prev .'"';
# return false;
diff --git a/gosa-plugins/mail/personal/mail/sieve/class_sieve.inc b/gosa-plugins/mail/personal/mail/sieve/class_sieve.inc
index 22b02e48aa231a0dd0e09e8905f69ca3d4f581a1..cab0fdd34673edd85c877098d44a160b1f0089d5 100644 (file)
//response. They repsond as follows: "Cyrus timsieved v1.0.0" "SASL={PLAIN,........}"
//So, if we see IMLEMENTATION in the first line, then we are done.
- if(ereg("IMPLEMENTATION",$this->line))
+ if(strstr($this->line, "IMPLEMENTATION"))
{
//we're on the Cyrus V2 sieve server
while(sieve::status($this->line) == F_DATA){