[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] api/class.phpgw.php, 1.1.1.1.2.49
From: |
nomail |
Subject: |
[Phpgroupware-cvs] api/class.phpgw.php, 1.1.1.1.2.49 |
Date: |
Thu, 26 Aug 2004 22:11:13 +0200 |
Update of /api
Modified Files:
Branch: proposal-branch
class.phpgw.php
date: 2004/08/26 20:11:13; author: jengo; state: Exp; lines: +53 -39
Log Message:
Mild reformating
=====================================================================
Index: api/class.phpgw.php
diff -u api/class.phpgw.php:1.1.1.1.2.48 api/class.phpgw.php:1.1.1.1.2.49
--- api/class.phpgw.php:1.1.1.1.2.48 Thu Aug 26 20:05:38 2004
+++ api/class.phpgw.php Thu Aug 26 20:11:13 2004
@@ -69,28 +69,29 @@
{
reg_var('phpgw_user', 'any', 'any');
reg_var('phpgw_pass', 'any', 'any');
- if($force)
+
+ if ($force)
{
$GLOBALS['phpgw_data']['api']['op'] =
'api.base.login';
unset($GLOBALS['phpgw_data']['api']['phpgw_user']);
unset($GLOBALS['phpgw_data']['api']['phpgw_pass']);
}
- if(!isset($_SESSION['phpgw_session']['nextop']))
+ if (! isset($_SESSION['phpgw_session']['nextop']))
{
$_SESSION['phpgw_session']['nextop'] =
$GLOBALS['phpgw_data']['api']['op'];
}
while ($GLOBALS['phpgw_data']['api']['op'] ==
'api.base.login')
{
-
if(!isset($GLOBALS['phpgw_data']['api']['phpgw_user']) ||
!isset($GLOBALS['phpgw_data']['api']['phpgw_pass']))
+ if (!
isset($GLOBALS['phpgw_data']['api']['phpgw_user']) ||
!isset($GLOBALS['phpgw_data']['api']['phpgw_pass']))
{
$GLOBALS['phpgw']->interface->failed_login('missing');
break;
}
$this->auth = createObject('api_auth');
- if
(!$this->auth->authenticate($GLOBALS['phpgw_data']['api']['phpgw_user'],
$GLOBALS['phpgw_data']['api']['phpgw_pass']))
+ if (!
$this->auth->authenticate($GLOBALS['phpgw_data']['api']['phpgw_user'],
$GLOBALS['phpgw_data']['api']['phpgw_pass']))
{
$GLOBALS['phpgw']->interface->failed_login('invalid');
break;
@@ -99,7 +100,8 @@
$this->accounts =
createObject('api_accounts',$GLOBALS['phpgw_data']['api']['phpgw_user']);
$history =
createObject('api_history');
$history->account_id =
$this->accounts->account_id;
- $new_data = array(
+ $new_data = array
+ (
'ip_address' => get_ip(),
'sessionid' => session_id()
);
@@ -109,7 +111,7 @@
unset($GLOBALS['phpgw_data']['api']['phpgw_user']);
unset($GLOBALS['phpgw_data']['api']['phpgw_pass']);
$this->check_op();
- if($GLOBALS['phpgw_data']['api']['op'] ==
'api.base.login')
+ if ($GLOBALS['phpgw_data']['api']['op'] ==
'api.base.login')
{
$GLOBALS['phpgw_data']['api']['op'] =
'api.base.start';
}
@@ -125,7 +127,7 @@
*/
function load_base_classes()
{
- if (!$this->base_classes_loaded)
+ if (! $this->base_classes_loaded)
{
/* load up the accounts, preferences and
application classeses */
/* and also have them send their appropriate
data to phpgw_data */
@@ -181,7 +183,7 @@
$args->set('xsl', REQUIRED, 'string');
$args = $args->get(func_get_args());
- if (!in_array($args['xsl'],$this->xsl_files))
+ if (! in_array($args['xsl'],$this->xsl_files))
{
$this->xsl_files[] = $args['xsl'];
}
@@ -198,7 +200,7 @@
$args->set('css', REQUIRED, 'string');
$args = $args->get(func_get_args());
- if (!in_array($args['css'],$this->css_files))
+ if (! in_array($args['css'],$this->css_files))
{
$this->css_files[] = $args['css'];
}
@@ -215,7 +217,7 @@
$args->set('js', REQUIRED, 'string');
$args = $args->get(func_get_args());
- if (!in_array($args['js'],$this->js_files))
+ if (! in_array($args['js'],$this->js_files))
{
$this->js_files[] = $args['js'];
}
@@ -234,7 +236,8 @@
{
if ($this->acl->check('api.base.start', 1))
{
- $menu[] = array(
+ $menu[] = array
+ (
'title' => lang('Home', NOTSET , 'api'),
'op' => 'api.base.start',
);
@@ -242,7 +245,8 @@
if ($this->acl->check('api.admin.start', 1))
{
- $menu[] = array(
+ $menu[] = array
+ (
'title' => lang('Admin', NOTSET, 'api'),
'op' => 'api.admin.start',
);
@@ -250,7 +254,8 @@
if ($this->acl->check('api.base.prefs', 1))
{
- $menu[] = array(
+ $menu[] = array
+ (
'title' => lang('Preferences',
NOTSET, 'api'),
'op' =>
'api.base.prefs&appname=api'
);
@@ -258,7 +263,8 @@
if ($this->acl->check('api.base.profile', 1))
{
- $menu[] = array(
+ $menu[] = array
+ (
'title' => lang('Your Profile',
NOTSET, 'api'),
'op' => 'api.base.profile'
);
@@ -266,13 +272,15 @@
if ($this->acl->check('api.base.about', 1))
{
- $menu[] = array(
+ $menu[] = array
+ (
'title' => lang('About', NOTSET, 'api'),
'op' => 'api.base.about',
);
}
- $menu[] = array(
+ $menu[] = array
+ (
'title' => lang('Logout', NOTSET, 'api'),
'op' => 'api.base.logout',
);
@@ -307,7 +315,8 @@
}
}
- $this->app_menus[$args['title']][] = array(
+ $this->app_menus[$args['title']][] = array
+ (
'title' => lang($args['item_title']),
'op' => $args['item_op']
);
@@ -323,13 +332,15 @@
foreach ($values as $value)
{
- $r[] = array(
+ $r[] = array
+ (
'title' =>
lang($value['title']),
'op' => $value['op']
);
}
- $result[] = array(
+ $result[] = array
+ (
'title' => lang($key),
'links' => $r
);
@@ -353,7 +364,7 @@
$args = $args->get(func_get_args());
define('PHPGW_FINISHED', true);
- if(!$GLOBALS['force_setup'])
+ if (! $GLOBALS['force_setup'])
{
/* Make sure the base classes are loaded. */
$this->load_base_classes();
@@ -383,7 +394,7 @@
/* Check to see there are any errors. */
/* If so include them in XML and load the xsl for it */
$messages = $GLOBALS['msgbox']->out();
- if(!empty($messages))
+ if (! empty($messages))
{
$GLOBALS['phpgw']->add_xsl('api.msgbox');
$GLOBALS['phpgw_xml_apinode']->add_node($messages,'msgbox');
@@ -402,7 +413,7 @@
}
$this->check_op();
- if (!$found_title)
+ if (! $found_title)
{
// This if shouldnt need to be here. I need to
find out why the flags are not set.
//if(!is_array($GLOBALS['phpgw_data']['flags']))
@@ -432,7 +443,7 @@
if (! $GLOBALS['force_setup'])
{
/* If any, add the hooks to the API XML node */
- if(count($this->hooks->data) > 0)
+ if (count($this->hooks->data) > 0)
{
$GLOBALS['phpgw_xml_apinode']->add_node($this->hooks->data,'hooks');
}
@@ -442,11 +453,13 @@
}
/* Add the op data to the API XML node */
- $op = array('opname' =>
$GLOBALS['phpgw_data']['api']['op'],
- 'appname' =>
$GLOBALS['phpgw_data']['flags']['req_app'],
- 'classname' =>
$GLOBALS['phpgw_data']['flags']['req_class'],
- 'methodname' =>
$GLOBALS['phpgw_data']['flags']['req_method'],
- );
+ $op = array
+ (
+ 'opname' =>
$GLOBALS['phpgw_data']['api']['op'],
+ 'appname' =>
$GLOBALS['phpgw_data']['flags']['req_app'],
+ 'classname' =>
$GLOBALS['phpgw_data']['flags']['req_class'],
+ 'methodname' =>
$GLOBALS['phpgw_data']['flags']['req_method']
+ );
$GLOBALS['phpgw_xml_apinode']->add_node($op,'op');
/* Add the basepath and baseurl to the xml contents */
@@ -471,7 +484,7 @@
saveObject(&$this->statecache, 'statecache');
$GLOBALS['performance_timer']->stop('cache_classes');
- if(!$args['sendoutput'])
+ if (! $args['sendoutput'])
{
$GLOBALS['performance_timer']->stop('phpgw');
$GLOBALS['performance_timer']->save();
@@ -491,7 +504,8 @@
{
reg_var('nextop', 'any', 'any');
reg_var('prevop', 'any', 'any');
- if(!isset($GLOBALS['phpgw_data']['api']['op']))
+
+ if (! isset($GLOBALS['phpgw_data']['api']['op']))
{
if
(isset($GLOBALS['phpgw_data']['api']['nextop']))
{
@@ -503,9 +517,9 @@
}
else
{
- if($this->session->is_anon())
+ if ($this->session->is_anon())
{
-
if(isset($GLOBALS['phpgw_data']['server']['default_anon_op']))
+ if
(isset($GLOBALS['phpgw_data']['server']['default_anon_op']))
{
$GLOBALS['phpgw_data']['api']['op'] =
$GLOBALS['phpgw_data']['server']['default_anon_op'];
}
@@ -547,12 +561,12 @@
trigger_error('illegal op name',E_USER_ERROR);
}
- if (!isset($GLOBALS['phpgw_data']['flags']['req_app']))
+ if (! isset($GLOBALS['phpgw_data']['flags']['req_app']))
{
$GLOBALS['phpgw_data']['flags']['req_app'] =
'api';
}
- if
(!isset($GLOBALS['phpgw_data']['flags']['req_class']))
+ if (!
isset($GLOBALS['phpgw_data']['flags']['req_class']))
{
$GLOBALS['phpgw_data']['flags']['req_class'] =
'phpgw';
}
@@ -570,7 +584,7 @@
{
while (($dir = readdir($maindh)) !==
false)
{
-
if(filetype(PHPGW_ROOT.SEP.$dir) == 'dir' && $dir != '.' && $dir != '..' &&
$dir != 'CVS')
+ if
(filetype(PHPGW_ROOT.SEP.$dir) == 'dir' && $dir != '.' && $dir != '..' && $dir
!= 'CVS')
{
if
(is_dir(PHPGW_ROOT.SEP.$dir))
{
@@ -578,17 +592,17 @@
{
while
(($file = readdir($dh)) !== false)
{
-
if(substr($file, 0, 6) == 'class.')
+
if (substr($file, 0, 6) == 'class.')
{
$classname = substr($file, 6, strlen($file)-10);
include_once(PHPGW_ROOT.SEP.$dir.SEP.$file);
}
- }
+ }
closedir($dh);
}
}
}
- }
+ }
closedir($maindh);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] api/class.phpgw.php, 1.1.1.1.2.49,
nomail <=