Advertisement
Guest User

Untitled

a guest
Jan 29th, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.09 KB | None | 0 0
  1. Index: index.php
  2. ===================================================================
  3. --- index.php   (revision 20449)
  4. +++ index.php   (working copy)
  5. @@ -107,15 +107,8 @@
  6.  }
  7.  $template->assign('U_CANONICAL', $canonical_url);
  8.  
  9. -//----------------------------------------------------- template initialization
  10. -//
  11. -// Start output of page
  12. -//
  13. +
  14.  $title = $page['title'];
  15. -$page['body_id'] = 'theCategoryPage';
  16. -
  17. -$template->set_filenames( array('index'=>'index.tpl') );
  18. -//-------------------------------------------------------------- category title
  19.  $template_title = $page['section_title'];
  20.  if (count($page['items']) > 0)
  21.  {
  22. @@ -123,6 +116,18 @@
  23.  }
  24.  $template->assign('TITLE', $template_title);
  25.  
  26. +// include menubar
  27. +include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
  28. +
  29. +if (!isset($page['body_id']))
  30. +{
  31. +//----------------------------------------------------- template initialization
  32. +$page['body_id'] = 'theCategoryPage';
  33. +
  34. +$template->set_filename('index', 'index.tpl');
  35. +//-------------------------------------------------------------- category title
  36. +
  37. +
  38.  if (isset($page['flat']) or isset($page['chronology_field']))
  39.  {
  40.    $template->assign(
  41. @@ -273,9 +278,6 @@
  42.    $template->assign('CONTENT_DESCRIPTION', $page['comment'] );
  43.  }
  44.  
  45. -// include menubar
  46. -include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
  47. -
  48.  if ( isset($page['category']['count_categories']) and $page['category']['count_categories']==0 )
  49.  {// count_categories might be computed by menubar - if the case unassign flat link if no sub albums
  50.     $template->clear_assign('U_MODE_FLAT');
  51. @@ -330,12 +332,18 @@
  52.      $template->assign('U_SLIDESHOW', $page['cat_slideshow_url']);
  53.    }
  54.  }
  55. +}
  56. +else
  57. +{
  58. +  $template->set_filename('index', 'empty_page.tpl');
  59. +}
  60.  
  61.  include(PHPWG_ROOT_PATH.'include/page_header.php');
  62.  trigger_action('loc_end_index');
  63.  include(PHPWG_ROOT_PATH.'include/page_messages.php');
  64.  $template->parse_index_buttons();
  65.  $template->pparse('index');
  66. +
  67.  //------------------------------------------------------------ log informations
  68.  pwg_log();
  69.  include(PHPWG_ROOT_PATH.'include/page_tail.php');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement