From: <cl...@us...> - 2004-05-19 03:45:20
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22817 Modified Files: day.php month.php week.php year.php Log Message: Code optimization: Specifically replace each language variable instead of looking for any. Index: day.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/day.php,v retrieving revision 1.114 retrieving revision 1.115 diff -C2 -d -r1.114 -r1.115 *** day.php 15 May 2004 23:56:17 -0000 1.114 --- day.php 19 May 2004 03:45:07 -0000 1.115 *************** *** 75,81 **** 'list_jumps' => $list_jumps, 'legend' => $list_calcolors, ! 'style_select' => $style_select )); $page->draw_day($this->page); $page->tomorrows_events($this->page); --- 75,106 ---- 'list_jumps' => $list_jumps, 'legend' => $list_calcolors, ! 'style_select' => $style_select, ! 'l_goprint' => $lang['l_goprint'], ! 'l_preferences' => $lang['l_preferences'], ! 'l_calendar' => $lang['l_calendar'], ! 'l_legend' => $lang['l_legend'], ! 'l_tomorrows' => $lang['l_tomorrows'], ! 'l_jump' => $lang['l_jump'], ! 'l_todo' => $lang['l_todo'], ! 'l_day' => $lang['l_day'], ! 'l_week' => $lang['l_week'], ! 'l_month' => $lang['l_month'], ! 'l_year' => $lang['l_year'], ! 'l_powered_by' => $lang['l_powered_by'], ! 'l_subscribe' => $lang['l_subscribe'], ! 'l_download' => $lang['l_download'], ! 'l_this_site_is' => $lang['l_this_site_is'] )); + if ($allow_login == 'yes') { + $page->replace_tags(array( + 'l_invalid_login' => $lang['l_invalid_login'], + 'l_password' => $lang['l_password'], + 'l_username' => $lang['l_username'], + 'l_login' => $lang['l_login'], + 'l_logout' => $lang['l_logout'] + )); + } + $page->draw_day($this->page); $page->tomorrows_events($this->page); Index: month.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/month.php,v retrieving revision 1.118 retrieving revision 1.119 diff -C2 -d -r1.118 -r1.119 *** month.php 16 May 2004 05:39:25 -0000 1.118 --- month.php 19 May 2004 03:45:08 -0000 1.119 *************** *** 49,53 **** $page = new Page(BASE.'templates/'.$template.'/month.tpl'); - $page->replace_tags(array( 'header' => BASE.'templates/'.$template.'/header.tpl', --- 49,52 ---- *************** *** 77,81 **** 'legend' => $list_calcolors, 'current_view' => $current_view, ! 'style_select' => $style_select )); --- 76,96 ---- 'legend' => $list_calcolors, 'current_view' => $current_view, ! 'style_select' => $style_select, ! 'l_goprint' => $lang['l_goprint'], ! 'l_preferences' => $lang['l_preferences'], ! 'l_calendar' => $lang['l_calendar'], ! 'l_legend' => $lang['l_legend'], ! 'l_tomorrows' => $lang['l_tomorrows'], ! 'l_jump' => $lang['l_jump'], ! 'l_todo' => $lang['l_todo'], ! 'l_day' => $lang['l_day'], ! 'l_week' => $lang['l_week'], ! 'l_month' => $lang['l_month'], ! 'l_year' => $lang['l_year'], ! 'l_subscribe' => $lang['l_subscribe'], ! 'l_download' => $lang['l_download'], ! 'l_this_months' => $lang['l_this_months'], ! 'l_powered_by' => $lang['l_powered_by'], ! 'l_this_site_is' => $lang['l_this_site_is'] )); Index: week.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/week.php,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** week.php 15 May 2004 23:56:18 -0000 1.112 --- week.php 19 May 2004 03:45:08 -0000 1.113 *************** *** 80,84 **** 'list_jumps' => $list_jumps, 'legend' => $list_calcolors, ! 'style_select' => $style_select )); --- 80,99 ---- 'list_jumps' => $list_jumps, 'legend' => $list_calcolors, ! 'style_select' => $style_select, ! 'l_goprint' => $lang['l_goprint'], ! 'l_preferences' => $lang['l_preferences'], ! 'l_calendar' => $lang['l_calendar'], ! 'l_legend' => $lang['l_legend'], ! 'l_tomorrows' => $lang['l_tomorrows'], ! 'l_jump' => $lang['l_jump'], ! 'l_todo' => $lang['l_todo'], ! 'l_day' => $lang['l_day'], ! 'l_week' => $lang['l_week'], ! 'l_month' => $lang['l_month'], ! 'l_year' => $lang['l_year'], ! 'l_subscribe' => $lang['l_subscribe'], ! 'l_download' => $lang['l_download'], ! 'l_powered_by' => $lang['l_powered_by'], ! 'l_this_site_is' => $lang['l_this_site_is'] )); Index: year.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/year.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** year.php 16 May 2004 07:05:39 -0000 1.30 --- year.php 19 May 2004 03:45:09 -0000 1.31 *************** *** 35,39 **** 'this_year' => $this_year, 'next_year' => $next_year, ! 'prev_year' => $prev_year )); --- 35,46 ---- 'this_year' => $this_year, 'next_year' => $next_year, ! 'prev_year' => $prev_year, ! 'l_day' => $lang['l_day'], ! 'l_week' => $lang['l_week'], ! 'l_month' => $lang['l_month'], ! 'l_year' => $lang['l_year'], ! 'l_powered_by' => $lang['l_powered_by'], ! 'l_this_site_is' => $lang['l_this_site_is'] ! )); |