Add ability to control the display of the "Check Spelling" button. Allows administrat...
[squirrelmail.git] / plugins / change_password / backend / merak.php
index 4b21172b804db45bbb536e50d60cc41b09291239..1c332795a7f736b8619a0e70388e6925228c9785 100644 (file)
@@ -1,8 +1,11 @@
 <?php
+
 /**
  * Merakchange password backend
  *
- * @author Edwin van Elk <Edwin@eve-software.com>
+ * @author Edwin van Elk <edwin at eve-software.com>
+ * @copyright 2004-2017 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
  * @subpackage change_password
@@ -31,31 +34,20 @@ if ( isset($cpw_merak) && is_array($cpw_merak) && !empty($cpw_merak) ) {
 global $squirrelmail_plugin_hooks;
 $squirrelmail_plugin_hooks['change_password_dochange']['merak'] =
    'cpw_merak_dochange';
-$squirrelmail_plugin_hooks['change_password_init']['merak'] = 
+$squirrelmail_plugin_hooks['change_password_init']['merak'] =
    'cpw_merak_init';
 
 /**
  * Check if php install has all required extensions.
  */
 function cpw_merak_init() {
-    global $color;
-
-    /**
-     * If SM_PATH isn't defined, define it.  Required to include files.
-     * @ignore
-     */
-    if (!defined('SM_PATH'))  {
-        define('SM_PATH','../../../');
-    }
-
-    // load error_box() function
-    include_once(SM_PATH . 'functions/display_messages.php');
+    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();
     }
 }
@@ -213,4 +205,4 @@ function IsChecked($tag) {
    }
 
    return false;
-}
\ No newline at end of file
+}