Changeset 1051

Show
Ignore:
Timestamp:
04/28/2008 05:00:33 AM (2 years ago)
Author:
DotMG
Message:

refs #721

Copied Compatibility.lib.php from trunk. Calling Compatibility.lib.php before Wakka.class.php

Location:
branches/1.1.6.5
Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • branches/1.1.6.5/wikka.php

    r1048 r1051  
    100100if (file_exists('libs/Wakka.class.php')) 
    101101{ 
     102        require_once('libs/Compatibility.lib.php'); 
    102103        require_once('libs/Wakka.class.php'); 
    103104} 
     
    414415 */ 
    415416echo $page_output; 
    416  
    417  
    418 // ---------------------------------------------- 
    419 // Utility and compatibility functions 
    420 // ---------------------------------------------- 
    421  
    422 /** 
    423  * Calculate page generation time. 
    424  */ 
    425 function getmicrotime() { 
    426         list($usec, $sec) = explode(" ", microtime()); 
    427         return ((float)$usec + (float)$sec); 
    428 } 
    429  
    430 if (!function_exists('mysql_real_escape_string')) 
    431 { 
    432         /** 
    433          * Escape special characters in a string for use in a SQL statement. 
    434          * 
    435          * This function is added for back-compatibility with MySQL 3.23. 
    436          * @param string $string the string to be escaped 
    437          * @return string a string with special characters escaped 
    438          */ 
    439         function mysql_real_escape_string($string) 
    440         { 
    441                 return mysql_escape_string($string); 
    442         } 
    443 } 
    444  
    445 /** 
    446  * Workaround for the amazingly annoying magic quotes. 
    447  */ 
    448 function magicQuotesWorkaround(&$a) 
    449 { 
    450         if (is_array($a)) 
    451         { 
    452                 foreach ($a as $k => $v) 
    453                 { 
    454                         if (is_array($v)) 
    455                                 magicQuotesWorkaround($a[$k]); 
    456                         else 
    457                                 $a[$k] = stripslashes($v); 
    458                 } 
    459         } 
    460 } 
    461  
    462417?>