diff options
author | rvelices <rv-github@modusoptimus.com> | 2006-03-17 04:13:19 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2006-03-17 04:13:19 +0000 |
commit | 97b681f1fa58e72bacff516ac51b35577181367b (patch) | |
tree | e3641755fa68efd8382c6305c2978a722881987f /include/calendar_weekly.class.php | |
parent | 9b521760af7639310742d7817c4fb91b88471c5c (diff) |
URL rewrite for chronology: uses $page['chronology'] and
$page['chronology_date']. $page['chronology'] is an array with 'field',
'style' and 'view' keys. This is step 1.
git-svn-id: http://piwigo.org/svn/trunk@1086 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/calendar_weekly.class.php')
-rw-r--r-- | include/calendar_weekly.class.php | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/include/calendar_weekly.class.php b/include/calendar_weekly.class.php index 023743693..4259650e0 100644 --- a/include/calendar_weekly.class.php +++ b/include/calendar_weekly.class.php @@ -38,13 +38,11 @@ class Calendar extends CalendarBase /** * Initialize the calendar - * @param string date_field db column on which this calendar works * @param string inner_sql used for queries (INNER JOIN or normal) - * @param array date_components */ - function initialize($date_field, $inner_sql, $date_components) + function initialize($inner_sql) { - parent::initialize($date_field, $inner_sql, $date_components); + parent::initialize($inner_sql); global $lang; $week_no_labels=array(); for ($i=1; $i<=53; $i++) @@ -79,23 +77,19 @@ class Calendar extends CalendarBase * Generate navigation bars for category page * @return boolean false to indicate that thumbnails where not included here */ -function generate_category_content($url_base, $view_type) +function generate_category_content() { - global $conf; + global $conf, $page; - $this->url_base = $url_base; - - assert($view_type==CAL_VIEW_LIST); - - if ( count($this->date_components)==0 ) + if ( count($page['chronology_date'])==0 ) { $this->build_nav_bar(CYEAR); // years } - if ( count($this->date_components)==1 ) + if ( count($page['chronology_date'])==1 ) { $this->build_nav_bar(CWEEK, array()); // week nav bar 1-53 } - if ( count($this->date_components)==2 ) + if ( count($page['chronology_date'])==2 ) { $this->build_nav_bar(CDAY); // days nav bar Mon-Sun } @@ -112,7 +106,8 @@ function generate_category_content($url_base, $view_type) */ function get_date_where($max_levels=3) { - $date = $this->date_components; + global $page; + $date = $page['chronology_date']; while (count($date)>$max_levels) { array_pop($date); |