Ignore:
Timestamp:
Mar 17, 2006, 5:13:19 AM (18 years ago)
Author:
rvelices
Message:

URL rewrite for chronology: uses $pagechronology and
$pagechronology_date. $pagechronology is an array with 'field',
'style' and 'view' keys. This is step 1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/calendar_weekly.class.php

    r1069 r1086  
    3939  /**
    4040   * Initialize the calendar
    41    * @param string date_field db column on which this calendar works
    4241   * @param string inner_sql used for queries (INNER JOIN or normal)
    43    * @param array date_components
    4442   */
    45   function initialize($date_field, $inner_sql, $date_components)
     43  function initialize($inner_sql)
    4644  {
    47     parent::initialize($date_field, $inner_sql, $date_components);
     45    parent::initialize($inner_sql);
    4846    global $lang;
    4947    $week_no_labels=array();
     
    8078 * @return boolean false to indicate that thumbnails where not included here
    8179 */
    82 function generate_category_content($url_base, $view_type)
     80function generate_category_content()
    8381{
    84   global $conf;
     82  global $conf, $page;
    8583
    86   $this->url_base = $url_base;
    87 
    88   assert($view_type==CAL_VIEW_LIST);
    89 
    90   if ( count($this->date_components)==0 )
     84  if ( count($page['chronology_date'])==0 )
    9185  {
    9286    $this->build_nav_bar(CYEAR); // years
    9387  }
    94   if ( count($this->date_components)==1 )
     88  if ( count($page['chronology_date'])==1 )
    9589  {
    9690    $this->build_nav_bar(CWEEK, array()); // week nav bar 1-53
    9791  }
    98   if ( count($this->date_components)==2 )
     92  if ( count($page['chronology_date'])==2 )
    9993  {
    10094    $this->build_nav_bar(CDAY); // days nav bar Mon-Sun
     
    113107function get_date_where($max_levels=3)
    114108{
    115   $date = $this->date_components;
     109  global $page;
     110  $date = $page['chronology_date'];
    116111  while (count($date)>$max_levels)
    117112  {
Note: See TracChangeset for help on using the changeset viewer.