Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:tony-landis/agilebill
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Luther committed Mar 26, 2009
2 parents 062c117 + 944d0e2 commit 84b2ea3
Show file tree
Hide file tree
Showing 20 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions includes/pdf/pdf_invoice_overview.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ function drawLineItems(&$db, &$line) {

# Draw attributes if they are present
if (strlen($line['attr'])) {
$atrs = split("\r\n", str_replace('\r\n',"\r\n",$line['attr']));
$atrs = preg_split("/\r\n/", str_replace('\r\n',"\r\n",$line['attr']));
foreach ($atrs as $a) {
$parts = split("==", $a);
$parts = preg_split("/==/", $a);
switch ($parts[0]) {
default:
if(strlen($parts[0]))
Expand Down
4 changes: 2 additions & 2 deletions includes/pdf/pdf_invoice_voip-detailed.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ function drawLineItems_1(&$db, &$line) {
$val = $line['name'];
if (strlen($line['attr'])) {
$val = "";
$atrs = split("\r\n", str_replace('\r\n',"\r\n",$line['attr']));
$atrs = preg_split("/\r\n/", str_replace('\r\n',"\r\n",$line['attr']));
foreach ($atrs as $a) {
$parts = split("==", $a);
$parts = preg_split("/==/", $a);
switch ($parts[0]) {
case "Destination":
$this->SetX(69);
Expand Down
8 changes: 4 additions & 4 deletions includes/pdf/pdf_invoice_voip.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ function drawLineItems(&$db, &$line) {
$val = $line['name'];
if (strlen($line['attr'])) {
$val = "";
$atrs = split("\r\n", str_replace('\r\n',"\r\n",$line['attr']));
$atrs = preg_split("/\r\n/", str_replace('\r\n',"\r\n",$line['attr']));
foreach ($atrs as $a) {
$parts = split("==", $a);
$parts = preg_split("/==/", $a);
switch ($parts[0]) {
case "Destination":
$this->SetX(75);
Expand All @@ -229,9 +229,9 @@ function drawLineItems(&$db, &$line) {
case "parent_service_id":
$sql = sqlSelect($db,"service","prod_attr","id=::".$parts[1]."::");
$rstmp = $db->Execute($sql);
$atrs2 = split("\r\n", $rstmp->fields['prod_attr']);
$atrs2 = preg_split("/\r\n/", $rstmp->fields['prod_attr']);
foreach ($atrs2 as $a2) {
$parts2 = split("==", $a2);
$parts2 = preg_split("/==/", $a2);
switch ($parts2[0]) {
case "station":
case "ported":
Expand Down
4 changes: 2 additions & 2 deletions includes/phplayers/layersmenu-common.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ function setMenuStructureFile($tree_file)
*/
function setMenuStructureString($tree_string)
{
$this->menuStructure = ereg_replace(chr(13), '', $tree_string); // Microsoft Stupidity Suppression
$this->menuStructure = preg_replace("/".chr(13)."/", '', $tree_string); // Microsoft Stupidity Suppression
if ($this->menuStructure == '') {
$this->error('setMenuStructureString: empty string.');
return false;
Expand Down Expand Up @@ -790,7 +790,7 @@ function _postParse(
for ($cnt=$this->_firstItem[$menu_name]; $cnt<=$this->_lastItem[$menu_name]; $cnt++) { // this counter scans all nodes of the new menu
$this->tree[$cnt]['child_of_root_node'] = ($this->tree[$cnt]['level'] == 1);
$this->tree[$cnt]['parsed_text'] = stripslashes($this->tree[$cnt]['text']);
$this->tree[$cnt]['parsed_href'] = (ereg_replace(' ', '', $this->tree[$cnt]['href']) == '') ? '#' : $this->prependedUrl . $this->tree[$cnt]['href'];
$this->tree[$cnt]['parsed_href'] = (preg_replace('/ /', '', $this->tree[$cnt]['href']) == '') ? '#' : $this->prependedUrl . $this->tree[$cnt]['href'];
$this->tree[$cnt]['parsed_title'] = ($this->tree[$cnt]['title'] == '') ? '' : ' title="' . stripslashes($this->tree[$cnt]['title']) . '"';
$fooimg = $this->icondir . $this->tree[$cnt]['icon'];
if ($this->tree[$cnt]['icon'] != '' && (substr($this->tree[$cnt]['icon'], 0, 7) == 'http://' || substr($this->tree[$cnt]['icon'], 0, 8) == 'https://')) {
Expand Down
4 changes: 2 additions & 2 deletions install/install_db_core.inc
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class install_db

if(ereg('[(]',$t_s))
{
$ts = split('[(]',$t_s);
$ts = preg_split('/[(]/',$t_s);
$type = $ts[0];
$size = ereg_replace('[)]', '', $ts[1]);
$flds[] = Array($field, $type, $size);
Expand Down Expand Up @@ -423,7 +423,7 @@ class install_db

if(ereg('[(]',$t_s))
{
$ts = split('[(]',$t_s);
$ts = preg_split('/[(]/',$t_s);
$type = $ts[0];
$size = ereg_replace('[)]', '', $ts[1]);
$flds[] = Array($field, $type, $size);
Expand Down
6 changes: 3 additions & 3 deletions modules/account/account.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ function add($VAR)
####################################################################

$type = 'add';
$this->method["$type"] = split(",", $this->method["$type"]);
$this->method["$type"] = preg_split("/,/", $this->method["$type"]);
$arr = $this->method["$type"];
include_once(PATH_CORE . 'validate.inc.php');
$validate = new CORE_validate;
Expand Down Expand Up @@ -644,7 +644,7 @@ function view($VAR)

### Retrieve the record:
$type = "view";
$this->method["$type"] = split(",", $this->method["$type"]);
$this->method["$type"] = explode(",", $this->method["$type"]);
$db = new CORE_database;
$db->view($VAR, $this, $type);

Expand Down Expand Up @@ -843,7 +843,7 @@ function update($VAR)
### Update the record
$this->account_construct();
$type = "update";
$this->method["$type"] = split(",", $this->method["$type"]);
$this->method["$type"] = explode(",", $this->method["$type"]);
$db = new CORE_database;
$db->update($VAR, $this, $type);

Expand Down
4 changes: 2 additions & 2 deletions modules/core/auth_generate_admin_menu.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/core/database.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down
2 changes: 1 addition & 1 deletion modules/core/database_view.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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] != '')
Expand Down
2 changes: 1 addition & 1 deletion modules/core/method.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function do_all()
{
if(!empty($VAR['do'][$i]))
{
if(ereg(":", $VAR['do'][$i]))
if(preg_match("/:/", $VAR['do'][$i]))
{
$identifier = explode(':',$VAR['do'][$i]);
$module = $identifier[0];
Expand Down
4 changes: 2 additions & 2 deletions modules/core/session.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,14 @@ function setcookies() {
$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);
Expand Down
2 changes: 1 addition & 1 deletion modules/core/theme.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function 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);
Expand Down
4 changes: 2 additions & 2 deletions modules/core/trigger.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ function trigger($trigger, $type, $VAR)
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)
{
Expand Down
2 changes: 1 addition & 1 deletion modules/core/xml.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function xml_string_to_array($string) {

// 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;
Expand Down
4 changes: 2 additions & 2 deletions modules/db_mapping/db_mapping.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ function view($VAR)
$this->construct();

$type = "view";
$this->method["$type"] = split(",", $this->method["$type"]);
$this->method["$type"] = explode(",", $this->method["$type"]);
$db = new CORE_database;
$db->view($VAR, $this, $type);

Expand Down Expand Up @@ -624,7 +624,7 @@ function search_show($VAR)
{
if($file_name != '..' && $file_name != '.')
{
$result[$count]['name'] = eregi_replace('.php', '', $file_name);
$result[$count]['name'] = preg_replace('/.php/', '', $file_name);
$result[$count]['id'] = $count;

### Get the status of this plugin:
Expand Down
2 changes: 1 addition & 1 deletion modules/setup/setup.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function search_show($VAR)
function view($VAR)
{
$type = "view";
$this->method["$type"] = split(",", $this->method["$type"]);
$this->method["$type"] = explode(",", $this->method["$type"]);
$db = new CORE_database;
$db->view($VAR, $this, $type);
}
Expand Down
2 changes: 1 addition & 1 deletion modules/setup/setup_construct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
</session_ip_match>
<error_reporting>
<type>C(16)</type>
<default>0</default>
<default>1</default>
</error_reporting>
<site_name>
<type>X</type>
Expand Down
2 changes: 1 addition & 1 deletion modules/setup/setup_install_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<date_format><![CDATA[a:4:{i:0;s:1:"m";i:1;s:1:"d";i:2;s:1:"Y";i:3;s:1:"-";}]]></date_format>
<date_time_format><![CDATA[a:1:{i:0;s:0:"";}]]></date_time_format>
<decimal_place>2</decimal_place>
<debug>0</debug>
<debug>1</debug>
<login_attempt_try>10</login_attempt_try>
<login_attempt_time>60</login_attempt_time>
<login_attempt_lock>60</login_attempt_lock>
Expand Down
2 changes: 1 addition & 1 deletion plugins/db_mapping/PostNuke_726.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function map_POSTNUKE_726 ()
function sync($id, $file)
{
$db_map = new db_mapping;
$this = $db_map->MAP_sync ($id, $file, $this);
$this &= $db_map->MAP_sync ($id, $file, $this);
}


Expand Down
2 changes: 1 addition & 1 deletion plugins/db_mapping/osCommerce_22.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function install()
function sync($id, $file)
{
$db_map = new db_mapping;
$this = $db_map->MAP_sync ($id, $file, $this);
$db_map->MAP_sync ($id, $file, $this);
}


Expand Down

0 comments on commit 84b2ea3

Please sign in to comment.