generalise folder_manip_dialog CSS into dialogbox CSS
[squirrelmail.git] / functions / strings.php
index 2bc4d55c77d77cd461dc57e734da317c7066f017..eff1ba661af8900a0782cdc0dcbbdd5779b749c9 100644 (file)
@@ -6,7 +6,7 @@
  * This code provides various string manipulation functions that are
  * used by the rest of the SquirrelMail code.
  *
- * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @copyright © 1999-2007 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -792,7 +792,7 @@ function quoteimap($str) {
  * @since 1.4.2
  */
 function makeComposeLink($url, $text = null, $target='') {
-    global $compose_new_win, $javascript_on, $compose_width, 
+    global $compose_new_win, $compose_width, 
            $compose_height, $oTemplate;
 
     if(!$text) {
@@ -809,13 +809,11 @@ function makeComposeLink($url, $text = null, $target='') {
 
 
     // if javascript is on, use onclick event to handle it
-    if($javascript_on) {
+    if(checkForJavascript()) {
         sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION);
         $compuri = SM_BASE_URI.$url;
-        $oTemplate->assign('uri', 'javascript:void(0)');
-        $oTemplate->assign('text', $text);
-        $oTemplate->assign('onclick', "comp_in_new('$compuri','$compose_width','$compose_height')");
-        return $oTemplate->fetch('hyperlink.tpl');
+
+        return create_hyperlink('javascript:void(0)', $text, '', "comp_in_new('$compuri','$compose_width','$compose_height')");
     }
 
     // otherwise, just open new window using regular HTML