Changeset 4395


Ignore:
Timestamp:
11/29/09 22:33:33 (10 years ago)
Author:
grum
Message:

[AMM] feature 1299, feature 1298, feature 1297
Allows to manage access for the 'Admin' users
Users 'Webmaster' aren't managed
AMM don't works properly if a block 'menu' or 'specials' is hidden

Location:
extensions/AMenuManager
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/AMenuManager/admin/amm_sections_visibility.tpl

    r4389 r4395  
    44  <label> 
    55  <input type="checkbox" id="i{$name}_vis_user_{$values.id}" value="{$values.id}" 
    6     {if $values.allowed==true} checked{/if} 
    7     {if $values.enabled==false} disabled{/if} />{$values.name} 
     6    {if $values.allowed==true} checked{/if} />{$values.name} 
    87  </label><br/> 
    98{/foreach} 
     
    1514  <label> 
    1615  <input type="checkbox" id="i{$name}_vis_group_{$values.id}" value="{$values.id}" 
    17     {if $values.allowed==true} checked{/if} 
    18     {if $values.enabled==false} disabled{/if} />{$values.name} 
     16    {if $values.allowed==true} checked{/if} />{$values.name} 
    1917  </label><br/> 
    2018{/foreach} 
  • extensions/AMenuManager/amm_aip.class.inc.php

    r4389 r4395  
    521521    { 
    522522      $this->my_config['amm_sections_items'][$key]['visibilityForm'] = $this->makeVisibility($val['visibility'], $key); 
    523       $this->defaultMenus[$key]['visibilityForm'] = $this->makeVisibility("guest,generic,normal,admin/", $key); 
     523      $this->defaultMenus[$key]['visibilityForm'] = $this->makeVisibility("guest,generic,normal,webmaster,admin/", $key); 
    524524    } 
    525525 
  • extensions/AMenuManager/amm_pip.class.inc.php

    r4389 r4395  
    147147    */ 
    148148    $blocks=Array(); 
    149     $blocks['menu']=$menu->get_block('mbMenu'); 
    150     $blocks['special']=$menu->get_block('mbSpecials'); 
     149 
     150    if($menu->is_hidden('mbMenu')) 
     151    { 
     152      // if block is hidden, make a fake to manage AMM features 
     153      // the fake block isn't displayed 
     154      $blocks['menu']=new DisplayBlock('amm_mbMenu'); 
     155      $blocks['menu']->data=Array(); 
     156    } 
     157    else 
     158    { 
     159      $blocks['menu']=$menu->get_block('mbMenu'); 
     160    } 
     161 
     162    if($menu->is_hidden('mbSpecials')) 
     163    { 
     164      // if block is hidden, make a fake to manage AMM features 
     165      // the fake block isn't displayed 
     166      $blocks['special']=new DisplayBlock('amm_mbSpecial'); 
     167      $blocks['special']->data=Array(); 
     168    } 
     169    else 
     170    { 
     171      $blocks['special']=$menu->get_block('mbSpecials'); 
     172    } 
    151173 
    152174    $menuItems=array_merge($blocks['menu']->data, $blocks['special']->data); 
  • extensions/AMenuManager/amm_root.class.inc.php

    r4389 r4395  
    2626  protected $css;   //the css object 
    2727  protected $defaultMenus = array( 
    28     'favorites' => array('container' => 'special', 'visibility' => 'guest,generic,normal,admin/', 'order' => 0, 'translation' => 'favorite_cat'), 
    29     'most_visited' => array('container' => 'special', 'visibility' => 'guest,generic,normal,admin/', 'order' => 1, 'translation' => 'most_visited_cat'), 
    30     'best_rated' => array('container' => 'special', 'visibility' => 'guest,generic,normal,admin/', 'order' => 2, 'translation' => 'best_rated_cat'), 
    31     'random' => array('container' => 'special', 'visibility' => 'guest,generic,normal,admin/', 'order' => 3, 'translation' => 'random_cat'), 
    32     'recent_pics' => array('container' => 'special', 'visibility' => 'guest,generic,normal,admin/', 'order' => 4, 'translation' => 'recent_pics_cat'), 
    33     'recent_cats' => array('container' => 'special', 'visibility' => 'guest,generic,normal,admin/', 'order' => 5, 'translation' => 'recent_cats_cat'), 
    34     'calendar' => array('container' => 'special', 'visibility' => 'guest,generic,normal,admin/', 'order' => 6, 'translation' => 'calendar'), 
    35     'qsearch' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,admin/', 'order' => 0, 'translation' => 'qsearch'), 
    36     'tags' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,admin/', 'order' => 1, 'translation' => 'Tags'), 
    37     'search' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,admin/', 'order' => 2, 'translation' => 'Search'), 
    38     'comments' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,admin/', 'order' => 3, 'translation' => 'comments'), 
    39     'about' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,admin/', 'order' => 4, 'translation' => 'About'), 
    40     'rss' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,admin/', 'order' => 5, 'translation' => 'Notification') 
     28    'favorites' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 0, 'translation' => 'favorite_cat'), 
     29    'most_visited' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 1, 'translation' => 'most_visited_cat'), 
     30    'best_rated' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 2, 'translation' => 'best_rated_cat'), 
     31    'random' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 3, 'translation' => 'random_cat'), 
     32    'recent_pics' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 4, 'translation' => 'recent_pics_cat'), 
     33    'recent_cats' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 5, 'translation' => 'recent_cats_cat'), 
     34    'calendar' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 6, 'translation' => 'calendar'), 
     35    'qsearch' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 0, 'translation' => 'qsearch'), 
     36    'tags' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 1, 'translation' => 'Tags'), 
     37    'search' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 2, 'translation' => 'Search'), 
     38    'comments' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 3, 'translation' => 'comments'), 
     39    'about' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 4, 'translation' => 'About'), 
     40    'rss' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 5, 'translation' => 'Notification') 
    4141  ); 
    4242 
  • extensions/AMenuManager/main.inc.php

    r4390 r4395  
    22/* 
    33Plugin Name: Advanced Menu Manager 
    4 Version: 2.1.3 
     4Version: 2.1.4 
    55Description: Gestion avancée du menu / Advanced management of menu 
    66Plugin URI: http://piwigo.org 
     
    5858|         |            | * mantis: feature 1100 
    5959|         |            |   Random picture : compatibility with theme 'montblanc' 
    60 |         |            | 
    61 |         |            | 
    62 |         |            | 
    63 |         |            | 
    64 |         |            | 
     60| 2.1.4   | 2009/11/29 | * mantis: feature 1299 
     61|         |            |   Allows to manage access for the 'Admin' users 
     62|         |            | * mantis: feature 1298 
     63|         |            |   Users 'Webmaster' aren't managed 
     64|         |            | * mantis: feature 1297 
     65|         |            |   AMM don't works properly if a block 'menu' or 
     66|         |            |   'specials' is hidden 
    6567|         |            | 
    6668|         |            | 
     
    8890define('AMM_PATH' , PHPWG_PLUGINS_PATH . AMM_DIR . '/'); 
    8991 
    90 define('AMM_VERSION' , '2.1.3'); //=> ne pas oublier la version dans l'entête !! 
     92define('AMM_VERSION' , '2.1.4'); //=> ne pas oublier la version dans l'entête !! 
    9193 
    9294global $prefixeTable, $page; 
  • extensions/AMenuManager/maintain.inc.php

    r4391 r4395  
    2020{ 
    2121  @include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/main.inc.php'); 
    22   // need GPC release greater or equal than 2.0.3 
     22  // need GPC release greater or equal than 2.0.4 
    2323 
    24   if(checkGPCRelease(2,0,3)) 
     24  if(checkGPCRelease(2,0,4)) 
    2525  { 
    2626    @include_once("amm_install.class.inc.php"); 
     
    3131function gpcMsgError(&$errors) 
    3232{ 
    33   array_push($errors, sprintf(l10n('Grum Plugin Classes is not installed (release >= %s)'), "2.0.3")); 
     33  array_push($errors, sprintf(l10n('Grum Plugin Classes is not installed (release >= %s)'), "2.0.4")); 
    3434} 
    3535// ----------------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.