phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] etemplate doc/et_notes/inc/hook_add_def_pref.in...


From: Dave Hall
Subject: [Phpgroupware-cvs] etemplate doc/et_notes/inc/hook_add_def_pref.in...
Date: Wed, 06 Sep 2006 11:35:34 +0000

CVSROOT:        /cvsroot/phpgroupware
Module name:    etemplate
Changes by:     Dave Hall <skwashd>     06/09/06 11:35:33

Modified files:
        doc/et_notes/inc: hook_add_def_pref.inc.php 
        inc            : class.boetemplate.inc.php 
                         class.db_tools.inc.php class.so_sql.inc.php 

Log message:
        more clean ups

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/etemplate/doc/et_notes/inc/hook_add_def_pref.inc.php?cvsroot=phpgroupware&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/etemplate/inc/class.boetemplate.inc.php?cvsroot=phpgroupware&r1=1.37&r2=1.38
http://cvs.savannah.gnu.org/viewcvs/etemplate/inc/class.db_tools.inc.php?cvsroot=phpgroupware&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/etemplate/inc/class.so_sql.inc.php?cvsroot=phpgroupware&r1=1.7&r2=1.8

Patches:
Index: doc/et_notes/inc/hook_add_def_pref.inc.php
===================================================================
RCS file: 
/cvsroot/phpgroupware/etemplate/doc/et_notes/inc/hook_add_def_pref.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- doc/et_notes/inc/hook_add_def_pref.inc.php  6 Sep 2006 11:13:30 -0000       
1.2
+++ doc/et_notes/inc/hook_add_def_pref.inc.php  6 Sep 2006 11:35:33 -0000       
1.3
@@ -1,12 +1,11 @@
 <?php
-<?php
 /**
 * eTemplate - basic application development environment
 * @copyright Copyright (C) 2002-2006 Free Software Foundation, Inc. 
http://www.fsf.org/
 * @author Bettina Gille <address@hidden>
 * @license http://www.gnu.org/licenses/gpl.html GNU General Public License
 * @package etemplate
-* @version $Id: hook_add_def_pref.inc.php,v 1.2 2006/09/06 11:13:30 skwashd 
Exp $
+* @version $Id: hook_add_def_pref.inc.php,v 1.3 2006/09/06 11:35:33 skwashd 
Exp $
 */
        global $pref;
        
$pref->change('notes','notes_font','Verdana,Arial,Helvetica,sans-serif');

Index: inc/class.boetemplate.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.boetemplate.inc.php,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- inc/class.boetemplate.inc.php       6 Sep 2006 11:13:30 -0000       1.37
+++ inc/class.boetemplate.inc.php       6 Sep 2006 11:35:33 -0000       1.38
@@ -5,7 +5,7 @@
 * @author Ralf Becker <address@hidden>
 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public 
License
 * @package etemplate
-* @version $Id: class.boetemplate.inc.php,v 1.37 2006/09/06 11:13:30 skwashd 
Exp $
+* @version $Id: class.boetemplate.inc.php,v 1.38 2006/09/06 11:35:33 skwashd 
Exp $
 */
        include_once(PHPGW_INCLUDE_ROOT . 
'/etemplate/inc/class.soetemplate.inc.php');
 
@@ -78,7 +78,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * allows a few variables (eg. row-number) to be used in 
field-names
                *
                 * This is mainly used for autorepeat, but other use is 
possible.
@@ -203,9 +202,7 @@
                }
 
                /**
-                * @author ralfbecker
                 * creates a new appsession-id via microtime()
-               *
                 */
                function appsession_id()
                {
@@ -297,7 +294,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * saves content,readonlys,template-keys, ... via the 
appsession function
                *
                 * As a user may open several windows with the same 
content/template wie generate a location-id from microtime
@@ -320,7 +316,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * gets content,readonlys,template-keys, ... back from the 
appsession function
                *
                 * @param $id the location-id
@@ -340,7 +335,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * gets an attribute in a named cell
                *
                 * @return the attribute or False if named cell not found
@@ -365,7 +359,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * set an attribute in a named cell
                *
                 * @return the number of changed cells
@@ -399,7 +392,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * disables all cells with name == $name
                *
                 */
@@ -409,7 +401,6 @@
                }
                
                /**
-                * @author ralfbecker
                 * set one or more attibutes for row $n
                *
                 * @param $n is numerical row-number starting with 1 (!)
@@ -432,7 +423,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * disables row $n
                *
                 * @param $n is numerical row-number starting with 1 (!)
@@ -444,7 +434,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * set one or more attibutes for column $c
                *
                 * @param $c is numerical column-number starting with 0 (!), or 
the char-code starting with 'A'
@@ -465,7 +454,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * disables column $c
                *
                 * @param $c is numerical column-number starting with 0 (!), or 
the char-code starting with 'A'
@@ -477,7 +465,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * trys to load the Extension / Widget-class from the app or 
etemplate
                 * @param $name name of the extension, the classname should be 
class.${name}_widget.inc.php
                 * the $name might be "$name.$app" to give a app-name (default 
is the current app,or template-name)
@@ -508,19 +495,17 @@
                        return 
$GLOBALS['phpgw_info']['etemplate']['extension'][$type]->human_name;
                }
 
-               function haveExtension($type,$function='')
                /*
                @function haveExtension
                @syntax haveExtension($type)
-               @author ralfbecker
                @abstract checks if extension is loaded and load it if it isnt
                */
