[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: setup/inc README,1.2,1.3 functions.inc.php,1.45,
From: |
Miles Lott <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: setup/inc README,1.2,1.3 functions.inc.php,1.45,1.46 class.schema_proc.inc.php,1.5,NONE class.schema_proc_array.inc.php,1.3,NONE class.schema_proc_mssql.inc.php,1.4,NONE class.schema_proc_mysql.inc.php,1.8,NONE class.schema_proc_pgsql.inc.php,1.11,NONE class.setup.inc.php,1.24,NONE class.setup_detection.inc.php,1.14,NONE class.setup_html.inc.php,1.9,NONE class.setup_lang.inc.php,1.9,NONE class.setup_process.inc.php,1.12,NONE xml_functions.inc.php,1.1,NONE |
Date: |
Sun, 03 Mar 2002 16:53:03 -0500 |
Update of /cvsroot/phpgroupware/setup/inc
In directory subversions:/tmp/cvs-serv16191/inc
Modified Files:
README functions.inc.php
Removed Files:
class.schema_proc.inc.php class.schema_proc_array.inc.php
class.schema_proc_mssql.inc.php
class.schema_proc_mysql.inc.php
class.schema_proc_pgsql.inc.php class.setup.inc.php
class.setup_detection.inc.php class.setup_html.inc.php
class.setup_lang.inc.php class.setup_process.inc.php
xml_functions.inc.php
Log Message:
Moved setup and schema_proc classes to api; reorganize how the setup class
is created
Index: README
===================================================================
RCS file: /cvsroot/phpgroupware/setup/inc/README,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** README 3 Dec 2001 17:39:39 -0000 1.2
--- README 3 Mar 2002 21:52:59 -0000 1.3
***************
*** 1,3 ****
! phpGroupWare setup May 2001
Class logical (?) organization map:
--- 1,3 ----
! phpGroupWare setup March 2002 revised (5-2001)
Class logical (?) organization map:
***************
*** 5,15 ****
class.setup.inc.php Global setup
functions app/hook/login
|
! class.setup_detection.inc.php Detection of header, file and
db versions
|
! class.setup_lang.inc.php Multi-lang functions
for display
|
! class.setup_html.inc.php HTML/template output
functions
|
! class.setup_process.inc.php db processing
functions/upgrade/install
|
class.schema_proc.inc.php
DB array <--> SQL and abstraction class
--- 5,15 ----
class.setup.inc.php Global setup
functions app/hook/login
|
! class.detection.inc.php Detection of header, file and db
versions
|
! class.translation.inc.php Multi-lang functions
for display
|
! class.html.inc.php HTML/template output functions
|
! class.process.inc.php db processing
functions/upgrade/install
|
class.schema_proc.inc.php
DB array <--> SQL and abstraction class
Index: functions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/inc/functions.inc.php,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -r1.45 -r1.46
*** functions.inc.php 17 Feb 2002 20:23:26 -0000 1.45
--- functions.inc.php 3 Mar 2002 21:52:59 -0000 1.46
***************
*** 28,36 ****
unset($d1);unset($d2);unset($d3);
/* ######## End security check ########## */
if(file_exists('../header.inc.php'))
{
include('../header.inc.php');
}
! else
{
define('PHPGW_SERVER_ROOT','..');
--- 28,38 ----
unset($d1);unset($d2);unset($d3);
/* ######## End security check ########## */
+
if(file_exists('../header.inc.php'))
{
include('../header.inc.php');
}
! /* If we included the header.inc.php, but it is somehow broken, cover
ourselves... */
! if(!defined('PHPGW_SERVER_ROOT') && !defined('PHPGW_INCLUDE_ROOT'))
{
define('PHPGW_SERVER_ROOT','..');
***************
*** 38,139 ****
}
! function CreateObject($class,
! $p1='_UNDEF_',$p2='_UNDEF_',$p3='_UNDEF_',$p4='_UNDEF_',
! $p5='_UNDEF_',$p6='_UNDEF_',$p7='_UNDEF_',$p8='_UNDEF_',
! $p9='_UNDEF_',$p10='_UNDEF_',$p11='_UNDEF_',$p12='_UNDEF_',
! $p13='_UNDEF_',$p14='_UNDEF_',$p15='_UNDEF_',$p16='_UNDEF_')
! {
! list($appname,$classname) = explode('.', $class);
!
! if
(!isset($GLOBALS['phpgw_info']['flags']['included_classes'][$classname]) ||
!
!$GLOBALS['phpgw_info']['flags']['included_classes'][$classname])
! {
!
$GLOBALS['phpgw_info']['flags']['included_classes'][$classname] = True;
!
include(PHPGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php');
! }
! if ($p1 == '_UNDEF_' && $p1 != 1)
! {
! eval('$obj = new ' . $classname . ';');
! }
! else
! {
! $input =
array($p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9,$p10,$p11,$p12,$p13,$p14,$p15,$p16);
! $i = 1;
! $code = '$obj = new ' . $classname . '(';
! while (list($x,$test) = each($input))
! {
! if (($test == '_UNDEF_' && $test != 1 ) || $i
== 17)
! {
! break;
! }
! else
! {
! $code .= '$p' . $i . ',';
! }
! $i++;
! }
! $code = substr($code,0,-1) . ');';
! eval($code);
! }
! return $obj;
! }
!
! /* This is needed is some parts of setup, until we include the API
directly */
! function filesystem_separator()
{
! if (PHP_OS == 'Windows' || PHP_OS == 'OS/2')
! {
! return '\\';
! }
! else
! {
! return '/';
! }
}
define('SEP',filesystem_separator());
/*!
- @function get_account_id
- @abstract Return a properly formatted account_id.
- @author skeeter
- @discussion This function will return a properly formatted account_id.
This can take either a name or an account_id as paramters. If a name is
provided it will return the associated id.
- @syntax get_account_id($accountid);
- @example $account_id = get_account_id($accountid);
- @param $account_id either a name or an id
- @param $default_id either a name or an id
- */
- function get_account_id($account_id = '',$default_id = '')
- {
- if (is_int($account_id))
- {
- return $account_id;
- }
- elseif ($account_id == '')
- {
- if ($default_id == '')
- {
- return
(isset($GLOBALS['phpgw_info']['user']['account_id'])?$GLOBALS['phpgw_info']['user']['account_id']:0);
- }
- elseif (is_string($default_id))
- {
- return
$GLOBALS['phpgw']->accounts->name2id($default_id);
- }
- return intval($default_id);
- }
- elseif (is_string($account_id))
- {
-
if($GLOBALS['phpgw']->accounts->exists(intval($account_id)) == True)
- {
- return intval($account_id);
- }
- else
- {
- return
$GLOBALS['phpgw']->accounts->name2id($account_id);
- }
- }
- }
-
- /*!
@function lang
@abstract function to handle multilanguage support
--- 40,52 ----
}
! if (floor(phpversion()) == 3)
{
! include(PHPGW_INCLUDE_ROOT .
'/phpgwapi/inc/php3_support_functions.inc.php');
}
+ include(PHPGW_INCLUDE_ROOT . '/phpgwapi/inc/common_functions.inc.php');
define('SEP',filesystem_separator());
/*!
@function lang
@abstract function to handle multilanguage support
***************
*** 149,153 ****
$vars = array($m1,$m2,$m3,$m4,$m5,$m6,$m7,$m8,$m9,$m10);
}
! $value = $GLOBALS['phpgw_setup']->translate("$key", $vars );
return $value;
}
--- 62,66 ----
$vars = array($m1,$m2,$m3,$m4,$m5,$m6,$m7,$m8,$m9,$m10);
}
! $value =
$GLOBALS['phpgw_setup']->translation->translate("$key", $vars );
return $value;
}
***************
*** 160,165 ****
function get_langs()
{
! $f = fopen('./lang/languages','r');
! while ($line = fgets($f,200))
{
list($x,$y) = split("\t",$line);
--- 73,78 ----
function get_langs()
{
! $f = fopen('./lang/languages','rb');
! while($line = fgets($f,200))
{
list($x,$y) = split("\t",$line);
***************
*** 173,177 ****
while($entry=$d->read())
{
! if (ereg('^phpgw_',$entry))
{
$z = substr($entry,6,2);
--- 86,90 ----
while($entry=$d->read())
{
! if(ereg('^phpgw_',$entry))
{
$z = substr($entry,6,2);
***************
*** 191,197 ****
$select = '<select name="ConfigLang">' . "\n";
$languages = get_langs();
! while (list($null,$data) = each($languages))
{
! if ($data['available'])
{
$selected = '';
--- 104,110 ----
$select = '<select name="ConfigLang">' . "\n";
$languages = get_langs();
! while(list($null,$data) = each($languages))
{
! if($data['available'])
{
$selected = '';
***************
*** 209,250 ****
}
- /*!
- @function isinarray
- @abstract php3/4 compliant in_array()
- @param $needle String to search for
- @param $haystack Array to search
- */
- function isinarray($needle,$haystack='')
- {
- if($haystack == '')
- {
- settype($haystack,'array');
- $haystack = Array();
- }
- for($i=0;$i<count($haystack) && $haystack[$i] !=$needle;$i++);
- return ($i!=count($haystack));
- }
-
- /* Include to check user authorization against the
- password in ../header.inc.php to protect all of the setup
- pages from unauthorized use.
- */
-
- function _debug_array($array)
- {
- if(floor(phpversion()) == 4)
- {
- ob_start();
- echo '<pre>'; print_r($array); echo '</pre>';
- $contents = ob_get_contents();
- ob_end_clean();
- echo $contents;
- }
- else
- {
- echo '<pre>'; var_dump($array); echo '</pre>';
- }
- }
-
if(file_exists(PHPGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php'))
{
--- 122,125 ----
***************
*** 260,264 ****
$GLOBALS['phpgw_info']['server']['app_images'] =
'templates/default/images';
! include('./inc/class.setup.inc.php');
! $phpgw_setup = new phpgw_setup;
?>
--- 135,138 ----
$GLOBALS['phpgw_info']['server']['app_images'] =
'templates/default/images';
! $GLOBALS['phpgw_setup'] = CreateObject('phpgwapi.setup',True,True);
?>
--- class.schema_proc.inc.php DELETED ---
--- class.schema_proc_array.inc.php DELETED ---
--- class.schema_proc_mssql.inc.php DELETED ---
--- class.schema_proc_mysql.inc.php DELETED ---
--- class.schema_proc_pgsql.inc.php DELETED ---
--- class.setup.inc.php DELETED ---
--- class.setup_detection.inc.php DELETED ---
--- class.setup_html.inc.php DELETED ---
--- class.setup_lang.inc.php DELETED ---
--- class.setup_process.inc.php DELETED ---
--- xml_functions.inc.php DELETED ---
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: setup/inc README,1.2,1.3 functions.inc.php,1.45,1.46 class.schema_proc.inc.php,1.5,NONE class.schema_proc_array.inc.php,1.3,NONE class.schema_proc_mssql.inc.php,1.4,NONE class.schema_proc_mysql.inc.php,1.8,NONE class.schema_proc_pgsql.inc.php,1.11,NONE class.setup.inc.php,1.24,NONE class.setup_detection.inc.php,1.14,NONE class.setup_html.inc.php,1.9,NONE class.setup_lang.inc.php,1.9,NONE class.setup_process.inc.php,1.12,NONE xml_functions.inc.php,1.1,NONE,
Miles Lott <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: etemplate/inc class.db_tools.inc.php,1.4,1.5
- Next by Date:
[Phpgroupware-cvs] CVS: setup applications.php,1.15,1.16 applist.php,1.7,1.8 config.php,1.72,1.73 index.php,1.104,1.105 lang.php,1.33,1.34 ldap.php,1.50,1.51 ldapexport.php,1.3,1.4 ldapimport.php,1.5,1.6 ldapmodify.php,1.5,1.6 manageheader.php,1.31,1.32 schematoy.php,1.7,1.8 setup_demo.php,1.25,1.26 sqltoarray.php,1.9,1.10
- Previous by thread:
[Phpgroupware-cvs] CVS: etemplate/inc class.db_tools.inc.php,1.4,1.5
- Next by thread:
[Phpgroupware-cvs] CVS: setup applications.php,1.15,1.16 applist.php,1.7,1.8 config.php,1.72,1.73 index.php,1.104,1.105 lang.php,1.33,1.34 ldap.php,1.50,1.51 ldapexport.php,1.3,1.4 ldapimport.php,1.5,1.6 ldapmodify.php,1.5,1.6 manageheader.php,1.31,1.32 schematoy.php,1.7,1.8 setup_demo.php,1.25,1.26 sqltoarray.php,1.9,1.10
- Index(es):