mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-21 09:03:38 +02:00
feature 657: permalinks for categories
git-svn-id: http://piwigo.org/svn/trunk@1866 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
+1
-27
@@ -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']))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user