From: <var...@us...> - 2015-04-01 13:44:47
|
Revision: 9636 http://sourceforge.net/p/phpwiki/code/9636 Author: vargenau Date: 2015-04-01 13:44:45 +0000 (Wed, 01 Apr 2015) Log Message: ----------- Fix test Modified Paths: -------------- trunk/lib/WikiTheme.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2015-04-01 13:31:30 UTC (rev 9635) +++ trunk/lib/WikiTheme.php 2015-04-01 13:44:45 UTC (rev 9636) @@ -1638,35 +1638,33 @@ $dbi = $request->getDbh(); // display flat calender dhtml in the sidebar - if ($dbi->isWikiPage($this->calendarBase())) { - $jslang = @$GLOBALS['LANG']; - $this->addMoreHeaders - ( + $jslang = @$GLOBALS['LANG']; + $this->addMoreHeaders( $this->_CSSlink(0, $this->_findFile('jscalendar/calendar-phpwiki.css'), 'all')); - $this->addMoreHeaders + $this->addMoreHeaders (JavaScript('', array('src' => $this->_findData('jscalendar/calendar' . (DEBUG ? '' : '_stripped') . '.js')))); - if (!($langfile = $this->_findData("jscalendar/lang/calendar-$jslang.js"))) + if (!($langfile = $this->_findData("jscalendar/lang/calendar-$jslang.js"))) $langfile = $this->_findData("jscalendar/lang/calendar-en.js"); - $this->addMoreHeaders(JavaScript('', array('src' => $langfile))); - $this->addMoreHeaders + $this->addMoreHeaders(JavaScript('', array('src' => $langfile))); + $this->addMoreHeaders (JavaScript('', array('src' => $this->_findData('jscalendar/calendar-setup' . (DEBUG ? '' : '_stripped') . '.js')))); - // Get existing date entries for the current user - require_once 'lib/TextSearchQuery.php'; - $iter = $dbi->titleSearch(new TextSearchQuery("^" . $this->calendarBase() . '/', true, "auto")); - $existing = array(); - while ($page = $iter->next()) { - if ($page->exists()) - $existing[] = basename($page->_pagename); - } - if (!empty($existing)) { - $js_exist = '{"' . join('":1,"', $existing) . '":1}'; - //var SPECIAL_DAYS = {"2004-05-11":1,"2004-05-12":1,"2004-06-01":1} - $this->addMoreHeaders(JavaScript(' + // Get existing date entries for the current user + require_once 'lib/TextSearchQuery.php'; + $iter = $dbi->titleSearch(new TextSearchQuery("^" . $this->calendarBase() . '/', true, "auto")); + $existing = array(); + while ($page = $iter->next()) { + if ($page->exists()) + $existing[] = basename($page->_pagename); + } + if (!empty($existing)) { + $js_exist = '{"' . join('":1,"', $existing) . '":1}'; + //var SPECIAL_DAYS = {"2004-05-11":1,"2004-05-12":1,"2004-06-01":1} + $this->addMoreHeaders(JavaScript(' /* This table holds the existing calender entries for the current user * calculated from the database */ @@ -1692,10 +1690,9 @@ else return false; } ')); - } else { - $this->addMoreHeaders(JavaScript(' + } else { + $this->addMoreHeaders(JavaScript(' function dateStatusFunc(date, y, m, d) { return false;}')); - } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |