* 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
* @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) {
// 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