Merge branch 'master' of git@github.com:tony-landis/agilebill
This commit is contained in:
@@ -47,7 +47,7 @@ function auth_generate_admin_menu($menu_obj)
|
||||
if(empty($meth_arr[2]))
|
||||
$page = $module.':'.$method;
|
||||
else
|
||||
$page = eregi_replace('%%', $module, $meth_arr[2]);
|
||||
$page = preg_replace('/%%/', $module, $meth_arr[2]);
|
||||
|
||||
$module_arr[$i]["methods"][] = Array('name' => $method_name, 'page' => $page);
|
||||
|
||||
@@ -71,7 +71,7 @@ function auth_generate_admin_menu($menu_obj)
|
||||
if(empty($meth_arr[2]))
|
||||
$page = $module.':'.$method;
|
||||
else
|
||||
$page = eregi_replace('%%', $module, $meth_arr[2]);
|
||||
$page = preg_replace('/%%/', $module, $meth_arr[2]);
|
||||
$module_arr[$i]["sub_methods"][$ii][] = Array('name' => $method_name, 'page' => $page);
|
||||
}
|
||||
}
|
||||
|
@@ -159,7 +159,7 @@ function sqlConditions( &$db, $Conditions=false, $Tables=false )
|
||||
$where = " WHERE ";
|
||||
|
||||
if($Conditions) {
|
||||
if(ereg('::', $Conditions) ) {
|
||||
if(preg_match('/::/', $Conditions) ) {
|
||||
$s = explode('::', $Conditions);
|
||||
$ii=1;
|
||||
$Conditions = '';
|
||||
|
@@ -45,7 +45,7 @@ function CORE_database_view($VAR, &$construct, $type)
|
||||
|
||||
if(isset($VAR["id"]))
|
||||
{
|
||||
$id = split(',',$VAR["id"]);
|
||||
$id = explode(',',$VAR["id"]);
|
||||
for($i=0; $i<count($id); $i++)
|
||||
{
|
||||
if($id[$i] != '')
|
||||
|
@@ -29,7 +29,7 @@ class CORE_method
|
||||
{
|
||||
if(!empty($VAR['do'][$i]))
|
||||
{
|
||||
if(ereg(":", $VAR['do'][$i]))
|
||||
if(preg_match("/:/", $VAR['do'][$i]))
|
||||
{
|
||||
$identifier = explode(':',$VAR['do'][$i]);
|
||||
$module = $identifier[0];
|
||||
|
@@ -187,14 +187,14 @@ class CORE_session
|
||||
$server = getallheaders();
|
||||
$domain = $server['Host'];
|
||||
}
|
||||
$domain = '.'.eregi_replace('^www.', '', $domain);
|
||||
$domain = '.'.preg_replace('/^www./', '', $domain);
|
||||
}
|
||||
|
||||
if(COOKIE_EXPIRE == 0 )
|
||||
$cookie_expire = (time() + 86400*365);
|
||||
else
|
||||
$cookie_expire = (time() + (COOKIE_EXPIRE*60));
|
||||
if(empty($domain) || eregi('localhost', $domain))
|
||||
if(empty($domain) || preg_match('/localhost/', $domain))
|
||||
setcookie(COOKIE_NAME,$this->id,$cookie_expire,'/');
|
||||
else
|
||||
setcookie(COOKIE_NAME,$this->id,$cookie_expire,'/', $domain);
|
||||
|
@@ -77,7 +77,7 @@ class CORE_theme
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$url = ereg_replace('tid=default_admin', '', $url);
|
||||
$url = preg_replace('/tid=default_admin/', '', $url);
|
||||
$smarty->assign('mainFrameUrl', $url);
|
||||
$this_template = 'file:'.PATH_THEMES.''.THEME_NAME.'/template.tpl';
|
||||
$smarty->display($this_template);
|
||||
|
@@ -40,12 +40,12 @@ class CORE_trigger
|
||||
function run_triggers($trigger)
|
||||
{
|
||||
global $C_method;
|
||||
$triggers = split(',', $trigger);
|
||||
$triggers = explode(',', $trigger);
|
||||
for($i=0; $i<count($triggers); $i++)
|
||||
{
|
||||
if(isset($triggers[$i]))
|
||||
{
|
||||
$triggerss = split(':',$triggers[$i]);
|
||||
$triggerss = explode(':',$triggers[$i]);
|
||||
# added to remove php error: Undefined offset
|
||||
if(isset($triggerss) && count($triggerss) > 1)
|
||||
{
|
||||
|
@@ -65,7 +65,7 @@ class CORE_xml
|
||||
|
||||
// new XML to Array for PHP5 and SimpleXML
|
||||
function SimpleXML2Array($xml) {
|
||||
if (get_class($xml) == 'SimpleXMLElement') {
|
||||
if (is_object($xml) && get_class($xml) == 'SimpleXMLElement') {
|
||||
$attributes = $xml->attributes();
|
||||
foreach($attributes as $k=>$v) {
|
||||
if ($v) $a[$k] = (string) $v;
|
||||
|
Reference in New Issue
Block a user