[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] skel/class.base.php, 1.1.2.1.2.16
From: |
nomail |
Subject: |
[Phpgroupware-cvs] skel/class.base.php, 1.1.2.1.2.16 |
Date: |
Thu, 20 May 2004 15:33:02 -0000 |
Update of /skel
Modified Files:
Branch: proposal-branch
class.base.php
date: 2004/04/16 20:59:49; author: seek3r; state: Exp; lines: +82 -32
Log Message:
bringing savannah cvs back up to date with what we were doing on our private
cvs server. We will not be doing dev from this cvs tree
=====================================================================
No syntax errors detected in -
=====================================================================
Index: skel/class.base.php
diff -u skel/class.base.php:1.1.2.1.2.15 skel/class.base.php:1.1.2.1.2.16
--- skel/class.base.php:1.1.2.1.2.15 Tue Nov 18 15:53:58 2003
+++ skel/class.base.php Fri Apr 16 20:59:49 2004
@@ -56,7 +56,7 @@
'functions'=>$functions
);
- $GLOBALS['skel_base_menus_loaded'] = False;
+ $GLOBALS['skel_base_menus_loaded'] = false;
class skel_base
{
var $sec;
@@ -71,27 +71,20 @@
$GLOBALS['phpgw']->add_appmenu('App menu','HTML
Outputted by app','skel.base.htmloutputtest');
$GLOBALS['phpgw']->add_appmenu('App
menu','Display all docs','skel.base.view_docs');
- $GLOBALS['api_account_mgr_menus_loaded'] = True;
+ $GLOBALS['api_account_mgr_menus_loaded'] = true;
}
}
- function htmloutputtest()
- {
- $str = '<table
border="2"><tr><td>blah</td></tr><tr><td>blah</td></tr></table>';
- $GLOBALS['phpgw_xml_apinode']->add_node($str,'APPHTML');
- $GLOBALS['phpgw']->xslt_render_force_server = True;
- }
-
function start()
{
$args = new safe_args();
- $args->set('answer', '##NOVAR##', 'any');
- $args = $args->get(func_get_args(),__LINE__,__FILE__);
+ $args->set('answer', NOVAR, 'any');
+ $args = $args->get(func_get_args());
$result['b'] = '';
switch($args['answer'])
{
- case '##NOVAR##':
+ case NOVAR:
$GLOBALS['phpgw']->add_xsl('api.widgets');
$result['dialog'] = array(
'text' => lang('Do you think
this will actually work?'),
@@ -141,11 +134,11 @@
function view_docs()
{
$args = new safe_args();
- $args->set('class', '##NOTSET##', 'any');
- $args->set('function', '##NOTSET##', 'any');
- $args = $args->get(func_get_args(),__LINE__,__FILE__);
+ $args->set('class', NOTSET, 'any');
+ $args->set('function', NOTSET, 'any');
+ $args = $args->get(func_get_args());
$GLOBALS['phpgw']->load_docs();
- $GLOBALS['msgbox']->add('Display template is not yet
done.',__LINE__,__FILE__, 'notice');
+ $GLOBALS['msgbox']->add('Display template is not yet
done.', 'notice');
$GLOBALS['phpgw']->add_xsl('api.docs');
return $GLOBALS['docs'];
}
@@ -153,10 +146,10 @@
function home_hook()
{
$args = new safe_args();
- $args->set('fname', '##NOTSET##', 'any');
- $args->set('lname', '##NOTSET##', 'any');
- $args = $args->get(func_get_args(),__LINE__,__FILE__);
- $GLOBALS['msgbox']->add('Skel apps hook was
called!',__LINE__,__FILE__, 'notice');
+ $args->set('fname', NOTSET, 'any');
+ $args->set('lname', NOTSET, 'any');
+ $args = $args->get(func_get_args());
+ $GLOBALS['msgbox']->add('Skel apps hook was called!',
'notice');
// $GLOBALS['phpgw']->add_xsl('skel.home_hook');
// return $args;
@@ -166,21 +159,78 @@
{
if ($this->sec->check($op, $rights))
{
- return $rights.' is valid';
+ return $rights.' is granted';
}
else
{
- return $rights.' is invalid';
+ return $rights.' is denied';
}
}
+ function __test_private()
+ {
+ $GLOBALS['msgbox']->add('WARNING! This shouldn\'t
actually get called.', 'notice');
+
+ return array();
+ }
+
+ function _test_protected()
+ {
+ $GLOBALS['msgbox']->add('WARNING! This shouldn\'t
actually get called.', 'notice');
+
+ return array();
+ }
+
+ function htmloutputtest()
+ {
+ // a function that echo's out directly
+ echo '<table
border="2"><tr><td>blah</td></tr><tr><td>blah</td></tr></table>';
+ }
+
+ function naughtyapptest()
+ {
+ // a function that echo's out directly and also does an
exit.
+ echo '<table
border="2"><tr><td>blah</td></tr><tr><td>blah</td></tr></table>';
+ exit;
+ }
+
+ function xultest()
+ {
+
+header ( 'Content-type: application/vnd.mozilla.xul+xml' );
+echo '<?xml version="1.0"?>
+<!-- example1.xul -->
+<?xml-stylesheet href="example1.css" type="text/css"?>
+<window
+ title="XUL in Action"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+<tabbox orient="vertical" flex="1">
+ <tabs>
+ <tab label="PHP & MySQL Interviews, News and Views" />
+ <tab label="PHP & MySQL Tips and Tutorials" />
+ <tab label="PHP & MySQL Apps and Reviews" />
+ </tabs>
+ <tabpanels flex="1">
+ <browser src="http://www.sitepoint.com/subcat/97"/>
+ <browser src="http://www.sitepoint.com/subcat/98"/>
+ <browser src="http://www.sitepoint.com/subcat/99"/>
+ </tabpanels>
+</tabbox>
+</window>';
+exit;
+ $str = '<table
border="2"><tr><td>blah</td></tr><tr><td>blah</td></tr></table>';
+ $GLOBALS['phpgw_xml_apinode']->add_node($str,'APPHTML');
+ $_GET['fxsl'] = 2;
+ }
+
function acl_tester()
{
- $this->sec = createobject('api_acl',
array('account_id'=>9999));
+ $this->sec = createObject('api_acl',
array('account_id'=>9999));
$this->sec->get_memberships();
$result['text'][] = 'This test is going to delete all
your phpgw_acl records to ensure that the tests run as expected.';
- $GLOBALS['phpgw']->db->query('DELETE FROM phpgw_acl
where acl_account=9999',__LINE__,__FILE__);
+ $GLOBALS['phpgw']->db->query('DELETE FROM phpgw_acl
where acl_account=9999');
$result['text'][] = 'Action: DELETE FROM phpgw_acl';
$result['text'][] = ' ';
$result['text'][] = 'Running checks on skel.base.rtest
after changing directly granted rights as well as skels it will inherit from';
@@ -191,10 +241,10 @@
$result['text'][] = $this->ttt('skel.base', 2);
$result['text'][] = $this->ttt('skel.base', 4);
$result['text'][] = $this->ttt('skel.base', 8);
- $result['text'][] = 'You can see that no rights are
set, so nskel will be inherited';
+ $result['text'][] = 'You can see that no rights are
set, so skel will be inherited';
$result['text'][] = ' ';
- $result['text'][] = '2: checking skelbase.rtest';
+ $result['text'][] = '2: checking skel.base.rtest';
$result['text'][] = $this->ttt('skel.base.rtest', 1);
$result['text'][] = $this->ttt('skel.base.rtest', 2);
$result['text'][] = $this->ttt('skel.base.rtest', 4);
@@ -307,7 +357,7 @@
'name' => 'checkbox_a',
'label' => 'checkbox_label_a',
'value' => 'checkbox_value_a',
- 'checked' => True
+ 'checked' => true
),
3 => array(
'type' => 'inputbox',
@@ -327,7 +377,7 @@
1 => array(
'value' => 'select_value_b',
'text' => 'select_text_b',
- 'selected' => True
+ 'selected' => true
),
2 => array(
'value' => 'select_value_c',
@@ -339,7 +389,7 @@
'type' => 'selectbox',
'name' => 'selectbox_b',
'label' => 'selectbox_label_b',
- 'multiple' => True,
+ 'multiple' => true,
'size' => 10,
'values' => array(
0 => array(
@@ -353,7 +403,7 @@
2 => array(
'value' => 'select_value_c',
'text' => 'select_text_c',
- 'selected' => True
+ 'selected' => true
),
)
),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] skel/class.base.php, 1.1.2.1.2.16,
nomail <=