Commit Graph

6 Commits

Author SHA1 Message Date
Ralf Becker
bf5275949e small fix 2005-10-14 10:04:41 +00:00
Ralf Becker
0ddb73fddb modernize now removes:
- global $phpgw;
- global $phpgw_info;
and replaces:
- $phpgw -> $GLOBALS['egw']
- $phpgw_info -> $GLOBALS['egw_info']
2005-10-14 09:36:37 +00:00
Ralf Becker
5d3e8d1c86 added HTTP_SESSION_VARS to list of vars to transform as it is off by default in php5 too 2005-07-20 10:20:18 +00:00
Ralf Becker
85f4f36c5b added --replace option and made the replacements case-insensitiv (at least for php5) 2005-06-14 07:55:36 +00:00
Ralf Becker
550ce8314d changed first line to #!/usr/bin/php -qC
-C makes the CGI binary behave like the CLI one (CGI has the script's dir as it's current dir not the current dir where the script is invoked)
2005-05-23 17:30:05 +00:00
Ralf Becker
bdb7f0df1d Tool to change eGW sources automatic to comply with some of the eGW coding rules:
// saves an unnecessary copy
'= CreateObject'           => '=& CreateObject',
'= new'                    => '=& new',
// php5 cloning of the DB object
'= $GLOBALS[\'egw\']->db;' => '= clone($GLOBALS[\'egw\']->db);',
'= $this->db;'             => '= clone($this->db);',
// remove windows lineends (CR)
"\r"                       => '',
// $HTTP_{GET|POST|SERVER}_VARS => $_{GET|POST|SERVER}
$modernize['$HTTP_'.$name.'_VARS'] = '$_'.$name;
$modernize['$GLOBALS[\'HTTP_'.$name.'_VARS\']'] = '$_'.$name;
$modernize['$GLOBALS["HTTP_'.$name.'_VARS"]'] = '$_'.$name;
// phpGW --> eGW
'PHPGW_'	               => 'EGW_',
'$GLOBALS[\'phpgw_info\']' => '$GLOBALS[\'egw_info\']',
'$GLOBALS["phpgw_info"]'   => '$GLOBALS[\'egw_info\']',
'$GLOBALS[\'phpgw\']'      => '$GLOBALS[\'egw\']',
'$GLOBALS["phpgw"]'        => '$GLOBALS[\'egw\']',
'common->phpgw_header'     => 'common->egw_header',
'common->phpgw_footer'     => 'common->egw_footer',
'common->phpgw_exit'       => 'common->egw_exit',
'common->phpgw_final'      => 'common->egw_final',

It also substitutes spaces at the beginning of a line (indetion) with tabs, you need to specify (--remove-space-indention N) the number of spaces to substitute, if it's other then 2.
2005-05-02 10:21:38 +00:00