Happy New Year
[squirrelmail.git] / plugins / change_password / backend / merak.php
index a7132919fc6032d5997d3ac569c22d6f83fdab79..c9f93f0c89cbb7077c6825264b131554ca411bf0 100644 (file)
@@ -4,7 +4,7 @@
  * Merakchange password backend
  *
  * @author Edwin van Elk <edwin at eve-software.com>
- * @copyright &copy; 2004-2006 The SquirrelMail Project Team
+ * @copyright 2004-2020 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -41,24 +41,13 @@ $squirrelmail_plugin_hooks['change_password_init']['merak'] =
  * 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();
     }
 }
@@ -216,4 +205,4 @@ function IsChecked($tag) {
    }
 
    return false;
-}
\ No newline at end of file
+}