mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 10:53:39 +01:00
fixing PHP5.3 deprecated warnings
This commit is contained in:
parent
74fecd8e63
commit
3c23ce30e0
@ -92,7 +92,7 @@ function cat_id($cats)
|
||||
return '';
|
||||
}
|
||||
$ids = array();
|
||||
foreach(split(' *[,;] *',$cats) as $cat)
|
||||
foreach(preg_split('/ *[,;] */',$cats) as $cat)
|
||||
{
|
||||
if (is_numeric($cat) && $GLOBALS['egw']->categories->id2name($cat) != '--')
|
||||
{
|
||||
@ -332,8 +332,8 @@ switch($_POST['action'])
|
||||
{
|
||||
if(ereg((string) $pattern,$val))
|
||||
{
|
||||
// echo "<p>csv_idx='$csv_idx',info='$addr',trans_csv=".print_r($trans_csv).",ereg_replace('$pattern','$replace','$val') = ";
|
||||
$val = ereg_replace((string) $pattern,str_replace($VPre,'\\',$replace),(string) $val);
|
||||
// echo "<p>csv_idx='$csv_idx',info='$addr',trans_csv=".print_r($trans_csv).",preg_replace('/$pattern/','$replace','$val') = ";
|
||||
$val = preg_replace('/'.(string) $pattern.'/',str_replace($VPre,'\\',$replace),(string) $val);
|
||||
// echo "'$val'</p>";
|
||||
|
||||
$reg = $CPreReg.'([a-zA-Z_0-9]+)'.$CPosReg;
|
||||
@ -379,7 +379,7 @@ switch($_POST['action'])
|
||||
if (isset($values[$date]) && !is_numeric($date))
|
||||
{
|
||||
// convert german DD.MM.YYYY format into ISO YYYY-MM-DD format
|
||||
$values[$date] = ereg_replace('([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})','\3-\2-\1',$values[$date]);
|
||||
$values[$date] = preg_replace('/([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})/','\3-\2-\1',$values[$date]);
|
||||
// remove fractures of seconds if present at the end of the string
|
||||
if (ereg('(.*)\.[0-9]+',$values[$date],$parts)) $values[$date] = $parts[1];
|
||||
$values[$date] = strtotime($values[$date]);
|
||||
|
@ -53,7 +53,7 @@ class addressbook_groupdav extends groupdav_handler
|
||||
{
|
||||
parent::__construct($app,$debug,$base_uri);
|
||||
|
||||
$this->bo =& new addressbook_bo();
|
||||
$this->bo = new addressbook_bo();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -290,7 +290,7 @@ class addressbook_groupdav extends groupdav_handler
|
||||
*/
|
||||
private function _get_handler()
|
||||
{
|
||||
$handler =& new addressbook_vcal();
|
||||
$handler = new addressbook_vcal();
|
||||
$handler->setSupportedFields('GroupDAV',$this->agent);
|
||||
|
||||
return $handler;
|
||||
|
@ -937,7 +937,7 @@ class addressbook_ldap
|
||||
return $this->_error(__LINE__); // baseDN does NOT exist and we cant/wont create it
|
||||
}
|
||||
// create a admin connection to add the needed DN
|
||||
$adminLDAP =& new ldap;
|
||||
$adminLDAP = new ldap;
|
||||
$adminDS = $adminLDAP->ldapConnect();
|
||||
|
||||
list(,$ou) = explode(',',$baseDN);
|
||||
|
@ -35,7 +35,7 @@ class addressbook_merge // extends bo_merge
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
$this->contacts =& new addressbook_bo();
|
||||
$this->contacts = new addressbook_bo();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -159,7 +159,7 @@ class addressbook_merge // extends bo_merge
|
||||
function calendar_replacements($id,$last_event_too=false)
|
||||
{
|
||||
require_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.calendar_boupdate.inc.php');
|
||||
$calendar =& new calendar_boupdate();
|
||||
$calendar = new calendar_boupdate();
|
||||
|
||||
// next events
|
||||
$events = $calendar->search(array(
|
||||
|
@ -217,7 +217,7 @@ class addressbook_so
|
||||
if($GLOBALS['egw_info']['server']['contact_repository'] == 'ldap' && $this->account_repository == 'ldap')
|
||||
{
|
||||
$this->contact_repository = 'ldap';
|
||||
$this->somain =& new addressbook_ldap();
|
||||
$this->somain = new addressbook_ldap();
|
||||
|
||||
if ($this->user) // not set eg. in setup
|
||||
{
|
||||
@ -236,7 +236,7 @@ class addressbook_so
|
||||
{
|
||||
$this->contact_repository = 'sql-ldap';
|
||||
}
|
||||
$this->somain =& new addressbook_sql();
|
||||
$this->somain = new addressbook_sql();
|
||||
|
||||
if ($this->user) // not set eg. in setup
|
||||
{
|
||||
|
@ -516,7 +516,7 @@ class addressbook_sql extends so_sql
|
||||
if ($this->db->select($this->lists_table,'list_id',array(
|
||||
'list_name' => $name,
|
||||
'list_owner' => $owner,
|
||||
),__LINE__,__FILE__)->fetchSingle())
|
||||
),__LINE__,__FILE__)->fetchColumn())
|
||||
{
|
||||
return true; // return existing list-id
|
||||
}
|
||||
@ -551,7 +551,7 @@ class addressbook_sql extends so_sql
|
||||
if ($this->db->select($this->ab2list_table,'list_id',array(
|
||||
'contact_id' => $contact,
|
||||
'list_id' => $list,
|
||||
),__LINE__,__FILE__)->fetchSingle())
|
||||
),__LINE__,__FILE__)->fetchColumn())
|
||||
{
|
||||
return true; // no need to insert it, would give sql error
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ class addressbook_tracking extends bo_tracking
|
||||
case 'copy':
|
||||
if ($data['is_contactform'])
|
||||
{
|
||||
return split(', ?',$data['email_contactform']);
|
||||
return preg_split('/, ?/',$data['email_contactform']);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -16,7 +16,7 @@ if ($GLOBALS['egw_info']['user']['apps']['addressbook'] &&
|
||||
|
||||
if (!(int) $days) $days = 1; // old pref
|
||||
|
||||
$contacts =& new addressbook_bo();
|
||||
$contacts = new addressbook_bo();
|
||||
|
||||
$month_start = date('*-m-*',$contacts->now_su);
|
||||
$bdays =& $contacts->search(array('bday' => $month_start),array('id','n_family','n_given','bday'),'n_given,n_family');
|
||||
|
@ -795,7 +795,7 @@ abstract class admin_cmd
|
||||
return admin_cmd::run_queued_jobs();
|
||||
}
|
||||
include_once(EGW_API_INC.'/class.asyncservice.inc.php');
|
||||
$async =& new asyncservice();
|
||||
$async = new asyncservice();
|
||||
|
||||
// we cant use this class as callback, as it's abstract and ExecMethod used by the async service instanciated the class!
|
||||
list($app) = explode('_',$class=$next['type']);
|
||||
|
@ -50,7 +50,7 @@ class admin_cmd_change_pw extends admin_cmd
|
||||
|
||||
if ($check_only) return true;
|
||||
|
||||
$auth =& new auth;
|
||||
$auth = new auth;
|
||||
|
||||
if (!$auth->change_password(null, $this->password, $account_id))
|
||||
{
|
||||
|
@ -56,7 +56,7 @@
|
||||
|
||||
if (ereg('@',$record['loginid']))
|
||||
{
|
||||
$t = split('@',$record['loginid']);
|
||||
$t = explode('@',$record['loginid']);
|
||||
$record['loginid'] = $t[0];
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
{
|
||||
if (ereg('@',$value['session_lid']))
|
||||
{
|
||||
$t = split('@',$value['session_lid']);
|
||||
$t = explode('@',$value['session_lid']);
|
||||
$session_lid = $t[0];
|
||||
}
|
||||
else
|
||||
|
@ -230,7 +230,7 @@ class customfields
|
||||
{
|
||||
foreach(explode("\n",$field['values']) as $line)
|
||||
{
|
||||
list($var,$value) = split('=',trim($line),2);
|
||||
list($var,$value) = explode('=',trim($line),2);
|
||||
$var = trim($var);
|
||||
$values[$var] = empty($value) ? $var : $value;
|
||||
}
|
||||
|
@ -1577,7 +1577,7 @@
|
||||
|
||||
function ajax_check_account_email($first,$last,$account_lid,$account_id,$email,$id)
|
||||
{
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
if (!$email)
|
||||
{
|
||||
$response->addAssign('email','value',$GLOBALS['egw']->common->email_address($first,$last,$account_lid));
|
||||
|
@ -108,7 +108,7 @@
|
||||
}
|
||||
}
|
||||
/* don't erase passwords, since we also don't print them */
|
||||
elseif(!ereg('passwd',$key) && !ereg('password',$key) && !ereg('root_pw',$key))
|
||||
elseif(strpos($key,'passwd') === false && strpos($key,'password') === false && strpos($key,'root_pw') === false)
|
||||
{
|
||||
unset($c->config_data[$key]);
|
||||
}
|
||||
@ -181,7 +181,7 @@
|
||||
case 'value':
|
||||
$newval = str_replace(' ','_',$newval);
|
||||
/* Don't show passwords in the form */
|
||||
if(ereg('passwd',$value) || ereg('password',$value) || ereg('root_pw',$value))
|
||||
if(strpos($value,'passwd') !== false || strpos($value,'password') !== false || strpos($value,'root_pw') !== false)
|
||||
{
|
||||
$t->set_var($value,'');
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ function cat_id($cats)
|
||||
return '';
|
||||
}
|
||||
|
||||
foreach(split('[,;]',$cats) as $cat)
|
||||
foreach(preg_split('/[,;]/',$cats) as $cat)
|
||||
{
|
||||
if (isset($cat2id[$cat]))
|
||||
{
|
||||
@ -374,8 +374,8 @@ case 'import':
|
||||
{
|
||||
if (ereg((string) $pattern,$val))
|
||||
{
|
||||
//echo "<p>csv_idx='$csv_idx',info='$info',trans_csv=".print_r($trans_csv).",ereg_replace('$pattern','$replace','$val') = ";
|
||||
$val = ereg_replace((string) $pattern,str_replace($VPre,'\\',$replace),(string) $val);
|
||||
//echo "<p>csv_idx='$csv_idx',info='$info',trans_csv=".print_r($trans_csv).",preg_replace('/$pattern/','$replace','$val') = ";
|
||||
$val = preg_replace('/'.(string) $pattern.'/',str_replace($VPre,'\\',$replace),(string) $val);
|
||||
//echo "'$val'";
|
||||
|
||||
$reg = $CPreReg.'([a-zA-Z_0-9 ]+)'.$CPosReg;
|
||||
@ -440,14 +440,14 @@ case 'import':
|
||||
if (isset($values[$date]) && !is_numeric($date))
|
||||
{
|
||||
// convert german DD.MM.YYYY format into ISO YYYY-MM-DD format
|
||||
$values[$date] = ereg_replace('([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})','\3-\2-\1',$values[$date]);
|
||||
$values[$date] = preg_replace('/([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})/','\3-\2-\1',$values[$date]);
|
||||
// remove fractures of seconds if present at the end of the string
|
||||
if (ereg('(.*)\.[0-9]+',$values[$date],$parts)) $values[$date] = $parts[1];
|
||||
$values[$date] = strtotime($values[$date]);
|
||||
}
|
||||
}
|
||||
// convert participants-names to user-id's
|
||||
$parts = $values['participants'] ? split('[,;]',$values['participants']) : array();
|
||||
$parts = $values['participants'] ? preg_split('/[,;]/',$values['participants']) : array();
|
||||
$values['participants'] = array();
|
||||
foreach($parts as $part_status)
|
||||
{
|
||||
|
216
doc/fix_depricated.php
Executable file
216
doc/fix_depricated.php
Executable file
@ -0,0 +1,216 @@
|
||||
#!/usr/bin/php -qC
|
||||
<?php
|
||||
/**
|
||||
* EGroupware - fix in 5.3 depricated (in 6 not longer existing) functions and constructs
|
||||
*
|
||||
* The depricated warnings fill up the log files, as they can not be swichted off in the logs.
|
||||
* The biggest issue are posix regular expressions (ereg, split, ereg_replace) and
|
||||
* php4 assignment of objects (specially new obj()) by reference.
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @author RalfBecker@outdoor-training.de
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
if (isset($_SERVER['HTTP_HOST'])) // security precaution: forbit calling as web-page
|
||||
{
|
||||
die('<h1>fix_depricated.php must NOT be called as web-page --> exiting !!!</h1>');
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix depricated stuff in a given file
|
||||
*
|
||||
* @param string $file filename
|
||||
* @param boolean $replace_file=false replace existing file if modifications are necessary, otherwise .php53 file is created
|
||||
* @return boolean false on error
|
||||
*/
|
||||
function fix_depricated($file,$replace_file=false)
|
||||
{
|
||||
$orig = $lines = file_get_contents($file);
|
||||
if ($lines === false) return false;
|
||||
global $prog;
|
||||
if (basename($file) == $prog) return true; // dont fix ourself ;-)
|
||||
|
||||
// PHP Deprecated: Assigning the return value of new by reference is deprecated
|
||||
if (preg_match('/= *& *new /m',$lines))
|
||||
{
|
||||
$lines = preg_replace('/= *& *new /','= new ',$lines);
|
||||
}
|
||||
// PHP Deprecated: Function split() is deprecated
|
||||
if (preg_match_all('/[= \t(]+spliti? *\\(("[^"]*"|\'[^\']*\'),/m',$lines,$matches))
|
||||
{
|
||||
$replace = array();
|
||||
//print_r($matches);
|
||||
foreach($matches[1] as $key => $pattern)
|
||||
{
|
||||
$full_pattern = $matches[0][$key];
|
||||
// single char --> just explode
|
||||
if (strlen($pattern) == 3 || strlen($pattern) == 4 && substr($pattern,0,2) == '"\\')
|
||||
{
|
||||
$replace[$full_pattern] = str_replace('split','explode',$full_pattern);
|
||||
}
|
||||
else
|
||||
{
|
||||
$preg_pattern = $pattern[0].'/'.str_replace('/','\\\\/',substr($pattern,1,-1)).'/'.$pattern[0];
|
||||
if (strpos($full_pattern,'spliti')) $preg_pattern = substr($preg_pattern,0,-1).'i'.$pattern[0];
|
||||
$replace[$full_pattern] = str_replace(array('spliti','split',$pattern),array('preg_split','preg_split',$preg_pattern),$full_pattern);
|
||||
}
|
||||
}
|
||||
//print_r($replace);
|
||||
$lines = strtr($lines,$replace);
|
||||
}
|
||||
// PHP Deprecated: Function ereg() is deprecated
|
||||
if (preg_match_all('/!?eregi? *\\(("[^"]+"[^,]*|\'[^\']+\'[^,]*), *(\$[A-Za-z0-9_]+)(, *\$[A-Za-z0-9_]+)?\)([ )&|]+)/m',$lines,$matches))
|
||||
{
|
||||
$replace = array();
|
||||
//print_r($matches);
|
||||
foreach($matches[1] as $key => $pattern)
|
||||
{
|
||||
$full_pattern = $matches[0][$key];
|
||||
$what = $matches[2][$key];
|
||||
|
||||
// simple existence check --> use strpos()
|
||||
if (preg_quote($pattern) == $pattern)
|
||||
{
|
||||
|
||||
$replace[$full_pattern] = (strpos($full_pattern,'eregi')!==false?'strposi':'strpos').'('.$what.','.$pattern.
|
||||
') '.($full_pattern[0]=='!'?'===':'!==').' false'.$matches[4][$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
// full ereg regular expression --> preg_match
|
||||
$preg_pattern = "'/'.".str_replace('/','\\\\/',$pattern).(strpos($full_pattern,'eregi') !== false ? ".'/i'" : ".'/'");
|
||||
$replace[$full_pattern] = str_replace(array('eregi','ereg',$pattern),array('preg_match','preg_match',$preg_pattern),$full_pattern);
|
||||
}
|
||||
}
|
||||
//print_r($replace);
|
||||
$lines = strtr($lines,$replace);
|
||||
}
|
||||
// PHP Deprecated: Function ereg_replace() is deprecated
|
||||
if (preg_match_all('/eregi?_replace *\\((".+"|\'.+\'|[^,]+), *(.+), *[\'s$].+\)[,; =]/m',$lines,$matches))
|
||||
{
|
||||
$replace = array();
|
||||
//print_r($matches);
|
||||
foreach($matches[1] as $key => $pattern)
|
||||
{
|
||||
$full_pattern = $matches[0][$key];
|
||||
$other = $matches[2][$key];
|
||||
|
||||
// simple replace --> use str_replace()
|
||||
if (preg_quote($pattern) == $pattern)
|
||||
{
|
||||
$replace[$full_pattern] = str_replace(array('eregi_replace','ereg_replace'),array('stri_replace','str_replace'),$full_pattern);
|
||||
}
|
||||
else
|
||||
{
|
||||
// full ereg regular expression --> preg_replace
|
||||
$preg_pattern = "'/'.".str_replace('/','\\\\/',$pattern).(strpos($full_pattern,'eregi') !== false ? ".'/i'" : ".'/'");
|
||||
$replace[$full_pattern] = str_replace(array('eregi_replace','ereg_replace',$pattern),
|
||||
array('preg_replace','preg_replace',$preg_pattern),$full_pattern);
|
||||
}
|
||||
}
|
||||
//print_r($replace);
|
||||
$lines = strtr($lines,$replace);
|
||||
}
|
||||
// remove extra '/' from regular expressions
|
||||
$lines = str_replace(array("'/'.'","'.'/'","'.'/i'"),array("'/","/'","/i'"),$lines);
|
||||
|
||||
// fix call to not longer existing PDO method $result->fetchSingle()
|
||||
$lines = str_replace('->fetchSingle(','->fetchColumn(',$lines);
|
||||
|
||||
if ($lines != $orig)
|
||||
{
|
||||
file_put_contents($file.'53',$lines);
|
||||
system('/usr/bin/php -l '.$file.'53',$ret);
|
||||
system('/usr/bin/diff -u '.$file.' '.$file.'53');
|
||||
if (!$ret && $replace_file)
|
||||
{
|
||||
unlink($file);
|
||||
rename($file.'53',$file);
|
||||
}
|
||||
return !$ret;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loop recursive through directory and call fix_depricated for each php file
|
||||
*
|
||||
* @param string $dir
|
||||
* @param boolean $replace_file=false replace existing file if modifications are necessary, otherwise .php53 file is created
|
||||
* @return boolean false on error
|
||||
*/
|
||||
function fix_depricated_recursive($dir,$replace_file=false)
|
||||
{
|
||||
if (!is_dir($dir)) return false;
|
||||
|
||||
foreach(scandir($dir) as $file)
|
||||
{
|
||||
if ($file == '.' || $file == '..') continue;
|
||||
|
||||
if (is_dir($dir.'/'.$file))
|
||||
{
|
||||
fix_depricated_recursive($dir.'/'.$file,$replace_file);
|
||||
}
|
||||
elseif(substr($file,-4) == '.php')
|
||||
{
|
||||
echo "\r".str_repeat(' ',100)."\r".$dir.'/'.$file.': ';
|
||||
fix_depricated($dir.'/'.$file,$replace_file);
|
||||
}
|
||||
}
|
||||
echo "\r".str_repeat(' ',100)."\r";
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Give usage
|
||||
*
|
||||
* @param string $error=null
|
||||
*/
|
||||
function usage($error=null)
|
||||
{
|
||||
global $prog;
|
||||
echo "Usage: $prog [--replace] [-h|--help] file or dir\n\n";
|
||||
if ($error) echo $error."\n\n";
|
||||
exit($error ? 1 : 0);
|
||||
}
|
||||
|
||||
$args = $_SERVER['argv'];
|
||||
$prog = basename(array_shift($args));
|
||||
|
||||
if (!$args) usage();
|
||||
|
||||
$replace_file = false;
|
||||
while(($arg = array_shift($args)))
|
||||
{
|
||||
switch($arg)
|
||||
{
|
||||
case '-h':
|
||||
case '--help':
|
||||
usage();
|
||||
break;
|
||||
|
||||
case '--replace':
|
||||
$replace_file = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
if ($args) // not last argument
|
||||
{
|
||||
usage("Unknown argument '$arg'!");
|
||||
}
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (!file_exists($arg)) usage("Error: $arg not found!");
|
||||
|
||||
if (!is_dir($arg))
|
||||
{
|
||||
fix_depricated($arg,$replace_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
fix_depricated_recursive($arg,$replace_file);
|
||||
}
|
@ -1,219 +0,0 @@
|
||||
#!/usr/bin/php -qC
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare - Tool to modernize the eGW code automaticaly *
|
||||
* http://www.eGroupWare.org *
|
||||
* Written and (c) by Ralf Becker <RalfBecker@outdoor-training.de> *
|
||||
* ------------------------------------------------------- *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU General Public License as published by the *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
error_reporting(E_ALL & ~ E_NOTICE);
|
||||
|
||||
// defaults
|
||||
$no_phpgw = $do_replace = false;
|
||||
$remove_space_indention = 2; // replace 2 space with a tab
|
||||
|
||||
while ($argc > 2)
|
||||
{
|
||||
switch($argv[1])
|
||||
{
|
||||
case '--no-phpgw':
|
||||
$no_phpgw = true;
|
||||
break;
|
||||
|
||||
case '--remove-space-indention':
|
||||
$remove_space_indention = (int) $argv[2];
|
||||
array_shift($argv);
|
||||
--$argc;
|
||||
break;
|
||||
|
||||
case '--replace':
|
||||
$do_replace = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
$argc = 0; // invalid parameter ==> break the loop and give usage message
|
||||
break;
|
||||
}
|
||||
array_shift($argv);
|
||||
--$argc;
|
||||
}
|
||||
|
||||
if ($argc != 2 || !file_exists($file = $argv[1]))
|
||||
{
|
||||
if ($argc == 2) echo "File '$file' not found !!!\n\n";
|
||||
echo "Usage: modernize.php [--no-phpgw] [--remove-space-indention N] [--replace] <filename>\n";
|
||||
echo "--no-phpgw dont change phpgw to egw, necessary for some API files\n";
|
||||
echo "--remove-space-indention N substitute every N space at the beginning of a line with a tab (default 2)\n";
|
||||
echo "--replace replaces the given file (plus creating a backup) instead of acting as filter\n\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($do_replace)
|
||||
{
|
||||
if (!is_writable($file) && !is_writable(dirname($file)))
|
||||
{
|
||||
echo "'$file' is NOT writeable !!!\n";
|
||||
exit;
|
||||
}
|
||||
$do_replace = $file;
|
||||
$file .= '.bak';
|
||||
if (is_writable(dirname($file)))
|
||||
{
|
||||
rename($do_replace,$file);
|
||||
}
|
||||
else // only file is writable not the directory, so we cant create a backup
|
||||
{
|
||||
$file = $do_replace;
|
||||
}
|
||||
ob_start();
|
||||
}
|
||||
|
||||
|
||||
// some code modernizations
|
||||
$modernize = array(
|
||||
// saves an unnecessary copy
|
||||
'= CreateObject' => '=& CreateObject',
|
||||
'= new' => '=& new',
|
||||
// php5 cloning of the DB object
|
||||
'= $GLOBALS[\'phpgw\']->db;' => '= clone($GLOBALS[\'egw\']->db);',
|
||||
'= $this->db;' => '= clone($this->db);',
|
||||
// remove windows lineends (CR)
|
||||
"\r" => '',
|
||||
);
|
||||
|
||||
foreach(array('GET','POST','SERVER','SESSION') as $name)
|
||||
{
|
||||
$modernize['$HTTP_'.$name.'_VARS'] = '$_'.$name;
|
||||
$modernize['$GLOBALS[\'HTTP_'.$name.'_VARS\']'] = '$_'.$name;
|
||||
$modernize['$GLOBALS["HTTP_'.$name.'_VARS"]'] = '$_'.$name;
|
||||
}
|
||||
|
||||
if (!$no_phpgw)
|
||||
{
|
||||
$modernize += array(
|
||||
// phpGW --> eGW
|
||||
// done now separate as it is case sensitve 'PHPGW_' => 'EGW_',
|
||||
'global $phpgw_info;' => '',
|
||||
'global $phpgw;' => '',
|
||||
'$GLOBALS[\'phpgw_info\']' => '$GLOBALS[\'egw_info\']',
|
||||
'$GLOBALS["phpgw_info"]' => '$GLOBALS[\'egw_info\']',
|
||||
'$phpgw_info[' => '$GLOBALS[\'egw_info\'][',
|
||||
'$GLOBALS[\'phpgw\']' => '$GLOBALS[\'egw\']',
|
||||
'$GLOBALS["phpgw"]' => '$GLOBALS[\'egw\']',
|
||||
'$phpgw->' => '$GLOBALS[\'egw\']->',
|
||||
'common->phpgw_header' => 'common->egw_header',
|
||||
'common->phpgw_footer' => 'common->egw_footer',
|
||||
'common->phpgw_exit' => 'common->egw_exit',
|
||||
'common->phpgw_final' => 'common->egw_final',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$modernize_from = array_keys($modernize);
|
||||
$modernize_to = array_values($modernize);
|
||||
|
||||
$in_doc_block = false;
|
||||
foreach(file($file) as $n => $line)
|
||||
{
|
||||
$func = function_exists('str_ireplace') ? 'str_ireplace' : 'str_replace';
|
||||
$line = str_replace('PHPGW_','EGW_',$func($modernize_from,$modernize_to,$line));
|
||||
|
||||
if ($remove_space_indention)
|
||||
{
|
||||
while (preg_match("/^(\t*)".str_repeat(' ',$remove_space_indention).'/',$line))
|
||||
{
|
||||
$line = preg_replace("/^(\t*)".str_repeat(' ',$remove_space_indention).'/',"\\1\t",$line);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$in_doc_block)
|
||||
{
|
||||
$parts = explode('/*!',$line);
|
||||
if (count($parts) <= 1)
|
||||
{
|
||||
echo $line;
|
||||
continue;
|
||||
}
|
||||
$in_doc_block = true;
|
||||
|
||||
list($indent,$rest) = $parts;
|
||||
echo $indent."/**\n";
|
||||
if (strlen($rest) <= 2)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$line = $indent.$rest;
|
||||
|
||||
if (($one_line_block = strstr($line,'*/') !== false)) $line = str_replace('*/','',$line);
|
||||
}
|
||||
// now we are inside a comment-block
|
||||
|
||||
if (preg_match('/[ \t]*\*\//',$line)) // exiting the comment-block
|
||||
{
|
||||
$in_doc_block = false;
|
||||
echo str_replace('*/',' */',$line);
|
||||
continue;
|
||||
}
|
||||
if (preg_match('/^(.*)@([a-zA-Z]+) (.*)$/',$line,$parts))
|
||||
{
|
||||
list(,$indent,$cmd,$value) = $parts;
|
||||
switch ($cmd)
|
||||
{
|
||||
// to ignore
|
||||
case 'syntax':
|
||||
case 'function':
|
||||
case 'class':
|
||||
break;
|
||||
|
||||
case 'abstract':
|
||||
echo $indent.' * '.$value."\n".$indent." *\n";
|
||||
break;
|
||||
|
||||
case 'discussion':
|
||||
case 'example':
|
||||
default:
|
||||
echo $indent.' * '.$value."\n";
|
||||
break;
|
||||
|
||||
case 'result':
|
||||
$cmd = 'return';
|
||||
// fall through
|
||||
case 'param':
|
||||
case 'return':
|
||||
case 'var':
|
||||
case 'author':
|
||||
case 'copyright':
|
||||
case 'licence':
|
||||
case 'package':
|
||||
case 'access':
|
||||
echo $indent.' * @'.$cmd.' '.$value."\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo str_replace($indent,$indent.' * ',$line);
|
||||
}
|
||||
if ($one_line_block)
|
||||
{
|
||||
echo $indent." */\n";
|
||||
$one_line_block = $in_doc_block = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($do_replace && ($f = fopen($do_replace,'wb')))
|
||||
{
|
||||
fwrite($f,ob_get_contents());
|
||||
fclose($f);
|
||||
}
|
||||
else
|
||||
{
|
||||
ob_flush();
|
||||
}
|
@ -144,7 +144,7 @@ class Log
|
||||
|
||||
/* If the class exists, return a new instance of it. */
|
||||
if (class_exists($class)) {
|
||||
$obj = &new $class($name, $ident, $conf, $level);
|
||||
$obj = new $class($name, $ident, $conf, $level);
|
||||
return $obj;
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ class Log_observer
|
||||
* instance.
|
||||
*/
|
||||
if (class_exists($class)) {
|
||||
$object = &new $class($priority, $conf);
|
||||
$object = new $class($priority, $conf);
|
||||
return $object;
|
||||
}
|
||||
|
||||
@ -102,9 +102,9 @@ class Log_observer
|
||||
if (class_exists($class)) {
|
||||
/* Support both new-style and old-style construction. */
|
||||
if ($newstyle) {
|
||||
$object = &new $class($priority, $conf);
|
||||
$object = new $class($priority, $conf);
|
||||
} else {
|
||||
$object = &new $class($priority);
|
||||
$object = new $class($priority);
|
||||
}
|
||||
return $object;
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ class Net_Sieve
|
||||
$this->_data['port'] = $port;
|
||||
$this->_data['logintype'] = $logintype;
|
||||
$this->_data['euser'] = $euser;
|
||||
$this->_sock = &new Net_Socket();
|
||||
$this->_sock = new Net_Socket();
|
||||
$this->_debug = $debug;
|
||||
$this->_bypassAuth = $bypassAuth;
|
||||
$this->_useTLS = $useTLS;
|
||||
|
@ -53,7 +53,7 @@
|
||||
{
|
||||
$acl = implode('',(array)$_aclData['acl']);
|
||||
$data = $this->bofelamimail->addACL($this->sessionDataAjax['folderName'], $_accountName, $acl);
|
||||
#$response =& new xajaxResponse();
|
||||
#$response = new xajaxResponse();
|
||||
#$response->addScript("window.close();");
|
||||
#$response->addAssign("accountName", "value", $this->sessionDataAjax['folderName'].'-'.$_accountName.'-'.$acl);
|
||||
#return $response->getXML();
|
||||
@ -65,7 +65,7 @@
|
||||
{
|
||||
$folderACL = $this->bofelamimail->getIMAPACL($this->sessionDataAjax['folderName']);
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
$response->addAssign("aclTable", "innerHTML", $this->createACLTable($folderACL));
|
||||
return $response->getXML();
|
||||
}
|
||||
|
@ -423,7 +423,7 @@ class pleskimap extends defaultimap
|
||||
while(!feof($fp))
|
||||
{
|
||||
$line = trim(fgets($fp));
|
||||
list($name,$value) = split(': *',$line,2);
|
||||
list($name,$value) = preg_split('/: */',$line,2);
|
||||
if (!is_null($value) && strpos($name,'An error occured') === false && $name)
|
||||
{
|
||||
$values[$name] = $value;
|
||||
|
@ -49,7 +49,7 @@ class smtpplesk extends defaultsmtp
|
||||
static $plesk;
|
||||
if (!is_object($plesk))
|
||||
{
|
||||
$plesk =& new pleskimap(null);
|
||||
$plesk = new pleskimap(null);
|
||||
$this->error =& $plesk->error;
|
||||
}
|
||||
return $plesk->plesk_mail($action,$account,$password,$aliases,$forward,$keepLocalCopy,$quota_kb);
|
||||
|
@ -76,7 +76,7 @@
|
||||
(is_array($GLOBALS['egw']->session->appsession('advanced_search_query',$GLOBALS['egw_info']['flags']['currentapp'])) ?
|
||||
$GLOBALS['egw']->session->appsession('advanced_search_query',$GLOBALS['egw_info']['flags']['currentapp']) : $value);
|
||||
|
||||
$tpl =& new etemplate;
|
||||
$tpl = new etemplate;
|
||||
$tpl->init('*** generated advanced search widget','','',0,'',0,0); // make an empty template
|
||||
|
||||
if($extension_data['message'])
|
||||
@ -96,7 +96,7 @@
|
||||
// 'width' => '800px',
|
||||
)));
|
||||
|
||||
$result_rows_tpl =& new etemplate;
|
||||
$result_rows_tpl = new etemplate;
|
||||
$result_rows_tpl->init('*** generated rows template for advanced search results','','',0,'',0,0);
|
||||
$grid =& $result_rows_tpl->children[0];
|
||||
foreach((array)$extension_data['colums_to_present'] as $field => $label)
|
||||
|
@ -146,7 +146,7 @@
|
||||
$cell['type'] = 'template';
|
||||
$cell['size'] = $cell['name'];
|
||||
$value = array('value' => $current_value, 'search' => $title);
|
||||
$widget =& new etemplate('etemplate.ajax_select_widget');
|
||||
$widget = new etemplate('etemplate.ajax_select_widget');
|
||||
$widget->no_onclick = True;
|
||||
|
||||
// Link if readonly & link is set
|
||||
|
@ -113,9 +113,9 @@ class date_widget
|
||||
}
|
||||
elseif ($data_format != '')
|
||||
{
|
||||
$date = split('[- /.:,]',$value);
|
||||
$date = preg_split('/[- \\/.:,]/',$value);
|
||||
//echo "date=<pre>"; print_r($date); echo "</pre>";
|
||||
$mdy = split('[- /.:,]',$data_format);
|
||||
$mdy = preg_split('/[- \\/.:,]/',$data_format);
|
||||
|
||||
if (count($mdy) == 1) // no seperators, eg. YmdHi
|
||||
{
|
||||
@ -166,7 +166,7 @@ class date_widget
|
||||
$value['H'] = $value['H'] % 12 ? $value['H'] % 12 : 12; // no leading 0 and 0h => 12am
|
||||
$timeformat += array(5 => 'a');
|
||||
}
|
||||
$format = split('[/.-]',$this->dateformat);
|
||||
$format = preg_split('/[\\/.-]/',$this->dateformat);
|
||||
|
||||
// no time also if $options&8 and readonly and time=0h0
|
||||
if ($type != 'date' && !($readonly && ($options & 8) && $time_0h0))
|
||||
@ -236,7 +236,7 @@ class date_widget
|
||||
'needed' => $cell['needed'],
|
||||
);
|
||||
}
|
||||
$tpl =& new etemplate;
|
||||
$tpl = new etemplate;
|
||||
$tpl->init('*** generated fields for date','','',0,'',0,0); // make an empty template
|
||||
// keep the editor away from the generated tmpls
|
||||
$tpl->no_onclick = true;
|
||||
@ -411,7 +411,7 @@ class date_widget
|
||||
'value' => $value,
|
||||
'unit' => $unit,
|
||||
);
|
||||
$tpl =& new etemplate;
|
||||
$tpl = new etemplate;
|
||||
$tpl->init('*** generated fields for duration','','',0,'',0,0); // make an empty template
|
||||
// keep the editor away from the generated tmpls
|
||||
$tpl->no_onclick = true;
|
||||
|
@ -300,7 +300,7 @@ class db_tools
|
||||
$new_version[$minor] = sprintf('%03d',1+$new_version[$minor]);
|
||||
$content['new_version'] = implode('.',$new_version);
|
||||
|
||||
$tmpl =& new etemplate('etemplate.db-tools.ask_save');
|
||||
$tmpl = new etemplate('etemplate.db-tools.ask_save');
|
||||
|
||||
if (!file_exists(EGW_SERVER_ROOT."/$posted_app/setup/tables_current.inc.php"))
|
||||
{
|
||||
@ -485,7 +485,7 @@ class db_tools
|
||||
$opts = array();
|
||||
foreach(explode(',',$col['options']) as $opt)
|
||||
{
|
||||
list($db,$opt) = split('[(:)]',$opt);
|
||||
list($db,$opt) = preg_split('/[(:)]/',$opt);
|
||||
$opts[$db] = is_numeric($opt) ? intval($opt) : $opt;
|
||||
}
|
||||
$table[$prop][] = array(
|
||||
|
@ -271,7 +271,7 @@ class editor
|
||||
{
|
||||
$content[$row] = $param;
|
||||
}
|
||||
$list_result =& new etemplate('etemplate.editor.list_result');
|
||||
$list_result = new etemplate('etemplate.editor.list_result');
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Editable Templates - Search');
|
||||
$list_result->exec('etemplate.editor.list_result',$content,'','',array(
|
||||
'result' => $result,
|
||||
@ -460,7 +460,7 @@ class editor
|
||||
'xml' => $xml ? '<pre>'.html::htmlspecialchars($xml)."</pre>\n" : '',
|
||||
);
|
||||
|
||||
$editor =& new etemplate('etemplate.editor.new');
|
||||
$editor = new etemplate('etemplate.editor.new');
|
||||
if (!$msg && isset($content['values']) && !isset($content['vals']))
|
||||
{
|
||||
$r = 1;
|
||||
@ -1319,8 +1319,8 @@ class editor
|
||||
|
||||
$content['cell']['options'] = explode(',',$content['cell']['size']);
|
||||
|
||||
$editor =& new etemplate('etemplate.editor.widget');
|
||||
$type_tmpl =& new etemplate;
|
||||
$editor = new etemplate('etemplate.editor.widget');
|
||||
$type_tmpl = new etemplate;
|
||||
|
||||
list($ext_type) = explode('-',$widget['type']);
|
||||
if ($type_tmpl->read('etemplate.editor.widget.'.$widget['type']) ||
|
||||
@ -1435,7 +1435,7 @@ class editor
|
||||
'java_script' => $js ? '<script>'.$js.'</script>' : '',
|
||||
'msg' => $msg
|
||||
);
|
||||
$tmpl =& new etemplate('etemplate.editor.styles');
|
||||
$tmpl = new etemplate('etemplate.editor.styles');
|
||||
|
||||
if ($content['from'])
|
||||
{
|
||||
@ -1489,7 +1489,7 @@ class editor
|
||||
$dir = @opendir(EGW_SERVER_ROOT.'/'.$app.'/inc');
|
||||
while ($dir && ($file = readdir($dir)))
|
||||
{
|
||||
if (ereg('class\\.([a-zA-Z0-9_]*)_widget.inc.php',$file,$regs) &&
|
||||
if (preg_match('/class\\.([a-zA-Z0-9_]*)_widget.inc.php/',$file,$regs) &&
|
||||
($regs[1] != 'xslt' || $this->etemplate->xslt) &&
|
||||
($ext = $this->etemplate->loadExtension($regs[1].'.'.$app,$this->etemplate)))
|
||||
{
|
||||
|
@ -281,7 +281,7 @@ class etemplate extends boetemplate
|
||||
echo '<div id="popupMainDiv">'."\n";
|
||||
if ($GLOBALS['egw_info']['user']['apps']['manual']) // adding a manual icon to every popup
|
||||
{
|
||||
$manual =& new etemplate('etemplate.popup.manual');
|
||||
$manual = new etemplate('etemplate.popup.manual');
|
||||
echo $manual->show(array());
|
||||
unset($manual);
|
||||
echo '<style type="text/css">.ajax-loader { position: absolute; right: 27px; top: 24px; display: none; }</style>'."\n";
|
||||
@ -1360,7 +1360,7 @@ class etemplate extends boetemplate
|
||||
$obj_read = 'already loaded';
|
||||
if (is_array($cell['obj']))
|
||||
{
|
||||
$obj =& new etemplate();
|
||||
$obj = new etemplate();
|
||||
$obj->init($cell['obj']);
|
||||
$cell['obj'] =& $obj;
|
||||
unset($obj);
|
||||
@ -1373,12 +1373,12 @@ class etemplate extends boetemplate
|
||||
$obj_read = is_object($cell['obj']) ? 'obj from content' : 'obj read, obj-name from content';
|
||||
if (!is_object($cell['obj']))
|
||||
{
|
||||
$cell['obj'] =& new etemplate($cell['obj'],$this->as_array());
|
||||
$cell['obj'] = new etemplate($cell['obj'],$this->as_array());
|
||||
}
|
||||
}
|
||||
else
|
||||
{ $obj_read = 'obj read';
|
||||
$cell['obj'] =& new etemplate($name,$this->as_array());
|
||||
$cell['obj'] = new etemplate($name,$this->as_array());
|
||||
}
|
||||
}
|
||||
if (is_int($this->debug) && $this->debug >= 3 || $this->debug == $cell['type'])
|
||||
|
@ -61,14 +61,14 @@ class historylog_widget
|
||||
$status_widgets = is_array($value) && isset($value['status-widgets']) ? $value['status-widgets'] : null;
|
||||
$id = is_array($value) ? $value['id'] : $value;
|
||||
|
||||
$historylog =& new historylog($app);
|
||||
$historylog = new historylog($app);
|
||||
if (!$id || method_exists($historylog,'search'))
|
||||
{
|
||||
$value = $id ? $historylog->search($id) : false;
|
||||
}
|
||||
unset($historylog);
|
||||
|
||||
$tpl =& new etemplate;
|
||||
$tpl = new etemplate;
|
||||
$tpl->init('*** generated fields for historylog','','',0,'',0,0); // make an empty template
|
||||
// keep the editor away from the generated tmpls
|
||||
$tpl->no_onclick = true;
|
||||
|
@ -249,7 +249,7 @@ class link_widget
|
||||
// modify add_app default to the action used as value
|
||||
if (isset($value['add_app']) && $app == $value['add_app']) $value['add_app'] = $action;
|
||||
}
|
||||
$tpl =& new etemplate('etemplate.link_widget.add');
|
||||
$tpl = new etemplate('etemplate.link_widget.add');
|
||||
break;
|
||||
|
||||
case 'link-to':
|
||||
@ -283,7 +283,7 @@ class link_widget
|
||||
return True;
|
||||
}
|
||||
$value['link_list_format'] = $GLOBALS['egw_info']['user']['preferences']['common']['link_list_format'];
|
||||
$tpl =& new etemplate('etemplate.link_widget.list');
|
||||
$tpl = new etemplate('etemplate.link_widget.list');
|
||||
for($row=$tpl->rows-1; list(,$link) = each($links); ++$row)
|
||||
{
|
||||
$value[$row] = $link;
|
||||
@ -319,7 +319,7 @@ class link_widget
|
||||
|
||||
case 'link-entry':
|
||||
$GLOBALS['egw_info']['flags']['include_xajax'] = true;
|
||||
$tpl =& new etemplate('etemplate.link_widget.entry');
|
||||
$tpl = new etemplate('etemplate.link_widget.entry');
|
||||
$options = $cell['size'] ? explode(',',$cell['size']) : array();
|
||||
$app = $extension_data['app'] = $options[0];
|
||||
// handle extra args for onclick like: values2url(this.form,'start,end,duration,participants,recur_type,whole_day')+'&exec[event_id]=
|
||||
|
@ -344,7 +344,7 @@ class nextmatch_widget
|
||||
}
|
||||
if (!is_object($value['template']))
|
||||
{
|
||||
$value['template'] =& new etemplate($value['template'],$tmpl->as_array());
|
||||
$value['template'] = new etemplate($value['template'],$tmpl->as_array());
|
||||
}
|
||||
$extension_data['template'] = $value['template']->name; // used for the column-selection, and might be set in get_rows()
|
||||
$extension_data['columnselection_pref'] = $value['columnselection_pref'];
|
||||
@ -360,7 +360,7 @@ class nextmatch_widget
|
||||
{ // disable whole nextmatch line if no scrolling necessary
|
||||
if ($value['header_left'] || $value['header_right'])
|
||||
{
|
||||
$nextmatch =& new etemplate('etemplate.nextmatch_widget.header_only');
|
||||
$nextmatch = new etemplate('etemplate.nextmatch_widget.header_only');
|
||||
$cell['size'] = $cell['name'];
|
||||
$cell['obj'] = &$nextmatch;
|
||||
$cell['name'] = $nextmatch->name;
|
||||
@ -374,7 +374,7 @@ class nextmatch_widget
|
||||
}
|
||||
else
|
||||
{
|
||||
$nextmatch =& new etemplate('etemplate.nextmatch_widget');
|
||||
$nextmatch = new etemplate('etemplate.nextmatch_widget');
|
||||
$nextmatch->read('etemplate.nextmatch_widget');
|
||||
// keep the editor away from the generated tmpls
|
||||
$nextmatch->no_onclick = true;
|
||||
@ -1075,7 +1075,7 @@ class nextmatch_widget
|
||||
if ($app)
|
||||
{
|
||||
include_once(EGW_API_INC.'/class.config.inc.php');
|
||||
$config =& new config($app);
|
||||
$config = new config($app);
|
||||
$config->read_repository();
|
||||
|
||||
$customfields = isset($config->config_data['customfields']) ? $config->config_data['customfields'] : $config->config_data['custom_fields'];
|
||||
|
@ -182,7 +182,7 @@
|
||||
}
|
||||
else // we need to instanciate a new cat object for the correct application
|
||||
{
|
||||
$categories =& new categories('',$type3);
|
||||
$categories = new categories('',$type3);
|
||||
}
|
||||
$accountId = $GLOBALS['egw_info']['user']['account_id'];
|
||||
foreach((array)$categories->return_sorted_array(0,False,'','','',!$type) as $cat)
|
||||
|
@ -838,7 +838,7 @@ class so_sql
|
||||
}
|
||||
elseif (!$need_full_no_count && (!$join || stripos($join,'LEFT JOIN')!==false))
|
||||
{
|
||||
$this->total = $this->db->select($this->table_name,'COUNT(*)',$query,__LINE__,__FILE__,false,'',$this->app,0,$join)->fetchSingle();
|
||||
$this->total = $this->db->select($this->table_name,'COUNT(*)',$query,__LINE__,__FILE__,false,'',$this->app,0,$join)->fetchColumn();
|
||||
}
|
||||
else // cant do a count, have to run the query without limit
|
||||
{
|
||||
@ -854,7 +854,7 @@ class so_sql
|
||||
|
||||
if ($mysql_calc_rows)
|
||||
{
|
||||
$this->total = $this->db->query('SELECT FOUND_ROWS()')->fetchSingle();
|
||||
$this->total = $this->db->query('SELECT FOUND_ROWS()')->fetchColumn();
|
||||
}
|
||||
$arr = array();
|
||||
if ($rs) foreach($rs as $row)
|
||||
|
@ -949,7 +949,7 @@ class soetemplate
|
||||
|
||||
$tpls = $this->search($app);
|
||||
|
||||
$tpl =& new soetemplate; // to not alter our own data
|
||||
$tpl = new soetemplate; // to not alter our own data
|
||||
|
||||
while (list(,$keys) = each($tpls))
|
||||
{
|
||||
@ -1058,7 +1058,7 @@ class soetemplate
|
||||
$templ_version=0;
|
||||
|
||||
include($path = EGW_SERVER_ROOT."/$app/setup/etemplates.inc.php");
|
||||
$templ =& new etemplate($app);
|
||||
$templ = new etemplate($app);
|
||||
|
||||
foreach($templ_data as $data)
|
||||
{
|
||||
@ -1100,7 +1100,7 @@ class soetemplate
|
||||
|
||||
if ($time = @filemtime($path))
|
||||
{
|
||||
$templ =& new soetemplate(".$app",'','##');
|
||||
$templ = new soetemplate(".$app",'','##');
|
||||
if ($templ->lang != '##' || $templ->modified < $time) // need to import
|
||||
{
|
||||
$ret = self::import_dump($app);
|
||||
@ -1282,7 +1282,7 @@ class soetemplate
|
||||
case 'template':
|
||||
if (!isset($widget['obj']) && $widget['name'][0] != '@')
|
||||
{
|
||||
$widget['obj'] =& new etemplate;
|
||||
$widget['obj'] = new etemplate;
|
||||
if (!$widget['obj']->read($widget['name'])) $widget['obj'] = false;
|
||||
}
|
||||
if (!is_object($widget['obj'])) break; // cant descent into template
|
||||
|
@ -74,7 +74,7 @@ class solangfile
|
||||
}
|
||||
foreach($lines as $n => $line)
|
||||
{
|
||||
while (ereg('\{lang_([^}]+)\}(.*)',$line,$found))
|
||||
while (preg_match('/\{lang_([^}]+)\}(.*)/',$line,$found))
|
||||
{
|
||||
$lang = str_replace('_',' ',$found[1]);
|
||||
$this->plist[$lang] = $app;
|
||||
@ -256,7 +256,7 @@ class solangfile
|
||||
}
|
||||
$rest = substr($rest,$next+1);
|
||||
}
|
||||
if(!ereg("[ \t\n]*,[ \t\n]*(.*)$",$rest,$parts))
|
||||
if(!preg_match('/'."[ \t\n]*,[ \t\n]*(.*)$".'/',$rest,$parts))
|
||||
{
|
||||
break; // nothing found
|
||||
}
|
||||
|
@ -86,7 +86,7 @@
|
||||
}
|
||||
$all_names = implode('|',$names);
|
||||
|
||||
$tab_widget =& new etemplate('etemplate.tab_widget');
|
||||
$tab_widget = new etemplate('etemplate.tab_widget');
|
||||
$tab_widget->no_onclick = true;
|
||||
|
||||
if ($value && strpos($value,'.') === false)
|
||||
@ -150,7 +150,7 @@
|
||||
foreach($names as $n => $name)
|
||||
{
|
||||
$bcell = $tab_widget->empty_cell('template',$name);
|
||||
$bcell['obj'] =& new etemplate($name,$tmpl->as_array());
|
||||
$bcell['obj'] = new etemplate($name,$tmpl->as_array());
|
||||
$tab_widget->set_cell_attribute('body',$n+1,$bcell);
|
||||
}
|
||||
$tab_widget->set_cell_attribute('body','type','deck');
|
||||
@ -160,7 +160,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$stab =& new etemplate($selected_tab,$tmpl->as_array());
|
||||
$stab = new etemplate($selected_tab,$tmpl->as_array());
|
||||
$tab_widget->set_cell_attribute('body','type','template');
|
||||
$tab_widget->set_cell_attribute('body','size',''); // the deck has a '1' there
|
||||
$tab_widget->set_cell_attribute('body','obj',$stab);
|
||||
|
@ -81,7 +81,7 @@ class tree_widget
|
||||
}
|
||||
else // we need to instanciate a new cat object for the correct application
|
||||
{
|
||||
$categories =& new categories('',$type3);
|
||||
$categories = new categories('',$type3);
|
||||
}
|
||||
$accountId = $GLOBALS['egw_info']['user']['account_id'];
|
||||
$cat2path=array();
|
||||
|
@ -108,7 +108,7 @@
|
||||
*/
|
||||
if (!$GLOBALS['egw_info']['etemplate']['window'])
|
||||
{
|
||||
$window = &new GtkWindow();
|
||||
$window = new GtkWindow();
|
||||
$window->connect('destroy',array('etemplate','destroy'));
|
||||
$window->connect('delete-event',array('etemplate','delete_event'));
|
||||
$window->set_title('eGroupWareGTK: '.$GLOBALS['egw_info']['server']['site_title']);
|
||||
@ -125,7 +125,7 @@
|
||||
$table->set_border_width(10);
|
||||
$table->show();
|
||||
|
||||
$swindow = &new GtkScrolledWindow(null,null);
|
||||
$swindow = new GtkScrolledWindow(null,null);
|
||||
$swindow->set_policy(GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC);
|
||||
$swindow->add_with_viewport($table);
|
||||
$swindow->show();
|
||||
@ -287,7 +287,7 @@
|
||||
'.row' => $show_row
|
||||
);
|
||||
|
||||
$table = &new GtkTable($this->rows,$this->cols,False);
|
||||
$table = new GtkTable($this->rows,$this->cols,False);
|
||||
$table->set_row_spacings(2);
|
||||
$table->set_col_spacings(5);
|
||||
$table->show();
|
||||
@ -369,7 +369,7 @@
|
||||
default:
|
||||
$align = 0.0;
|
||||
}
|
||||
$align = &new GtkAlignment($align,$valign,$cell['type'] == 'hrule' ? 1.0 : 0.0,0.0);
|
||||
$align = new GtkAlignment($align,$valign,$cell['type'] == 'hrule' ? 1.0 : 0.0,0.0);
|
||||
$align->add($widget);
|
||||
}
|
||||
$table->attach($align ? $align : $widget, $c, $c+$colspan, $r, $r+1,GTK_FILL,GTK_FILL,0,0);
|
||||
@ -444,7 +444,7 @@
|
||||
$name = $this->expand_name($cell['name'],$show_c,$show_row,$content['.c'],$content['.row'],$content);
|
||||
|
||||
// building the form-field-name depending on prefix $cname and possibl. Array-subscript in name
|
||||
if (ereg('^([^[]*)(\\[.*\\])$',$name,$regs)) // name contains array-index
|
||||
if (preg_match('/^([^[]*)(\\[.*\\])$/',$name,$regs)) // name contains array-index
|
||||
{
|
||||
$form_name = $cname == '' ? $name : $cname.'['.$regs[1].']'.$regs[2];
|
||||
eval(str_replace(']',"']",str_replace('[',"['",'$value = $content['.$regs[1].']'.$regs[2].';')));
|
||||
@ -492,7 +492,7 @@
|
||||
|
||||
if ($value)
|
||||
{
|
||||
$widget = &new GtkLabel($value);
|
||||
$widget = new GtkLabel($value);
|
||||
if ($cell['align'] != 'center')
|
||||
{
|
||||
$widget->set_justify($cell['align'] == 'right' ? GTK_JUSTIFY_RIGHT : GTK_JUSTIFY_LEFT);
|
||||
@ -520,7 +520,7 @@
|
||||
//$html .= $this->html->input($form_name,$value,'',$options.$this->html->formatOptions($cell['size'],'SIZE,MAXLENGTH'));
|
||||
}
|
||||
list($len,$max) = explode(',',$cell['size']);
|
||||
$widget = &new GtkEntry();
|
||||
$widget = new GtkEntry();
|
||||
$widget->set_text($value);
|
||||
if ($max)
|
||||
{
|
||||
@ -534,15 +534,15 @@
|
||||
break;
|
||||
case 'textarea': // Multiline Text Input, size: [rows][,cols]
|
||||
//$html .= $this->html->textarea($form_name,$value,$options.$this->html->formatOptions($cell['size'],'ROWS,COLS'));
|
||||
$widget = &new GtkText(null,null);
|
||||
$widget = new GtkText(null,null);
|
||||
$widget->insert_text($value,strlen($value));
|
||||
$widget->set_editable(!$readonly);
|
||||
break;
|
||||
/* case 'date':
|
||||
if ($cell['size'] != '')
|
||||
{
|
||||
$date = split('[/.-]',$value);
|
||||
$mdy = split('[/.-]',$cell['size']);
|
||||
$date = preg_split('/[\\/.-]/',$value);
|
||||
$mdy = preg_split('/[\\/.-]/',$cell['size']);
|
||||
for ($value=array(),$n = 0; $n < 3; ++$n)
|
||||
{
|
||||
switch($mdy[$n])
|
||||
@ -572,7 +572,7 @@
|
||||
$options .= ' CHECKED';
|
||||
}
|
||||
//$html .= $this->html->input($form_name,'1','CHECKBOX',$options);
|
||||
$widget = &new GtkCheckButton($right_label);
|
||||
$widget = new GtkCheckButton($right_label);
|
||||
$right_label = '';
|
||||
$widget->set_active($value);
|
||||
break;
|
||||
@ -584,23 +584,23 @@
|
||||
//$html .= $this->html->input($form_name,$cell['size'],'RADIO',$options);
|
||||
if (isset($this->buttongroup[$form_name]))
|
||||
{
|
||||
$widget = &new GtkRadioButton($this->buttongroup[$form_name],$right_label);
|
||||
$widget = new GtkRadioButton($this->buttongroup[$form_name],$right_label);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->buttongroup[$form_name] = $widget = &new GtkRadioButton(null,$right_label);
|
||||
$this->buttongroup[$form_name] = $widget = new GtkRadioButton(null,$right_label);
|
||||
}
|
||||
$right_label = '';
|
||||
$widget->set_active($value == $cell['size']);
|
||||
break;
|
||||
case 'button':
|
||||
//$html .= $this->html->submit_button($form_name,$cell['label'],'',strlen($cell['label']) <= 1 || $cell['no_lang'],$options);
|
||||
$widget = &new GtkButton(strlen($cell['label']) > 1 ? lang($cell['label']) : $cell['label']);
|
||||
$widget = new GtkButton(strlen($cell['label']) > 1 ? lang($cell['label']) : $cell['label']);
|
||||
$widget->connect_object('clicked', array('etemplate', 'button_clicked'),&$var,$form_name);
|
||||
break;
|
||||
case 'hrule':
|
||||
//$html .= $this->html->hr($cell['size']);
|
||||
$widget = &new GtkHSeparator();
|
||||
$widget = new GtkHSeparator();
|
||||
break;
|
||||
case 'template': // size: index in content-array (if not full content is past further on)
|
||||
if ($this->autorepeat_idx($cell,$show_c,$show_row,$idx,$idx_cname) || $cell['size'] != '')
|
||||
@ -661,7 +661,7 @@
|
||||
$maxlen = $len;
|
||||
}
|
||||
}
|
||||
$widget = &new GtkCombo();
|
||||
$widget = new GtkCombo();
|
||||
$widget->set_popdown_strings($sel_options);
|
||||
$entry = $widget->entry;
|
||||
$entry->set_text($sel_options[$value]);
|
||||
@ -709,7 +709,7 @@
|
||||
$pixbuf = &$GLOBALS['egw_info']['etemplate']['pixbufs'][$path];
|
||||
if ($pixbuf)
|
||||
{
|
||||
$widget = &new GtkDrawingArea();
|
||||
$widget = new GtkDrawingArea();
|
||||
$widget->size($pixbuf->get_width(),$pixbuf->get_height());
|
||||
$widget->connect('expose_event',array('etemplate','draw_image'),$pixbuf);
|
||||
}
|
||||
@ -720,7 +720,7 @@
|
||||
break;
|
||||
default:
|
||||
//$html .= '<i>unknown type</i>';
|
||||
$widget = &new GtkLabel('unknown type: '.$cell['type']);
|
||||
$widget = new GtkLabel('unknown type: '.$cell['type']);
|
||||
$widget->set_justify(GTK_JUSTIFY_LEFT);
|
||||
break;
|
||||
}
|
||||
@ -738,14 +738,14 @@
|
||||
{
|
||||
if (!$widget && !$right_label)
|
||||
{
|
||||
$widget = &new GtkLabel($left_label);
|
||||
$widget = new GtkLabel($left_label);
|
||||
}
|
||||
else
|
||||
{
|
||||
$hbox = &new GtkHBox(False,5);
|
||||
$hbox = new GtkHBox(False,5);
|
||||
if ($left_label)
|
||||
{
|
||||
$left = &new GtkLabel($left_label);
|
||||
$left = new GtkLabel($left_label);
|
||||
$left->show();
|
||||
$hbox->add($left);
|
||||
}
|
||||
@ -756,7 +756,7 @@
|
||||
}
|
||||
if ($right_label)
|
||||
{
|
||||
$right = &new GtkLabel($right_label);
|
||||
$right = new GtkLabel($right_label);
|
||||
$right->show();
|
||||
$hbox->add($right);
|
||||
}
|
||||
@ -766,7 +766,7 @@
|
||||
{
|
||||
if (!$this->tooltips)
|
||||
{
|
||||
$this->tooltips = &new GtkTooltips();
|
||||
$this->tooltips = new GtkTooltips();
|
||||
}
|
||||
$this->tooltips->set_tip($widget,lang($cell['help']),$this->name.'/'.$form_name);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
function var2xml($name, $data)
|
||||
{
|
||||
$doc =& new xmltool('root','','');
|
||||
$doc = new xmltool('root','','');
|
||||
return $doc->import_var($name,$data,True,True);
|
||||
}
|
||||
|
||||
@ -167,7 +167,7 @@
|
||||
function import_var($name, $value,$is_root=False,$export_xml=False)
|
||||
{
|
||||
//echo "<p>import_var: this->indentstring='$this->indentstring'</p>\n";
|
||||
$node =& new xmltool('node',$name,$this->indentstring);
|
||||
$node = new xmltool('node',$name,$this->indentstring);
|
||||
switch (gettype($value))
|
||||
{
|
||||
case 'string':
|
||||
@ -220,12 +220,12 @@
|
||||
case 'integer':
|
||||
case 'double':
|
||||
case 'NULL':
|
||||
$subnode =& new xmltool('node', $nextkey,$this->indentstring);
|
||||
$subnode = new xmltool('node', $nextkey,$this->indentstring);
|
||||
$subnode->set_value($val);
|
||||
$node->add_node($subnode);
|
||||
break;
|
||||
case 'boolean':
|
||||
$subnode =& new xmltool('node', $nextkey,$this->indentstring);
|
||||
$subnode = new xmltool('node', $nextkey,$this->indentstring);
|
||||
if($val == True)
|
||||
{
|
||||
$subnode->set_value('1');
|
||||
@ -251,7 +251,7 @@
|
||||
}
|
||||
break;
|
||||
case 'object':
|
||||
$subnode =& new xmltool('node', $nextkey,$this->indentstring);
|
||||
$subnode = new xmltool('node', $nextkey,$this->indentstring);
|
||||
$subnode->set_value('PHP_SERIALIZED_OBJECT&:'.serialize($val));
|
||||
$node->add_node($subnode);
|
||||
break;
|
||||
@ -390,7 +390,7 @@
|
||||
{
|
||||
case 'cdata':
|
||||
case 'complete':
|
||||
$node =& new xmltool('node',$data[$i]['tag'],$this->indentstring);
|
||||
$node = new xmltool('node',$data[$i]['tag'],$this->indentstring);
|
||||
if(is_array($data[$i]['attributes']) && count($data[$i]['attributes']) > 0)
|
||||
{
|
||||
while(list($k,$v)=each($data[$i]['attributes']))
|
||||
@ -402,7 +402,7 @@
|
||||
$parent_node->add_node($node);
|
||||
break;
|
||||
case 'open':
|
||||
$node =& new xmltool('node',$data[$i]['tag'],$this->indentstring);
|
||||
$node = new xmltool('node',$data[$i]['tag'],$this->indentstring);
|
||||
if(is_array($data[$i]['attributes']) && count($data[$i]['attributes']) > 0)
|
||||
{
|
||||
while(list($k,$v)=each($data[$i]['attributes']))
|
||||
@ -428,7 +428,7 @@
|
||||
xml_parse_into_struct($parser, $xmldata, $vals, $index);
|
||||
xml_parser_free($parser);
|
||||
unset($index);
|
||||
$node =& new xmltool('node',$vals[0]['tag'],$this->indentstring);
|
||||
$node = new xmltool('node',$vals[0]['tag'],$this->indentstring);
|
||||
if(isset($vals[0]['attributes']))
|
||||
{
|
||||
while(list($key,$value) = each($vals[0]['attributes']))
|
||||
|
@ -61,7 +61,7 @@
|
||||
|
||||
function render_html($cell,$form_name,$value,$readonly,&$tmpl)
|
||||
{
|
||||
list($app,$file) = split('\\.',$cell['size'],2);
|
||||
list($app,$file) = preg_split('/\\./',$cell['size'],2);
|
||||
$pref_templ = $GLOBALS['egw_info']['server']['template_set'];
|
||||
$path = "$app/templates/$pref_templ/$file";
|
||||
if (!file_exists(EGW_SERVER_ROOT.'/'.$path.'.xsl'))
|
||||
|
@ -165,16 +165,16 @@
|
||||
$widgetattr2xul = isset($this->widget2xul[$type]) ? $this->widget2xul[$type] : array();
|
||||
$type = isset($widgetattr2xul['.name']) ? $widgetattr2xul['.name'] : $type;
|
||||
list($type,$child,$child2) = explode(',',$type);
|
||||
$widget =& new xmlnode($type);
|
||||
$widget = new xmlnode($type);
|
||||
$attr_widget = &$widget;
|
||||
if ($child)
|
||||
{
|
||||
$child =& new xmlnode($child);
|
||||
$child = new xmlnode($child);
|
||||
if ($type != 'tabbox') $attr_widget = &$child;
|
||||
}
|
||||
if ($child2)
|
||||
{
|
||||
$child2 =& new xmlnode($child2);
|
||||
$child2 = new xmlnode($child2);
|
||||
}
|
||||
if (isset($widgetattr2xul['.set'])) // set default-attr for type
|
||||
{
|
||||
@ -189,7 +189,7 @@
|
||||
{
|
||||
case 'nextmatch':
|
||||
list($tpl) = explode(',',$cell['size']);
|
||||
$embeded =& new etemplate($tpl,$this->load_via);
|
||||
$embeded = new etemplate($tpl,$this->load_via);
|
||||
if ($embeded_too)
|
||||
{
|
||||
$this->add_etempl($embeded,$embeded_too);
|
||||
@ -203,17 +203,17 @@
|
||||
$names = explode('|',$cell['name']); unset($cell['name']);
|
||||
for ($n = 0; $n < count($labels); ++$n)
|
||||
{
|
||||
$tab =& new xmlnode('tab');
|
||||
$tab = new xmlnode('tab');
|
||||
$tab->set_attribute('label',$labels[$n]);
|
||||
$tab->set_attribute('statustext',$helps[$n]);
|
||||
$child->add_node($tab);
|
||||
|
||||
$embeded =& new etemplate($names[$n],$this->load_via);
|
||||
$embeded = new etemplate($names[$n],$this->load_via);
|
||||
if ($embeded_too)
|
||||
{
|
||||
$this->add_etempl($embeded,$embeded_too);
|
||||
}
|
||||
$template =& new xmlnode('template');
|
||||
$template = new xmlnode('template');
|
||||
$template->set_attribute('id',$embeded->name);
|
||||
$child2->add_node($template);
|
||||
unset($embeded);
|
||||
@ -236,7 +236,7 @@
|
||||
case 'groupbox':
|
||||
if ($cell['label'])
|
||||
{
|
||||
$caption =& new xmlnode('caption');
|
||||
$caption = new xmlnode('caption');
|
||||
$caption->set_attribute('label',$cell['label']);
|
||||
$widget->add_node($caption);
|
||||
unset($cell['label']);
|
||||
@ -246,7 +246,7 @@
|
||||
case 'hbox':
|
||||
case 'box':
|
||||
case 'deck':
|
||||
list($anz,$orient,$options) = split(',',$cell['size'],3);
|
||||
list($anz,$orient,$options) = explode(',',$cell['size'],3);
|
||||
for ($n = 1; $n <= $anz; ++$n)
|
||||
{
|
||||
$this->add_widget($widget,$cell[$n],$embeded_too);
|
||||
@ -261,7 +261,7 @@
|
||||
case 'template':
|
||||
if ($cell['name'][0] != '@' && $embeded_too)
|
||||
{
|
||||
$templ =& new etemplate();
|
||||
$templ = new etemplate();
|
||||
if ($templ->read(boetemplate::expand_name($cell['name'],0,0),'default','default',0,'',$this->load_via))
|
||||
{
|
||||
$this->add_etempl($templ,$embeded_too);
|
||||
@ -310,18 +310,18 @@
|
||||
*/
|
||||
function add_grid(&$parent,$grid,&$embeded_too)
|
||||
{
|
||||
$xul_grid =& new xmlnode('grid');
|
||||
$xul_grid = new xmlnode('grid');
|
||||
$this->set_attributes($xul_grid,'width,height,border,class,spacing,padding,overflow',$grid['size']);
|
||||
$this->set_attributes($xul_grid,'id',$grid['name']);
|
||||
|
||||
$xul_columns =& new xmlnode('columns');
|
||||
$xul_rows =& new xmlnode('rows');
|
||||
$xul_columns = new xmlnode('columns');
|
||||
$xul_rows = new xmlnode('rows');
|
||||
|
||||
reset($grid['data']);
|
||||
list(,$opts) = each ($grid['data']); // read over options-row
|
||||
while (list($r,$row) = each ($grid['data']))
|
||||
{
|
||||
$xul_row =& new xmlnode('row');
|
||||
$xul_row = new xmlnode('row');
|
||||
$this->set_attributes($xul_row,'class,valign',$opts["c$r"]);
|
||||
$this->set_attributes($xul_row,'height,disabled',$opts["h$r"]);
|
||||
|
||||
@ -330,7 +330,7 @@
|
||||
{
|
||||
if ($r == '1') // write columns only once in the first row
|
||||
{
|
||||
$xul_column =& new xmlnode('column');
|
||||
$xul_column = new xmlnode('column');
|
||||
$this->set_attributes($xul_column,'width,disabled',$opts[$c]);
|
||||
$xul_columns->add_node($xul_column);
|
||||
}
|
||||
@ -371,7 +371,7 @@
|
||||
}
|
||||
$embeded_too[$etempl->name] = True;
|
||||
|
||||
$template =& new xmlnode('template');
|
||||
$template = new xmlnode('template');
|
||||
$template->set_attribute('id',$etempl->name);
|
||||
$template->set_attribute('template',$etempl->template);
|
||||
$template->set_attribute('lang',$etempl->lang);
|
||||
@ -384,7 +384,7 @@
|
||||
}
|
||||
if ($etempl->style != '')
|
||||
{
|
||||
$styles =& new xmlnode('styles');
|
||||
$styles = new xmlnode('styles');
|
||||
$styles->set_value(str_replace("\r",'',$etempl->style));
|
||||
$template->add_node($styles);
|
||||
}
|
||||
@ -403,10 +403,10 @@
|
||||
{
|
||||
echo "<p>etempl->data = "; _debug_array($etempl->data);
|
||||
}
|
||||
$doc =& new xmldoc();
|
||||
$doc = new xmldoc();
|
||||
$doc->add_comment('$'.'Id$');
|
||||
|
||||
$this->xul_overlay =& new xmlnode('overlay'); // global for all add_etempl calls
|
||||
$this->xul_overlay = new xmlnode('overlay'); // global for all add_etempl calls
|
||||
$this->load_via = $etempl->as_array();
|
||||
|
||||
$embeded_too = True;
|
||||
@ -568,7 +568,7 @@
|
||||
{
|
||||
break;
|
||||
}
|
||||
$nul = null; soetemplate::add_child($parent,$nul); // null =& new row
|
||||
$nul = null; soetemplate::add_child($parent,$nul); // null = new row
|
||||
$parent['data'][0]['c'.$parent['rows']] = $attr['class'] . ($attr['valign'] ? ','.$attr['valign'] : '');
|
||||
$parent['data'][0]['h'.$parent['rows']] = $attr['height'] .
|
||||
($attr['disabled'] ? ','.$attr['disabled'] : '');
|
||||
@ -691,7 +691,7 @@
|
||||
unset($attr['src']);
|
||||
break;
|
||||
case 'listbox':
|
||||
$attr['size'] = ereg_replace(',*$','',$attr['rows'].','.$attr['size']);
|
||||
$attr['size'] = preg_replace('/,*$','/',$attr['rows'].','.$attr['size']);
|
||||
unset($attr['rows']);
|
||||
break;
|
||||
case 'button':
|
||||
|
@ -380,7 +380,7 @@ class Script {
|
||||
$if[] = 'address :contains ["To","TO","Cc","CC"] "'.$addr.'"';
|
||||
}
|
||||
$newscriptbody .= 'if anyof ('.implode(', ',$if).") {\n";
|
||||
foreach(split(', ?',$vacation['forwards']) as $addr) {
|
||||
foreach(preg_split('/, ?/',$vacation['forwards']) as $addr) {
|
||||
$newscriptbody .= "\tredirect \"".$addr."\";\n";
|
||||
}
|
||||
$newscriptbody .= "\tkeep;\n}\n";
|
||||
|
@ -60,7 +60,7 @@
|
||||
), $_searchString, 'tid=n', '', 'fn');
|
||||
}
|
||||
}
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
|
||||
if(is_array($contacts)) {
|
||||
$innerHTML = '';
|
||||
|
@ -49,7 +49,7 @@
|
||||
function addACL($_accountName, $_aclData)
|
||||
{
|
||||
if($this->_debug) error_log("ajaxfelamimail::addACL");
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
|
||||
if(!empty($_accountName)) {
|
||||
$acl = implode('',(array)$_aclData['acl']);
|
||||
@ -75,7 +75,7 @@
|
||||
|
||||
if($this->_debug) error_log("ajaxfelamimail::addFolder($parentFolder, $newSubFolder)");
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
|
||||
if($folderName = $this->bofelamimail->createFolder($parentFolder, $newSubFolder, true)) {
|
||||
$parentFolder = $this->_encodeFolderName($parentFolder);
|
||||
@ -213,7 +213,7 @@
|
||||
function deleteACL($_aclData)
|
||||
{
|
||||
if($this->_debug) error_log("ajaxfelamimail::deleteACL");
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
if(is_array($_aclData)) {
|
||||
foreach($_aclData['accountName'] as $accountName) {
|
||||
$data = $this->bofelamimail->deleteACL($this->sessionDataAjax['folderName'], $accountName);
|
||||
@ -232,7 +232,7 @@
|
||||
$bocompose =& CreateObject('felamimail.bocompose', $_composeID);
|
||||
$bocompose->removeAttachment($_attachmentID);
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
return $response->getXML();
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@
|
||||
}
|
||||
$htmlObject = html::fckEditorQuick('body', $_mode, $_content);
|
||||
$this->saveSessionData();
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
$response->addScript('FCKeditorAPI_ConfirmCleanup();');
|
||||
$response->addScript('FCKeditorAPI_Cleanup();');
|
||||
$response->addAssign('editorArea', 'innerHTML', $htmlObject);
|
||||
@ -271,7 +271,7 @@
|
||||
{
|
||||
$folderName = $this->_decodeEntityFolderName($_folderName);
|
||||
if($this->_debug) error_log("ajaxfelamimail::deleteFolder($_folderName)");
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
|
||||
// don't delete this folders
|
||||
if($folderName == 'INBOX' || $folderName == '--topfolder--') {
|
||||
@ -312,7 +312,7 @@
|
||||
unset($signatures);
|
||||
$signatures = $boSignatures->getListOfSignatures();
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
$response->addAssign('signatureTable', 'innerHTML', $this->uiwidgets->createSignatureTable($signatures));
|
||||
return $response->getXML();
|
||||
}
|
||||
@ -325,7 +325,7 @@
|
||||
$boPreferences->setProfileActive(false);
|
||||
if ($accountData) $boPreferences->setProfileActive(true,$accountData);
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
$response->addScript('refreshView();');
|
||||
return $response->getXML();
|
||||
}
|
||||
@ -353,7 +353,7 @@
|
||||
}
|
||||
$accountArray[]=$tempvar;
|
||||
}
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
$response->addAssign('userDefinedAccountTable', 'innerHTML', $this->uiwidgets->createAccountDataTable($accountArray));
|
||||
return $response->getXML();
|
||||
}
|
||||
@ -410,7 +410,7 @@
|
||||
|
||||
function sendNotify ($_uid, $_ret)
|
||||
{
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
if ($_ret==='true') {
|
||||
if ( $this->bofelamimail->sendMDN($_uid) )
|
||||
$this->bofelamimail->flagMessages("mdnsent",array($_uid));
|
||||
@ -425,7 +425,7 @@
|
||||
function generateMessageList($_folderName)
|
||||
{
|
||||
if($this->_debug) error_log("ajaxfelamimail::generateMessageList");
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
|
||||
if($this->_connectionStatus === false) {
|
||||
return $response->getXML();
|
||||
@ -516,7 +516,7 @@
|
||||
$folderName = html_entity_decode($_folderName, ENT_QUOTES, $this->charset);
|
||||
|
||||
if($folderName != '--topfolder--' && $folderStatus = $this->bofelamimail->getFolderStatus($folderName)) {
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
|
||||
if($this->sessionDataAjax['oldFolderName'] == '--topfolder--') {
|
||||
$this->sessionDataAjax['oldFolderName'] = '';
|
||||
@ -565,7 +565,7 @@
|
||||
$this->sessionDataAjax['oldFolderName'] = $folderName;
|
||||
$this->saveSessionData();
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
$response->addAssign("newMailboxName", "value", '');
|
||||
$response->addAssign("folderName", "innerHTML", '');
|
||||
$response->addScript("document.getElementById('newMailboxName').disabled = true;");
|
||||
@ -638,7 +638,7 @@
|
||||
|
||||
return $this->generateMessageList($this->sessionData['mailbox']);
|
||||
} else {
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
$response->addScript('resetMessageSelect();');
|
||||
$response->addScript('tellUser("'.lang('No messages selected, or lost selection. Changing to folder ').'","'.$_folderName.'");');
|
||||
$response->addScript('onNodeSelect("'.$_folderName.'");');
|
||||
@ -677,7 +677,7 @@
|
||||
if ($this->_debug) error_log("ajaxfelamimail::refreshFolder");
|
||||
$GLOBALS['egw']->session->commit_session();
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
|
||||
if ($this->_connectionStatus === true) {
|
||||
$folderName = $this->sessionData['mailbox'];
|
||||
@ -699,7 +699,7 @@
|
||||
if($this->_debug) error_log("ajaxfelamimail::refreshFolderList");
|
||||
$GLOBALS['egw']->session->commit_session();
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
|
||||
if($this->_connectionStatus === true) {
|
||||
$folders = $this->bofelamimail->getFolderObjects();
|
||||
@ -725,7 +725,7 @@
|
||||
$boSignatures = new felamimail_bosignatures();
|
||||
$signatures = $boSignatures->getListOfSignatures();
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
$response->addAssign('signatureTable', 'innerHTML', $this->uiwidgets->createSignatureTable($signatures));
|
||||
return $response->getXML();
|
||||
}
|
||||
@ -750,7 +750,7 @@
|
||||
}
|
||||
$accountArray[]=$tempvar;
|
||||
}
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
$response->addAssign('userDefinedAccountTable', 'innerHTML', $this->uiwidgets->createAccountDataTable($accountArray));
|
||||
return $response->getXML();
|
||||
}
|
||||
@ -802,7 +802,7 @@
|
||||
$table = html::table($tableRows, "style='width:100%'");
|
||||
}
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
$response->addAssign('divAttachments', 'innerHTML', $table);
|
||||
return $response->getXML();
|
||||
}
|
||||
@ -824,7 +824,7 @@
|
||||
$parentFolder = ($_parentFolder == '--topfolder--' ? '' : $parentFolder);
|
||||
if($this->_debug) error_log("ajaxfelamimail::renameFolder work with ($oldFolderName, $parentFolder, $folderName)");
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
if(strtoupper($_oldFolderName) != 'INBOX' ) {
|
||||
if($newFolderName = $this->bofelamimail->renameFolder($oldFolderName, $parentFolder, $folderName)) {
|
||||
//enforce the subscription to the newly named server, as it seems to fail for names with umlauts
|
||||
@ -866,7 +866,7 @@
|
||||
|
||||
$signatureID = $boSignatures->saveSignature($_id, $_description, $_signature, $isDefaultSignature);
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
|
||||
if($_mode == 'save') {
|
||||
#$response->addAssign('signatureID', 'value', $signatureID);
|
||||
@ -887,7 +887,7 @@
|
||||
$Identities = $preferences->getIdentity($identity);
|
||||
//error_log(print_r($Identities->signature,true));
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
$response->addScript('setSignature('.$Identities->signature.');');
|
||||
return $response->getXML();
|
||||
}
|
||||
@ -900,7 +900,7 @@
|
||||
'email_home' => $_searchString,
|
||||
),array('n_fn','email','email_home'),'n_fn','','%',false,'OR',array(0,20));
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
|
||||
if(is_array($contacts)) {
|
||||
$innerHTML = '';
|
||||
@ -988,7 +988,7 @@
|
||||
function updateACL($_user, $_acl)
|
||||
{
|
||||
if ($_acl == 'custom') {
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
return $response->getXML();
|
||||
}
|
||||
|
||||
@ -998,7 +998,7 @@
|
||||
return $this->updateACLView();
|
||||
}
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
// add error message
|
||||
// $response->add???
|
||||
return $response->getXML();
|
||||
@ -1014,7 +1014,7 @@
|
||||
function updateACLView()
|
||||
{
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
if($folderACL = $this->bofelamimail->getIMAPACL($this->sessionDataAjax['folderName'])) {
|
||||
$response->addAssign("aclTable", "innerHTML", $this->createACLTable($folderACL));
|
||||
}
|
||||
@ -1031,7 +1031,7 @@
|
||||
|
||||
$this->bofelamimail->subscribe($folderName, $status);
|
||||
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
return $response->getXML();
|
||||
}
|
||||
|
||||
@ -1059,14 +1059,14 @@
|
||||
|
||||
function updateSingleACL($_accountName, $_aclType, $_aclStatus)
|
||||
{
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
$data = $this->bofelamimail->updateSingleACL($this->sessionDataAjax['folderName'], $_accountName, $_aclType, $_aclStatus);
|
||||
return $response->getXML();
|
||||
}
|
||||
|
||||
function xajaxFolderInfo($_formValues)
|
||||
{
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
|
||||
$response->addAssign("field1", "value", $_formValues['num1']);
|
||||
$response->addAssign("field2", "value", $_formValues['num2']);
|
||||
|
@ -126,7 +126,7 @@
|
||||
|
||||
// setting up an async job to enable/disable the vacation message
|
||||
include_once(EGW_API_INC.'/class.asyncservice.inc.php');
|
||||
$async =& new asyncservice();
|
||||
$async = new asyncservice();
|
||||
$user = $GLOBALS['egw_info']['user']['account_id'];
|
||||
$async->delete($async_id ="felamimail-vacation-$user");
|
||||
$end_date = $_vacation['end_date'] + 24*3600; // end-date is inclusive, so we have to add 24h
|
||||
|
@ -257,7 +257,7 @@
|
||||
|
||||
if ($_vacation['forwards'])
|
||||
{
|
||||
foreach(split(', ?',$_vacation['forwards']) as $addr)
|
||||
foreach(preg_split('/, ?/',$_vacation['forwards']) as $addr)
|
||||
{
|
||||
if (!preg_match($regexp,$addr))
|
||||
{
|
||||
@ -522,7 +522,7 @@
|
||||
// store text as default
|
||||
if (isset($_POST['set_as_default']))
|
||||
{
|
||||
$config =& new config('felamimail');
|
||||
$config = new config('felamimail');
|
||||
$config->save_value('default_vacation_text',$_POST['vacation_text'],'felamimail');
|
||||
}
|
||||
$this->t->set_var('set_as_default','<input type="submit" name="set_as_default" value="'.htmlspecialchars(lang('Set as default')).'" />');
|
||||
@ -581,7 +581,7 @@
|
||||
|
||||
// vacation text
|
||||
if (empty($vacation['text'])) {
|
||||
$config =& new config('felamimail');
|
||||
$config = new config('felamimail');
|
||||
$config = $config->read_repository();
|
||||
$vacation['text'] = $config['default_vacation_text'];
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ class uidefinitions
|
||||
$GLOBALS['egw_info']['flags']['currentapp'] = self::_appname;
|
||||
|
||||
$GLOBALS['egw_info']['flags']['include_xajax'] = true;
|
||||
$this->etpl =& new etemplate();
|
||||
$this->etpl = new etemplate();
|
||||
$this->clock = html::image(self::_appname,'clock');
|
||||
$this->steps = array(
|
||||
'wizzard_step10' => lang('Choose an application'),
|
||||
@ -112,7 +112,7 @@ class uidefinitions
|
||||
}
|
||||
|
||||
}
|
||||
$etpl =& new etemplate(self::_appname.'.definition_index');
|
||||
$etpl = new etemplate(self::_appname.'.definition_index');
|
||||
|
||||
// we need an offset because of autocontinued rows in etemplate ...
|
||||
$definitions = array('row0');
|
||||
@ -213,7 +213,7 @@ class uidefinitions
|
||||
|
||||
if(class_exists('xajaxResponse'))
|
||||
{
|
||||
$this->response =& new xajaxResponse();
|
||||
$this->response = new xajaxResponse();
|
||||
|
||||
if ($content['closewindow'])
|
||||
{
|
||||
@ -245,7 +245,7 @@ class uidefinitions
|
||||
// adding a manual icon to every popup
|
||||
if ($GLOBALS['egw_info']['user']['apps']['manual'])
|
||||
{
|
||||
$manual =& new etemplate('etemplate.popup.manual');
|
||||
$manual = new etemplate('etemplate.popup.manual');
|
||||
echo $manual->exec(self::_appname.'.uidefinitions.wizzard',$content,$sel_options,$readonlys,$preserv,1);
|
||||
unset($manual);
|
||||
}
|
||||
@ -271,7 +271,7 @@ class uidefinitions
|
||||
/*if($content['plugin'] && $content['application']&& !is_object($this->plugin))
|
||||
{
|
||||
$plugin_definition = $this->plugins[$content['application']][$content['plugin']]['definition'];
|
||||
if($plugin_definition) $this->plugin =& new $plugin_definition;
|
||||
if($plugin_definition) $this->plugin = new $plugin_definition;
|
||||
}*/
|
||||
if(is_object($this->plugin))
|
||||
{
|
||||
@ -446,7 +446,7 @@ class uidefinitions
|
||||
}
|
||||
else
|
||||
{
|
||||
$etpl =& new etemplate(self::_appname.'.import_definition');
|
||||
$etpl = new etemplate(self::_appname.'.import_definition');
|
||||
return $etpl->exec(self::_appname.'.uidefinitions.import_definition',$content,array(),$readonlys,$preserv);
|
||||
}
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ class uiexport {
|
||||
elseif(class_exists('xajaxResponse'))
|
||||
{
|
||||
//error_log(__LINE__.__FILE__.'$_content: '.print_r($_content,true));
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
|
||||
if ($_content['defintion'] == 'expert') {
|
||||
$definition = new definition();
|
||||
|
@ -429,8 +429,8 @@ case 'import':
|
||||
{
|
||||
if (ereg((string) $pattern,$val))
|
||||
{
|
||||
// echo "<p>csv_idx='$csv_idx',info='$info',trans_csv=".print_r($trans_csv).",ereg_replace('$pattern','$replace','$val') = ";
|
||||
$val = ereg_replace((string) $pattern,str_replace($VPre,'\\',$replace),(string) $val);
|
||||
// echo "<p>csv_idx='$csv_idx',info='$info',trans_csv=".print_r($trans_csv).",preg_replace('/$pattern/','$replace','$val') = ";
|
||||
$val = preg_replace('/'.(string) $pattern.'/',str_replace($VPre,'\\',$replace),(string) $val);
|
||||
// echo "'$val'</p>";
|
||||
|
||||
$reg = $CPreReg.'([a-zA-Z_0-9]+)'.$CPosReg;
|
||||
@ -485,7 +485,7 @@ case 'import':
|
||||
{
|
||||
$responsible = $values['responsible'];
|
||||
$values['responsible'] = array();
|
||||
foreach(split('[,;]',$responsible) as $user)
|
||||
foreach(preg_split('/[,;]/',$responsible) as $user)
|
||||
{
|
||||
if (preg_match('/\[([^\]]+)\]/',$user,$matches)) $user = $matches[1];
|
||||
if ($user && !is_numeric($user)) $user = $GLOBALS['egw']->accounts->name2id($user);
|
||||
|
@ -209,7 +209,7 @@ class infolog_customfields
|
||||
{
|
||||
foreach(explode("\n",$field['values']) as $line)
|
||||
{
|
||||
list($var,$value) = split('=',trim($line),2);
|
||||
list($var,$value) = explode('=',trim($line),2);
|
||||
$var = trim($var);
|
||||
$values[$var] = empty($value) ? $var : $value;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ class infolog_datasource extends datasource
|
||||
// we use $GLOBALS['infolog_bo'] as an already running instance might be availible there
|
||||
if (!is_object($GLOBALS['infolog_bo']))
|
||||
{
|
||||
$GLOBALS['infolog_bo'] =& new infolog_bo();
|
||||
$GLOBALS['infolog_bo'] = new infolog_bo();
|
||||
}
|
||||
$this->infolog_bo =& $GLOBALS['infolog_bo'];
|
||||
}
|
||||
@ -150,7 +150,7 @@ class infolog_datasource extends datasource
|
||||
if (!is_object($GLOBALS['infolog_bo']))
|
||||
{
|
||||
include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.infolog_bo.inc.php');
|
||||
$GLOBALS['infolog_bo'] =& new infolog_bo();
|
||||
$GLOBALS['infolog_bo'] = new infolog_bo();
|
||||
}
|
||||
// dont delete infolog, which are linked to other elements, but their project
|
||||
if (count(egw_link::get_links('infolog',$id)) > 1)
|
||||
|
@ -34,7 +34,7 @@ class infolog_groupdav extends groupdav_handler
|
||||
{
|
||||
parent::__construct($app,$debug,$base_uri);
|
||||
|
||||
$this->bo =& new infolog_bo();
|
||||
$this->bo = new infolog_bo();
|
||||
}
|
||||
|
||||
const PATH_ATTRIBUTE = 'info_id';
|
||||
@ -219,7 +219,7 @@ class infolog_groupdav extends groupdav_handler
|
||||
*/
|
||||
private function _get_handler()
|
||||
{
|
||||
$handler =& new infolog_ical();
|
||||
$handler = new infolog_ical();
|
||||
$handler->setSupportedFields('GroupDAV',$this->agent);
|
||||
|
||||
return $handler;
|
||||
|
@ -60,7 +60,7 @@ class infolog_widget
|
||||
function infolog_widget($ui)
|
||||
{
|
||||
$this->ui = $ui;
|
||||
$this->infolog =& new infolog_bo();
|
||||
$this->infolog = new infolog_bo();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -402,7 +402,7 @@ else
|
||||
|
||||
foreach($_GET as $name => $value)
|
||||
{
|
||||
if(ereg('phpgw_',$name))
|
||||
if(strpos($name,'phpgw_') !== false)
|
||||
{
|
||||
$extra_vars .= '&' . $name . '=' . urlencode($value);
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ class ajaxnotifications {
|
||||
* @return xajax response
|
||||
*/
|
||||
public function get_popup_notifications() {
|
||||
$response =& new xajaxResponse();
|
||||
$response = new xajaxResponse();
|
||||
$session_id = $GLOBALS['egw_info']['user']['sessionid'];
|
||||
$message = '';
|
||||
$rs = $this->db->select(self::_notification_table,
|
||||
|
@ -390,7 +390,7 @@ class ADODB_DataDict {
|
||||
if ($flds) {
|
||||
list($lines,$pkey) = $this->_GenFields($flds);
|
||||
list(,$first) = each($lines);
|
||||
list(,$column_def) = split("[\t ]+",$first,2);
|
||||
list(,$column_def) = preg_split("/[\t ]+/",$first,2);
|
||||
}
|
||||
return array(sprintf($this->renameColumn,$tabname,$this->NameQuote($oldcolumn),$this->NameQuote($newcolumn),$column_def));
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ class DB
|
||||
{
|
||||
include_once(ADODB_DIR."/drivers/adodb-$type.inc.php");
|
||||
$obj = &NewADOConnection($type);
|
||||
if (!is_object($obj)) $obj =& new PEAR_Error('Unknown Database Driver: '.$dsninfo['phptype'],-1);
|
||||
if (!is_object($obj)) $obj = new PEAR_Error('Unknown Database Driver: '.$dsninfo['phptype'],-1);
|
||||
return $obj;
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ class DB
|
||||
|
||||
@$obj =& NewADOConnection($type);
|
||||
if (!is_object($obj)) {
|
||||
$obj =& new PEAR_Error('Unknown Database Driver: '.$dsninfo['phptype'],-1);
|
||||
$obj = new PEAR_Error('Unknown Database Driver: '.$dsninfo['phptype'],-1);
|
||||
return $obj;
|
||||
}
|
||||
if (is_array($options)) {
|
||||
|
@ -75,10 +75,10 @@ function& adodb_log_sql(&$conn,$sql,$inputarr)
|
||||
$conn->_logsql = false; // disable logsql error simulation
|
||||
$dbT = $conn->databaseType;
|
||||
|
||||
$a0 = split(' ',$t0);
|
||||
$a0 = explode(' ',$t0);
|
||||
$a0 = (float)$a0[1]+(float)$a0[0];
|
||||
|
||||
$a1 = split(' ',$t1);
|
||||
$a1 = explode(' ',$t1);
|
||||
$a1 = (float)$a1[1]+(float)$a1[0];
|
||||
|
||||
$time = $a1 - $a0;
|
||||
|
@ -350,7 +350,7 @@ class dbTable extends dbObject {
|
||||
*/
|
||||
function &addIndex( $attributes ) {
|
||||
$name = strtoupper( $attributes['NAME'] );
|
||||
$this->indexes[$name] =& new dbIndex( $this, $attributes );
|
||||
$this->indexes[$name] = new dbIndex( $this, $attributes );
|
||||
return $this->indexes[$name];
|
||||
}
|
||||
|
||||
@ -362,7 +362,7 @@ class dbTable extends dbObject {
|
||||
*/
|
||||
function &addData( $attributes ) {
|
||||
if( !isset( $this->data ) ) {
|
||||
$this->data =& new dbData( $this, $attributes );
|
||||
$this->data = new dbData( $this, $attributes );
|
||||
}
|
||||
return $this->data;
|
||||
}
|
||||
|
@ -885,7 +885,7 @@
|
||||
}
|
||||
|
||||
if ($this->_queryID === true) { // return simplified recordset for inserts/updates/deletes with lower overhead
|
||||
$rs =& new ADORecordSet_empty();
|
||||
$rs = new ADORecordSet_empty();
|
||||
return $rs;
|
||||
}
|
||||
|
||||
@ -1853,7 +1853,7 @@
|
||||
|
||||
if (empty($this->_metars)) {
|
||||
$rsclass = $this->rsPrefix.$this->databaseType;
|
||||
$this->_metars =& new $rsclass(false,$this->fetchMode);
|
||||
$this->_metars = new $rsclass(false,$this->fetchMode);
|
||||
}
|
||||
|
||||
return $this->_metars->MetaType($t,$len,$fieldobj);
|
||||
|
@ -369,7 +369,7 @@ class ADORecordset_informix72 extends ADORecordSet {
|
||||
foreach($fp as $k => $v) {
|
||||
$o = new ADOFieldObject;
|
||||
$o->name = $k;
|
||||
$arr = split(';',$v); //"SQLTYPE;length;precision;scale;ISNULLABLE"
|
||||
$arr = explode(';',$v); //"SQLTYPE;length;precision;scale;ISNULLABLE"
|
||||
$o->type = $arr[0];
|
||||
$o->max_length = $arr[1];
|
||||
$this->_fieldprops[] = $o;
|
||||
|
@ -422,7 +422,7 @@ See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/od
|
||||
}
|
||||
if (empty($qid)) return $false;
|
||||
|
||||
$rs =& new ADORecordSet_odbc($qid);
|
||||
$rs = new ADORecordSet_odbc($qid);
|
||||
$ADODB_FETCH_MODE = $savem;
|
||||
|
||||
if (!$rs) return $false;
|
||||
|
@ -647,7 +647,7 @@ WHERE c2.relname=\'%s\' or c2.relname=lower(\'%s\')';
|
||||
if (strlen($db) == 0) $db = 'template1';
|
||||
$db = adodb_addslashes($db);
|
||||
if ($str) {
|
||||
$host = split(":", $str);
|
||||
$host = explode(":", $str);
|
||||
if ($host[0]) $str = "host=".adodb_addslashes($host[0]);
|
||||
else $str = 'host=localhost';
|
||||
if (isset($host[1])) $str .= " port=$host[1]";
|
||||
|
@ -77,7 +77,7 @@ class ADODB_sybase_ase extends ADODB_sybase {
|
||||
|
||||
$retarr = array();
|
||||
while (!$rs->EOF) {
|
||||
$fld =& new ADOFieldObject();
|
||||
$fld = new ADOFieldObject();
|
||||
$fld->name = $rs->Fields('field_name');
|
||||
$fld->type = $rs->Fields('type');
|
||||
$fld->max_length = $rs->Fields('width');
|
||||
|
@ -21,14 +21,14 @@ class ADODB_Encrypt_MD5 {
|
||||
/**
|
||||
*/
|
||||
function write($data, $key) {
|
||||
$md5crypt =& new MD5Crypt();
|
||||
$md5crypt = new MD5Crypt();
|
||||
return $md5crypt->encrypt($data, $key);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
function read($data, $key) {
|
||||
$md5crypt =& new MD5Crypt();
|
||||
$md5crypt = new MD5Crypt();
|
||||
return $md5crypt->decrypt($data, $key);
|
||||
}
|
||||
|
||||
|
@ -482,7 +482,7 @@ class accounts_sql
|
||||
*/
|
||||
function update_lastlogin($account_id, $ip)
|
||||
{
|
||||
$previous_login = $this->db->select($this->table,'account_lastlogin',array('account_id'=>abs($account_id)),__LINE__,__FILE__)->fetchSingle();
|
||||
$previous_login = $this->db->select($this->table,'account_lastlogin',array('account_id'=>abs($account_id)),__LINE__,__FILE__)->fetchColumn();
|
||||
|
||||
$this->db->update($this->table,array(
|
||||
'account_lastloginfrom' => $ip,
|
||||
|
@ -436,7 +436,7 @@ class acl
|
||||
'acl_location' => $location,
|
||||
'acl_account' => $account_id,
|
||||
'acl_appname' => $appname,
|
||||
),__LINE__,__FILE__)->fetchSingle();
|
||||
),__LINE__,__FILE__)->fetchColumn();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -604,7 +604,7 @@ class asyncservice
|
||||
while ($line = fgets($crontab,256))
|
||||
{
|
||||
if ($this->debug) echo 'line '.++$n.": $line<br>\n";
|
||||
$parts = split(' ',$line,6);
|
||||
$parts = explode(' ',$line,6);
|
||||
|
||||
if ($line{0} == '#' || count($parts) < 6 || ($parts[5]{0} != '/' && substr($parts[5],0,3) != 'php'))
|
||||
{
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
function authenticate($username, $passwd)
|
||||
{
|
||||
if (ereg('[()|&=*,<>!~]',$username))
|
||||
if (preg_match('/[()|&=*,<>!~]/',$username))
|
||||
{
|
||||
return False;
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ class auth_
|
||||
'account_id' => $account_id,
|
||||
'account_type' => 'u',
|
||||
'account_status' => 'A',
|
||||
),__LINE__,__FILE__)->fetchSingle()) === false)
|
||||
),__LINE__,__FILE__)->fetchColumn()) === false)
|
||||
{
|
||||
return false; // account not found
|
||||
}
|
||||
|
@ -39,30 +39,30 @@
|
||||
/*
|
||||
Determine browser and version
|
||||
*/
|
||||
if(ereg('MSIE ([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
|
||||
if(preg_match('/MSIE ([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version))
|
||||
{
|
||||
$this->BROWSER_VER = $log_version[1];
|
||||
$this->BROWSER_AGENT = 'IE';
|
||||
}
|
||||
elseif(ereg('Opera ([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version) ||
|
||||
ereg('Opera/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
|
||||
elseif(preg_match('/Opera ([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version) ||
|
||||
preg_match('/Opera\\/([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version))
|
||||
{
|
||||
$this->BROWSER_VER = $log_version[1];
|
||||
$this->BROWSER_AGENT = 'OPERA';
|
||||
}
|
||||
elseif(eregi('iCab ([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version) ||
|
||||
eregi('iCab/([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version))
|
||||
elseif(preg_match('/iCab ([0-9].[0-9a-zA-Z]{1,4})/i',$HTTP_USER_AGENT,$log_version) ||
|
||||
preg_match('/iCab\\/([0-9].[0-9a-zA-Z]{1,4})/i',$HTTP_USER_AGENT,$log_version))
|
||||
{
|
||||
$this->BROWSER_VER = $log_version[1];
|
||||
$this->BROWSER_AGENT = 'iCab';
|
||||
}
|
||||
elseif(ereg('Gecko',$HTTP_USER_AGENT,$log_version))
|
||||
elseif(strpos($HTTP_USER_AGENT,'Gecko') !== false)
|
||||
{
|
||||
$this->BROWSER_VER = $log_version[1];
|
||||
$this->BROWSER_AGENT = 'MOZILLA';
|
||||
}
|
||||
elseif(ereg('Konqueror/([0-9].[0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version) ||
|
||||
ereg('Konqueror/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
|
||||
elseif(preg_match('/Konqueror\\/([0-9].[0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version) ||
|
||||
preg_match('/Konqueror\\/([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version))
|
||||
{
|
||||
$this->BROWSER_VER=$log_version[1];
|
||||
$this->BROWSER_AGENT='Konqueror';
|
||||
|
@ -94,7 +94,7 @@ class categories
|
||||
case 'mains': $where = 'cat_parent = 0'; break;
|
||||
default: return False;
|
||||
}
|
||||
return $this->db->select($this->table,'COUNT(*)',$where,__LINE__,__FILE__)->fetchSingle();
|
||||
return $this->db->select($this->table,'COUNT(*)',$where,__LINE__,__FILE__)->fetchColumn();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -190,7 +190,7 @@ class categories
|
||||
$where = '(cat_appname=' . $this->db->quote($this->app_name) . ' AND ' . $grant_cats . $global_cats . ')'
|
||||
. $parent_filter . $querymethod . $filter;
|
||||
|
||||
$this->total_records = $this->db->select($this->table,'COUNT(*)',$where,__LINE__,__FILE__)->fetchSingle();
|
||||
$this->total_records = $this->db->select($this->table,'COUNT(*)',$where,__LINE__,__FILE__)->fetchColumn();
|
||||
|
||||
if (!$this->total_records) return false;
|
||||
|
||||
@ -731,7 +731,7 @@ class categories
|
||||
}
|
||||
}
|
||||
$where[] = $grant_cats . ")";
|
||||
return $cache[$type][$cat_name][$cat_id][$private] = $this->db->select($this->table,'cat_id',$where,__LINE__,__FILE__)->fetchSingle();
|
||||
return $cache[$type][$cat_name][$cat_id][$private] = $this->db->select($this->table,'cat_id',$where,__LINE__,__FILE__)->fetchColumn();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -606,7 +606,7 @@
|
||||
{
|
||||
while ($file = readdir($dh))
|
||||
{
|
||||
if (eregi("\.css$", $file) && $file != 'phpgw.css')
|
||||
if (preg_match('/'."\.css$".'/i', $file) && $file != 'phpgw.css')
|
||||
{
|
||||
$list[] = substr($file,0,strpos($file,'.'));
|
||||
}
|
||||
@ -618,7 +618,7 @@
|
||||
$dh = opendir(EGW_SERVER_ROOT . '/phpgwapi/themes');
|
||||
while ($file = readdir($dh))
|
||||
{
|
||||
if (eregi("\.theme$", $file))
|
||||
if (preg_match('/'."\.theme$".'/i', $file))
|
||||
{
|
||||
$list[] = substr($file,0,strpos($file,'.'));
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ class contenthistory
|
||||
'sync_contentid' => $_id,
|
||||
);
|
||||
|
||||
if (($ts = $this->db->select(self::TABLE,$col,$where,__LINE__,__FILE__)->fetchSingle()))
|
||||
if (($ts = $this->db->select(self::TABLE,$col,$where,__LINE__,__FILE__)->fetchColumn()))
|
||||
{
|
||||
$ts = $this->db->from_timestamp($ts);
|
||||
}
|
||||
@ -155,7 +155,7 @@ class contenthistory
|
||||
'sync_contentid' => $_id,
|
||||
);
|
||||
|
||||
if (!$this->db->select(self::TABLE,'sync_contentid',$where,__LINE__,__FILE__)->fetchSingle())
|
||||
if (!$this->db->select(self::TABLE,'sync_contentid',$where,__LINE__,__FILE__)->fetchColumn())
|
||||
{
|
||||
$this->db->insert(self::TABLE,$newData,array(),__LINE__,__FILE__);
|
||||
}
|
||||
|
@ -84,9 +84,9 @@ class egw extends egw_minimal
|
||||
// check if eGW is already setup, if not redirect to setup/
|
||||
try {
|
||||
$this->db->connect();
|
||||
if (!($num_config = $this->db->select(config::TABLE,'COUNT(config_name)',false,__LINE__,__FILE__)->fetchSingle()))
|
||||
if (!($num_config = $this->db->select(config::TABLE,'COUNT(config_name)',false,__LINE__,__FILE__)->fetchColumn()))
|
||||
{
|
||||
$phpgw_config = $this->db->select('phpgw_config','COUNT(config_name)',false,__LINE__,__FILE__)->fetchSingle();
|
||||
$phpgw_config = $this->db->select('phpgw_config','COUNT(config_name)',false,__LINE__,__FILE__)->fetchColumn();
|
||||
}
|
||||
}
|
||||
catch(Exception $e) {
|
||||
@ -113,7 +113,7 @@ class egw extends egw_minimal
|
||||
$system_charset = $this->db->select(config::TABLE,'config_value',array(
|
||||
'config_app' => 'phpgwapi',
|
||||
'config_name' => 'system_charset',
|
||||
),__LINE__,__FILE__)->fetchSingle();
|
||||
),__LINE__,__FILE__)->fetchColumn();
|
||||
if ($system_charset)
|
||||
{
|
||||
$this->db->Link_ID->SetCharSet($system_charset);
|
||||
|
@ -39,7 +39,7 @@
|
||||
* egw_db allows to use exceptions to catch sql-erros, not existing tables or failure to connect to the database, eg.:
|
||||
* try {
|
||||
* $this->db->connect();
|
||||
* $num_config = $this->db->select(config::TABLE,'COUNT(config_name)',false,__LINE__,__FILE__)->fetchSingle();
|
||||
* $num_config = $this->db->select(config::TABLE,'COUNT(config_name)',false,__LINE__,__FILE__)->fetchColumn();
|
||||
* }
|
||||
* catch(Exception $e) {
|
||||
* echo "Connection to DB failed (".$e->getMessage().")!\n";
|
||||
|
@ -641,7 +641,7 @@ abstract class egw_framework
|
||||
{
|
||||
require_once(EGW_SERVER_ROOT.'/phpgwapi/inc/xajax.inc.php');
|
||||
|
||||
$xajax =& new xajax($GLOBALS['egw']->link('/xajax.php'), 'xajax_', $GLOBALS['egw']->translation->charset());
|
||||
$xajax = new xajax($GLOBALS['egw']->link('/xajax.php'), 'xajax_', $GLOBALS['egw']->translation->charset());
|
||||
$xajax->waitCursorOff();
|
||||
$xajax->registerFunction("doXMLHTTP");
|
||||
|
||||
|
@ -689,7 +689,7 @@ class egw_session
|
||||
'account_id = 0',
|
||||
'ip' => $ip,
|
||||
"li > $block_time",
|
||||
),__LINE__,__FILE__)->fetchSingle()) > $GLOBALS['egw_info']['server']['num_unsuccessful_ip'])
|
||||
),__LINE__,__FILE__)->fetchColumn()) > $GLOBALS['egw_info']['server']['num_unsuccessful_ip'])
|
||||
{
|
||||
//echo "<p>login_blocked: ip='$ip' ".$this->db->f(0)." trys (".$GLOBALS['egw_info']['server']['num_unsuccessful_ip']." max.) since ".date('Y/m/d H:i',$block_time)."</p>\n";
|
||||
$blocked = true;
|
||||
@ -698,7 +698,7 @@ class egw_session
|
||||
'account_id = 0',
|
||||
'(loginid = '.$GLOBALS['egw']->db->quote($login).' OR loginid LIKE '.$GLOBALS['egw']->db->quote($login.'@%').')',
|
||||
"li > $block_time",
|
||||
),__LINE__,__FILE__)->fetchSingle()) > $GLOBALS['egw_info']['server']['num_unsuccessful_id'])
|
||||
),__LINE__,__FILE__)->fetchColumn()) > $GLOBALS['egw_info']['server']['num_unsuccessful_id'])
|
||||
{
|
||||
//echo "<p>login_blocked: login='$login' ".$this->db->f(0)." trys (".$GLOBALS['egw_info']['server']['num_unsuccessful_id']." max.) since ".date('Y/m/d H:i',$block_time)."</p>\n";
|
||||
$blocked = true;
|
||||
|
@ -61,7 +61,7 @@
|
||||
}
|
||||
$fname = $parms['file'];
|
||||
$line = $parms['line'];
|
||||
if (eregi('([DIWEF])-([[:alnum:]]*)\, (.*)',$etext,$match))
|
||||
if (preg_match('/([DIWEF])-([[:alnum:]]*)\, (.*)/i',$etext,$match))
|
||||
{
|
||||
$this->severity = strtoupper($match[1]);
|
||||
$this->code = $match[2];
|
||||
|
@ -459,7 +459,7 @@
|
||||
}
|
||||
break;
|
||||
case 'expires':
|
||||
if(ereg("^((Mon|Monday|Tue|Tuesday|Wed|Wednesday|Thu|Thursday|Fri|Friday|Sat|Saturday|Sun|Sunday), )?([0-9]{2})\\-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\-([0-9]{2,4}) ([0-9]{2})\\:([0-9]{2})\\:([0-9]{2}) GMT$",$value,$matches))
|
||||
if(preg_match('/'."^((Mon|Monday|Tue|Tuesday|Wed|Wednesday|Thu|Thursday|Fri|Friday|Sat|Saturday|Sun|Sunday), )?([0-9]{2})\\-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\-([0-9]{2,4}) ([0-9]{2})\\:([0-9]{2})\\:([0-9]{2}) GMT$".'/',$value,$matches))
|
||||
{
|
||||
$year = (int)$matches[5];
|
||||
if($year<1900)
|
||||
|
@ -81,7 +81,7 @@
|
||||
|
||||
function interserver($serverid='')
|
||||
{
|
||||
$url = eregi_replace('https*://[^/]*/','',$GLOBALS['egw_info']['server']['webserver_url']);
|
||||
$url = preg_replace('/https*:\\/\\/[^\\/]*\\//i','',$GLOBALS['egw_info']['server']['webserver_url']);
|
||||
$this->urlparts = array(
|
||||
'xmlrpc' => $url.'/xmlrpc.php',
|
||||
'soap' => $url.'/soap.php'
|
||||
|
@ -309,7 +309,7 @@
|
||||
$thyapi_comp = 'thyapi_comp_gecko.js';
|
||||
}
|
||||
|
||||
$GLOBALS['egw_info']['flags']['java_script_globals']['jsapi']['imgDir'] = $GLOBALS['egw_info']['server']['webserver_url'].'/'.'phpgwapi/images';
|
||||
$GLOBALS['egw_info']['flags']['java_script_globals']['jsapi']['imgDir'] = $GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/images';
|
||||
if (EGW_UNCOMPRESSED_THYAPI)
|
||||
{
|
||||
$jsCode = "<!-- JS Global Variables and ThyAPI Insertion -->\n" .
|
||||
|
@ -204,8 +204,8 @@ function monthClicked(calendar,monthstart) {
|
||||
{
|
||||
return False;
|
||||
}
|
||||
$fields = split('[./-]',$datestr);
|
||||
foreach(split('[./-]',$this->dateformat) as $n => $field)
|
||||
$fields = preg_split('/[.\\/-]/',$datestr);
|
||||
foreach(preg_split('/[.\\/-]/',$this->dateformat) as $n => $field)
|
||||
{
|
||||
if ($field == 'M')
|
||||
{
|
||||
|
@ -496,7 +496,7 @@ class PHPMailer {
|
||||
$to .= $this->AddrFormat($this->to[$i]);
|
||||
}
|
||||
|
||||
$toArr = split(',', $to);
|
||||
$toArr = explode(',', $to);
|
||||
|
||||
$params = sprintf("-oi -f %s", $this->Sender);
|
||||
if ($this->Sender != '' && strlen(ini_get('safe_mode'))< 1) {
|
||||
@ -1779,7 +1779,7 @@ class PHPMailer {
|
||||
$directory = dirname($url);
|
||||
($directory == '.')?$directory='':'';
|
||||
$cid = 'cid:' . md5($filename);
|
||||
$fileParts = split("\.", $filename);
|
||||
$fileParts = explode("\.", $filename);
|
||||
$ext = $fileParts[1];
|
||||
$mimeType = $this->_mime_types($ext);
|
||||
if ( strlen($basedir) > 1 && substr($basedir,-1) != '/') { $basedir .= '/'; }
|
||||
|
@ -53,12 +53,12 @@
|
||||
$this->action = '';
|
||||
|
||||
// endpoint mangling
|
||||
if(ereg("^http://",$path))
|
||||
if(preg_match('/'."^http:\\/\\/".'/',$path))
|
||||
{
|
||||
$path = str_replace('http://','',$path);
|
||||
$this->path = strstr($path,'/');
|
||||
$this->debug("path = $this->path");
|
||||
if(ereg(':',$path))
|
||||
if(preg_match('/:/',$path))
|
||||
{
|
||||
$this->server = substr($path,0,strpos($path,':'));
|
||||
$this->port = substr(strstr($path,':'),1);
|
||||
|
@ -134,15 +134,15 @@
|
||||
$this->parent = $pos;
|
||||
|
||||
// set status
|
||||
if(ereg(":Envelope$",$name))
|
||||
if(preg_match('/'.":Envelope$".'/',$name))
|
||||
{
|
||||
$this->status = 'envelope';
|
||||
}
|
||||
elseif(ereg(":Header$",$name))
|
||||
elseif(preg_match('/'.":Header$".'/',$name))
|
||||
{
|
||||
$this->status = 'header';
|
||||
}
|
||||
elseif(ereg(":Body$",$name))
|
||||
elseif(preg_match('/'.":Body$".'/',$name))
|
||||
{
|
||||
$this->status = 'body';
|
||||
// set method
|
||||
@ -150,7 +150,7 @@
|
||||
elseif($this->status == 'body')
|
||||
{
|
||||
$this->status = 'method';
|
||||
if(ereg(':',$name))
|
||||
if(preg_match('/:/',$name))
|
||||
{
|
||||
$this->root_struct_name = substr(strrchr($name,':'),1);
|
||||
}
|
||||
@ -169,7 +169,7 @@
|
||||
// set attrs
|
||||
$this->message[$pos]['attrs'] = $attrs;
|
||||
// get namespace
|
||||
if(ereg(":",$name))
|
||||
if(preg_match('/'.":".'/',$name))
|
||||
{
|
||||
$namespace = substr($name,0,strpos($name,':'));
|
||||
$this->message[$pos]['namespace'] = $namespace;
|
||||
@ -185,7 +185,7 @@
|
||||
/* foreach($attrs as $key => $value) */
|
||||
{
|
||||
// if ns declarations, add to class level array of valid namespaces
|
||||
if(ereg('xmlns:',$key))
|
||||
if(preg_match('/xmlns:/',$key))
|
||||
{
|
||||
$namespaces[substr(strrchr($key,':'),1)] = $value;
|
||||
if($name == $this->root_struct_name)
|
||||
@ -280,11 +280,11 @@
|
||||
{
|
||||
$this->status = 'body';
|
||||
}
|
||||
elseif(ereg(':Body',$name))
|
||||
elseif(preg_match('/:Body/',$name))
|
||||
{
|
||||
$this->status = 'header';
|
||||
}
|
||||
elseif(ereg(':Header',$name))
|
||||
elseif(preg_match('/:Header/',$name))
|
||||
{
|
||||
$this->status = 'envelope';
|
||||
}
|
||||
|
@ -81,13 +81,13 @@
|
||||
if($headers_array["SOAPAction"])
|
||||
{
|
||||
$action = str_replace('"','',$headers_array["SOAPAction"]);
|
||||
if(ereg("^urn:",$action))
|
||||
if(preg_match('/'."^urn:".'/',$action))
|
||||
{
|
||||
$this->service = substr($action,4);
|
||||
}
|
||||
elseif(ereg(".php",$action))
|
||||
elseif(preg_match('/'.".php".'/',$action))
|
||||
{
|
||||
$this->service = ereg_replace('"|/','',substr(strrchr($action,".php"),4,strlen(strrchr($action,"/"))));
|
||||
$this->service = preg_replace('/"|\\/','/',substr(strrchr($action,".php"),4,strlen(strrchr($action,"/"))));
|
||||
}
|
||||
$this->debug("got service: $this->service");
|
||||
}
|
||||
@ -105,7 +105,7 @@
|
||||
$this->debug("method name: $this->methodname");
|
||||
|
||||
// does method exist?
|
||||
$test = ereg_replace("\.",'_',$this->methodname);
|
||||
$test = preg_replace('/'."\.".'/','_',$this->methodname);
|
||||
if(function_exists($test))
|
||||
{
|
||||
$method = $this->methodname = $test;
|
||||
@ -115,7 +115,7 @@
|
||||
{
|
||||
/* egroupware customization - createobject based on methodname */
|
||||
list($app,$class,$method) = explode('.',$this->methodname);
|
||||
if(ereg("^service",$app))
|
||||
if(preg_match('/'."^service".'/',$app))
|
||||
{
|
||||
$args = $class;
|
||||
$class = 'service';
|
||||
|
@ -111,12 +111,12 @@
|
||||
$this->debug("Entering parseResponse()");
|
||||
//$this->debug(" w/ data $data");
|
||||
// strip headers here
|
||||
//$clean_data = ereg_replace("\r\n","\n", $data);
|
||||
if(ereg("^.*\r\n\r\n<",$data))
|
||||
//$clean_data = preg_replace('/'."\r\n".'/',"\n", $data);
|
||||
if(preg_match('/'."^.*\r\n\r\n<".'/',$data))
|
||||
{
|
||||
$this->debug("found proper seperation of headers and document");
|
||||
$this->debug("getting rid of headers, stringlen: ".strlen($data));
|
||||
$clean_data = ereg_replace("^.*\r\n\r\n<","<", $data);
|
||||
$clean_data = preg_replace('/'."^.*\r\n\r\n<".'/',"<", $data);
|
||||
$this->debug("cleaned data, stringlen: ".strlen($clean_data));
|
||||
}
|
||||
else
|
||||
@ -134,7 +134,7 @@
|
||||
}
|
||||
/*
|
||||
// if response is a proper http response, and is not a 200
|
||||
if(ereg("^HTTP",$clean_data) && !ereg("200$", $clean_data))
|
||||
if(preg_match('/'."^HTTP".'/',$clean_data) && !preg_match('/'."200$".'/', $clean_data))
|
||||
{
|
||||
// get error data
|
||||
$errstr = substr($clean_data, 0, strpos($clean_data, "\n")-1);
|
||||
|
@ -94,7 +94,7 @@
|
||||
}
|
||||
|
||||
// get type prefix
|
||||
if(ereg(":",$type))
|
||||
if(preg_match('/'.":".'/',$type))
|
||||
{
|
||||
$this->type = substr(strrchr($type,':'),1,strlen(strrchr($type,':')));
|
||||
$this->type_prefix = substr($type,0,strpos($type,':'));
|
||||
@ -198,7 +198,7 @@
|
||||
$type = 'array';
|
||||
}
|
||||
}
|
||||
elseif(!ereg("^[0-9]*$",$k) && in_array($k,array_keys($this->soapTypes)))
|
||||
elseif(!preg_match('/'."^[0-9]*$".'/',$k) && in_array($k,array_keys($this->soapTypes)))
|
||||
{
|
||||
$type = $k;
|
||||
}
|
||||
|
@ -1486,7 +1486,7 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
|
||||
$GLOBALS['egw_info']['server']['files_dir'] = $GLOBALS['egw_setup']->db->select('egw_config','config_value',array(
|
||||
'config_name' => 'files_dir',
|
||||
'config_app' => 'phpgwapi',
|
||||
),__LINE__,__FILE__)->fetchSingle();
|
||||
),__LINE__,__FILE__)->fetchColumn();
|
||||
}
|
||||
}
|
||||
if (!$GLOBALS['egw_info']['server']['files_dir'])
|
||||
|
@ -102,7 +102,7 @@ class translation
|
||||
'lang' => $lang,
|
||||
'message_id'=> 'charset',
|
||||
'app_name' => 'common',
|
||||
),__LINE__,__FILE__)->fetchSingle()))
|
||||
),__LINE__,__FILE__)->fetchColumn()))
|
||||
{
|
||||
$this->charsets[$lang] = 'iso-8859-1';
|
||||
}
|
||||
@ -309,7 +309,7 @@ class translation
|
||||
{
|
||||
return $this->langs[$lang];
|
||||
}
|
||||
return $this->db->select($this->languages_table,'lang_name',array('lang_id' => $lang),__LINE__,__FILE__)->fetchSingle();
|
||||
return $this->db->select($this->languages_table,'lang_name',array('lang_id' => $lang),__LINE__,__FILE__)->fetchColumn();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -511,7 +511,7 @@ class translation
|
||||
if (($ctimes = $this->db->select($this->config_table,'config_value',array(
|
||||
'config_app' => 'phpgwapi',
|
||||
'config_name' => 'lang_ctimes',
|
||||
),__LINE__,__FILE__)->fetchSingle()))
|
||||
),__LINE__,__FILE__)->fetchColumn()))
|
||||
{
|
||||
$GLOBALS['egw_info']['server']['lang_ctimes'] = unserialize(stripslashes($ctimes));
|
||||
}
|
||||
@ -539,7 +539,7 @@ class translation
|
||||
//echo "<br>Test: addonlynew - select count(*) from egw_lang where lang='".$lang."'";
|
||||
if (!$this->db->select($this->lang_table,'COUNT(*)',array(
|
||||
'lang' => $lang,
|
||||
),__LINE__,__FILE__)->fetchSingle())
|
||||
),__LINE__,__FILE__)->fetchColumn())
|
||||
{
|
||||
//echo '<br>Test: addonlynew - True';
|
||||
$addlang = True;
|
||||
@ -747,7 +747,7 @@ class translation
|
||||
}
|
||||
if ($this->db->select($this->lang_table,'COUNT(*)',array(
|
||||
'app_name' => $appname
|
||||
),__LINE__,__FILE__)->fetchSingle())
|
||||
),__LINE__,__FILE__)->fetchColumn())
|
||||
{
|
||||
$this->db->delete($this->lang_table,array(
|
||||
'app_name' => $appname
|
||||
@ -820,7 +820,7 @@ class translation
|
||||
'lang' => $lang,
|
||||
'app_name' => $app_name,
|
||||
'message_id' => $message_id,
|
||||
),__LINE__,__FILE__)->fetchSingle();
|
||||
),__LINE__,__FILE__)->fetchColumn();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -838,6 +838,6 @@ class translation
|
||||
if ($app) $where['app_name'] = $app;
|
||||
if ($lang) $where['lang'] = $lang;
|
||||
|
||||
return $this->db->select($this->lang_table,'message_id',$where,__LINE__,__FILE__)->fetchSingle();
|
||||
return $this->db->select($this->lang_table,'message_id',$where,__LINE__,__FILE__)->fetchColumn();
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@
|
||||
/* strips all whitespace from a string */
|
||||
function strip_space($text)
|
||||
{
|
||||
return ereg_replace("( |\n|\t|\r)+", '', $text);
|
||||
return preg_replace('/'."( |\n|\t|\r)+".'/', '', $text);
|
||||
}
|
||||
|
||||
function is_allnumbers($text)
|
||||
@ -196,7 +196,7 @@
|
||||
foreach($segs as $seg)
|
||||
{
|
||||
//echo "Checking $seg<br>";
|
||||
if(eregi("[a-z0-9\-]{0,62}",$seg))
|
||||
if(preg_match('/'."[a-z0-9\-]{0,62}".'/i',$seg))
|
||||
{
|
||||
$return = True;
|
||||
}
|
||||
|
@ -123,7 +123,7 @@
|
||||
$fp = fopen($filename,'r');
|
||||
while($data = fgets($fp,8000))
|
||||
{
|
||||
list($name,$value,$extra) = split(':', $data);
|
||||
list($name,$value,$extra) = explode(':', $data);
|
||||
if(substr($value,0,5) == 'http')
|
||||
{
|
||||
$value = $value . ':'.$extra;
|
||||
@ -216,12 +216,12 @@
|
||||
settype($buffer,'array');
|
||||
foreach($buffer as $name => $value)
|
||||
{
|
||||
$field = split(';',$name);
|
||||
$field[0] = ereg_replace("A\.",'',$field[0]);
|
||||
$field[0] = ereg_replace("B\.",'',$field[0]);
|
||||
$field[0] = ereg_replace("C\.",'',$field[0]);
|
||||
$field[0] = ereg_replace("D\.",'',$field[0]);
|
||||
$values = split(';',$value);
|
||||
$field = explode(';',$name);
|
||||
$field[0] = preg_replace('/'."A\.".'/','',$field[0]);
|
||||
$field[0] = preg_replace('/'."B\.".'/','',$field[0]);
|
||||
$field[0] = preg_replace('/'."C\.".'/','',$field[0]);
|
||||
$field[0] = preg_replace('/'."D\.".'/','',$field[0]);
|
||||
$values = explode(';',$value);
|
||||
if($field[1])
|
||||
{
|
||||
//echo $field[0];
|
||||
@ -594,7 +594,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$tmp = split('-',$values[0]);
|
||||
$tmp = explode('-',$values[0]);
|
||||
if($tmp[0])
|
||||
{
|
||||
$entry['bday'] = $tmp[1] . '/' . $tmp[2] . '/' . $tmp[0];
|
||||
@ -612,7 +612,7 @@
|
||||
$entry['adr_one_type'] = substr($buffer['adr_one_type'],0,-1);
|
||||
$entry['adr_two_type'] = substr($buffer['adr_two_type'],0,-1);
|
||||
|
||||
if(count($street = split("\r*\n",$buffer['adr_one_street'],3)) > 1)
|
||||
if(count($street = preg_split("/\r*\n/",$buffer['adr_one_street'],3)) > 1)
|
||||
{
|
||||
$entry['adr_one_street'] = $street[0]; // RB 2001/05/08 added for Lotus Organizer to split multiline adresses
|
||||
$entry['address2'] = $street[1];
|
||||
@ -650,7 +650,7 @@
|
||||
}
|
||||
elseif($value == 'BDAY')
|
||||
{
|
||||
$tmp = split('/',$buffer[$value]); # 12/31/1969 -> 1969-12-31
|
||||
$tmp = explode('/',$buffer[$value]); # 12/31/1969 -> 1969-12-31
|
||||
if($tmp[0])
|
||||
{
|
||||
if(strlen($tmp[0]) == 1) { $tmp[0] = '0'.$tmp[0]; }
|
||||
|
@ -205,7 +205,7 @@
|
||||
break;
|
||||
}
|
||||
// get element prefix
|
||||
if(ereg(":",$name))
|
||||
if(preg_match('/'.":".'/',$name))
|
||||
{
|
||||
$prefix = substr($name,0,strpos($name,':'));
|
||||
}
|
||||
|
@ -494,7 +494,7 @@ class XML
|
||||
function remove_node ( $node )
|
||||
{
|
||||
// Check whether the node is an attribute node.
|
||||
if ( ereg("/attribute::", $node) )
|
||||
if ( preg_match('/'."\\/attribute::".'/', $node) )
|
||||
{
|
||||
// Get the path to the attribute node's parent.
|
||||
$parent = $this->prestr($node, "/attribute::");
|
||||
@ -612,7 +612,7 @@ class XML
|
||||
function add_content ( $path, $value )
|
||||
{
|
||||
// Check whether it's an attribute node.
|
||||
if ( ereg("/attribute::", $path) )
|
||||
if ( preg_match('/'."\\/attribute::".'/', $path) )
|
||||
{
|
||||
// Get the path to the attribute node's parent.
|
||||
$parent = $this->prestr($path, "/attribute::");
|
||||
@ -649,7 +649,7 @@ class XML
|
||||
function set_content ( $path, $value )
|
||||
{
|
||||
// Check whether it's an attribute node.
|
||||
if ( ereg("/attribute::", $path) )
|
||||
if ( preg_match('/'."\\/attribute::".'/', $path) )
|
||||
{
|
||||
// Get the path to the attribute node's parent.
|
||||
$parent = $this->prestr($path, "/attribute::");
|
||||
@ -688,7 +688,7 @@ class XML
|
||||
function get_content ( $path )
|
||||
{
|
||||
// Check whether it's an attribute node.
|
||||
if ( ereg("/attribute::", $path) )
|
||||
if ( preg_match('/'."\\/attribute::".'/', $path) )
|
||||
{
|
||||
// Get the path to the attribute node's parent.
|
||||
$parent = $this->prestr($path, "/attribute::");
|
||||
@ -1053,7 +1053,7 @@ class XML
|
||||
);
|
||||
|
||||
// Check whether there are predicates.
|
||||
if ( ereg("\[", $step) )
|
||||
if ( preg_match('/'."\[".'/', $step) )
|
||||
{
|
||||
// Get the predicates.
|
||||
$predicates = substr($step, strpos($step, "["));
|
||||
@ -1099,7 +1099,7 @@ class XML
|
||||
$axis["axis"] = "child";
|
||||
$axis["node-test"] = "*";
|
||||
}
|
||||
elseif ( ereg("\(", $step) )
|
||||
elseif ( preg_match('/'."\(".'/', $step) )
|
||||
{
|
||||
// Check whether it's a function.
|
||||
if ( $this->is_function($this->prestr($step, "(")) )
|
||||
@ -1130,13 +1130,13 @@ class XML
|
||||
$axis["node-test"] = $step;
|
||||
}
|
||||
}
|
||||
elseif ( eregi("^@", $step) )
|
||||
elseif ( preg_match('/'."^@".'/i', $step) )
|
||||
{
|
||||
// Use the attribute axis and select the attribute.
|
||||
$axis["axis"] = "attribute";
|
||||
$axis["node-test"] = substr($step, 1);
|
||||
}
|
||||
elseif ( eregi("\]$", $step) )
|
||||
elseif ( preg_match('/'."\]$".'/i', $step) )
|
||||
{
|
||||
// Use the child axis and select a position.
|
||||
$axis["axis"] = "child";
|
||||
@ -1154,7 +1154,7 @@ class XML
|
||||
$axis["axis"] = "parent";
|
||||
$axis["node-test"] = "*";
|
||||
}
|
||||
elseif ( ereg("^[a-zA-Z0-9\-_]+$", $step) )
|
||||
elseif ( preg_match('/'."^[a-zA-Z0-9\-_]+$".'/', $step) )
|
||||
{
|
||||
// Select the child axis and the child.
|
||||
$axis["axis"] = "child";
|
||||
@ -1496,7 +1496,7 @@ class XML
|
||||
foreach ( $this->functions as $function )
|
||||
{
|
||||
// Check whether there's a - sign in the function name.
|
||||
if ( ereg("-", $function) )
|
||||
if ( strpos($function,"-") !== false )
|
||||
{
|
||||
// Get the position of the - in the function name.
|
||||
$sign = strpos($function, "-");
|
||||
@ -1615,7 +1615,7 @@ class XML
|
||||
}
|
||||
|
||||
// Check whether the predicate is a function.
|
||||
if ( ereg("\(", $predicate) )
|
||||
if ( preg_match('/'."\(".'/', $predicate) )
|
||||
{
|
||||
// Get the position of the first bracket.
|
||||
$start = strpos($predicate, "(");
|
||||
@ -1664,8 +1664,8 @@ class XML
|
||||
}
|
||||
|
||||
// Check whether the predicate is just a digit.
|
||||
if ( ereg("^[0-9]+(\.[0-9]+)?$", $predicate) ||
|
||||
ereg("^\.[0-9]+$", $predicate) )
|
||||
if ( preg_match('/'."^[0-9]+(\.[0-9]+)?$".'/', $predicate) ||
|
||||
preg_match('/'."^\.[0-9]+$".'/', $predicate) )
|
||||
{
|
||||
// Return the value of the digit.
|
||||
return doubleval($predicate);
|
||||
@ -1718,7 +1718,7 @@ class XML
|
||||
foreach ( $predicates as $predicate )
|
||||
{
|
||||
// Check whether the predicate is just an number.
|
||||
if ( ereg("^[0-9]+$", $predicate) )
|
||||
if ( preg_match('/'."^[0-9]+$".'/', $predicate) )
|
||||
{
|
||||
// Enhance the predicate.
|
||||
$predicate .= "=position()";
|
||||
@ -1786,7 +1786,7 @@ class XML
|
||||
function check_node_test ( $context, $node_test )
|
||||
{
|
||||
// Check whether it's a function.
|
||||
if ( ereg("\(", $node_test) )
|
||||
if ( preg_match('/'."\(".'/', $node_test) )
|
||||
{
|
||||
// Get the type of function to use.
|
||||
$function = $this->prestr($node_test, "(");
|
||||
@ -1862,7 +1862,7 @@ class XML
|
||||
// Add this node to the node-set.
|
||||
return true;
|
||||
}
|
||||
elseif ( ereg("^[a-zA-Z0-9\-_]+", $node_test) )
|
||||
elseif ( preg_match('/'."^[a-zA-Z0-9\-_]+".'/', $node_test) )
|
||||
{
|
||||
// Check whether the node-test can be fulfilled.
|
||||
if ( $this->nodes[$context]["name"] == $node_test )
|
||||
@ -2592,8 +2592,8 @@ class XML
|
||||
function handle_function_string ( $node, $arguments )
|
||||
{
|
||||
// Check what type of parameter is given
|
||||
if ( ereg("^[0-9]+(\.[0-9]+)?$", $arguments) ||
|
||||
ereg("^\.[0-9]+$", $arguments) )
|
||||
if ( preg_match('/'."^[0-9]+(\.[0-9]+)?$".'/', $arguments) ||
|
||||
preg_match('/'."^\.[0-9]+$".'/', $arguments) )
|
||||
{
|
||||
// Convert the digits to a number.
|
||||
$number = doubleval($arguments);
|
||||
@ -2701,7 +2701,7 @@ class XML
|
||||
$second = $this->evaluate_predicate($node, $second);
|
||||
|
||||
// Check whether the first string starts with the second one.
|
||||
if ( ereg("^".$second, $first) )
|
||||
if ( preg_match('/'."^".$second.'/', $first) )
|
||||
{
|
||||
// Return true.
|
||||
return true;
|
||||
@ -2935,8 +2935,8 @@ class XML
|
||||
$arguments = trim($arguments);
|
||||
|
||||
// Check what type of parameter is given
|
||||
if ( ereg("^[0-9]+(\.[0-9]+)?$", $arguments) ||
|
||||
ereg("^\.[0-9]+$", $arguments) )
|
||||
if ( preg_match('/'."^[0-9]+(\.[0-9]+)?$".'/', $arguments) ||
|
||||
preg_match('/'."^\.[0-9]+$".'/', $arguments) )
|
||||
{
|
||||
// Convert the digits to a number.
|
||||
$number = doubleval($arguments);
|
||||
@ -3128,8 +3128,8 @@ class XML
|
||||
function handle_function_number ( $node, $arguments )
|
||||
{
|
||||
// Check the type of argument.
|
||||
if ( ereg("^[0-9]+(\.[0-9]+)?$", $arguments) ||
|
||||
ereg("^\.[0-9]+$", $arguments) )
|
||||
if ( preg_match('/'."^[0-9]+(\.[0-9]+)?$".'/', $arguments) ||
|
||||
preg_match('/'."^\.[0-9]+$".'/', $arguments) )
|
||||
{
|
||||
// Return the argument as a number.
|
||||
return doubleval($arguments);
|
||||
@ -3367,7 +3367,7 @@ class XML
|
||||
}
|
||||
|
||||
// Replace the last separator.
|
||||
$command = eregi_replace(", $", ");", $command);
|
||||
$command = preg_replace('/'.", $".'/i', ");", $command);
|
||||
|
||||
// Execute the command.
|
||||
eval($command);
|
||||
|
@ -211,7 +211,7 @@
|
||||
}
|
||||
elseif(is_string($msg))
|
||||
{
|
||||
$n =& new xmlrpcmsg('');
|
||||
$n = new xmlrpcmsg('');
|
||||
$n->payload = $msg;
|
||||
$msg = $n;
|
||||
}
|
||||
@ -668,17 +668,17 @@
|
||||
$calls = array();
|
||||
foreach($msgs as $msg)
|
||||
{
|
||||
$call['methodName'] =& new xmlrpcval($msg->method(),'string');
|
||||
$call['methodName'] = new xmlrpcval($msg->method(),'string');
|
||||
$numParams = $msg->getNumParams();
|
||||
$params = array();
|
||||
for($i = 0; $i < $numParams; $i++)
|
||||
{
|
||||
$params[$i] = $msg->getParam($i);
|
||||
}
|
||||
$call['params'] =& new xmlrpcval($params, 'array');
|
||||
$calls[] =& new xmlrpcval($call, 'struct');
|
||||
$call['params'] = new xmlrpcval($params, 'array');
|
||||
$calls[] = new xmlrpcval($call, 'struct');
|
||||
}
|
||||
$multicall =& new xmlrpcmsg('system.multicall');
|
||||
$multicall = new xmlrpcmsg('system.multicall');
|
||||
$multicall->addParam(new xmlrpcval($calls, 'array'));
|
||||
|
||||
// Attempt RPC call
|
||||
@ -717,7 +717,7 @@
|
||||
return false; // Bad value
|
||||
}
|
||||
// Normal return value
|
||||
$response[$i] =& new xmlrpcresp($val->arraymem(0));
|
||||
$response[$i] = new xmlrpcresp($val->arraymem(0));
|
||||
break;
|
||||
case 'struct':
|
||||
$code = $val->structmem('faultCode');
|
||||
@ -730,7 +730,7 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$response[$i] =& new xmlrpcresp(0, $code->scalarval(), $str->scalarval());
|
||||
$response[$i] = new xmlrpcresp(0, $code->scalarval(), $str->scalarval());
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
|
@ -52,12 +52,12 @@
|
||||
{
|
||||
$arr = array();
|
||||
|
||||
if (ereg('^([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})$',$isodate,$arr))
|
||||
if (preg_match('/^([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})$/',$isodate,$arr))
|
||||
{
|
||||
// $isodate is simple ISO8601, remove the difference between split and ereg
|
||||
array_shift($arr);
|
||||
}
|
||||
elseif (($arr = split('[-:T]',$isodate)) && count($arr) == 6)
|
||||
elseif (($arr = preg_split('/[-:T]/',$isodate)) && count($arr) == 6)
|
||||
{
|
||||
// $isodate is extended ISO8601, do nothing
|
||||
}
|
||||
|
@ -161,7 +161,7 @@
|
||||
$syscall = 0;
|
||||
|
||||
/* Setup dispatch map based on the function, if this is a system call */
|
||||
if(ereg('^system\.', $methName))
|
||||
if(preg_match('/^system\./', $methName))
|
||||
{
|
||||
foreach($GLOBALS['_xmlrpcs_dmap'] as $meth => $dat)
|
||||
{
|
||||
@ -170,8 +170,8 @@
|
||||
$sysCall = 1;
|
||||
$dmap = $this->dmap;
|
||||
}
|
||||
elseif(ereg('^examples\.',$methName) ||
|
||||
ereg('^validator1\.',$methName) ||
|
||||
elseif(preg_match('/^examples\./',$methName) ||
|
||||
preg_match('/^validator1\./',$methName) ||
|
||||
ereg('^interopEchoTests\.', $methName)
|
||||
)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user