diff --git a/phpgwapi/inc/class.egw_db.inc.php b/phpgwapi/inc/class.egw_db.inc.php index 39214135df..ab5bec80ff 100644 --- a/phpgwapi/inc/class.egw_db.inc.php +++ b/phpgwapi/inc/class.egw_db.inc.php @@ -1630,7 +1630,7 @@ $sql = "SELECT $cols FROM $table $join"; // if we have a where clause, we need to add it together with the WHERE statement, if thats not in the join - if ($where) $sql .= @strstr($join,"WHERE") ? ' AND ('.$where.')' : ' WHERE '.$where; + if ($where) $sql .= (strpos($join,"WHERE")!==false) ? ' AND ('.$where.')' : ' WHERE '.$where; if ($append) $sql .= ' '.$append; diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index 614295cc9a..c54be2d011 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -111,7 +111,7 @@ class html { if (!$this->wz_tooltip_included) { - if (!strstr('wz_tooltip',$GLOBALS['egw_info']['flags']['need_footer'])) + if (strpos('wz_tooltip',$GLOBALS['egw_info']['flags']['need_footer'])===false) { $GLOBALS['egw_info']['flags']['need_footer'] .= ''."\n"; } @@ -324,8 +324,8 @@ class html $base_name.'['.$val.']','',($title ? 'title="'.$this->htmlspecialchars($title).'" ':''))."
\n"; } if ($style && substr($style,-1) != ';') $style .= '; '; - if (!strstr($style,'height')) $style .= 'height: '.(1.7*$multiple).'em; '; - if (!strstr($style,'width')) $style .= 'width: '.(4+$max_len*($max_len < 15 ? 0.65 : 0.55)).'em; '; + if (strpos($style,'height')===false) $style .= 'height: '.(1.7*$multiple).'em; '; + if (strpos($style,'width')===false) $style .= 'width: '.(4+$max_len*($max_len < 15 ? 0.65 : 0.55)).'em; '; $style .= 'background-color: white; overflow: auto; border: lightgray 2px inset;'; return $this->div($html,$options,'',$style); @@ -432,7 +432,7 @@ class html case 'mozilla': return $this->ua_version >= 1.3; default: - return False; + return true;//False; } } @@ -461,7 +461,7 @@ class html $GLOBALS['egw']->js = CreateObject('phpgwapi.javascript'); } - if (!@strstr($GLOBALS['egw_info']['flags']['java_script'],'tinyMCE')) + if (strpos($GLOBALS['egw_info']['flags']['java_script'],'tinyMCE')===false) { $GLOBALS['egw']->js->validate_file('tiny_mce','tiny_mce'); } @@ -538,7 +538,7 @@ class html $tab2a .= ',separator,insertdate,inserttime'; break; default: - if(strstr($plugin,'=')) + if(strpos($plugin,'=')!==false) { $init .= ','. str_replace('=',':',$plugin); } @@ -705,7 +705,7 @@ class html $label = lang($label); } if (($accesskey = strstr($label,'&')) && $accesskey[1] != ' ' && - (($pos = strpos($accesskey,';')) === False || $pos > 5)) + (($pos = strpos($accesskey,';')) === false || $pos > 5)) { $label_u = str_replace('&'.$accesskey[1],''.$accesskey[1].'',$label); $label = str_replace('&','',$label); @@ -1005,7 +1005,11 @@ class html $vars = $url; $url = '/index.php'; } - elseif (!strstr($url,'/') && count(explode('.',$url)) >= 3 && !(strstr($url,'mailto:') || strstr($url,'://') || strstr($url,'javascript:'))) + elseif (strpos($url,'/')===false && + count(explode('.',$url)) >= 3 && + !(strpos($url,'mailto:')!==false || + strpos($url,'://')!==false || + strpos($url,'javascript:')!==false)) { $url = "/index.php?menuaction=$url"; } diff --git a/phpgwapi/inc/class.jscalendar.inc.php b/phpgwapi/inc/class.jscalendar.inc.php index da1bdf485f..14d14c8283 100644 --- a/phpgwapi/inc/class.jscalendar.inc.php +++ b/phpgwapi/inc/class.jscalendar.inc.php @@ -44,7 +44,7 @@ class jscalendar $this->jscalendar_url = $GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/js/'.$path; $this->dateformat = $GLOBALS['egw_info']['user']['preferences']['common']['dateformat']; - if ($do_header && !@strstr($GLOBALS['egw_info']['flags']['java_script'],'jscalendar')) + if ($do_header && (strpos($GLOBALS['egw_info']['flags']['java_script'],'jscalendar')===false)) { $GLOBALS['egw_info']['flags']['java_script'] .= ' @@ -81,7 +81,7 @@ class jscalendar if ($year && $month && $day) { $date = adodb_date($this->dateformat,$ts = adodb_mktime(12,0,0,$month,$day,$year)); - if (strpos($this->dateformat,'M') !== False) + if (strpos($this->dateformat,'M') !== false) { $short = lang(adodb_date('M',$ts)); // check if we have a translation of the short-cut if (substr($short,-1) == '*') // if not generate one by truncating the translation of the long name diff --git a/phpgwapi/inc/class.nextmatchs.inc.php b/phpgwapi/inc/class.nextmatchs.inc.php index 5f40f8dadb..1d08b9ea0c 100644 --- a/phpgwapi/inc/class.nextmatchs.inc.php +++ b/phpgwapi/inc/class.nextmatchs.inc.php @@ -399,7 +399,7 @@ // If they place a '"' in their search, it will mess everything up // Our only option is to remove it - if(strstr($_query,'"')) + if(strpos($_query,'"')!==false) { $_query = str_replace('"','',$_query); }