feature 657: permalinks for categories
git-svn-id: http://piwigo.org/svn/trunk@1866 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
30e259904c
commit
ea56d7b2ac
22 changed files with 650 additions and 89 deletions
|
|
@ -137,32 +137,6 @@ SELECT id, name
|
|||
);
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Cache management |
|
||||
// +-----------------------------------------------------------------------+
|
||||
$query = '
|
||||
SELECT *
|
||||
FROM '.CATEGORIES_TABLE;
|
||||
if (!isset($_GET['parent_id']))
|
||||
{
|
||||
$query.= '
|
||||
WHERE id_uppercat IS NULL';
|
||||
}
|
||||
else
|
||||
{
|
||||
$query.= '
|
||||
WHERE id_uppercat = '.$_GET['parent_id'];
|
||||
}
|
||||
$query.= '
|
||||
ORDER BY rank ASC
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
while ($row = mysql_fetch_assoc($result))
|
||||
{
|
||||
$categories[$row['rank']] = $row;
|
||||
$categories[$row['rank']]['nb_subcats'] = 0;
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Navigation path |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
|
@ -209,7 +183,7 @@ $tpl = array('cat_first','cat_last');
|
|||
$categories = array();
|
||||
|
||||
$query = '
|
||||
SELECT id, name, dir, rank, nb_images, status
|
||||
SELECT id, name, permalink, dir, rank, nb_images, status
|
||||
FROM '.CATEGORIES_TABLE;
|
||||
if (!isset($_GET['parent_id']))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue