1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-01 10:50:37 +02:00

Pages Plugin: Update Index Action.

This commit is contained in:
Awilum
2012-09-30 02:12:13 +03:00
parent 1be8ef7531
commit 75acfb7290

View File

@@ -441,14 +441,19 @@
// Its mean that you can add your own actions for this plugin
Action::run('admin_pages_extra_actions');
} else { // Load main template
} else {
// Index action
// -------------------------------------
// Init vars
$pages_array = array();
$count = 0;
// Get pages
$pages_list = $pages->select(null, 'all', null, array('slug', 'title', 'status', 'date', 'author', 'parent'));
$pages_array = array();
$count = 0;
// Loop
foreach ($pages_list as $page) {
$pages_array[$count]['title'] = $page['title'];
@@ -465,6 +470,7 @@
}
if ($c_p != '') {
$_page = $pages->select('[slug="'.$page['parent'].'"]', null);
if (isset($_page['title'])) {
@@ -472,10 +478,15 @@
} else {
$_title = '';
}
$pages_array[$count]['sort'] = $_title . ' ' . $page['title'];
} else {
$pages_array[$count]['sort'] = $page['title'];
}
$_title = '';
$count++;
}