Ignore:
Timestamp:
Feb 18, 2011, 5:15:58 PM (13 years ago)
Author:
patdenice
Message:

Permalink accept special chars.
Bug correction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/AdditionalPages/index_menu.php

    r9272 r9275  
    4848    while ($row = mysql_fetch_assoc($result))
    4949    {
    50       if ($row['pos'] != '0' or is_admin())
     50      $authorized_users = array();
     51      $authorized_groups = array();
     52      if (!empty($row['users']))
    5153      {
    52         $authorized_users = array();
    53         $authorized_groups = array();
    54         if (!empty($row['users']))
     54        $authorized_users = explode(',', $row['users']);
     55      }
     56      if (!empty($row['groups']))
     57      {
     58        $auth = explode(',', $row['groups']);
     59        $authorized_groups = array_intersect($groups, $auth);
     60      }
     61      if (is_admin() or (
     62        (!$conf['additional_pages']['group_perm'] or empty($row['groups']) or !empty($authorized_groups)) and
     63        (!$conf['additional_pages']['user_perm'] or empty($row['users']) or in_array($user['status'], $authorized_users))))
     64      {
     65        $url = make_index_url();
     66        if ($row['id'] != $conf['additional_pages']['homepage'])
    5567        {
    56           $authorized_users = explode(',', $row['users']);
     68          $url .= '/page/'.(isset($row['permalink']) ? $row['permalink'] : $row['id']);
    5769        }
    58         if (!empty($row['groups']))
    59         {
    60           $auth = explode(',', $row['groups']);
    61           $authorized_groups = array_intersect($groups, $auth);
    62         }
    63         if (is_admin() or (
    64           (!$conf['additional_pages']['group_perm'] or empty($row['groups']) or !empty($authorized_groups)) and
    65           (!$conf['additional_pages']['user_perm'] or empty($row['users']) or in_array($user['status'], $authorized_users))))
    66         {
    67           $url = make_index_url();
    68           if ($row['id'] != $conf['additional_pages']['homepage'])
    69           {
    70             $url .= '/page/'.(isset($row['permalink']) ? $row['permalink'] : $row['id']);
    71           }
    72           array_push($data, array(
    73             'URL' => $url,
    74             'LABEL' => $row['title']));
    75         }
    76         unset($authorized_groups);
    77         unset($authorized_users);
     70        array_push($data, array(
     71          'URL' => $url,
     72          'LABEL' => $row['title']));
    7873      }
    7974    }
Note: See TracChangeset for help on using the changeset viewer.