+               function haveExtension($type,$function='')
                {
                        return 
($GLOBALS['phpgw_info']['etemplate']['extension'][$type] || 
$this->loadExtension($type,$ui)) &&
                                        ($function == '' || 
$GLOBALS['phpgw_info']['etemplate']['extension'][$type]->public_functions[$function]);
                }
 
-               function 
extensionPreProcess($type,$name,&$value,&$cell,&$readonlys)
                /*
                @function extensionPreProcess
                @syntax extensionPreProcess(&$cell,&$value,&$readonlys)
@@ -530,8 +515,8 @@
                @param &$value value of the extensions content(-array)
                @param &$readonlys value of the extensions 
readonly-setting(-array)
                @abstract executes the pre_process-function of the extension 
$cell[]type]
-               @author ralfbecker
                */
+               function 
extensionPreProcess($type,$name,&$value,&$cell,&$readonlys)
                {
                        if (!$this->haveExtension($type))
                        {
@@ -541,7 +526,6 @@
                                
$GLOBALS['phpgw_info']['etemplate']['extension_data'][$name],$this);
                }
 
-               function extensionPostProcess($type,$name,&$value,$value_in)
                /*
                @function extensionPostProcess
                @syntax extensionPostProcess(&$cell,&$value)
@@ -549,8 +533,8 @@
                @param $name form-name of this widget/field (used as a unique 
index into extension_data)
                @param &$value value of the extensions content(-array)
                @abstract executes the post_process-function of the extension 
$cell[type]
-               @author ralfbecker
                */
+               function extensionPostProcess($type,$name,&$value,$value_in)
                {
                        if (!$this->haveExtension($type,'post_process'))
                        {
@@ -561,13 +545,11 @@
                                
$GLOBALS['phpgw_info']['etemplate']['loop'],$this,$value_in);
                }
 
-               function extensionRender($type,$name,&$value,&$cell,$readonly)
                /*
-               @function extensionRender
                @syntax extensionRender(&$cell,$form_name,&$value,$readonly)
                @abstract executes the render-function of the extension 
$cell[type]
-               @author ralfbecker
                */
