Support all extensions in link, too
[mailer.git] / inc / template-functions.php
index fa47705d73a9c7b2487456e462da8ed9e86aa233..4b6420a59f013706ed0e545a6329842f5762200a 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -1162,16 +1162,16 @@ function generateEmailLink ($email, $table = 'admins') {
  * functionality like logging and admin notification (which you can configure
  * through your admin area).
  *
- * @param      $F                      Function or file basename where the error came from
- * @param      $L                      Line number where the error came from
+ * @param      $file           Function or file basename where the error came from
+ * @param      $line           Line number where the error came from
  * @param      $message        Message which shall be output to web
  * @return     void
  */
-function app_exit ($F, $L, $message) {
+function app_exit ($file, $line, $message) {
        // Check if Script is already dieing and not let it kill itself another 1000 times
        if (isset($GLOBALS['app_died'])) {
                // Script tried to kill itself twice
-               die('[' . __FUNCTION__ . ':' . __LINE__ . ']: Script wanted to kill itself more than once! Raw message=' . $message . ', file/function=' . $F . ', line=' . $L);
+               die('[' . __FUNCTION__ . ':' . __LINE__ . ']: Script wanted to kill itself more than once! Raw message=' . $message . ', file/function=' . $file . ', line=' . $line);
        } // END - if
 
        // Make sure, that the script realy realy diese here and now
@@ -1192,8 +1192,8 @@ function app_exit ($F, $L, $message) {
        // Rewrite message for output
        $message = sprintf(
                getMessage('MAILER_HAS_DIED'),
-               basename($F),
-               $L,
+               basename($file),
+               $line,
                $message
        );
 
@@ -1258,16 +1258,16 @@ function displayParsingTime () {
  * app_exit() is more a "private" function and will only output a bug message to
  * the user, no email and no logging.
  *
- * @param      $F                      Function or file basename where the error came from
- * @param      $L                      Line number where the error came from
+ * @param      $file           Function or file basename where the error came from
+ * @param      $line           Line number where the error came from
  * @param      $sendEmail      Wether to send an email to all configured administrators
  * @return     void
  */
-function reportBug ($F, $L, $message = '', $sendEmail = TRUE) {
+function reportBug ($file, $line, $message = '', $sendEmail = TRUE) {
        // Is this already called?
        if (isset($GLOBALS[__FUNCTION__])) {
                // Other backtrace
-               print '[' . $F . ':' . $L . ':] ' . __FUNCTION__ . ' has already died! Message:' . $message . '<br />Backtrace:<pre>';
+               print '[' . $file . ':' . $line . ':] ' . __FUNCTION__ . ' has already died! Message:' . $message . '<br />Backtrace:<pre>';
                debug_print_backtrace();
                die('</pre>');
        } // END - if
@@ -1289,7 +1289,7 @@ function reportBug ($F, $L, $message = '', $sendEmail = TRUE) {
                );
 
                // @TODO Add a little more infos here
-               logDebugMessage($F, $L, strip_tags($message));
+               logDebugMessage($file, $line, strip_tags($message));
        } // END - if
 
        // Add output
@@ -1314,7 +1314,7 @@ function reportBug ($F, $L, $message = '', $sendEmail = TRUE) {
        // Is there HTML/CSS/AJAX mode?
        if (((isHtmlOutputMode()) || (isCssOutputMode()) || (isAjaxOutputMode())) && (isDebugModeEnabled())) {
                // And abort here
-               app_exit($F, $L, $debug);
+               app_exit($file, $line, $debug);
        } else {
                // Raw/image output mode and all other modes doesn't work well with text ...
                die();
@@ -1519,7 +1519,7 @@ function determinePageTitle () {
        $pageTitle = '';
 
        // Config and database connection valid?
-       if ((isConfigLocalLoaded()) && (isConfigurationLoaded()) && (SQL_IS_LINK_UP()) && (isExtensionInstalledAndNewer('sql_patches', '0.1.6'))) {
+       if ((isConfigLocalLoaded()) && (isConfigurationLoaded()) && (isSqlLinkUp()) && (isExtensionInstalledAndNewer('sql_patches', '0.1.6'))) {
                // Title decoration enabled?
                if ((isTitleDecorationEnabled()) && (getTitleLeft() != '')) {
                        $pageTitle .= '{%config,trim=title_left%} ';
@@ -2353,7 +2353,7 @@ function doTemplateMetaFavIcon ($templateName, $clear = FALSE) {
                // Is the file there?
                if (isFileReadable(getPath() . 'favicon.' . $extension)) {
                        // Then use this and abort
-                       $out = '<link rel="shortcut icon" href="http://www.wds66.com/favicon.ico" type="image/' . $extension . '" />';
+                       $out = '<link rel="shortcut icon" href="{%url=favicon.' . $extension . '%}" type="image/' . $extension . '" />';
                        break;
                } // END - if
        } // END - while