mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Fixed #689, reduced number of list queries (page administration)
This commit is contained in:
@@ -416,7 +416,7 @@ class page_admin_ui extends e_admin_ui
|
|||||||
protected $pluginName = 'core';
|
protected $pluginName = 'core';
|
||||||
protected $table = "page";
|
protected $table = "page";
|
||||||
|
|
||||||
protected $listQry = "SELECT
|
protected $listQry = "SELECT SQL_CALC_FOUND_ROWS
|
||||||
p.*,u.user_id,u.user_name,pch.chapter_sef,pbk.chapter_sef AS book_sef
|
p.*,u.user_id,u.user_name,pch.chapter_sef,pbk.chapter_sef AS book_sef
|
||||||
FROM #page AS p
|
FROM #page AS p
|
||||||
LEFT JOIN #user AS u ON p.page_author = u.user_id
|
LEFT JOIN #user AS u ON p.page_author = u.user_id
|
||||||
@@ -529,7 +529,7 @@ class page_admin_ui extends e_admin_ui
|
|||||||
if($this->getMode() == 'menu' && ($this->getACtion() == 'list' || $this->getACtion() == 'inline'))
|
if($this->getMode() == 'menu' && ($this->getACtion() == 'list' || $this->getACtion() == 'inline'))
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->listQry = "SELECT p.*,u.user_id,u.user_name FROM #page AS p LEFT JOIN #user AS u ON p.page_author = u.user_id WHERE p.menu_name != '' "; // without any Order or Limit.
|
$this->listQry = "SELECT SQL_CALC_FOUND_ROWS p.*,u.user_id,u.user_name FROM #page AS p LEFT JOIN #user AS u ON p.page_author = u.user_id WHERE p.menu_name != '' "; // without any Order or Limit.
|
||||||
|
|
||||||
$this->listOrder = 'p.page_id desc';
|
$this->listOrder = 'p.page_id desc';
|
||||||
|
|
||||||
@@ -559,6 +559,10 @@ class page_admin_ui extends e_admin_ui
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->fieldpref = array("page_id","menu_name", "menu_title", 'menu_image', 'menu_template', 'menu_icon', 'page_chapter', 'menu_class');
|
$this->fieldpref = array("page_id","menu_name", "menu_title", 'menu_image', 'menu_template', 'menu_icon', 'page_chapter', 'menu_class');
|
||||||
|
|
||||||
|
### Parse aliases again or all filters shall fail due to the menu hack!
|
||||||
|
$this->_alias_parsed = false;
|
||||||
|
$this->parseAliases();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user