Changeset 2777 for trunk/admin/include


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).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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?>
Note: See TracChangeset for help on using the changeset viewer.