From: <par...@us...> - 2010-04-12 18:58:46
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv20875 Modified Files: Tag: phpicalendar-editor AUTHORS README config.inc.php day.php default_config.php month.php preferences.php print.php search.php week.php year.php Log Message: merge with HEAD Index: AUTHORS =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/AUTHORS,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** AUTHORS 28 Dec 2008 19:30:41 -0000 1.8 --- AUTHORS 12 Apr 2010 18:58:36 -0000 1.8.2.1 *************** *** 18,21 **** --- 18,22 ---- Jim Hu <phpicalendar at gmail dot com> Chad Little <chad at chadsdomain dot com> + Jason Oster <jason dot oster at camp navajo dot com> David Reindl <dre at andare dot ch> Jared Wangen <xeo at silter dot org> *************** *** 32,35 **** --- 33,37 ---- Bulgarian Georgi Kodinov <kgeorge at progem dot bg Croation Tihomir Cvetkovic <tihomir dot cvetkovic at gmail dot com> + Czech Petr KleteÄka <kletecka at email dot cz> Danish Henrik Højmark <styxx at worldonline dot dk> Jakob Peterhänsel <marook at creepers dot org> Index: README =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/README,v retrieving revision 1.116 retrieving revision 1.116.2.1 diff -C2 -d -r1.116 -r1.116.2.1 *** README 30 Jan 2009 20:49:25 -0000 1.116 --- README 12 Apr 2010 18:58:36 -0000 1.116.2.1 *************** *** 6,14 **** Introduction: ------------- ! PHP iCalendar is a PHP-based iCal file viewer/parser to display iCals in a Web browser. ! Its based on v2.0 of the IETF spec. It displays iCal files in a nice logical, clean manner with day, week, month, and year navigation. It is available in 13 ! languages and includes support for printing, searching and RSS news feeds. ! If you need a Calendar application (for creating calendar files), please check the 'Supported Calendar Applications' section of the README. --- 6,14 ---- Introduction: ------------- ! PHP iCalendar is a PHP-based iCal file viewer/parser to display iCals in a Web browser. ! Its based on v2.0 of the IETF spec. It displays iCal files in a nice logical, clean manner with day, week, month, and year navigation. It is available in 13 ! languages and includes support for printing, searching and RSS news feeds. ! If you need a Calendar application (for creating calendar files), please check the 'Supported Calendar Applications' section of the README. *************** *** 22,26 **** - Put PHP iCalendar into your Sites folder (or another web directory) - PHP iCalendar works 'out of the box' but you may want to configure some things ! - see section below called "Configuration". - Put your iCal files into the directory you specify in config.inc.php (default is "calendars") --- 22,26 ---- - Put PHP iCalendar into your Sites folder (or another web directory) - PHP iCalendar works 'out of the box' but you may want to configure some things ! - see section below called "Configuration". - Put your iCal files into the directory you specify in config.inc.php (default is "calendars") *************** *** 38,57 **** View config.inc-dist.php. The comments behind each variable definition will tell you what each setting does. Change the values between the quotation ! marks to change the setting of that variable. If there are restrictions as to what that variable can be set to, the comment behind will specify ! them. IN ORDER TO USE THESE SETTINGS YOU MUST RENAME THE FILE to config.inc.php ! If you have difficulty with your configuration, you can ask the ! developers and other PHP iCalendar users at the PHP iCalendar forums: http://phpicalendar.net/forums/ Creating calendars and events: -------------------------------- ! PHP iCalendar DOES NOT create or edit calendars (or events). Instead it ! provides a way to view calendars from applications that generate valid IETF 2445 files (.ics). Some of the supported applications are: ! - Apple iCal - http://www.apple.com/ical/ --- 38,57 ---- View config.inc-dist.php. The comments behind each variable definition will tell you what each setting does. Change the values between the quotation ! marks to change the setting of that variable. If there are restrictions as to what that variable can be set to, the comment behind will specify ! them. IN ORDER TO USE THESE SETTINGS YOU MUST RENAME THE FILE to config.inc.php ! If you have difficulty with your configuration, you can ask the ! developers and other PHP iCalendar users at the PHP iCalendar forums: http://phpicalendar.net/forums/ Creating calendars and events: -------------------------------- ! PHP iCalendar DOES NOT create or edit calendars (or events). Instead it ! provides a way to view calendars from applications that generate valid IETF 2445 files (.ics). Some of the supported applications are: ! - Apple iCal - http://www.apple.com/ical/ *************** *** 68,72 **** ----- If you find a bug, please let us know. The easiest way for you to do this ! is to visit our Bug Tracker on SourceForge. This guarantees that we both look at it and take time to figure out what is causing it. You can submit bugs at the following URL: --- 68,72 ---- ----- If you find a bug, please let us know. The easiest way for you to do this ! is to visit our Bug Tracker on SourceForge. This guarantees that we both look at it and take time to figure out what is causing it. You can submit bugs at the following URL: *************** *** 82,86 **** http://phpicalendar.sourceforge.net/requests ! Licensing: ---------- This product is distributed under the GPL. Please read through the file --- 82,86 ---- http://phpicalendar.sourceforge.net/requests ! Licensing: ---------- This product is distributed under the GPL. Please read through the file *************** *** 89,93 **** Changes: -------- ! 2.31 Fix events ending at midnight bug in day view Fix publish.php for 2.3 config system add option to hide location in month view --- 89,127 ---- Changes: -------- ! 2.4 ! Security fixes: ! More ICS input sanitizing; prevent HTML/XSS injection ! Bug fixes: ! Webcal caching now works like local caching with save_parsed_cals ! Print view missing some events ! Setting time format in preferences page ! Default calendar selections in listbox picker ! Timezone DST calculation with all-day events ! Handling dates before 1970 ! Log in cookie handling; thanks gueba! ! Log out URL containing multiple ampersands ! Parsed calendars used the wrong file name for "all calendars" ! Recurring events across multiple versions of PHP; thanks to Len and gueba! ! Better handling of URLs and email addresses in event descriptions ! Navigation forms breaking PHP transparent SID ! New features: ! Event information displayed with Nice Titles ! Attendee/organizer parsing and email address hyperlinking ! Better display of tabs/line breaks in calendar events ! Strip "blocked" protocols, added by some mail servers ! Translations: ! Updates to Czech translation ! Updates to French translation ! Remove UTF-8 BOM from German language files ! Remove UTF-8 BOM from Korean language files ! Theme changes: ! Change month view navigation to a sidebar ! All pages inherit the width specified in the CSS "maintable" class ! Different row borders in day/week views for :00, :15, :30 and :45 ! All-day events in week view has tighter spacing ! Navigation arrows in all pages ! ! 2.31 ! Fix events ending at midnight bug in day view Fix publish.php for 2.3 config system add option to hide location in month view *************** *** 96,100 **** Make multiline descriptions display with line breaks in event popup Fix German language file ! 2.3 Major changes to recurrence handling Added more languages Added login to month view --- 130,135 ---- Make multiline descriptions display with line breaks in event popup Fix German language file ! 2.3 ! Major changes to recurrence handling Added more languages Added login to month view *************** *** 129,133 **** fix overlapping events bug fix path problems in template.php ! 2.22 template.php will look in templates/default if a file is missing from templates/$template --- 164,168 ---- fix overlapping events bug fix path problems in template.php ! 2.22 template.php will look in templates/default if a file is missing from templates/$template *************** *** 152,156 **** -bug fixes from 2.2 Modified rss.php to improve compatibility ! -Modified templates to validate as XHTML 1.0 Transitional 2.2 --- 187,191 ---- -bug fixes from 2.2 Modified rss.php to improve compatibility ! -Modified templates to validate as XHTML 1.0 Transitional 2.2 *************** *** 158,165 **** -Added support for finding calendars in subdirectories. -Can now select multiple local and web calendars. ! -rss.php new feed types for different kinds of date ranges changed handling of multi-day events ! -bug fixes from 2.1 handling of webcals popup encoding --- 193,200 ---- -Added support for finding calendars in subdirectories. -Can now select multiple local and web calendars. ! -rss.php new feed types for different kinds of date ranges changed handling of multi-day events ! -bug fixes from 2.1 handling of webcals popup encoding *************** *** 177,181 **** -Various bug fixes. ! 2.0.1 -Event URLs display without LOCATION. -Fixed VTIMEZONE dates on Windows IIS. --- 212,216 ---- -Various bug fixes. ! 2.0.1 -Event URLs display without LOCATION. -Fixed VTIMEZONE dates on Windows IIS. *************** *** 248,252 **** -Parsing engine now twice as fast. -Various bug fixes. ! 1.1 -Fixed a bug with HTTP authentication. --- 283,287 ---- -Parsing engine now twice as fast. -Various bug fixes. ! 1.1 -Fixed a bug with HTTP authentication. *************** *** 290,294 **** -Specify the name of 'All Calendars Combined' in language files. ! 0.9.3 -Multiple calendar support (up to 8). -Fixed pesky <br /> tags in event popup. --- 325,329 ---- -Specify the name of 'All Calendars Combined' in language files. ! 0.9.3 -Multiple calendar support (up to 8). -Fixed pesky <br /> tags in event popup. *************** *** 296,300 **** -Major bug fixes. -Last to support Netscape 4.x ! 0.9.2 -Fixed an extra .php on the preferences page. --- 331,335 ---- -Major bug fixes. -Last to support Netscape 4.x ! 0.9.2 -Fixed an extra .php on the preferences page. *************** *** 367,371 **** -New themes, Green, Orange, Grey, and Tan. -Parses calendars much faster. ! -Page titles added for bookmarking. -Fixed bug not letting notes to fully display. -Fixed bug in recurring all-day events. --- 402,406 ---- -New themes, Green, Orange, Grey, and Tan. -Parses calendars much faster. ! -Page titles added for bookmarking. -Fixed bug not letting notes to fully display. -Fixed bug in recurring all-day events. *************** *** 392,396 **** -Added "black-listing" of specific local calendars -Added remote calendar support ! -Subscribe to calendars hosted remotely and have them show up in your popup -Allow any URL of a calendar to be parsed by your server --- 427,431 ---- -Added "black-listing" of specific local calendars -Added remote calendar support ! -Subscribe to calendars hosted remotely and have them show up in your popup -Allow any URL of a calendar to be parsed by your server *************** *** 418,422 **** -Norwegian -Bug fixes ! 0.4 -Improved recurring event support --- 453,457 ---- -Norwegian -Bug fixes ! 0.4 -Improved recurring event support *************** *** 437,441 **** -All-day yearly recurring support -Bug fixes ! 0.2 -All-day event support --- 472,476 ---- -All-day yearly recurring support -Bug fixes ! 0.2 -All-day event support Index: config.inc.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/config.inc.php,v retrieving revision 1.203 retrieving revision 1.203.2.1 diff -C2 -d -r1.203 -r1.203.2.1 *** config.inc.php 30 Jan 2009 20:49:25 -0000 1.203 --- config.inc.php 12 Apr 2010 18:58:36 -0000 1.203.2.1 *************** *** 101,104 **** --- 101,105 ---- $list_webcals = array( # 'webcal://dimer.tamu.edu/calendars/seminars/Biochem.ics' + 'webcal://calendar.sxsw.com/iCa...@ro....ics' ); $more_webcals['recur_tests'] = array(); Index: day.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/day.php,v retrieving revision 1.137 retrieving revision 1.137.2.1 diff -C2 -d -r1.137 -r1.137.2.1 *** day.php 28 Dec 2008 19:30:41 -0000 1.137 --- day.php 12 Apr 2010 18:58:36 -0000 1.137.2.1 *************** *** 16,20 **** require_once(BASE.'functions/template.php'); ! if ($phpiCal_config->minical_view == 'current') $minical_view = 'day'; $weekstart = 1; --- 16,27 ---- require_once(BASE.'functions/template.php'); ! $minical_view = $current_view; ! switch ($phpiCal_config->minical_view) { ! case 'day': ! case 'week': ! case 'month': ! $minical_view = $phpiCal_config->minical_view; ! break; ! } $weekstart = 1; *************** *** 95,98 **** --- 102,107 ---- 'l_jump' => $lang['l_jump'], 'l_todo' => $lang['l_todo'], + 'l_prev' => $lang['l_prev'], + 'l_next' => $lang['l_next'], 'l_day' => $lang['l_day'], 'l_week' => $lang['l_week'], Index: default_config.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/default_config.php,v retrieving revision 1.21.2.1 retrieving revision 1.21.2.2 diff -C2 -d -r1.21.2.1 -r1.21.2.2 *** default_config.php 10 Feb 2009 19:59:45 -0000 1.21.2.1 --- default_config.php 12 Apr 2010 18:58:36 -0000 1.21.2.2 *************** *** 3,8 **** private static $instance; private function __construct(){ ! $this->phpicalendar_version = '2.32alpha'; ! // Configuration file for PHP iCalendar 2.32 // // To set values, change the text between the single quotes --- 3,8 ---- private static $instance; private function __construct(){ ! $this->phpicalendar_version = '2.4'; ! // Configuration file for PHP iCalendar 2.4 // // To set values, change the text between the single quotes Index: month.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/month.php,v retrieving revision 1.152 retrieving revision 1.152.2.1 diff -C2 -d -r1.152 -r1.152.2.1 *** month.php 7 Jan 2009 21:11:39 -0000 1.152 --- month.php 12 Apr 2010 18:58:36 -0000 1.152.2.1 *************** *** 6,10 **** require_once(BASE.'functions/template.php'); header("Content-Type: text/html; charset=$phpiCal_config->charset"); ! if ($phpiCal_config->minical_view == 'current') $minical_view = 'month'; $unix_time = strtotime($getdate); --- 6,18 ---- require_once(BASE.'functions/template.php'); header("Content-Type: text/html; charset=$phpiCal_config->charset"); ! ! $minical_view = $current_view; ! switch ($phpiCal_config->minical_view) { ! case 'day': ! case 'week': ! case 'month': ! $minical_view = $phpiCal_config->minical_view; ! break; ! } $unix_time = strtotime($getdate); *************** *** 77,81 **** --- 85,91 ---- 'rss_valid' => '', 'show_search' => $phpiCal_config->show_search, + 'next_day' => $tomorrows_date, 'next_month' => $next_month, + 'prev_day' => $yesterdays_date, 'prev_month' => $prev_month, 'show_goto' => '', *************** *** 103,106 **** --- 113,118 ---- 'l_jump' => $lang['l_jump'], 'l_todo' => $lang['l_todo'], + 'l_prev' => $lang['l_prev'], + 'l_next' => $lang['l_next'], 'l_day' => $lang['l_day'], 'l_week' => $lang['l_week'], *************** *** 141,149 **** $page->nomonthbottom($page); } - $page->draw_subscribe($page); $page->output(); - - ?> --- 153,159 ---- $page->nomonthbottom($page); } + $page->draw_subscribe($page); $page->output(); ?> Index: preferences.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/preferences.php,v retrieving revision 1.72 retrieving revision 1.72.2.1 diff -C2 -d -r1.72 -r1.72.2.1 *** preferences.php 7 Jan 2009 20:20:03 -0000 1.72 --- preferences.php 12 Apr 2010 18:58:36 -0000 1.72.2.1 *************** *** 23,27 **** if ($action == 'setcookie') { ! $cookie_language = $_POST['cookie_language']; $cookie_cpath = $_POST['cpath']; $cookie_calendar = $_POST['cookie_calendar']; --- 23,27 ---- if ($action == 'setcookie') { ! $cookie_language = urldecode($_POST['cookie_language']); $cookie_cpath = $_POST['cpath']; $cookie_calendar = $_POST['cookie_calendar']; *************** *** 30,34 **** $cookie_startday = $_POST['cookie_startday']; $cookie_time = $_POST['cookie_time']; ! $cookie_timeformat = $_POST['cookie_timeformat']; $cookie_endtime = $_POST['cookie_endtime']; $cookie_timezone = $_POST['cookie_timezone']; --- 30,34 ---- $cookie_startday = $_POST['cookie_startday']; $cookie_time = $_POST['cookie_time']; ! $cookie_timeformat = urldecode($_POST['cookie_timeformat']); $cookie_endtime = $_POST['cookie_endtime']; $cookie_timezone = $_POST['cookie_timezone']; *************** *** 129,133 **** // select for time $time_select = ''; ! for ($i = 000; $i <= 2400; $i += 100) { $s = sprintf("%04d", $i); $time_select .= '<option value="'.$s.'"'; --- 129,133 ---- // select for time $time_select = ''; ! for ($i = 0; $i <= 2400; $i += 100) { $s = sprintf("%04d", $i); $time_select .= '<option value="'.$s.'"'; *************** *** 139,143 **** $endtime_select = ''; ! for ($i = 000; $i <= 2400; $i += 100) { $s = sprintf("%04d", $i); $endtime_select .= '<option value="'.$s.'"'; --- 139,143 ---- $endtime_select = ''; ! for ($i = 0; $i <= 2400; $i += 100) { $s = sprintf("%04d", $i); $endtime_select .= '<option value="'.$s.'"'; Index: print.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/print.php,v retrieving revision 1.43 retrieving revision 1.43.2.1 diff -C2 -d -r1.43 -r1.43.2.1 *** print.php 28 Dec 2008 00:46:49 -0000 1.43 --- print.php 12 Apr 2010 18:58:36 -0000 1.43.2.1 *************** *** 1,4 **** <?php ! define('BASE', './'); $current_view ='print'; require_once(BASE.'functions/date_functions.php'); --- 1,4 ---- <?php ! if (!defined('BASE')) define('BASE', './'); $current_view ='print'; require_once(BASE.'functions/date_functions.php'); Index: search.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/search.php,v retrieving revision 1.44 retrieving revision 1.44.2.1 diff -C2 -d -r1.44 -r1.44.2.1 *** search.php 26 Dec 2008 09:05:15 -0000 1.44 --- search.php 12 Apr 2010 18:58:36 -0000 1.44.2.1 *************** *** 12,18 **** $back_page = $_SERVER['HTTP_REFERER']; } else { ! $back_page = BASE.$default_view.'.php?cal='.$cal.'&getdate='.$getdate; } $search_valid = false; if (isset($_GET['query']) && $_GET['query'] != '') { --- 12,19 ---- $back_page = $_SERVER['HTTP_REFERER']; } else { ! $back_page = BASE.$phpiCal_config->default_view.'.php?cal='.$cal.'&getdate='.$getdate; } + $query = ''; $search_valid = false; if (isset($_GET['query']) && $_GET['query'] != '') { *************** *** 22,33 **** $search_box = ''; ! $search_box .= '<form action="search.php" method="get">'."\n". ! '<input type="hidden" name="cpath" value="'.$cpath.'">'."\n". '<input type="hidden" name="cal" value="'.$cal.'">'."\n". '<input type="hidden" name="getdate" value="'.$getdate.'">'."\n". ! '<input type="text" size="15" name="query" value="'.$query.'">'."\n". ! '<INPUT type="image" src="templates/'.$phpiCal_config->template.'/images/search.gif" border=0 height="19" width="18" name="submit" value="Search">'."\n". ! '</form>'; $search_started = getmicrotime(); --- 23,36 ---- $search_box = ''; ! $search_box .= ! '<div style="width: 160px;">'."\n". '<form action="search.php" method="get">'."\n". ! '<input type="hidden" name="cpath" value="'.$cpath.'">'."\n". '<input type="hidden" name="cal" value="'.$cal.'">'."\n". '<input type="hidden" name="getdate" value="'.$getdate.'">'."\n". ! '<input type="text" style="width: 130px; float: left;" name="query" value="'.$query.'">'."\n". ! '<input type="image" src="templates/'.$phpiCal_config->template.'/images/search.gif" border="0" style="border-bottom: 3px;" name="submit" value="Search">'."\n". ! '</form>'."\n". ! '</div>'; $search_started = getmicrotime(); *************** *** 48,55 **** if (!isset($the_arr[$uid_tmp]) || isset($event_tmp['exception'])) { #print_r($format_search_arr); #echo "<br>this event:".$event_tmp['event_text']."<br>"; ! $results1 = search_boolean($format_search_arr,$event_tmp['event_text']); ! ! if (!$results1) { $results2 = search_boolean($format_search_arr,$event_tmp['description']); } --- 51,63 ---- if (!isset($the_arr[$uid_tmp]) || isset($event_tmp['exception'])) { #print_r($format_search_arr); + #print_r($event_tmp); #echo "<br>this event:".$event_tmp['event_text']."<br>"; ! $results1 = false; ! $results2 = false; ! if (isset($event_tmp['event_text'])) { ! $results1 = search_boolean($format_search_arr,$event_tmp['event_text']); ! } ! ! if (!$results1 && isset($event_tmp['description'])) { $results2 = search_boolean($format_search_arr,$event_tmp['description']); } *************** *** 74,78 **** } } else { ! $formatted_search = '<b>'.$no_query_lang.'</b>'; } $search_ended = getmicrotime(); --- 82,86 ---- } } else { ! $formatted_search = '<b>'.$lang['l_no_query'].'</b>'; } $search_ended = getmicrotime(); *************** *** 90,96 **** $search_str = strtolower($search_str); ! if ($search_str == ' ') return array(false,$and_arr,$or_arr,$not_arr); ! // clean up search string $search_str = trim($search_str); --- 98,104 ---- $search_str = strtolower($search_str); ! if ($search_str == ' ') return array(false,$and_arr,$or_arr,$not_arr); ! // clean up search string $search_str = trim($search_str); *************** *** 99,108 **** $search_str = ereg_replace('[[:space:]]+',' ', $search_str); $search_str = str_replace(' not ', ' -', $search_str); ! // start out with an AND array of all the items $and_arr = explode(' ', $search_str); $count = count($and_arr); $j = 0; ! // build an OR array from the items in AND for($i=0;$i<$count;$i++) { --- 107,116 ---- $search_str = ereg_replace('[[:space:]]+',' ', $search_str); $search_str = str_replace(' not ', ' -', $search_str); ! // start out with an AND array of all the items $and_arr = explode(' ', $search_str); $count = count($and_arr); $j = 0; ! // build an OR array from the items in AND for($i=0;$i<$count;$i++) { *************** *** 132,136 **** } } ! // prepare our formatted search string if (count($and_arr) > 1) { --- 140,144 ---- } } ! // prepare our formatted search string if (count($and_arr) > 1) { *************** *** 139,143 **** $final_str_arr[] = $and_arr[0]; } ! if (count($or_str_arr) > 1) { $final_str_arr[] = implode('</b> AND <b>', $or_str_arr); --- 147,151 ---- $final_str_arr[] = $and_arr[0]; } ! if (count($or_str_arr) > 1) { $final_str_arr[] = implode('</b> AND <b>', $or_str_arr); *************** *** 145,149 **** $final_str_arr[] = $or_str_arr[0]; } ! if (count($not_arr) > 1) { $final_str_arr[] = '-'.implode('</b> AND <b>-', $not_arr); --- 153,157 ---- $final_str_arr[] = $or_str_arr[0]; } ! if (count($not_arr) > 1) { $final_str_arr[] = '-'.implode('</b> AND <b>-', $not_arr); *************** *** 151,155 **** $final_str_arr[] = '-'.$not_arr[0]; } ! if (count($final_str_arr) > 1) { $formatted_search = '<b>'.implode('</b> AND <b>', $final_str_arr).'</b>'; --- 159,163 ---- $final_str_arr[] = '-'.$not_arr[0]; } ! if (count($final_str_arr) > 1) { $formatted_search = '<b>'.implode('</b> AND <b>', $final_str_arr).'</b>'; *************** *** 157,165 **** $formatted_search = '<b>'.$final_str_arr[0].'</b>'; } ! return array($formatted_search, $and_arr, $or_arr, $not_arr); } ! // takes an array made by format_search() and checks to see if it // it matches against a string function search_boolean($needle_arr, $haystack) { --- 165,173 ---- $formatted_search = '<b>'.$final_str_arr[0].'</b>'; } ! return array($formatted_search, $and_arr, $or_arr, $not_arr); } ! // takes an array made by format_search() and checks to see if it // it matches against a string function search_boolean($needle_arr, $haystack) { *************** *** 168,177 **** $or_arr = $needle_arr[2]; $not_arr = $needle_arr[3]; ! if (!$needle_arr[0]) return false; if ((sizeof($and_arr) == 0) && (sizeof($or_arr) == 0) && (sizeof($not_arr) == 0)) return false; ! // compare lowercase versions of the strings $haystack = strtolower($haystack); --- 176,185 ---- $or_arr = $needle_arr[2]; $not_arr = $needle_arr[3]; ! if (!$needle_arr[0]) return false; if ((sizeof($and_arr) == 0) && (sizeof($or_arr) == 0) && (sizeof($not_arr) == 0)) return false; ! // compare lowercase versions of the strings $haystack = strtolower($haystack); *************** *** 183,187 **** } } ! // check against the AND foreach($and_arr as $s) { --- 191,195 ---- } } ! // check against the AND foreach($and_arr as $s) { *************** *** 191,195 **** } } ! // check against the OR foreach($or_arr as $or) { --- 199,203 ---- } } ! // check against the OR foreach($or_arr as $or) { *************** *** 200,204 **** $is_false = false; break; ! } } elseif (is_string(strstr($haystack,$s)) == true) { $is_false = false; --- 208,212 ---- $is_false = false; break; ! } } elseif (is_string(strstr($haystack,$s)) == true) { $is_false = false; *************** *** 206,210 **** } } ! if ($is_false) return false; } // if we haven't returned false, then we return true --- 214,218 ---- } } ! if ($is_false) return false; } // if we haven't returned false, then we return true *************** *** 215,235 **** function format_recur($arr) { global $format_recur_lang, $monthsofyear_lang, $daysofweek_lang; ! $d = $format_recur_lang['delimiter']; ! $int = $arr['INTERVAL']; ! $tmp = (($int == '1') ? 0 : 1); ! ! $freq = $arr['FREQ']; ! $freq = $format_recur_lang[$freq][$tmp]; ! if (isset($arr['COUNT'])) $for = str_replace('%int%',$arr['COUNT'],$format_recur_lang['count']); elseif (isset($arr['UNTIL'])) $for = str_replace('%date%',$arr['UNTIL'], $format_recur_lang['until']); else $for = ''; ! $print = $format_recur_lang['start']; $print = str_replace('%int%', $int, $print); $print = str_replace('%freq%', $freq, $print); $print = str_replace('%for%', $for, $print); ! if (isset($arr['BYMONTH'])) { $list = ''; --- 223,248 ---- function format_recur($arr) { global $format_recur_lang, $monthsofyear_lang, $daysofweek_lang; ! $d = $format_recur_lang['delimiter']; ! ! $int = ''; ! $freq = ''; ! if (isset($arr['INTERVAL']) && isset($arr['FREQ'])) { ! $int = $arr['INTERVAL']; ! $tmp = (($int == '1') ? 0 : 1); ! ! $freq = $arr['FREQ']; ! $freq = $format_recur_lang[$freq][$tmp]; ! } ! if (isset($arr['COUNT'])) $for = str_replace('%int%',$arr['COUNT'],$format_recur_lang['count']); elseif (isset($arr['UNTIL'])) $for = str_replace('%date%',$arr['UNTIL'], $format_recur_lang['until']); else $for = ''; ! $print = $format_recur_lang['start']; $print = str_replace('%int%', $int, $print); $print = str_replace('%freq%', $freq, $print); $print = str_replace('%for%', $for, $print); ! if (isset($arr['BYMONTH'])) { $list = ''; *************** *** 242,246 **** $print .= str_replace('%list%', $list, $format_recur_lang['bymonth']); } ! if (isset($arr['BYMONTHDAY'])) { $list = ''; --- 255,259 ---- $print .= str_replace('%list%', $list, $format_recur_lang['bymonth']); } ! if (isset($arr['BYMONTHDAY'])) { $list = ''; *************** *** 257,261 **** $print .= str_replace('%list%', $list, $format_recur_lang['bymonthday']); } ! if (isset($arr['BYDAY'])) { $list = ''; --- 270,274 ---- $print .= str_replace('%list%', $list, $format_recur_lang['bymonthday']); } ! if (isset($arr['BYDAY'])) { $list = ''; *************** *** 273,277 **** $print .= str_replace('%list%', $list, $format_recur_lang['byday']); } ! return $print; } --- 286,290 ---- $print .= str_replace('%list%', $list, $format_recur_lang['byday']); } ! return $print; } *************** *** 282,286 **** $page->draw_search($page); ! $page->replace_files(array( 'header' => BASE.'templates/'.$phpiCal_config->template.'/header.tpl', --- 295,299 ---- $page->draw_search($page); ! $page->replace_files(array( 'header' => BASE.'templates/'.$phpiCal_config->template.'/header.tpl', *************** *** 316,333 **** 'rss_available' => '', 'rss_valid' => '', - 'show_search' => $show_search, - 'next_month' => $next_month, - 'prev_month' => $prev_month, 'show_goto' => '', 'is_logged_in' => '', - 'list_jumps' => $list_jumps, - 'list_icals' => $list_icals, - 'list_years' => $list_years, - 'list_months' => $list_months, - 'list_weeks' => $list_weeks, - 'legend' => $list_calcolors, 'current_view' => $current_view, ! 'style_select' => $style_select, ! 'sidebar_date' => $sidebar_date, 'l_goprint' => $lang['l_goprint'], 'l_preferences' => $lang['l_preferences'], --- 329,336 ---- 'rss_available' => '', 'rss_valid' => '', 'show_goto' => '', 'is_logged_in' => '', 'current_view' => $current_view, ! 'style_select' => '', 'l_goprint' => $lang['l_goprint'], 'l_preferences' => $lang['l_preferences'], *************** *** 345,349 **** 'l_this_months' => $lang['l_this_months'], 'l_powered_by' => $lang['l_powered_by'], ! 'l_this_site_is' => $lang['l_this_site_is'] )); --- 348,352 ---- 'l_this_months' => $lang['l_this_months'], 'l_powered_by' => $lang['l_powered_by'], ! 'l_this_site_is' => $lang['l_this_site_is'] )); *************** *** 354,356 **** #print_r($the_arr); #echo "</pre>"; ! ?> \ No newline at end of file --- 357,359 ---- #print_r($the_arr); #echo "</pre>"; ! ?> Index: week.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/week.php,v retrieving revision 1.137 retrieving revision 1.137.2.1 diff -C2 -d -r1.137 -r1.137.2.1 *** week.php 20 Dec 2008 03:22:54 -0000 1.137 --- week.php 12 Apr 2010 18:58:36 -0000 1.137.2.1 *************** *** 6,10 **** require_once(BASE.'functions/template.php'); header("Content-Type: text/html; charset=$phpiCal_config->charset"); ! if ($phpiCal_config->minical_view == "current") $minical_view = "week"; $starttime = "0500"; --- 6,18 ---- require_once(BASE.'functions/template.php'); header("Content-Type: text/html; charset=$phpiCal_config->charset"); ! ! $minical_view = $current_view; ! switch ($phpiCal_config->minical_view) { ! case 'day': ! case 'week': ! case 'month': ! $minical_view = $phpiCal_config->minical_view; ! break; ! } $starttime = "0500"; *************** *** 97,100 **** --- 105,110 ---- 'l_jump' => $lang['l_jump'], 'l_todo' => $lang['l_todo'], + 'l_prev' => $lang['l_prev'], + 'l_next' => $lang['l_next'], 'l_day' => $lang['l_day'], 'l_week' => $lang['l_week'], Index: year.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/year.php,v retrieving revision 1.52 retrieving revision 1.52.2.1 diff -C2 -d -r1.52 -r1.52.2.1 *** year.php 29 Dec 2008 08:20:52 -0000 1.52 --- year.php 12 Apr 2010 18:58:36 -0000 1.52.2.1 *************** *** 15,19 **** $prev_year = date ("Ymd", $prev_year); ! $sidebar_date = localizeDate($dateFormat_day, strtotime($getdate)); // For the side months --- 15,19 ---- $prev_year = date ("Ymd", $prev_year); ! $sidebar_date = localizeDate($dateFormat_week_list, strtotime($getdate)); // For the side months *************** *** 70,74 **** 'rss_valid' => '', 'todo_available' => '', - 'event_js' => '', 'this_year' => $this_year, 'next_day' => @$next_day, --- 70,73 ---- *************** *** 100,103 **** --- 99,104 ---- 'l_jump' => $lang['l_jump'], 'l_todo' => $lang['l_todo'], + 'l_prev' => $lang['l_prev'], + 'l_next' => $lang['l_next'], 'l_day' => $lang['l_day'], 'l_week' => $lang['l_week'], |