From: Tomas K. <to...@us...> - 2006-05-14 17:09:33
|
Update of /cvsroot/squirrelmail/squirrelmail/plugins/change_password/backend In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2655/plugins/change_password/backend Modified Files: ldap.php merak.php peardb.php template.php vmailmgrd.php Log Message: updating error_box() function calls. second argument was modified. using squirrelmail template code for closing html tags. added some comments in footer.tpl in order to detect generated footer Index: ldap.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/plugins/change_password/backend/ldap.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -w -r1.12 -r1.13 --- ldap.php 5 Apr 2006 00:22:05 -0000 1.12 +++ ldap.php 14 May 2006 17:09:28 -0000 1.13 @@ -158,27 +158,26 @@ * Makes sure that required functions and configuration options are set. */ function cpw_ldap_init() { - global $color; - global $cpw_ldap_basedn; + global $oTemplate, $cpw_ldap_basedn; // set initial value for error tracker $cpw_ldap_initerr=false; // check for ldap support in php if (! function_exists('ldap_connect')) { - error_box(_("Current configuration requires LDAP support in PHP."),$color); + error_box(_("Current configuration requires LDAP support in PHP.")); $cpw_ldap_initerr=true; } // chech required configuration settings. if ($cpw_ldap_basedn=='') { - error_box(_("Plugin is not configured correctly."),$color); + error_box(_("Plugin is not configured correctly.")); $cpw_ldap_initerr=true; } // if error var is positive, close html and stop execution if ($cpw_ldap_initerr) { - echo '</body></html>'; + $oTemplate->display('footer.tpl'); exit; } } Index: merak.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/plugins/change_password/backend/merak.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -w -r1.9 -r1.10 --- merak.php 5 Apr 2006 00:22:05 -0000 1.9 +++ merak.php 14 May 2006 17:09:28 -0000 1.10 @@ -41,13 +41,13 @@ * Check if php install has all required extensions. */ function cpw_merak_init() { - global $color; + global $oTemplate; if (!function_exists('curl_init')) { // user_error('Curl module NOT available!', E_USER_ERROR); - error_box(_("PHP Curl extension is NOT available! Unable to change password!"),$color); + error_box(_("PHP Curl extension is NOT available! Unable to change password!")); // close html and stop script execution - echo "</body></html>\n"; + $oTemplate->display('footer.tpl'); exit(); } } Index: peardb.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/plugins/change_password/backend/peardb.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- peardb.php 5 Apr 2006 00:22:05 -0000 1.4 +++ peardb.php 14 May 2006 17:09:28 -0000 1.5 @@ -106,19 +106,19 @@ * Checks if configuration is correct */ function cpw_peardb_init() { - global $color, $cpw_peardb_detect, $cpw_peardb_dsn, $cpw_peardb_table; + global $oTemplate, $cpw_peardb_detect, $cpw_peardb_dsn, $cpw_peardb_table; if (! $cpw_peardb_detect) { - error_box(_("Plugin is unable to use PHP Pear DB libraries. PHP Pear includes must be available in your PHP include_path setting."),$color); - echo "</body></html>\n"; + error_box(_("Plugin is unable to use PHP Pear DB libraries. PHP Pear includes must be available in your PHP include_path setting.")); + $oTemplate->display('footer.tpl'); exit(); } // Test required settings if ((is_string($cpw_peardb_dsn) && trim($cpw_peardb_dsn)=='') || trim($cpw_peardb_table)=='' ) { - error_box(_("Required change password backend configuration options are missing."),$color); - echo "</body></html>\n"; + error_box(_("Required change password backend configuration options are missing.")); + $oTemplate->display('footer.tpl'); exit(); } } Index: template.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/plugins/change_password/backend/template.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -w -r1.8 -r1.9 --- template.php 5 Apr 2006 00:22:05 -0000 1.8 +++ template.php 14 May 2006 17:09:28 -0000 1.9 @@ -39,12 +39,12 @@ */ function cpw_template_init() { - global $color; + global $oTemplate; // plugin is not configured. Handle error gracefully. - error_box(_("No valid backend defined."),$color); + error_box(_("No valid backend defined.")); // close html and stop script execution - echo "</body></html>\n"; + $oTemplate->display('footer.tpl'); exit(); } Index: vmailmgrd.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/plugins/change_password/backend/vmailmgrd.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -w -r1.10 -r1.11 --- vmailmgrd.php 5 Apr 2006 00:22:05 -0000 1.10 +++ vmailmgrd.php 14 May 2006 17:09:28 -0000 1.11 @@ -104,13 +104,13 @@ * is displayed to the user. */ function cpw_vmailmgrd_init(){ - global $vmail_inc_path, $color, $username; + global $vmail_inc_path, $username, $oTemplate; if ($vmail_inc_path=='' || ! file_exists($vmail_inc_path)) { // $vmail_inc_path is not set or file does not exist - error_box(_("Incorrent path to vmail.inc file."),$color); + error_box(_("Incorrent path to vmail.inc file.")); // close html and stop script execution - echo "</body></html>\n"; + $oTemplate->display('footer.tpl'); exit(); } @@ -118,17 +118,17 @@ if (! function_exists('vchpass')) { // included vmail.inc does not have required functions. - error_box(_("Invalid or corrupted vmail.inc file."),$color); + error_box(_("Invalid or corrupted vmail.inc file.")); // close html and stop script execution - echo "</body></html>\n"; + $oTemplate->display('footer.tpl'); exit(); } if (! preg_match("/(.*)\@(.*)/", $username)) { // username does not match vmailmgr syntax - error_box(_("Invalid user."),$color); + error_box(_("Invalid user.")); // close html and stop script execution - echo "</body></html>\n"; + $oTemplate->display('footer.tpl'); exit(); } } |