A lot code rewritten:
[mailer.git] / inc / wrapper-functions.php
index e44abe4e868658b818d5c9e3498666976357d1e0..dee0ad81ac815be93cf0539b73315a133cb4e125 100644 (file)
@@ -694,6 +694,12 @@ function addPointsDirectly ($subject, $userid, $points) {
        return addPointsThroughReferalSystem($subject, $userid, $points, false, 0, false, 'direct');
 }
 
+// Wrapper for redirectToUrl but URL comes from a configuration entry
+function redirectToConfiguredUrl ($configEntry) {
+       // Load the URL
+       redirectToUrl(getConfig($configEntry));
+}
+
 // Wrapper function to redirect from member-only modules to index
 function redirectToIndexMemberOnlyModule () {
        // Do the redirect here
@@ -926,11 +932,6 @@ function ifFatalErrorsDetected () {
        return (getTotalFatalErrors() > 0);
 }
 
-// Wrapper until we merged to the EL branch
-function preCompileCode ($code, $template = '', $compiled = false, $full = true, $overwrite = false) {
-       return compileCode($code, false, true, $full);
-}
-
 // Setter for HTTP status
 function setHttpStatus ($status) {
        $GLOBALS['http_status'] = (string) $status;
@@ -941,24 +942,6 @@ function getHttpStatus () {
        return $GLOBALS['http_status'];
 }
 
-// Setter for 'is_template_html'
-function enableTemplateHtml ($enable = true) {
-       $GLOBALS['is_template_html'] = (bool) $enable;
-}
-
-// Checks wether the template is HTML or not by previously set flag
-// Default: true
-function isTemplateHtml () {
-       // Is the output_mode other than 0 (HTML), then no comments are enabled
-       if (getOutputMode() != 0) {
-               // No HTML
-               return false;
-       } else {
-               // Maybe HTML?
-               return $GLOBALS['is_template_html'];
-       }
-}
-
 /**
  * Send a HTTP redirect to the browser. This function was taken from DokuWiki
  * (GNU GPL 2; http://www.dokuwiki.org) and modified to fit into mailer project.
@@ -1029,11 +1012,6 @@ function getTotalConfirmedUser () {
        return $GLOBALS['total_confirmed_users'];
 }
 
-// Wrapper for writing debug informations to the browser
-function debugOutput ($message) {
-       outputHtml('<div class="debug_message">' . $message . '</div>');
-}
-
 // Is given userid valid?
 function isValidUserId ($userid) {
        // Do we have cache?
@@ -1058,17 +1036,5 @@ function encodeEntities ($str) {
        return $str;
 }
 
-// "Fixes" an empty string into three dashes (use for templates)
-function fixEmptyContentToDashes ($str) {
-       // Trim the string
-       $str = trim($str);
-
-       // Is the string empty?
-       if (empty($str)) $str = '---';
-
-       // Return string
-       return $str;
-}
-
 // [EOF]
 ?>