From: <ch...@us...> - 2011-03-27 04:51:02
|
Revision: 33679 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=33679&view=rev Author: chealer Date: 2011-03-27 04:50:55 +0000 (Sun, 27 Mar 2011) Log Message: ----------- [FIX] Fatal error when date is not present (on PHP 5.1, r33614 regression) fallback to previous hardcoded list Modified Paths: -------------- branches/proposals/6.x/lib/setup/js_detect.php Modified: branches/proposals/6.x/lib/setup/js_detect.php =================================================================== --- branches/proposals/6.x/lib/setup/js_detect.php 2011-03-27 03:42:21 UTC (rev 33678) +++ branches/proposals/6.x/lib/setup/js_detect.php 2011-03-27 04:50:55 UTC (rev 33679) @@ -66,7 +66,7 @@ } // setup timezone array - $tz = array_keys(DateTimeZone::listAbbreviations()); + $timezones = extension_loaded('date') ? array_keys(DateTimeZone::listAbbreviations()) : array("A","ACDT","ACST","ADT","AEDT","AEST","AKDT","AKST","AST","AWDT","AWST","B","BST","C","CDT","CDT","CEDT","CEST","CET","CST","CST","CST","CXT","D","E","EDT","EDT","EEDT","EEST","EET","EST","EST","EST","F","G","GMT","H","HAA","HAC","HADT","HAE","HAP","HAR","HAST","HAT","HAY","HNA","HNC","HNE","HNP","HNR","HNT","HNY","HST","I","IST","K","L","M","MDT","MESZ","MEZ","MSD","MSK","MST","N","NDT","NFT","NST","O","P","PDT","PST","Q","R","S","T","U","UTC","V","W","WDT","WEDT","WEST","WET","WST","WST","X","Y","Z"); $headerlib->add_js(' function inArray(item, array) { for (var i in array) { @@ -76,7 +76,7 @@ } return false; } -var allTimeZoneCodes = ' . json_encode(array_map("strtoupper", $tz)) . '; +var allTimeZoneCodes = ' . json_encode(array_map("strtoupper", $timezones)) . '; var local_tz = ""; var now = new Date(); var now_string = now.toString(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |