]> git.mxchange.org Git - mailer.git/commitdiff
Several fixes for template engine, JavaScripts, etc.
authorRoland Häder <roland@mxchange.org>
Thu, 5 Nov 2009 19:32:58 +0000 (19:32 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 5 Nov 2009 19:32:58 +0000 (19:32 +0000)
18 files changed:
inc/classes/cachesystem.class.php
inc/db/lib-mysql3.php
inc/extensions-functions.php
inc/filters.php
inc/functions.php
inc/libs/html_mail_functions.php
inc/libs/sponsor_functions.php
inc/mysql-manager.php
inc/wrapper-functions.php
templates/de/html/js/js_jquery.tpl
templates/de/html/login_failed_js.tpl
templates/de/html/member/member_order_send.tpl
templates/de/html/member/member_surfbar_book_dynamic.tpl
templates/de/html/member/member_surfbar_book_static.tpl
templates/de/html/member/member_surfbar_edit_action_form.tpl
templates/de/html/page_header.tpl
templates/de/html/surfbar/surfbar_stopped.tpl
templates/de/html/uberwach/uberwach_snippet.tpl

index a24402a16709b91893d4b2b4fc00452b70c2a416..7a068539c6ed220f940bbf2a6d51b3a22da44b94 100644 (file)
@@ -475,7 +475,7 @@ class CacheSystem {
                // String or non-string? ;-)
                if (is_string($value)) {
                        // String...
-                       $line = '$this->' . $prefix . "['".$this->name."']['" . $key . "']" . $extender . " = '" . smartAddSlashes($value) . "';\n";
+                       $line = '$this->' . $prefix . "['".$this->name."']['" . $key . "']" . $extender . " = '" . addslashes($value) . "';\n";
                } elseif (is_null($value)) {
                        // Null
                        $line = '$this->' . $prefix . "['".$this->name."']['" . $key . "']" . $extender . " = null;\n";
index e75d09fc579a7c4098136fc62337dcae5435e3da..8c20de47cf773f49493b16cb10013935ec27f249 100644 (file)
@@ -313,8 +313,8 @@ function SQL_ESCAPE ($str, $secureString=true, $strip=true) {
                } // END - if
 
                if (!SQL_IS_LINK_UP()) {
-                       // Fall-back to smartAddSlashes() when there is no link
-                       $ret = smartAddSlashes($str);
+                       // Fall-back to addslashes() when there is no link
+                       $ret = addslashes($str);
                } elseif (function_exists('mysql_real_escape_string')) {
                        // The new and improved version
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'str='.$str);
@@ -323,8 +323,8 @@ function SQL_ESCAPE ($str, $secureString=true, $strip=true) {
                        // The obsolete function
                        $ret = mysql_escape_string($str, SQL_GET_LINK());
                } else {
-                       // If nothing else works, fall back to smartAddSlashes() again
-                       $ret = smartAddSlashes($str);
+                       // If nothing else works, fall back to addslashes() again
+                       $ret = addslashes($str);
                }
 
                // Cache result
index a9d1ed29103109e68f87d31369e617fbcb5816bc..3ea8b87b0b143634d8fc1703c6ce4e8fc7a8e04a 100644 (file)
@@ -520,9 +520,9 @@ function isExtensionActive ($ext_name) {
 }
 
 // Get version from extensions
-function getExtensionVersion ($ext_name) {
+function getExtensionVersion ($ext_name, $force = false) {
        // By default no extension is found
-       $ext_ver = 'invalid';
+       $ext_ver = 'false';
 
        // Empty extension name should be fixed!
        if (empty($ext_name)) {
@@ -565,7 +565,7 @@ function getExtensionVersion ($ext_name) {
        }
 
        // Extension version should not be invalid
-       if ($ext_ver == 'invalid') {
+       if (($ext_ver == 'false') && ($force === false)) {
                // Please report this trouble
                debug_report_bug(sprintf("Extension <strong>%s</strong> has empty version!", $ext_name));
        } // END - if
index 3bcc77e333318a1fac6af9edc39d1ac9a55cdd88..d18c91e74191d8a4fa2e264f7635c50fb8bcdab4 100644 (file)
@@ -452,27 +452,28 @@ function FILTER_COMPILE_EXTENSION ($code) {
        if ((count($matches) > 0) && (count($matches[3]) > 0)) {
                // Replace all matches
                foreach ($matches[3] as $key => $cmd) {
-                       // By default we have no extension installed, so 'false' is assumed
-                       $replacer = 'false';
+                       // Init replacer variable
+                       $replacer = '';
 
                        // Is the extension installed or code provided?
                        if ($cmd == 'code') {
                                // Code asked for
-                               $replacer = getCode($matches[4][$key]);
-                       } elseif (isExtensionActive($matches[4][$key])) {
+                               $replacer = "\".getCode(\"" . $matches[4][$key] . "\").\"";
+                       } else {
                                // Construct call-back function name
                                $functionName = 'getExtension' . ucfirst(strtolower($cmd));
 
-                               // Call the function
-                               $replacer = call_user_func_array($functionName, $matches[4][$key]);
-                       } // END - if
+                               // Construct call of the function
+                               $replacer = "\".call_user_func_array('" . $functionName . "', array('" . $matches[4][$key] . "', true)).\"";
+                       }
 
                        // Replace it and insert parameter for GET request
-                       $code = str_replace($matches[0][$key], sprintf("&amp;%s=%s&amp;rev=%s", $cmd, $replacer, getConfig('CURR_SVN_REVISION')), $code);
+                       $code = str_replace($matches[0][$key], sprintf("&amp;%s=%s&amp;rev=\".getConfig('CURR_SVN_REVISION').\"", $cmd, $replacer), $code);
                } // END - foreach
        } // END - if
 
        // Return compiled code
+       //* DEBUG: */ die('<pre>'.htmlentities($code).'</pre>');
        return $code;
 }
 
index 2add576617475d43f8dbd5cb4e5c813cdbb4b13c..25cb94adb14ee8db77fb50cc97c1c1f225f38b62 100644 (file)
@@ -103,49 +103,16 @@ function outputHtml ($htmlCode, $newLine = true) {
                        clearOutputBuffer();
                } // END - if
 
-               // Send HTTP header
-               sendHeader('HTTP/1.1 200');
-
-               // Used later
-               $now = gmdate('D, d M Y H:i:s') . ' GMT';
-
-               // General headers for no caching
-               sendHeader('Expired: ' . $now); // RFC2616 - Section 14.21
-               sendHeader('Last-Modified: ' . $now);
-               sendHeader('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
-               sendHeader('Pragma: no-cache'); // HTTP/1.0
-               sendHeader('Connection: Close');
-               sendHeader('Content-Type: ' . getContentType() . '; charset=UTF-8');
-               sendHeader('Content-language: ' . getLanguage());
-
                // Extension 'rewrite' installed?
                if ((isExtensionActive('rewrite')) && (getOutputMode() != 1)) {
                        $GLOBALS['output'] = rewriteLinksInCode($GLOBALS['output']);
                } // END - if
 
-               // Init counter
-               $cnt = '0';
-
                // Compile and run finished rendered HTML code
-               while (((strpos($GLOBALS['output'], '{--') > 0) || (strpos($GLOBALS['output'], '{!') > 0) || (strpos($GLOBALS['output'], '{?') > 0)) && ($cnt < 3)) {
-                       // Prepare the content and eval() it...
-                       $content = array();
-                       $newContent = '';
-
-                       // Compile it
-                       $eval = "\$newContent = \"".compileCode(smartAddSlashes($GLOBALS['output']))."\";";
-                       eval($eval);
-
-                       // Was that eval okay?
-                       if (empty($newContent)) {
-                               // Something went wrong!
-                               debug_report_bug('Evaluation error:<pre>' . linenumberCode($eval) . '</pre>');
-                       } // END - if
-                       $GLOBALS['output'] = $newContent;
+               compileFinalOutput();
 
-                       // Count round
-                       $cnt++;
-               } // END - while
+               // Send all HTTP headers
+               sendHttpHeaders();
 
                // Output code here, DO NOT REMOVE! ;-)
                outputRawCode($GLOBALS['output']);
@@ -156,19 +123,68 @@ function outputHtml ($htmlCode, $newLine = true) {
                } // END - if
 
                // Compile and run finished rendered HTML code
-               while (strpos($GLOBALS['output'], '{!') > 0) {
-                       eval("\$GLOBALS['output'] = \"".compileCode(smartAddSlashes($GLOBALS['output']))."\";");
-               } // END - while
+               compileFinalOutput();
+
+               // Send all HTTP headers
+               sendHttpHeaders();
 
                // Output code here, DO NOT REMOVE! ;-)
                outputRawCode($GLOBALS['output']);
        }
 }
 
+// Sends out all headers required for HTTP/1.1 reply
+function sendHttpHeaders () {
+       // Used later
+       $now = gmdate('D, d M Y H:i:s') . ' GMT';
+
+       // Send HTTP header
+       sendHeader('HTTP/1.1 200');
+
+       // General headers for no caching
+       sendHeader('Expired: ' . $now); // RFC2616 - Section 14.21
+       sendHeader('Last-Modified: ' . $now);
+       sendHeader('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
+       sendHeader('Pragma: no-cache'); // HTTP/1.0
+       sendHeader('Connection: Close');
+       sendHeader('Content-Type: ' . getContentType() . '; charset=UTF-8');
+       sendHeader('Content-Language: ' . getLanguage());
+}
+
+// Compiles the final output
+function compileFinalOutput () {
+       // Init counter
+       $cnt = '0';
+
+       // Compile all out
+       while (((strpos($GLOBALS['output'], '{--') > 0) || (strpos($GLOBALS['output'], '{!') > 0) || (strpos($GLOBALS['output'], '{?') > 0)) && ($cnt < 3)) {
+               // Init common variables
+               $content = array();
+               $newContent = '';
+
+               // Compile it
+               $eval = "\$newContent = \"".compileCode(addslashes($GLOBALS['output']))."\";";
+               eval($eval);
+
+               // Was that eval okay?
+               if (empty($newContent)) {
+                       // Something went wrong!
+                       debug_report_bug('Evaluation error:<pre>' . linenumberCode($eval) . '</pre>');
+               } // END - if
+               $GLOBALS['output'] = $newContent;
+
+               // Count round
+               $cnt++;
+       } // END - while
+
+       // Add final length
+       sendHeader('Content-Length: ' . strlen($GLOBALS['output']));
+}
+
 // Output the raw HTML code
 function outputRawCode ($htmlCode) {
        // Output stripped HTML code to avoid broken JavaScript code, etc.
-       print(stripslashes(stripslashes($htmlCode)));
+       print($htmlCode);
 
        // Flush the output if only getPhpCaching() is not 'on'
        if (getPhpCaching() != 'on') {
@@ -330,18 +346,18 @@ function loadTemplate ($template, $return=false, $content=array()) {
                                        $ret = "<!-- Template " . $template . " - Start -->\n" . $GLOBALS['tpl_content'] . "<!-- Template " . $template . " - End -->\n";
 
                                        // Prepare eval() command
-                                       $eval = '$ret = "' . compileCode(smartAddSlashes($ret)) . '";';
+                                       $eval = '$ret = "' . compileCode(addslashes($ret)) . '";';
                                } elseif (substr($template, 0, 3) == 'js_') {
-                                       // JavaScripts don't like entities
-                                       $eval = '$ret = decodeEntities("' . compileCode(smartAddSlashes($GLOBALS['tpl_content'])) . '");';
+                                       // JavaScripts don't like entities and timings
+                                       $eval = '$ret = decodeEntities("' . compileRawCode(addslashes($GLOBALS['tpl_content'])) . '");';
                                } else {
                                        // Prepare eval() command
-                                       $eval = '$ret = "' . compileCode(smartAddSlashes($GLOBALS['tpl_content'])) . '";';
+                                       $eval = '$ret = "' . compileCode(addslashes($GLOBALS['tpl_content'])) . '";';
                                }
                        } else {
                                // Add surrounding HTML comments to help finding bugs faster
                                $ret = "<!-- Template " . $template . " - Start -->\n" . $GLOBALS['tpl_content'] . "<!-- Template " . $template . " - End -->\n";
-                               $eval = '$ret = "' . smartAddSlashes($ret) . '";';
+                               $eval = '$ret = "' . addslashes($ret) . '";';
                        } // END - if
 
                        // Cache the eval() command here
@@ -498,7 +514,7 @@ function loadEmailTemplate ($template, $content = array(), $UID = '0') {
                $GLOBALS['tpl_content'] = readFromFile($FQFN);
 
                // Run code
-               $GLOBALS['tpl_content'] = "\$newContent = decodeEntities(\"".compileRawCode(smartAddSlashes($GLOBALS['tpl_content']))."\");";
+               $GLOBALS['tpl_content'] = "\$newContent = decodeEntities(\"".compileRawCode(addslashes($GLOBALS['tpl_content']))."\");";
                eval($GLOBALS['tpl_content']);
        } elseif (!empty($template)) {
                // Template file not found!
@@ -529,7 +545,7 @@ function loadEmailTemplate ($template, $content = array(), $UID = '0') {
        unset($DATA);
 
        // Compile the code and eval it
-       $eval = '$newContent = "' . compileRawCode(smartAddSlashes($newContent)) . '";';
+       $eval = '$newContent = "' . compileRawCode(addslashes($newContent)) . '";';
        eval($eval);
 
        // Return content
@@ -541,7 +557,7 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '
        //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):TO={$toEmail},SUBJECT={$subject}<br />");
 
        // Compile subject line (for POINTS constant etc.)
-       eval("\$subject = decodeEntities(\"".compileRawCode(smartAddSlashes($subject))."\");");
+       eval("\$subject = decodeEntities(\"".compileRawCode(addslashes($subject))."\");");
 
        // Set from header
        if ((!eregi('@', $toEmail)) && ($toEmail > 0)) {
@@ -587,10 +603,10 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '
        }
 
        // Compile "TO"
-       eval("\$toEmail = \"".compileRawCode(smartAddSlashes($toEmail))."\";");
+       eval("\$toEmail = \"".compileRawCode(addslashes($toEmail))."\";");
 
        // Compile "MSG"
-       eval("\$message = \"".compileRawCode(smartAddSlashes($message))."\";");
+       eval("\$message = \"".compileRawCode(addslashes($message))."\";");
 
        // Fix HTML parameter (default is no!)
        if (empty($isHtml)) $isHtml = 'N';
index 91f9504bcc30d5c87e2c86c8894fd1e4ac43a802..beeb5562da34f828d4a2920ad1a3085969518309 100644 (file)
@@ -60,7 +60,7 @@ function checkHtmlTags ($html) {
                $check = str_replace('/', '', $check);
                if (!in_array($check, $GLOBALS['html_tags'])) {
                        // Invalid tag found!
-                       return "";
+                       return '';
                }
                $test = substr($test, strpos($test, '>') + 1);
        }
index 51d3510e97c238cb4cb390f9a323226289d4f159..e1ee608916770ba0303e98025d3b187d3829016b 100644 (file)
@@ -175,10 +175,12 @@ function handlSponsorRequest (&$postData, $update=false, $messageArray=array(),
                                $OUT = '';
                                foreach ($postData as $k => $v) {
                                        // Do not add 'force' !
-                                       if ($k != "force") {
-                                               $OUT .= "<input type=\"hidden\" name=\"".$k."\" value=\"".stripslashes($v)."\" />\n";
-                                       }
-                               }
+                                       if ($k != 'force') {
+                                               $OUT .= "<input type=\"hidden\" name=\"" . SQL_ESCAPE($k) . "\" value=\"" . SQL_ESCAPE($v) . "\" />\n";
+                                       } // END - if
+                               } // END - foreach
+
+                               // Remember data
                                $content['hidden'] = $OUT;
                                $content['email']  = $postData['email'];
 
index e19b1689b05df9b64f6c9fdc057a31576abdfbdc..cc9b9aedcab6bec531ef0606903b2ee46d9cbb70 100644 (file)
@@ -2222,7 +2222,7 @@ function reduceRecipientReceivedMails ($column, $id, $count) {
 function createNewTask ($subject, $notes, $taskType, $userid = '0', $adminId = '0', $strip = true) {
        // Insert the task data into the database
        SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_task_system` (`assigned_admin`, `userid`, `status`, `task_type`, `subject`, `text`, `task_created`) VALUES (%s,%s,'NEW','%s','%s','%s', UNIX_TIMESTAMP())",
-               array($adminId, $userid, $taskType, $subject, smartAddSlashes($notes)), __FUNCTION__, __LINE__, true, $strip);
+               array($adminId, $userid, $taskType, $subject, addslashes($notes)), __FUNCTION__, __LINE__, true, $strip);
 }
 
 // Updates last module / online time
index cd1eddf236e914c1e55ca1d592837e7b78aa9081..64ac4a9660af8fd81e9d710b354aabeb447ae24e 100644 (file)
@@ -137,21 +137,6 @@ function decodeString ($str, $decompress = true) {
        return $str;
 }
 
-// Smartly adds slashes
-function smartAddSlashes ($unquoted) {
-       // Do we have cache?
-       if (!isset($GLOBALS['smart_addslashes'][$unquoted])) {
-               // Remove slashe
-               $unquoted = str_replace("\\", '', $unquoted);
-
-               // Put it in cache and add slashes
-               $GLOBALS['smart_addslashes'][$unquoted] = addslashes($unquoted);
-       } // END - if
-
-       // Return result
-       return $GLOBALS['smart_addslashes'][$unquoted];
-}
-
 // Decode entities in a nicer way
 function decodeEntities ($str) {
        // Decode the entities to UTF-8 now
index 926357433e3e8289757481ee826cee31657982fe..462cde56c37da29943abb3d6286c6f17595b70df 100644 (file)
@@ -1266,150 +1266,150 @@ jQuery.each({
 function num(elem, prop) {
        return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
 }
-var expando = "jQuery" + now(), uuid = 0, windowData = {};\r
-\r
-jQuery.extend({\r
-       cache: {},\r
-\r
-       data: function( elem, name, data ) {\r
-               elem = elem == window ?\r
-                       windowData :\r
-                       elem;\r
-\r
-               var id = elem[ expando ];\r
-\r
-               // Compute a unique ID for the element\r
-               if ( !id )\r
-                       id = elem[ expando ] = ++uuid;\r
-\r
-               // Only generate the data cache if we're\r
-               // trying to access or manipulate it\r
-               if ( name && !jQuery.cache[ id ] )\r
-                       jQuery.cache[ id ] = {};\r
-\r
-               // Prevent overriding the named cache with undefined values\r
-               if ( data !== undefined )\r
-                       jQuery.cache[ id ][ name ] = data;\r
-\r
-               // Return the named cache data, or the ID for the element\r
-               return name ?\r
-                       jQuery.cache[ id ][ name ] :\r
-                       id;\r
-       },\r
-\r
-       removeData: function( elem, name ) {\r
-               elem = elem == window ?\r
-                       windowData :\r
-                       elem;\r
-\r
-               var id = elem[ expando ];\r
-\r
-               // If we want to remove a specific section of the element's data\r
-               if ( name ) {\r
-                       if ( jQuery.cache[ id ] ) {\r
-                               // Remove the section of cache data\r
-                               delete jQuery.cache[ id ][ name ];\r
-\r
-                               // If we've removed all the data, remove the element's cache\r
-                               name = "";\r
-\r
-                               for ( name in jQuery.cache[ id ] )\r
-                                       break;\r
-\r
-                               if ( !name )\r
-                                       jQuery.removeData( elem );\r
-                       }\r
-\r
-               // Otherwise, we want to remove all of the element's data\r
-               } else {\r
-                       // Clean up the element expando\r
-                       try {\r
-                               delete elem[ expando ];\r
-                       } catch(e){\r
-                               // IE has trouble directly removing the expando\r
-                               // but it's ok with using removeAttribute\r
-                               if ( elem.removeAttribute )\r
-                                       elem.removeAttribute( expando );\r
-                       }\r
-\r
-                       // Completely remove the data cache\r
-                       delete jQuery.cache[ id ];\r
-               }\r
-       },\r
-       queue: function( elem, type, data ) {\r
-               if ( elem ){\r
-       \r
-                       type = (type || "fx") + "queue";\r
-       \r
-                       var q = jQuery.data( elem, type );\r
-       \r
-                       if ( !q || jQuery.isArray(data) )\r
-                               q = jQuery.data( elem, type, jQuery.makeArray(data) );\r
-                       else if( data )\r
-                               q.push( data );\r
-       \r
-               }\r
-               return q;\r
-       },\r
-\r
-       dequeue: function( elem, type ){\r
-               var queue = jQuery.queue( elem, type ),\r
-                       fn = queue.shift();\r
-               \r
-               if( !type || type === "fx" )\r
-                       fn = queue[0];\r
-                       \r
-               if( fn !== undefined )\r
-                       fn.call(elem);\r
-       }\r
-});\r
-\r
-jQuery.fn.extend({\r
-       data: function( key, value ){\r
-               var parts = key.split(".");\r
-               parts[1] = parts[1] ? "." + parts[1] : "";\r
-\r
-               if ( value === undefined ) {\r
-                       var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);\r
-\r
-                       if ( data === undefined && this.length )\r
-                               data = jQuery.data( this[0], key );\r
-\r
-                       return data === undefined && parts[1] ?\r
-                               this.data( parts[0] ) :\r
-                               data;\r
-               } else\r
-                       return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){\r
-                               jQuery.data( this, key, value );\r
-                       });\r
-       },\r
-\r
-       removeData: function( key ){\r
-               return this.each(function(){\r
-                       jQuery.removeData( this, key );\r
-               });\r
-       },\r
-       queue: function(type, data){\r
-               if ( typeof type !== "string" ) {\r
-                       data = type;\r
-                       type = "fx";\r
-               }\r
-\r
-               if ( data === undefined )\r
-                       return jQuery.queue( this[0], type );\r
-\r
-               return this.each(function(){\r
-                       var queue = jQuery.queue( this, type, data );\r
-                       \r
-                        if( type == "fx" && queue.length == 1 )\r
-                               queue[0].call(this);\r
-               });\r
-       },\r
-       dequeue: function(type){\r
-               return this.each(function(){\r
-                       jQuery.dequeue( this, type );\r
-               });\r
-       }\r
+var expando = "jQuery" + now(), uuid = 0, windowData = {};
+
+jQuery.extend({
+       cache: {},
+
+       data: function( elem, name, data ) {
+               elem = elem == window ?
+                       windowData :
+                       elem;
+
+               var id = elem[ expando ];
+
+               // Compute a unique ID for the element
+               if ( !id )
+                       id = elem[ expando ] = ++uuid;
+
+               // Only generate the data cache if we're
+               // trying to access or manipulate it
+               if ( name && !jQuery.cache[ id ] )
+                       jQuery.cache[ id ] = {};
+
+               // Prevent overriding the named cache with undefined values
+               if ( data !== undefined )
+                       jQuery.cache[ id ][ name ] = data;
+
+               // Return the named cache data, or the ID for the element
+               return name ?
+                       jQuery.cache[ id ][ name ] :
+                       id;
+       },
+
+       removeData: function( elem, name ) {
+               elem = elem == window ?
+                       windowData :
+                       elem;
+
+               var id = elem[ expando ];
+
+               // If we want to remove a specific section of the element's data
+               if ( name ) {
+                       if ( jQuery.cache[ id ] ) {
+                               // Remove the section of cache data
+                               delete jQuery.cache[ id ][ name ];
+
+                               // If we've removed all the data, remove the element's cache
+                               name = "";
+
+                               for ( name in jQuery.cache[ id ] )
+                                       break;
+
+                               if ( !name )
+                                       jQuery.removeData( elem );
+                       }
+
+               // Otherwise, we want to remove all of the element's data
+               } else {
+                       // Clean up the element expando
+                       try {
+                               delete elem[ expando ];
+                       } catch(e){
+                               // IE has trouble directly removing the expando
+                               // but it's ok with using removeAttribute
+                               if ( elem.removeAttribute )
+                                       elem.removeAttribute( expando );
+                       }
+
+                       // Completely remove the data cache
+                       delete jQuery.cache[ id ];
+               }
+       },
+       queue: function( elem, type, data ) {
+               if ( elem ){
+       
+                       type = (type || "fx") + "queue";
+       
+                       var q = jQuery.data( elem, type );
+       
+                       if ( !q || jQuery.isArray(data) )
+                               q = jQuery.data( elem, type, jQuery.makeArray(data) );
+                       else if( data )
+                               q.push( data );
+       
+               }
+               return q;
+       },
+
+       dequeue: function( elem, type ){
+               var queue = jQuery.queue( elem, type ),
+                       fn = queue.shift();
+               
+               if( !type || type === "fx" )
+                       fn = queue[0];
+                       
+               if( fn !== undefined )
+                       fn.call(elem);
+       }
+});
+
+jQuery.fn.extend({
+       data: function( key, value ){
+               var parts = key.split(".");
+               parts[1] = parts[1] ? "." + parts[1] : "";
+
+               if ( value === undefined ) {
+                       var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+
+                       if ( data === undefined && this.length )
+                               data = jQuery.data( this[0], key );
+
+                       return data === undefined && parts[1] ?
+                               this.data( parts[0] ) :
+                               data;
+               } else
+                       return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){
+                               jQuery.data( this, key, value );
+                       });
+       },
+
+       removeData: function( key ){
+               return this.each(function(){
+                       jQuery.removeData( this, key );
+               });
+       },
+       queue: function(type, data){
+               if ( typeof type !== "string" ) {
+                       data = type;
+                       type = "fx";
+               }
+
+               if ( data === undefined )
+                       return jQuery.queue( this[0], type );
+
+               return this.each(function(){
+                       var queue = jQuery.queue( this, type, data );
+                       
+                        if( type == "fx" && queue.length == 1 )
+                               queue[0].call(this);
+               });
+       },
+       dequeue: function(type){
+               return this.each(function(){
+                       jQuery.dequeue( this, type );
+               });
+       }
 });/*!
  * Sizzle CSS Selector Engine - v0.9.3
  *  Copyright 2009, The Dojo Foundation
index 4b212646299a78f96cfea6338e3fc881f37d2370..4728d90ec33c6847f26723c8709ef810a7b61d98 100644 (file)
@@ -1,2 +1 @@
-<script type="text/javascript"
- src="{?URL?}/js.php?js=cookies_disabled{%version=sql_patches%}"></script>
+<script src="{?URL?}/js.php?js=cookies_disabled{%version=sql_patches%}" type="text/javascript"></script>
index 08dadaf0bc4cb8a0549c057ab8e59c8d6d597ba0..170e0c1312700b5a1f76c215eed5432642b09c3a 100644 (file)
@@ -1,6 +1,5 @@
 <form accept-charset="utf-8" id="form" action="{?URL?}/modules.php?module=order&amp;order=$content" method="post" target="_parent" onsubmit="return Submit()">
 {--MEMBER_ORDER_PLEASE_WAIT_1--}<span id="counter" style="font-weight:bold">10</span>{--MEMBER_ORDER_PLEASE_WAIT_2--}<br />
 <input type="submit" class="member_submit" id="ok" name="ok" value="{--MEMBER_DO_ORDER--}" />
-<script type="text/javascript"
- src="{?URL?}/js.php?js=order_send{%version=order%}"></script>
+<script type="text/javascript" src="{?URL?}/js.php?js=order_send{%version=order%}"></script>
 </form>
index e30526aa94ab0aadffefb83b3fc0630880110ced..ed00275bf34b86cde0be049e46f1e95146d0e376 100644 (file)
@@ -34,8 +34,8 @@
        </div>
 </div>
 
-<script type="text/javascript"
- src="{?URL?}/js.php?js=surfbar_member_book{%version=surfbar%}"></form>
+<script src="{?URL?}/js.php?js=surfbar_member_book{%version=surfbar%}" type="text/javascript"></script>
+</form>
 
 <span align="center" class="member_note" style="padding:5px">
        Die maximalen Kosten bzw. Einnahmen pro Surfbaraufruf  richten sich nach
index 6e03731707615a8ee984902d1583e782af506b9b..870f4161bb3a6567df2383e1cded614e40291ad3 100644 (file)
@@ -34,7 +34,6 @@
        </div>
 </div>
 
-<script type="text/javascript"
- src="{?URL?}/js.php?js=surfbar_member_book{%version=surfbar%}"></script>
+<script src="{?URL?}/js.php?js=surfbar_member_book{%version=surfbar%}" type="text/javascript"></script>
 
 </form>
index b8a279c9f90e0d8c8f971b8b4d437ebee36bb89e..57d0b1b7eb3a3f2efca153c8506d831c20b59dfc 100644 (file)
@@ -27,6 +27,6 @@
        </div>
 </div>
 
-<script type="text/javascript"
src="{?URL?}/js.php?js=surfbar_member_edit{%version=surfbar%}&amp;views_max=$content[views_max]&amp;limited=$content[limited]"></script>
+<script src="{?URL?}/js.php?js=surfbar_member_edit{%version=surfbar%}&amp;views_max=$content[views_max]&amp;limited=$content[limited]"
type="text/javascript"></script>
 </form>
index e3a0b58061d111bd8ff95bc63c572e49d23de7a4..fb13505a8aa48a1d487446d9813e35439cfd919a 100644 (file)
@@ -7,5 +7,4 @@
 <meta http-equiv="content-script-type" content="text/javascript" />
 <meta http-equiv="language" content="de" />
 
-<script type="JavaScript" src="{?URL?}/js.php?js=jquery{%version=jquery%}">
-</script>
+<script src="{?URL?}/js.php?js=jquery{%version=jquery%}" type="text/javascript"></script>
index 8305e61aec452072d5c5f8cbfc3f7175a878e8d5..c7e1c38cf8dddaf992a0382b9488211ee852922a 100644 (file)
@@ -11,6 +11,5 @@
        </div>
 </div>
 
-<script type="text/javascript"
- src="{?URL?}/js.php?js=surfbar_stopped{%version=surfbar%}&amp;restart=$content[restart]&amp;autostart=$content[autostart]">
-</script>
+<script src="{?URL?}/js.php?js=surfbar_stopped{%version=surfbar%}&amp;restart=$content[restart]&amp;autostart=$content[autostart]"
+ type="text/javascript"></script>
index 226f201f41ad5538a683439fbdc79bd8f057d6bc..df769f07b258cd5f2e410c7152279330555195a4 100644 (file)
@@ -3,6 +3,6 @@
 <script type="text/javascript">/* <![CDATA[ */
 au_ip='$content[REMOTE_ADDR]';
 /* ]]> */</script>
-<script type="text/javascript" src="{?URL?}/js.php?js=uberwach{%version=uberwach%}"></script>
+<script src="{?URL?}/js.php?js=uberwach{%version=uberwach%}" type="text/javascript"></script>
 <noscript><a href="http://www.uberwach.de/" rel="external" target="_blank" title="Aktion: &Uuml;berwach!"><img src="http://www.uberwach.de/wanze.gif" alt="Aktion UBERWACH!" width="80" height="15" border="0" /></a></noscript>
 <!-- ende uberwach code -->