+               function extensionRender($type,$name,&$value,&$cell,$readonly)
                {
                        if (!$this->haveExtension($type,'render'))
                        {
@@ -578,10 +560,7 @@
                }
 
                /**
-                * @author ralfbecker
                 * checks if idx, which may contain ONE subindex is set in array
-               *
-                * @author ralfbecker
                 */
                function isset_array($arr,$idx)
                {
@@ -593,11 +572,8 @@
                }
 
                /**
-                * @author ralfbecker
                 * sets $arr[$idx] = $val
-               *
                 * This works for non-trival indexes like 'a[b][c]' too: 
$arr['a']['b']['c'] = $val;
-                * @author ralfbecker
                 */
                function set_array(&$arr,$idx,$val)
                {
@@ -615,12 +591,10 @@
                }
 
                /**
-                * @author ralfbecker
                 * return a var-param to $arr[$idx]
                *
                 * $sub = get_array($arr,'a[b]'); $sub = 'c'; is equivalent to 
$arr['a']['b'] = 'c';
                 * This works for non-trival indexes like 'a[b][c]' too: it 
returns &$arr[a][b][c]
-                * @author ralfbecker
                 */
                function &get_array(&$arr,$idx)
                {
@@ -642,12 +616,10 @@
                }
 
                /**
-                * @author ralfbecker
                 * unsets $arr[$idx]
                *
                 * unset_array($arr,'a[b]'); is equivalent to 
unset($arr['a']['b']);
                 * This works for non-trival indexes like 'a[b][c]' too
-                * @author ralfbecker
                 */
                function unset_array(&$arr,$idx)
                {
@@ -665,7 +637,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * merges $old and $new, content of $new has precedence over 
$old
                *
                 * THIS IS NOT THE SAME AS PHP4: array_merge (as it calls 
itself recursive for values which are arrays.

Index: inc/class.db_tools.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.db_tools.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- inc/class.db_tools.inc.php  6 Sep 2006 11:13:30 -0000       1.20
+++ inc/class.db_tools.inc.php  6 Sep 2006 11:35:33 -0000       1.21
@@ -5,7 +5,7 @@
 * @author Ralf Becker <address@hidden>
 * @license http://www.gnu.org/licenses/gpl.html GNU General Public License
 * @package etemplate
-* @version $Id: class.db_tools.inc.php,v 1.20 2006/09/06 11:13:30 skwashd Exp $
+* @version $Id: class.db_tools.inc.php,v 1.21 2006/09/06 11:35:33 skwashd Exp $
 */
        class db_tools
        {
@@ -22,7 +22,8 @@
                var $data;              // Table definitions
                var $app;               // used app
                var $table;             // used table
-               var $types = array(
+               var $types = array
+               (
                        'varchar'       => 'varchar',
                        'int'           => 'int',
                        'auto'          => 'auto',
@@ -36,19 +37,9 @@
                        'timestamp'     => 'timestamp',
 //                     'abstime'   => 'abstime (mysql:timestamp)',
                );
-               var $setup_header = '<?php
-/**
-* ' . $app . ' Setup
-* @copyright Copyright (C) 2006 Free Software Foundation, Inc. 
http://www.fsf.org/
-* @author Your Name <address@hidden>
-* @license http://www.gnu.org/licenses/gpl.html GNU Lesser General Public 
License
-* @package etemplate
-* @version $Id: class.db_tools.inc.php,v 1.20 2006/09/06 11:13:30 skwashd Exp $
-*/
-';
+               var $setup_header = '';
 
                /**
-                * @author ralfbecker
                 * constructor of class
                *
                 */
@@ -61,10 +52,22 @@
                        {
                                
ExecMethod('phpgwapi.applications.read_installed_apps');
                        }
+
+                       //I know this formatting is ugly, but it needs to be 
ugly for now - skwashd
+                       $this->setup_header = '<?php
+/**
+* ' . $app . ' Setup
+* @copyright Copyright (C) 2006 Free Software Foundation, Inc. 
http://www.fsf.org/
+* @author Your Name <address@hidden>
+* @license http://www.gnu.org/licenses/gpl.html GNU Lesser General Public 
License
+* @package etemplate
+* @version $Id: class.db_tools.inc.php,v 1.21 2006/09/06 11:35:33 skwashd Exp $
+*/
+';
+
                }
 
                /**
-                * @author ralfbecker
                 * this is the table editor (and the callback/submit-method too)
                *
                 */
@@ -213,7 +216,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * checks if table was changed and if so offers user to save 
changes
                *
                 * @param $cont the content of the form (if called by 
process_exec)
@@ -304,7 +306,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * creates content-array from a $table
                *
                 * @param $table table-definition, eg. 
$phpgw_baseline[$table_name]
@@ -336,7 +337,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * creates table-definition from posted content
                *
                 * @param $content posted content-array
@@ -423,7 +423,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * includes $app/setup/tables_current.inc.php
                *
                 * @param $app application name
@@ -507,7 +506,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * writes tabledefinitions $phpgw_baseline to file 
/$app/setup/tables_current.inc.php
                *
                 * @param $app app-name
@@ -561,7 +559,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * reads and updates the version and tables info in file 
$app/setup/setup.inc.php
                *
                 * @param $app the app
@@ -669,7 +666,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * updates file /$app/setup/tables_update.inc.php to reflect 
changes in $current
                *
                 * @param $app app-name
@@ -832,7 +828,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * sets all nullable properties to True or False
                *
                 * @return the new array
@@ -861,7 +856,6 @@
                }
 
                /**
-                * @author ralfbecker
                 * compares two table-definitions
                *
                 * @return True if they are identical or False else

Index: inc/class.so_sql.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.so_sql.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- inc/class.so_sql.inc.php    6 Sep 2006 11:13:30 -0000       1.7
+++ inc/class.so_sql.inc.php    6 Sep 2006 11:35:33 -0000       1.8
@@ -5,7 +5,7 @@
 * @author Ralf Becker <address@hidden>
 * @license http://www.gnu.org/licenses/gpl.html GNU General Public License
 * @package etemplate
-* @version $Id: class.so_sql.inc.php,v 1.7 2006/09/06 11:13:30 skwashd Exp $
+* @version $Id: class.so_sql.inc.php,v 1.8 2006/09/06 11:35:33 skwashd Exp $
 */
 
 /**
@@ -39,7 +39,6 @@
        var $db_key_cols = array(),$db_data_cols = array(); // key_cols mean 
primary keys
        var $db_uni_cols = array();
        var $db_cols;   // = $db_key_cols + $db_data_cols
-       var $non_db_cols = array();
        var $data;              // holds the content of all db_cols
        var $debug = 0;
        var $empty_on_write = 'NULL';




reply via email to

[Prev in Thread] Current Thread [Next in Thread]