Changeset 2777 for trunk


Ignore:
Timestamp:
Oct 19, 2008, 5:47:34 PM (16 years ago)
Author:
vdigital
Message:

Merging revisions 2773-2776

  • Default template and Piwigo domain ...
  • No metadata synchronization icon on a remote picture (Synchro failure)
  • Jump to category icon is removed on user forbidden categories (previously check_restrictions was leading administrators to the access denied page).
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/cat_modify.php

    r2653 r2777  
    236236  array(
    237237    'CATEGORIES_NAV'     => $navigation,
     238    'CAT_ID'             => $category['id'],
    238239    'CAT_NAME'           => @htmlspecialchars($category['name']),
    239240    'CAT_COMMENT'        => @htmlspecialchars($category['comment']),
  • trunk/admin/include/functions.php

    r2678 r2777  
    19001900  }
    19011901}
     1902
     1903/**
     1904 * Is the category accessible to the (Admin) user ?
     1905 *
     1906 * Note : if the user is not authorized to see this category, category jump
     1907 * will be replaced by admin cat_modify page
     1908 *
     1909 * @param int category id to verify
     1910 * @return bool
     1911 */
     1912function cat_admin_access($category_id)
     1913{
     1914  global $user;
     1915
     1916  // $filter['visible_categories'] and $filter['visible_images']
     1917  // are not used because it's not necessary (filter <> restriction)
     1918  if (in_array($category_id, explode(',', $user['forbidden_categories'])))
     1919  {
     1920    return false;
     1921  }
     1922  return true;
     1923}
     1924
    19021925?>
  • trunk/admin/template/goto/cat_list.tpl

    r2573 r2777  
    4949      <!-- category {$category.ID} -->
    5050      <ul class="categoryActions">
     51        {if cat_admin_access($category.ID)}
    5152        <li><a href="{$category.U_JUMPTO}" title="{'jump to category'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_jump-to.png" class="button" alt="{'jump to category'|@translate}" /></a></li>
     53        {/if}
    5254        <li><a href="{$category.U_EDIT}" title="{'edit category informations'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_edit.png" class="button" alt="{'edit'|@translate}"/></a></li>
    5355        {if isset($category.U_MANAGE_ELEMENTS) }
  • trunk/admin/template/goto/cat_modify.tpl

    r2761 r2777  
    1111
    1212<ul class="categoryActions">
     13  {if cat_admin_access($CAT_ID)}
    1314  <li><a href="{$U_JUMPTO}" title="{'jump to category'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_jump-to.png" class="button" alt="{'jump to category'|@translate}" /></a></li>
     15  {/if}
    1416  {if isset($U_MANAGE_ELEMENTS) }
    1517  <li><a href="{$U_MANAGE_ELEMENTS}" title="{'manage category elements'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/category_elements.png" class="button" alt="{'elements'|@translate}" /></a></li>
  • trunk/admin/template/goto/picture_modify.tpl

    r2761 r2777  
    1919  <li><a href="{$U_JUMPTO}" title="{'jump to image'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_jump-to.png" class="button" alt="{'jump to image'|@translate}" /></a></li>
    2020  {/if}
     21  {if !url_is_remote($path)}
    2122  <li><a href="{$U_SYNC}" title="{'synchronize metadata'|@translate}" {$TAG_INPUT_ENABLED}><img src="{$themeconf.admin_icon_dir}/sync_metadata.png" class="button" alt="{'synchronize'|@translate}" /></a></li>
     23  {/if}
    2224</ul>
    2325
  • trunk/include/constants.php

    r2725 r2777  
    2424// Default settings
    2525define('PHPWG_VERSION', 'Colibri');
    26 define('PHPWG_DOMAIN', 'phpwebgallery.net');
     26define('PHPWG_DOMAIN', 'piwigo.org');
    2727define('PHPWG_URL', 'http://www.'.PHPWG_DOMAIN);
    2828define('PEM_URL', 'http://' . PHPWG_DOMAIN . '/ext_new'); /* need to be changed on final release */
    2929define('PHPWG_DEFAULT_LANGUAGE', 'en_UK');
    30 define('PHPWG_DEFAULT_TEMPLATE', 'yoga/clear');
     30define('PHPWG_DEFAULT_TEMPLATE', 'yoga/Sylvia');
    3131
    3232// Required versions
Note: See TracChangeset for help on using the changeset viewer.