Removed @deprecated from CSS inline/PHP output
[mailer.git] / inc / template-functions.php
index 4805bb0e9998ac10dd110fe750cc571eb5b6b3b6..9d8412562c1ec72d02d08e28957a32ab5531a8ae 100644 (file)
@@ -1800,6 +1800,9 @@ function sendModeMails ($mod, $modes) {
 
 // Generates a 'selection box' from given array
 function generateSelectionBoxFromArray ($options, $name, $optionKey, $optionContent = '', $extraName = '', $templateName = '', $default = NULL, $nameElement = '', $allowNone = FALSE, $useDefaultAsArray = FALSE) {
+       // options must be an array
+       assert(is_array($options));
+
        // Default is empty
        $addKey = '';
 
@@ -2396,5 +2399,27 @@ function getTemplateBasePath ($part) {
        return $GLOBALS[__FUNCTION__][$part];
 }
 
+// Removes comments with @DEPRECATED
+function removeDeprecatedComment ($output) {
+       // Explode it into pieces ... ;)
+       $lines = explode(chr(10), $output);
+
+       // Walk through all
+       $return = '';
+       foreach ($lines as $line) {
+               // Is there a @DEPRECATED?
+               if (isInString('@DEPRECATED', $line)) {
+                       // Ignore this line
+                       continue;
+               } // END - if
+
+               // Add it
+               $return .= $line . chr(13);
+       } // END - foreach
+
+       // Returned cleaned content
+       return $return;
+}
+
 // [EOF]
 ?>