From 4b1390eb0fbc51fa04a0d444de75acf8fdff1a50 Mon Sep 17 00:00:00 2001 From: seek3r Date: Thu, 31 May 2001 10:11:18 +0000 Subject: [PATCH] had to make several changes and cleanups for php3 compatibility --- addressbook/inc/functions.inc.php | 3 ++- admin/accounts.php | 2 +- admin/groups.php | 2 +- admin/index.php | 2 +- calendar/inc/class.calendar.inc.php | 2 +- calendar/inc/functions.inc.php | 3 ++- phpgwapi/inc/class.accounts_shared.inc.php | 3 +-- phpgwapi/inc/class.acl.inc.php | 3 ++- phpgwapi/inc/class.nextmatchs.inc.php | 3 ++- phpgwapi/inc/functions.inc.php | 4 ++-- 10 files changed, 15 insertions(+), 12 deletions(-) diff --git a/addressbook/inc/functions.inc.php b/addressbook/inc/functions.inc.php index b3b515b287..9403d156a3 100755 --- a/addressbook/inc/functions.inc.php +++ b/addressbook/inc/functions.inc.php @@ -205,9 +205,10 @@ } } - function addressbook_strip_html($dirty=array()) + function addressbook_strip_html($dirty = "") { global $phpgw; + if ($dirty == ""){$dirty = array();} for($i=0;$iset_file(array( - 'accounts' => 'accounts.tpl', + 'accounts' => 'accounts.tpl' )); $p->set_block('accounts','list','list'); $p->set_block('accounts','row','row'); diff --git a/admin/groups.php b/admin/groups.php index b08c3ae04c..876227d0ed 100755 --- a/admin/groups.php +++ b/admin/groups.php @@ -35,7 +35,7 @@ $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); $p->set_file(array( - 'groups' => 'groups.tpl', + 'groups' => 'groups.tpl' )); $p->set_block('groups','list','list'); $p->set_block('groups','row','row'); diff --git a/admin/index.php b/admin/index.php index 2b3c6fb821..fd93bb3937 100755 --- a/admin/index.php +++ b/admin/index.php @@ -19,7 +19,7 @@ $admin_tpl = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); $admin_tpl->set_file(array( - 'admin' => 'index.tpl', + 'admin' => 'index.tpl' )); $admin_tpl->set_block('admin','list'); diff --git a/calendar/inc/class.calendar.inc.php b/calendar/inc/class.calendar.inc.php index be92312a1f..725f51dba6 100755 --- a/calendar/inc/class.calendar.inc.php +++ b/calendar/inc/class.calendar.inc.php @@ -209,7 +209,7 @@ class calendar extends calendar_ $p = CreateObject('phpgwapi.Template',$this->template_dir); $p->set_unknowns('remove'); $templates = Array( - 'link_picture' => 'link_pict.tpl', + 'link_picture' => 'link_pict.tpl' ); $p->set_file($templates); $p->set_block('link_picture','link_pict','link_pict'); diff --git a/calendar/inc/functions.inc.php b/calendar/inc/functions.inc.php index 1d128541ab..d66886eccc 100755 --- a/calendar/inc/functions.inc.php +++ b/calendar/inc/functions.inc.php @@ -37,7 +37,8 @@ { $owner = $phpgw_info['user']['account_id']; $rights = PHPGW_ACL_READ + PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE + PHPGW_ACL_PRIVATE; - $grants[$owner] = $rights; + $grants = Array(); + $grants[$owner] = "$rights"; } else { diff --git a/phpgwapi/inc/class.accounts_shared.inc.php b/phpgwapi/inc/class.accounts_shared.inc.php index c3207f960e..7369b70f2c 100644 --- a/phpgwapi/inc/class.accounts_shared.inc.php +++ b/phpgwapi/inc/class.accounts_shared.inc.php @@ -34,7 +34,6 @@ * This constructor sets the account id, if string is sent, converts to id * * I might move this to the accounts_shared if it stays around * \**************************************************************************/ - function accounts($account_id = '') { global $phpgw, $phpgw_info; @@ -110,7 +109,7 @@ for ($idx=0; $idxid2name(intval($security_equals[$idx])); - $this->members[] = Array('account_id' => intval($security_equals[$idx]), 'account_name' => $name); + $this->members = Array('account_id' => intval($security_equals[$idx]), 'account_name' => $name); } return $this->members; diff --git a/phpgwapi/inc/class.acl.inc.php b/phpgwapi/inc/class.acl.inc.php index e426a70b74..cec0599465 100644 --- a/phpgwapi/inc/class.acl.inc.php +++ b/phpgwapi/inc/class.acl.inc.php @@ -566,7 +566,8 @@ $sql = "select acl_account, acl_rights from phpgw_acl where acl_appname = '$app' and " . "acl_location in "; $security = "('". $phpgw_info['user']['account_id'] ."'"; - $my_memberships = $phpgw->accounts->memberships(); + $myaccounts = CreateObject('phpgwapi.accounts'); + $my_memberships = $myaccounts->memberships(); while($my_memberships && $groups = each($my_memberships)) { $group = each($groups); diff --git a/phpgwapi/inc/class.nextmatchs.inc.php b/phpgwapi/inc/class.nextmatchs.inc.php index 3a1b6f504f..3ec823305a 100644 --- a/phpgwapi/inc/class.nextmatchs.inc.php +++ b/phpgwapi/inc/class.nextmatchs.inc.php @@ -80,9 +80,10 @@ @param $filter_obj ? @param $showsearch ? */ - function show_tpl($sn,$start,$total,$extra, $twidth, $bgtheme,$search_obj=0,$filter_obj=1,$showsearch=1,$yours=0) + function show_tpl($sn,$localstart,$total,$extra, $twidth, $bgtheme,$search_obj=0,$filter_obj=1,$showsearch=1,$yours=0) { global $filter, $qfield, $start, $order, $sort, $query, $phpgw, $phpgw_info; + $start = $localstart; $tpl = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); $tpl->set_file(array( 'nextmatchs' => 'nextmatchs.tpl' diff --git a/phpgwapi/inc/functions.inc.php b/phpgwapi/inc/functions.inc.php index 3c8fdea25f..f3b002bcdd 100644 --- a/phpgwapi/inc/functions.inc.php +++ b/phpgwapi/inc/functions.inc.php @@ -259,8 +259,8 @@ $phpgw->common = CreateObject('phpgwapi.common'); $phpgw->hooks = CreateObject('phpgwapi.hooks'); $phpgw->auth = CreateObject('phpgwapi.auth'); - $phpgw->acl = CreateObject('phpgwapi.acl'); $phpgw->accounts = CreateObject('phpgwapi.accounts'); + $phpgw->acl = CreateObject('phpgwapi.acl'); $phpgw->session = CreateObject('phpgwapi.sessions'); $phpgw->preferences = CreateObject('phpgwapi.preferences'); $phpgw->applications = CreateObject('phpgwapi.applications'); @@ -332,7 +332,7 @@ /* This will make sure that a user has the basic default prefs. If not it will add them */ $phpgw->preferences->verify_basic_settings(); - + /********* Optional classes, which can be disabled for performance increases *********/ while ($phpgw_class_name = each($phpgw_info['flags'])) {