Project

General

Profile

« Previous | Next » 

Revision 1293

Added by Dietmar over 14 years ago

change show_menu2 to correct modul version 4.9

View differences:

include.php
1 1
<?php
2
/**
3
 *
4
 * @category        module
5
 * @package         show_menu2
6
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
8
 * @copyright       2009-2010, Website Baker Org. e.V.
9
 * @link			http://www.websitebaker2.org/
10
 * @license         http://www.gnu.org/licenses/gpl.html
11
 * @platform        WebsiteBaker 2.7.0 | 2.8.x
12
 * @requirements    PHP 4.4.9 and higher
13
 * @version         $Id$
14
 * @filesource		$HeadURL$
15
 * @lastmodified    $Date$
16
 *
17
 */
2 18

  
3
// $Id$
4

  
5
/*
6
    show_menu2: show_menu replacement for Website Baker 
7
    Copyright (C) 2006-2009, Brodie Thiesfield
8

  
9
    This program is free software; you can redistribute it and/or
10
    modify it under the terms of the GNU General Public License
11
    as published by the Free Software Foundation; either version 2
12
    of the License, or (at your option) any later version.
13

  
14
    This program is distributed in the hope that it will be useful,
15
    but WITHOUT ANY WARRANTY; without even the implied warranty of
16
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
    GNU General Public License for more details.
18

  
19
    You should have received a copy of the GNU General Public License
20
    along with this program; if not, write to the Free Software
21
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  
22
    02110-1301, USA.
23

  
24
    ***********************************************
25
    ** Version 4.8: see README for documentation **
26
    ***********************************************
27
*/
28

  
29 19
define('SM2_ROOT',       -1000);
30 20
define('SM2_CURR',       -2000);
31 21
define('SM2_ALLMENU',       -1);
......
43 33
define('SM2_NOESCAPE',       0); // NOOP, unnecessary with WB 2.6.7+
44 34
define('SM2_BUFFER',    0x0200); // bit 9
45 35
define('SM2_CURRTREE',  0x0400); // bit 10
36
define('SM2_SHOWHIDDEN', 0x0800); // bit 11
46 37

  
47 38
define('_SM2_GROUP_1',  0x000F); // exactly one flag from group 1 is required
48 39

  
......
588 579
                if ($page['page_id'] == $CURR_PAGE_ID) {
589 580
                    $page['sm2_is_curr'] = true;
590 581
                    $page['sm2_on_curr_path'] = true;
591
                    unset($page['sm2_hide']); // don't hide the current page
582
                    if ($flags & SM2_SHOWHIDDEN) 
583
					{ 
584
                        // show hidden pages if active and SHOWHIDDEN flag supplied
585
                        unset($page['sm2_hide']); 
586
                    }
592 587
                }
593 588

  
594 589
                // mark parents of the current page as such
595 590
                if (in_array($page['page_id'], $rgCurrParents)) {
596 591
                    $page['sm2_is_parent'] = true;
597 592
                    $page['sm2_on_curr_path'] = true;
598
                    unset($page['sm2_hide']); // don't hide a parent page                
593
                    if ($flags & SM2_SHOWHIDDEN) 
594
					{
595
                        // show hidden pages if active and SHOWHIDDEN flag supplied
596
						unset($page['sm2_hide']); // don't hide a parent page                
597
                    }
599 598
                }
600 599
                
601 600
                // add the entry to the array                
602 601

  

Also available in: Unified diff