mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-12 17:08:34 +01:00
some corrections for the inline-doc-parser
This commit is contained in:
parent
c698632d44
commit
569a3672b0
@ -16,6 +16,7 @@
|
||||
|
||||
/*!
|
||||
@class boetemplate
|
||||
@author ralfbecker
|
||||
@abstract Buiseness Objects for eTemplates
|
||||
@discussion Not so much so far, as the most logic is still in the UI-class
|
||||
@param $types,$alings converts internal names/values to (more) human readible ones
|
||||
@ -65,7 +66,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function expand_name($name,$c,$row,$c_='',$row_='',$cont='')
|
||||
@function expand_name
|
||||
@syntax expand_name( $name,$c,$row,$c_='',$row_='',$cont='' )
|
||||
@author ralfbecker
|
||||
@abstract allows a few variables (eg. row-number) to be used in field-names
|
||||
@discussion This is mainly used for autorepeat, but other use is possible.
|
||||
@discussion You need to be aware of the rules PHP uses to expand vars in strings, a name
|
||||
@ -123,7 +126,7 @@
|
||||
@param &$idx_cname returns the basename for the form-name: is $idx if only one value
|
||||
@param (no ',') is given in size (name (not template-fields) are always only one value)
|
||||
@param $check_col boolean to check for col- or row-autorepeat
|
||||
@returns true if cell is autorepeat (has index with vars / '$') or false otherwise
|
||||
@result true if cell is autorepeat (has index with vars / '$') or false otherwise
|
||||
*/
|
||||
function autorepeat_idx($cell,$c,$r,&$idx,&$idx_cname,$check_col=False)
|
||||
{
|
||||
@ -171,7 +174,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function save_appsession($data,$id='')
|
||||
@function save_appsession
|
||||
@syntax save_appsession( $data,$id='' )
|
||||
@author ralfbecker
|
||||
@abstract saves content,readonlys,template-keys, ... via the appsession function
|
||||
@discussion As a user may open several windows with the same content/template wie generate a location-id from microtime
|
||||
@discussion which is used as location for appsession to descriminate between the different windows. This location-id
|
||||
@ -179,7 +184,7 @@
|
||||
@discussion from the session-id which is constant for all windows opened in one session.
|
||||
@param $data the data to save
|
||||
@param $id the id to use or '' to generate a new id
|
||||
@returns the location-id
|
||||
@result the location-id
|
||||
*/
|
||||
function save_appsession($data,$id='')
|
||||
{
|
||||
@ -193,10 +198,12 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function get_appsession($id)
|
||||
@function get_appsession
|
||||
@syntax get_appsession( $id )
|
||||
@author ralfbecker
|
||||
@abstract gets content,readonlys,template-keys, ... back from the appsession function
|
||||
@param $id the location-id
|
||||
@returns the session-data
|
||||
@result the session-data
|
||||
*/
|
||||
function get_appsession($id)
|
||||
{
|
||||
@ -208,9 +215,11 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function get_cell_attribute($name,$attr)
|
||||
@function get_cell_attribute
|
||||
@syntax get_cell_attribute( $name,$attr )
|
||||
@author ralfbecker
|
||||
@abstract gets an attribute in a named cell
|
||||
@returns the attribute or False if named cell not found
|
||||
@result the attribute or False if named cell not found
|
||||
*/
|
||||
function get_cell_attribute($name,$attr)
|
||||
{
|
||||
@ -232,9 +241,11 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function set_cell_attribute($name,$attr,$val)
|
||||
@function set_cell_attribute
|
||||
@syntax set_cell_attribute( $name,$attr,$val )
|
||||
@author ralfbecker
|
||||
@abstract set an attribute in a named cell
|
||||
@returns the number of changed cells
|
||||
@result the number of changed cells
|
||||
*/
|
||||
function set_cell_attribute($name,$attr,$val)
|
||||
{
|
||||
@ -257,9 +268,11 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function set_cell_attribute($name,$attr,$val)
|
||||
@function set_cell_attribute
|
||||
@syntax set_cell_attribute( $name,$attr,$val )
|
||||
@author ralfbecker
|
||||
@abstract set an attribute in a named cell
|
||||
@returns the number of changed cells
|
||||
@result the number of changed cells
|
||||
*/
|
||||
function set_cell_attribute($name,$attr,$val)
|
||||
{
|
||||
@ -282,7 +295,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function disable_cells($name)
|
||||
@function disable_cells
|
||||
@syntax disable_cells( $name )
|
||||
@author ralfbecker
|
||||
@abstract disables all cells with name == $name
|
||||
*/
|
||||
function disable_cells($name)
|
||||
@ -291,10 +306,12 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function loadExtension($name,$ui='')
|
||||
@function loadExtension
|
||||
@syntax loadExtension( $name,$ui='' )
|
||||
@author ralfbecker
|
||||
@abstact 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
|
||||
@note the $name might be "$name.$app" to give a app-name (default is the current app)
|
||||
@discussion the $name might be "$name.$app" to give a app-name (default is the current app)
|
||||
*/
|
||||
function loadExtension($name,&$parent,$ui='html')
|
||||
{
|
||||
@ -327,7 +344,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function isset_array($arr,$idx)
|
||||
@function isset_array
|
||||
@syntax isset_array( $arr,$idx )
|
||||
@author ralfbecker
|
||||
@abstract checks if idx, which may contain ONE subindex is set in array
|
||||
*/
|
||||
function isset_array($arr,$idx)
|
||||
@ -377,10 +396,12 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function complete_array_merge($old,$new)
|
||||
@function complete_array_merge
|
||||
@syntax complete_array_merge( $old,$new )
|
||||
@author ralfbecker
|
||||
@abstract merges $old and $new, content of $new has precedence over $old
|
||||
@note THIS IS NOT THE SAME AS PHP4: array_merge (as it calls itself recursive for values which are arrays,
|
||||
@note if there key does NOT start with a '_' (array_merge just overwrites the old (sub)array)
|
||||
@discussion THIS IS NOT THE SAME AS PHP4: array_merge (as it calls itself recursive for values which are arrays,
|
||||
@discussion if there key does NOT start with a '_' (array_merge just overwrites the old (sub)array)
|
||||
*/
|
||||
function complete_array_merge($old,$new)
|
||||
{
|
||||
|
@ -14,8 +14,9 @@
|
||||
|
||||
/*!
|
||||
@class date_widget
|
||||
@author ralfbecker
|
||||
@abstract widget that reads dates in via 3 select-boxes
|
||||
@note This widget is generates html vi the sbox-class, so it does not work (without an extra implementation) in an other UI
|
||||
@discussion This widget is generates html vi the sbox-class, so it does not work (without an extra implementation) in an other UI
|
||||
*/
|
||||
class date_widget
|
||||
{
|
||||
|
@ -14,8 +14,9 @@
|
||||
|
||||
/*!
|
||||
@class datefield_widget
|
||||
@author ralfbecker
|
||||
@abstract widget that reads date in via 3 input-fields
|
||||
@note This widget is independent of the UI as it only uses etemplate-widgets and has therefor no render-function
|
||||
@discussion This widget is independent of the UI as it only uses etemplate-widgets and has therefor no render-function
|
||||
*/
|
||||
class datefield_widget
|
||||
{
|
||||
|
@ -65,7 +65,9 @@
|
||||
';
|
||||
|
||||
/*!
|
||||
@function db_tools()
|
||||
@function db_tools
|
||||
@syntax db_tools( )
|
||||
@author ralfbecker
|
||||
@abstract constructor of class
|
||||
*/
|
||||
function db_tools($lang_on_messages=True)
|
||||
@ -92,7 +94,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function edit($content='',$msg='')
|
||||
@function edit
|
||||
@syntax edit( $content='',$msg='' )
|
||||
@author ralfbecker
|
||||
@abstract this is the table editor (and the callback/submit-method too)
|
||||
*/
|
||||
function edit($content='',$msg = '')
|
||||
@ -241,13 +245,15 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function needs_save($cont='',$posted_app='',$posted_table='',$edited_table='')
|
||||
@function needs_save
|
||||
@syntax needs_save( $cont='',$posted_app='',$posted_table='',$edited_table='' )
|
||||
@author ralfbecker
|
||||
@abstract 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)
|
||||
@param $posted_app the app the table is from
|
||||
@param $posted_table the table-name
|
||||
@param $edited_table the edited table-definitions
|
||||
@returns only if no changes
|
||||
@result only if no changes
|
||||
*/
|
||||
function needs_save($cont='',$posted_app='',$posted_table='',$edited_table='')
|
||||
{
|
||||
@ -320,10 +326,12 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function table2content($table)
|
||||
@function table2content
|
||||
@syntax table2content( $table )
|
||||
@author ralfbecker
|
||||
@abstract creates content-array from a $table
|
||||
@param $table table-definition, eg. $phpgw_baseline[$table_name]
|
||||
@returns content-array
|
||||
@result content-array
|
||||
*/
|
||||
function table2content($table)
|
||||
{
|
||||
@ -351,10 +359,12 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function content2table($content)
|
||||
@function content2table
|
||||
@syntax content2table( $content )
|
||||
@author ralfbecker
|
||||
@abstract creates table-definition from posted content
|
||||
@param $content posted content-array
|
||||
@returns table-definition
|
||||
@result table-definition
|
||||
*/
|
||||
function content2table($content)
|
||||
{
|
||||
@ -426,11 +436,13 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function read($app,&$phpgw_baseline)
|
||||
@function read
|
||||
@syntax read( $app,&$phpgw_baseline )
|
||||
@author ralfbecker
|
||||
@abstract includes $app/setup/tables_current.inc.php
|
||||
@param $app application name
|
||||
@param $phpgw_baseline where to put the data
|
||||
@returns True if file found, False else
|
||||
@result True if file found, False else
|
||||
*/
|
||||
function read($app,&$phpgw_baseline)
|
||||
{
|
||||
@ -508,7 +520,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function write($app,$phpgw_baseline)
|
||||
@function write
|
||||
@syntax write( $app,$phpgw_baseline )
|
||||
@author ralfbecker
|
||||
@abstract writes tabledefinitions $phpgw_baseline to file /$app/setup/tables_current.inc.php
|
||||
@param $app app-name
|
||||
@param $phpgw_baseline tabledefinitions
|
||||
@ -552,7 +566,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function setup_version($app,$new = '',$tables='')
|
||||
@function setup_version
|
||||
@syntax setup_version( $app,$new = '',$tables='' )
|
||||
@author ralfbecker
|
||||
@abstract reads and updates the version in file $app/setup/setup.inc.php if $new != ''
|
||||
@return the version or False if the file could not be read or written
|
||||
*/
|
||||
@ -599,7 +615,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function update($app,$current,$version)
|
||||
@function update
|
||||
@syntax update( $app,$current,$version )
|
||||
@author ralfbecker
|
||||
@abstract updates file /$app/setup/tables_update.inc.php to reflect changes in $current
|
||||
@param $app app-name
|
||||
@param $current new tabledefinitions
|
||||
@ -759,9 +777,11 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function normalize($table)
|
||||
@function normalize
|
||||
@syntax normalize( $table )
|
||||
@author ralfbecker
|
||||
@abstract sets all nullable properties to True or False
|
||||
@returns the new array
|
||||
@result the new array
|
||||
*/
|
||||
function normalize($table)
|
||||
{
|
||||
@ -788,9 +808,11 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function tables_identical($old,$new)
|
||||
@function tables_identical
|
||||
@syntax tables_identical( $old,$new )
|
||||
@author ralfbecker
|
||||
@abstract compares two table-definitions
|
||||
@returns True if they are identical or False else
|
||||
@result True if they are identical or False else
|
||||
*/
|
||||
function tables_identical($a,$b)
|
||||
{
|
||||
|
@ -434,10 +434,12 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function scan_for_extensions()
|
||||
@function scan_for_extensions
|
||||
@syntax scan_for_extensions( )
|
||||
@author ralfbecker
|
||||
@abstract search the inc-dirs of etemplate and the app whichs template is edited for extensions / custom widgets
|
||||
@note extensions are class-files in $app/inc/class.${name}_widget.inc.php
|
||||
@returns array with name => human_name of the extensions found
|
||||
@discussion extensions are class-files in $app/inc/class.${name}_widget.inc.php
|
||||
@result array with name => human_name of the extensions found
|
||||
*/
|
||||
function scan_for_extensions($app='etemplate')
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ class html
|
||||
@parm $vars query or array ('name' => 'value', ...) with query
|
||||
@example link('/index.php?menuaction=infolog.uiinfolog.get_list',array('info_id' => 123))
|
||||
@example = 'http://domain/phpgw-path/index.php?menuaction=infolog.uiinfolog.get_list&info_id=123'
|
||||
@returns absolut link already run through $phpgw->link
|
||||
@result absolut link already run through $phpgw->link
|
||||
*/
|
||||
function link($url,$vars='')
|
||||
{
|
||||
@ -124,7 +124,7 @@ class html
|
||||
@example 2 => 'cell2', 3 => 'cell3', '.3' => 'width="10%"' ),
|
||||
@example '.1' => 'BGCOLOR="#0000FF"' );
|
||||
@example table($rows,'WIDTH="100%"') = '<table WIDTH="100%"><tr><td colspan=3>cell1</td><td>cell2</td><td width="10%">cell3</td></tr></table>'
|
||||
@returns string with html-code of the table
|
||||
@result string with html-code of the table
|
||||
*/
|
||||
function table($rows,$options = '')
|
||||
{
|
||||
@ -200,7 +200,7 @@ class html
|
||||
@param $options String (or Array) with option-values eg. '100%,,1'
|
||||
@param $names String (or Array) with the option-names eg. 'WIDTH,HEIGHT,BORDER'
|
||||
@example formatOptions('100%,,1','WIDTH,HEIGHT,BORDER') = ' WIDTH="100%" BORDER="1"'
|
||||
@returns option string
|
||||
@result option string
|
||||
*/
|
||||
function formatOptions($options,$names)
|
||||
{
|
||||
@ -217,7 +217,7 @@ class html
|
||||
/*!
|
||||
@function nextMatchStyles
|
||||
@abstract returns simple stylesheet for nextmatch row-colors
|
||||
@returns the classes 'nmh' = nextmatch header, 'nmr0'+'nmr1' = alternating rows
|
||||
@result the classes 'nmh' = nextmatch header, 'nmr0'+'nmr1' = alternating rows
|
||||
*/
|
||||
function nextMatchStyles()
|
||||
{
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
/*!
|
||||
@class so_sql
|
||||
@author ralfbecker
|
||||
@abstract generalized SQL Storage Object
|
||||
@discussion the class can be used in following ways:
|
||||
@discussion 1) by calling the constructor with an app and table-name or
|
||||
@ -50,7 +51,9 @@ class so_sql
|
||||
var $non_db_cols = array();
|
||||
|
||||
/*!
|
||||
@function so_sql($app='',$table='')
|
||||
@function so_sql
|
||||
@syntax so_sql( $app='',$table='' )
|
||||
@author ralfbecker
|
||||
@abstract constructor of the class
|
||||
@discussion NEED to be called from the constructor of the derived class
|
||||
@param $app, $table should be set if table-defs to be read from <app>/setup/tables_current.inc.php
|
||||
@ -73,7 +76,9 @@ class so_sql
|
||||
}
|
||||
|
||||
/*!
|
||||
@function setup_table($app,$table)
|
||||
@function setup_table
|
||||
@syntax setup_table( $app,$table )
|
||||
@author ralfbecker
|
||||
@abstract reads table-definition from <app>/setup/tables_current.inc.php
|
||||
@discussion Does NOT set a different internal-data-name. If you want this, you have to do so
|
||||
@discussion in a derifed class !!!
|
||||
@ -110,7 +115,9 @@ class so_sql
|
||||
}
|
||||
|
||||
/*!
|
||||
@function so_data_merge($new)
|
||||
@function so_data_merge
|
||||
@syntax so_data_merge( $new )
|
||||
@author ralfbecker
|
||||
@abstract merges in new values from the given new data-array
|
||||
@param $new array in form col => new_value with values to set
|
||||
*/
|
||||
@ -182,7 +189,7 @@ class so_sql
|
||||
@function so_sql_init
|
||||
@abstract initializes data with the content of key
|
||||
@param $keys array with keys in form internalName => value
|
||||
@returns void
|
||||
@result void
|
||||
*/
|
||||
function so_sql_init($keys=array())
|
||||
{
|
||||
@ -207,7 +214,7 @@ class so_sql
|
||||
@function so_sql_read
|
||||
@abstract reads row matched by key and puts all cols in the data array
|
||||
@param $keys array with keys in form internalName => value, may be a scalar value if only one key
|
||||
@returns data array if row could be retrived else False and data = array()
|
||||
@result data array if row could be retrived else False and data = array()
|
||||
*/
|
||||
function so_sql_read($keys)
|
||||
{
|
||||
@ -274,7 +281,7 @@ class so_sql
|
||||
@function so_sql_save
|
||||
@abstracts saves the content of data to the db
|
||||
@param $keys if given $keys are copied to data before saveing => allows a save as
|
||||
@returns 0 on success and errno != 0 else
|
||||
@result 0 on success and errno != 0 else
|
||||
*/
|
||||
function so_sql_save($keys='')
|
||||
{
|
||||
@ -338,7 +345,7 @@ class so_sql
|
||||
@function so_sql_delete
|
||||
@abstract deletes row representing keys in internal data or the supplied $keys if != ''
|
||||
@param $keys if not '', array with col => value pairs to characterise the rows to delete
|
||||
@returns affected rows, should be 1 if ok, 0 if an error
|
||||
@result affected rows, should be 1 if ok, 0 if an error
|
||||
*/
|
||||
function so_sql_delete($keys='')
|
||||
{
|
||||
@ -386,7 +393,7 @@ class so_sql
|
||||
@param $order_by fieldnames + {ASC|DESC} separated by colons ','
|
||||
@param $wildcard string appended befor and after each criteria
|
||||
@param $empty False=empty criteria are ignored in query, True=empty have to be empty in row
|
||||
@returns array of matching rows (the row is an array of the cols) or False
|
||||
@result array of matching rows (the row is an array of the cols) or False
|
||||
*/
|
||||
function so_sql_search($criteria,$only_keys=True,$order_by='',$extra_cols='',$wildcard='',$empty=False)
|
||||
{
|
||||
@ -433,10 +440,12 @@ class so_sql
|
||||
}
|
||||
|
||||
/*!
|
||||
@function so_sql_not_unique($data='')
|
||||
@function so_sql_not_unique
|
||||
@syntax so_sql_not_unique( $data='' )
|
||||
@author ralfbecker
|
||||
@abstract Check if values for unique keys are unique
|
||||
@param $data data-set to check, defaults to $this->data
|
||||
@returns 0: all keys are unique, 1: first key not unique, 2: ...
|
||||
@result 0: all keys are unique, 1: first key not unique, 2: ...
|
||||
*/
|
||||
function so_sql_not_unique($data='')
|
||||
{
|
||||
@ -465,7 +474,9 @@ class so_sql
|
||||
}
|
||||
|
||||
/*!
|
||||
@function not_unique($data='')
|
||||
@function not_unique
|
||||
@syntax not_unique( $data='' )
|
||||
@author ralfbecker
|
||||
@abstract just an convinient alias for so_sql_search, might be reimplemented in derived class
|
||||
@parms as for so_sql_not_unique
|
||||
*/
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
/*!
|
||||
@class soetemplate
|
||||
@author ralfbecker
|
||||
@abstract Storage Objects: Everything to store and retrive the eTemplates.
|
||||
@discussion eTemplates are stored in the db in table 'phpgw_etemplate' and gets distributed
|
||||
@discussion through the file 'etemplates.inc.php' in the setup dir of each app. That file gets
|
||||
@ -79,7 +80,7 @@
|
||||
@function num2chrs
|
||||
@abstract generates column-names from index: 'A', 'B', ..., 'AA', 'AB', ..., 'ZZ' (not more!)
|
||||
@param $num index to generate name from 1 => 'A'
|
||||
@returns the name
|
||||
@result the name
|
||||
*/
|
||||
function num2chrs($num)
|
||||
{
|
||||
@ -97,7 +98,7 @@
|
||||
/*!
|
||||
@function empty_cell
|
||||
@abstracts constructor for a new / empty cell (nothing fancy so far)
|
||||
@returns the cell
|
||||
@result the cell
|
||||
*/
|
||||
function empty_cell()
|
||||
{
|
||||
@ -150,7 +151,7 @@
|
||||
@param $template as '' loads the prefered template 'default' loads the default one '' in the db
|
||||
@param $lang as '' loads the pref. lang 'default' loads the default one '' in the db
|
||||
@param $group is NOT used / implemented yet
|
||||
@returns True if a fitting template is found, else False
|
||||
@result True if a fitting template is found, else False
|
||||
*/
|
||||
function read($name,$template='default',$lang='default',$group=0,$version='')
|
||||
{
|
||||
@ -242,12 +243,14 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function compress_array($arr)
|
||||
@function compress_array
|
||||
@syntax compress_array( $arr )
|
||||
@author ralfbecker
|
||||
@abstract to save space in the db all empty values in the array got unset
|
||||
@discussion The never-'' type field ensures a cell does not disapear completely.
|
||||
@discussion Calls it self recursivly for arrays / the rows
|
||||
@param $arr the array to compress
|
||||
@returns the compressed array
|
||||
@result the compressed array
|
||||
*/
|
||||
function compress_array($arr)
|
||||
{
|
||||
@ -273,7 +276,7 @@
|
||||
@function as_array
|
||||
@abstract returns obj-data as array
|
||||
@param $data_too 0 = no data array, 1 = data array too, 2 = serialize data array
|
||||
@returns the array
|
||||
@result the array
|
||||
*/
|
||||
function as_array($data_too=0)
|
||||
{
|
||||
@ -297,7 +300,7 @@
|
||||
@function save
|
||||
@abstract saves eTemplate-object to db, can be used as saveAs by giving keys as params
|
||||
@params keys see class
|
||||
@returns the number of affected rows, 1 should be ok, 0 somethings wrong
|
||||
@result the number of affected rows, 1 should be ok, 0 somethings wrong
|
||||
*/
|
||||
function save($name='',$template='.',$lang='.',$group='',$version='.')
|
||||
{
|
||||
@ -366,7 +369,7 @@
|
||||
/*!
|
||||
@function delete
|
||||
@abstract Deletes the eTemplate from the db, object itself is unchanged
|
||||
@returns the number of affected rows, 1 should be ok, 0 somethings wrong
|
||||
@result the number of affected rows, 1 should be ok, 0 somethings wrong
|
||||
*/
|
||||
function delete()
|
||||
{
|
||||
@ -383,7 +386,7 @@
|
||||
@function dump2setup
|
||||
@abstract dumps all eTemplates to <app>/setup/etemplates.inc.php for distribution
|
||||
@param $app app- or template-name
|
||||
@returns the number of templates dumped as message
|
||||
@result the number of templates dumped as message
|
||||
*/
|
||||
function dump2setup($app)
|
||||
{
|
||||
@ -425,8 +428,8 @@
|
||||
/*!
|
||||
@function getToTranslate
|
||||
@abstract extracts all texts: labels and helptexts from an eTemplate-object
|
||||
@note some extensions use a '|' to squezze multiple texts in a label or help field
|
||||
@returns array with messages as key AND value
|
||||
@discussion some extensions use a '|' to squezze multiple texts in a label or help field
|
||||
@result array with messages as key AND value
|
||||
*/
|
||||
function getToTranslate()
|
||||
{
|
||||
@ -454,7 +457,7 @@
|
||||
@function getToTranslateApp
|
||||
@abstract Read all eTemplates of an app an extracts the texts to an array
|
||||
@param $app name of the app
|
||||
@returns the array with texts
|
||||
@result the array with texts
|
||||
*/
|
||||
function getToTranslateApp($app)
|
||||
{
|
||||
@ -478,7 +481,7 @@
|
||||
@param $lang language the messages in the template are, defaults to 'en'
|
||||
@param $additional extra texts to translate, if you pass here an array with all messages and
|
||||
@param select-options they get writen too (form is <unique key> => <message>)
|
||||
@returns message with number of messages written (total and new)
|
||||
@result message with number of messages written (total and new)
|
||||
*/
|
||||
function writeLangFile($app,$lang='en',$additional='')
|
||||
{
|
||||
@ -540,7 +543,7 @@
|
||||
@function import_dump
|
||||
@abstract Imports the dump-file /$app/setup/etempplates.inc.php unconditional (!)
|
||||
@param $app app name
|
||||
@returns message with number of templates imported
|
||||
@result message with number of templates imported
|
||||
*/
|
||||
function import_dump($app)
|
||||
{
|
||||
|
@ -14,9 +14,10 @@
|
||||
|
||||
/*!
|
||||
@class tab_widget
|
||||
@author ralfbecker
|
||||
@abstract widget that shows one row of tabs and an other row with the eTemplate of the selected tab
|
||||
@note see the example in 'etemplate.tab_widget.test' (use show to view it)
|
||||
@note This widget is independent of the UI as it only uses etemplate-widgets and has therefor no render-function
|
||||
@discussion see the example in 'etemplate.tab_widget.test' (use show to view it)
|
||||
@discussion This widget is independent of the UI as it only uses etemplate-widgets and has therefor no render-function
|
||||
*/
|
||||
class tab_widget
|
||||
{
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
/*!
|
||||
@class etemplate
|
||||
@author ralfbecker
|
||||
@abstract creates dialogs / HTML-forms from eTemplate descriptions
|
||||
@discussion etemplate or uietemplate extends boetemplate, all vars and public functions are inherited
|
||||
@example $tmpl = CreateObject('etemplate.etemplate','app.template.name');
|
||||
@ -76,7 +77,7 @@
|
||||
@param $readonlys Array with field-names as keys for fields with should be readonly
|
||||
@param (eg. to implement ACL grants on field-level or to remove buttons not applicable)
|
||||
@param $preserv Array with vars which should be transported to the $method-call (eg. an id) array('id' => $id) sets $HTTP_POST_VARS['id'] for the $method-call
|
||||
@returns nothing
|
||||
@result nothing
|
||||
*/
|
||||
function exec($method,$content,$sel_options='',$readonlys='',$preserv='',$changes='')
|
||||
{
|
||||
@ -191,7 +192,7 @@
|
||||
@param $cname basename of names for form-elements, means index in $HTTP_POST_VARS
|
||||
@param eg. $cname='cont', element-name = 'name' returned content in $HTTP_POST_VARS['cont']['name']
|
||||
@param $show_xxx row,col name/index for name expansion
|
||||
@returns the generated HTML
|
||||
@result the generated HTML
|
||||
*/
|
||||
function show($content,$sel_options='',$readonlys='',$cname='cont',$show_c=0,$show_row=0)
|
||||
{
|
||||
@ -311,7 +312,7 @@
|
||||
@discussion calls show to generate included eTemplates. Again only an INTERMAL function.
|
||||
@param $cell array with data of the cell: name, type, ...
|
||||
@param for rest see show
|
||||
@returns the generated HTML
|
||||
@result the generated HTML
|
||||
*/
|
||||
function show_cell($cell,$content,$sel_options,$readonlys,$cname,$show_c,$show_row,&$span)
|
||||
{
|
||||
@ -583,7 +584,7 @@
|
||||
@param $vars HTTP_POST_VARS on first call, later (deeper recursions) subscripts of it
|
||||
@param $readonly array with cell- / var-names which should NOT return content (this is to workaround browsers who not understand READONLY correct)
|
||||
@param $cname basename of our returnt content (same as in call to show)
|
||||
@returns the adjusted content (by using the var-param &$content)
|
||||
@result the adjusted content (by using the var-param &$content)
|
||||
*/
|
||||
function process_show(&$content,$readonlys='')
|
||||
{
|
||||
@ -699,7 +700,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function process_show_cell($cell,$name,$c,$r,$readonlys,&$value)
|
||||
@function process_show_cell
|
||||
@syntax process_show_cell( $cell,$name,$c,$r,$readonlys,&$value )
|
||||
@author ralfbecker
|
||||
@abstract makes necessary adjustments on $value eTemplate / form gots submitted
|
||||
@discussion This is only an internal function, dont call it direct use only exec
|
||||
@discussion process_show recursivly calls itself for the included eTemplates.
|
||||
@ -708,7 +711,7 @@
|
||||
@param $c,$r col,row index
|
||||
@param $readonlys readonlys-array to pass on for templates
|
||||
@param &$value value to change
|
||||
@returns if $value is set
|
||||
@result if $value is set
|
||||
*/
|
||||
function process_show_cell($cell,$name,$c,$r,$readonlys,&$value)
|
||||
{
|
||||
@ -811,10 +814,12 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function java_script($consider_not_tested_as_enabled = True)
|
||||
@function java_script
|
||||
@syntax java_script( $consider_not_tested_as_enabled = True )
|
||||
@author ralfbecker
|
||||
@abstract is javascript enabled?
|
||||
@discussion this should be tested by the api at login
|
||||
@returns true if javascript is enabled or not yet tested
|
||||
@result true if javascript is enabled or not yet tested
|
||||
*/
|
||||
function java_script($consider_not_tested_as_enabled = True)
|
||||
{
|
||||
@ -825,7 +830,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function include_java_script()
|
||||
@function include_java_script
|
||||
@syntax include_java_script( )
|
||||
@author ralfbecker
|
||||
@abstract returns the javascript to be included by exec
|
||||
*/
|
||||
function include_java_script()
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
/*!
|
||||
@class etemplate
|
||||
@author ralfbecker
|
||||
@abstract creates dialogs / HTML-forms from eTemplate descriptions
|
||||
@discussion etemplate or uietemplate extends boetemplate, all vars and public functions are inherited
|
||||
@example $tmpl = CreateObject('etemplate.etemplate','app.template.name');
|
||||
@ -77,7 +78,7 @@
|
||||
@param $readonlys Array with field-names as keys for fields with should be readonly
|
||||
@param (eg. to implement ACL grants on field-level or to remove buttons not applicable)
|
||||
@param $preserv Array with vars which should be transported to the $method-call (eg. an id) array('id' => $id) sets $HTTP_POST_VARS['id'] for the $method-call
|
||||
@returns nothing
|
||||
@result nothing
|
||||
*/
|
||||
function exec($method,$content,$sel_options='',$readonlys='',$preserv='')
|
||||
{
|
||||
@ -154,7 +155,7 @@
|
||||
/*!
|
||||
@function process_show
|
||||
@abstract this is only an empty function for the GTK ui
|
||||
@returns the adjusted content (in the simplest case that would be $content)
|
||||
@result the adjusted content (in the simplest case that would be $content)
|
||||
*/
|
||||
function process_show(&$content,$readonlys='')
|
||||
{
|
||||
@ -263,7 +264,7 @@
|
||||
@param $cname basename of names for form-elements, means index in $HTTP_POST_VARS
|
||||
@param eg. $cname='cont', element-name = 'name' returned content in $HTTP_POST_VARS['cont']['name']
|
||||
@param $show_xxx row,col name/index for name expansion
|
||||
@returns the generated HTML
|
||||
@result the generated HTML
|
||||
*/
|
||||
function show(&$result,$content,$sel_options='',$readonlys='',$cname='',$show_c=0,$show_row=0)
|
||||
{
|
||||
@ -433,7 +434,7 @@
|
||||
@discussion calls show to generate included eTemplates. Again only an INTERMAL function.
|
||||
@param $cell array with data of the cell: name, type, ...
|
||||
@param for rest see show
|
||||
@returns the generated HTML
|
||||
@result the generated HTML
|
||||
*/
|
||||
function show_cell($cell,$content,$sel_options,$readonlys,$cname,$show_c,$show_row,&$span,&$result)
|
||||
{
|
||||
|
@ -446,7 +446,9 @@
|
||||
return False;
|
||||
}
|
||||
/*!
|
||||
@function link_title( $id )
|
||||
@function link_title
|
||||
@syntax link_title( $id )
|
||||
@author ralfbecker
|
||||
@abstract get title for an infolog entry identified by $id
|
||||
*/
|
||||
function link_title( $info )
|
||||
@ -459,7 +461,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function link_query( $pattern )
|
||||
@function link_query
|
||||
@syntax link_query( $pattern )
|
||||
@author ralfbecker
|
||||
@abstract query infolog for entries matching $pattern
|
||||
*/
|
||||
function link_title( $pattern )
|
||||
|
@ -20,11 +20,12 @@
|
||||
|
||||
/*!
|
||||
@class bolink
|
||||
@author ralfbecker
|
||||
@abstract generalized linking between entries of phpGroupware apps - BO layer
|
||||
@discussion This class is the BO-layer of the links
|
||||
@note Links have to ends each pointing to an entry, an entry is a double:
|
||||
@note app app-name or directory-name of an phpgw application, eg. 'infolog'
|
||||
@note id this is the id, eg. an integer or a tupple like '0:INBOX:1234'
|
||||
@discussion Links have to ends each pointing to an entry, an entry is a double:
|
||||
@discussion app app-name or directory-name of an phpgw application, eg. 'infolog'
|
||||
@discussion id this is the id, eg. an integer or a tupple like '0:INBOX:1234'
|
||||
*/
|
||||
class bolink extends solink
|
||||
{
|
||||
@ -85,9 +86,11 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function query($app,$pattern)
|
||||
@function query
|
||||
@syntax query( $app,$pattern )
|
||||
@author ralfbecker
|
||||
@abstract Searches for a $pattern in the entries of $app
|
||||
@returns an array of $id => $title pairs
|
||||
@result an array of $id => $title pairs
|
||||
*/
|
||||
function query($app,$pattern)
|
||||
{
|
||||
@ -101,9 +104,11 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function title($app,$id)
|
||||
@function title
|
||||
@syntax title( $app,$id )
|
||||
@author ralfbecker
|
||||
@abstract returns the title (short description) of entry $id and $app
|
||||
@returns the title
|
||||
@result the title
|
||||
*/
|
||||
function title($app,$id)
|
||||
{
|
||||
@ -117,7 +122,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function calendar_title( $id )
|
||||
@function calendar_title
|
||||
@syntax calendar_title( $id )
|
||||
@author ralfbecker
|
||||
@abstract get title for an event, should be moved to bocalendar.link_title
|
||||
*/
|
||||
function calendar_title( $event )
|
||||
@ -142,7 +149,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function calendar_query( $pattern )
|
||||
@function calendar_query
|
||||
@syntax calendar_query( $pattern )
|
||||
@author ralfbecker
|
||||
@abstract query calendar for an event $matching pattern, should be moved to bocalendar.link_query
|
||||
*/
|
||||
function calendar_query($pattern)
|
||||
@ -162,7 +171,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function addressbook_title( $id )
|
||||
@function addressbook_title
|
||||
@syntax addressbook_title( $id )
|
||||
@author ralfbecker
|
||||
@abstract get title for an address, should be moved to boaddressbook.link_title
|
||||
*/
|
||||
function addressbook_title( $addr )
|
||||
@ -195,7 +206,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function addressbook_query( $pattern )
|
||||
@function addressbook_query
|
||||
@syntax addressbook_query( $pattern )
|
||||
@author ralfbecker
|
||||
@abstract query addressbook for $pattern, should be moved to boaddressbook.link_query
|
||||
*/
|
||||
function addressbook_query( $pattern )
|
||||
@ -213,7 +226,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function projects_title( $id )
|
||||
@function projects_title
|
||||
@syntax projects_title( $id )
|
||||
@author ralfbecker
|
||||
@abstract get title for a project, should be moved to boprojects.link_title
|
||||
*/
|
||||
function projects_title( $proj )
|
||||
@ -232,7 +247,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function projects_query( $pattern )
|
||||
@function projects_query
|
||||
@syntax projects_query( $pattern )
|
||||
@author ralfbecker
|
||||
@abstract query for projects matching $pattern, should be moved to boprojects.link_query
|
||||
*/
|
||||
function projects_title( $pattern )
|
||||
|
@ -14,11 +14,12 @@
|
||||
|
||||
/*!
|
||||
@class solink
|
||||
@author ralfbecker
|
||||
@abstract generalized linking between entries of phpGroupware apps - DB layer
|
||||
@discussion This class is to access the links in the DB
|
||||
@note Links have to ends each pointing to an entry, an entry is a double:
|
||||
@note app app-name or directory-name of an phpgw application, eg. 'infolog'
|
||||
@note id this is the id, eg. an integer or a tupple like '0:INBOX:1234'
|
||||
@discussion Links have to ends each pointing to an entry, an entry is a double:
|
||||
@discussion app app-name or directory-name of an phpgw application, eg. 'infolog'
|
||||
@discussion id this is the id, eg. an integer or a tupple like '0:INBOX:1234'
|
||||
*/
|
||||
class solink // DB-Layer
|
||||
{
|
||||
@ -35,7 +36,9 @@
|
||||
var $debug = 0;
|
||||
|
||||
/*!
|
||||
@function solink( )
|
||||
@function solink
|
||||
@syntax solink( )
|
||||
@author ralfbecker
|
||||
@abstract constructor
|
||||
*/
|
||||
function solink( )
|
||||
@ -45,12 +48,14 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function link( $app1,$name1,$id1,$app2,$name2,$id2,$remark='',$user=0 )
|
||||
@function link
|
||||
@syntax link( $app1,$name1,$id1,$app2,$name2,$id2,$remark='',$user=0 )
|
||||
@author ralfbecker
|
||||
@abstract creats a link between $app1,$name1,$id1 and $app2,$name2,$id2
|
||||
@param $remark Remark to be saved with the link (defaults to '')
|
||||
@param $owner Owner of the link (defaults to user)
|
||||
@note Does NOT check if link already exists
|
||||
@returns db-errno or -1 (for param-error) or 0 for success
|
||||
@discussion Does NOT check if link already exists
|
||||
@result db-errno or -1 (for param-error) or 0 for success
|
||||
*/
|
||||
function link( $app1,$id1,$app2,$id2,$remark='',$owner=0 )
|
||||
{
|
||||
@ -82,11 +87,13 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function get_links( $app,$name,$id,$only_app='',$only_name='',$order='link_lastmod DESC' )
|
||||
@function get_links
|
||||
@syntax get_links( $app,$name,$id,$only_app='',$only_name='',$order='link_lastmod DESC' )
|
||||
@author ralfbecker
|
||||
@abstract returns array of links to $app,$name,$id
|
||||
@param $only_app if set return only links from $only_app (eg. only addressbook-entries)
|
||||
@param $order defaults to newest links first
|
||||
@returns array of links or empty array if no matching links found
|
||||
@result array of links or empty array if no matching links found
|
||||
*/
|
||||
function get_links( $app,$id,$only_app='',$order='link_lastmod DESC' )
|
||||
{
|
||||
@ -136,11 +143,13 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function unlink($link_id,$app='',$id='',$owner='')
|
||||
@function unlink
|
||||
@syntax unlink( $link_id,$app='',$id='',$owner='' )
|
||||
@author ralfbecker
|
||||
@abstract Remove link with $link_id or all links matching given params
|
||||
@param $link_id link-id to remove if > 0
|
||||
@param $app,$id,$owner if $link_id <= 0: removes all links matching the non-empty params
|
||||
@returns the number of links deleted
|
||||
@result the number of links deleted
|
||||
*/
|
||||
function unlink($link_id,$app='',$id='',$owner='')
|
||||
{
|
||||
@ -181,11 +190,13 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function chown($owner,$new_owner)
|
||||
@function chown
|
||||
@syntax chown( $owner,$new_owner )
|
||||
@author ralfbecker
|
||||
@abstract Changes ownership of all links from $owner to $new_owner
|
||||
@discussion This is needed when a user/account gets deleted
|
||||
@note Does NOT change the modification-time
|
||||
@returns the number of links changed
|
||||
@discussion Does NOT change the modification-time
|
||||
@result the number of links changed
|
||||
*/
|
||||
function chown($owner,$new_owner)
|
||||
{
|
||||
|
@ -20,11 +20,12 @@
|
||||
|
||||
/*!
|
||||
@class uilink
|
||||
@author ralfbecker
|
||||
@abstract generalized linking between entries of phpGroupware apps - HTML UI layer
|
||||
@discussion This class is the UI to show/modify the links
|
||||
@note Links have to ends each pointing to an entry, an entry is a double:
|
||||
@note app app-name or directory-name of an phpgw application, eg. 'infolog'
|
||||
@note id this is the id, eg. an integer or a tupple like '0:INBOX:1234'
|
||||
@discussion Links have to ends each pointing to an entry, an entry is a double:
|
||||
@discussion app app-name or directory-name of an phpgw application, eg. 'infolog'
|
||||
@discussion id this is the id, eg. an integer or a tupple like '0:INBOX:1234'
|
||||
*/
|
||||
class uilink extends bolink
|
||||
{
|
||||
@ -38,7 +39,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function getEntry($name)
|
||||
@function getEntry
|
||||
@syntax getEntry( $name )
|
||||
@author ralfbecker
|
||||
@abstract HTML UI to query user for one side of a link: an entry of a supported app
|
||||
*/
|
||||
function getEntry()
|
||||
@ -46,7 +49,9 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
@function show($app,$id)
|
||||
@function show
|
||||
@syntax show( $app,$id )
|
||||
@author ralfbecker
|
||||
@abstract HTML UI to show & delete existing links to $app,$id and to make new links
|
||||
@discussion this should be called by each link-supporting app at the bottom of its view-entry-page
|
||||
*/
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
/*!
|
||||
@class vfs
|
||||
@author ralfbecker
|
||||
@abstract Virtual File System
|
||||
@description Authors: Zone
|
||||
*/
|
||||
@ -55,6 +56,7 @@
|
||||
|
||||
/*!
|
||||
@class path_class
|
||||
@author ralfbecker
|
||||
@abstract helper class for path_parts
|
||||
*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user