From 6776809e7b76c2d84d6a03ae6d8a308287720066 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 30 Jun 2016 16:26:59 +0200 Subject: [PATCH] Improved page/cms management --- .../install/files/acp/templates/pageAdd.tpl | 2 +- .../install/files/acp/templates/pageList.tpl | 19 +++++++++---------- .../lib/acp/page/ArticleListPage.class.php | 5 +++++ .../files/lib/acp/page/BoxListPage.class.php | 5 +++++ .../files/lib/acp/page/MenuListPage.class.php | 5 +++++ .../files/lib/acp/page/PageListPage.class.php | 5 +++++ .../files/lib/data/page/Page.class.php | 2 +- 7 files changed, 31 insertions(+), 12 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/pageAdd.tpl b/wcfsetup/install/files/acp/templates/pageAdd.tpl index cd42beea0a..72fb017099 100644 --- a/wcfsetup/install/files/acp/templates/pageAdd.tpl +++ b/wcfsetup/install/files/acp/templates/pageAdd.tpl @@ -132,7 +132,7 @@
{if $errorField == 'applicationPackageID'} diff --git a/wcfsetup/install/files/acp/templates/pageList.tpl b/wcfsetup/install/files/acp/templates/pageList.tpl index 13a4d7cbf1..5bc2fb81de 100644 --- a/wcfsetup/install/files/acp/templates/pageList.tpl +++ b/wcfsetup/install/files/acp/templates/pageList.tpl @@ -56,7 +56,7 @@ @@ -110,7 +110,7 @@ {lang}wcf.global.objectID{/lang} {lang}wcf.global.name{/lang} - {lang}wcf.acp.page.url{/lang} + {lang}wcf.acp.page.url{/lang} {lang}wcf.acp.page.type{/lang} {lang}wcf.acp.page.lastUpdateTime{/lang} @@ -123,27 +123,26 @@ {if $page->canDisable()} - + {else} - + {/if} - + {if $page->canDelete()} - + {else} - + {/if} {if !$page->requireObjectID} - + {else} - + {/if} {event name='rowButtons'} {@$page->pageID} {if $page->isLandingPage} {/if}{$page->name} - {$page->getApplication()->getAbbreviation()} {$page->getDisplayLink()} diff --git a/wcfsetup/install/files/lib/acp/page/ArticleListPage.class.php b/wcfsetup/install/files/lib/acp/page/ArticleListPage.class.php index 6b87c84baf..e5f1dc51b6 100644 --- a/wcfsetup/install/files/lib/acp/page/ArticleListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/ArticleListPage.class.php @@ -55,6 +55,11 @@ class ArticleListPage extends SortablePage { */ public $validSortFields = ['articleID', 'title', 'time', 'views', 'comments']; + /** + * @inheritDoc + */ + public $itemsPerPage = 50; + /** * category id * @var integer diff --git a/wcfsetup/install/files/lib/acp/page/BoxListPage.class.php b/wcfsetup/install/files/lib/acp/page/BoxListPage.class.php index 9b83c9d8fd..b578766453 100644 --- a/wcfsetup/install/files/lib/acp/page/BoxListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/BoxListPage.class.php @@ -43,6 +43,11 @@ class BoxListPage extends SortablePage { */ public $validSortFields = ['boxID', 'name', 'boxType', 'position', 'showOrder']; + /** + * @inheritDoc + */ + public $itemsPerPage = 50; + /** * name * @var string diff --git a/wcfsetup/install/files/lib/acp/page/MenuListPage.class.php b/wcfsetup/install/files/lib/acp/page/MenuListPage.class.php index 5ddc70e180..22e82254cc 100644 --- a/wcfsetup/install/files/lib/acp/page/MenuListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/MenuListPage.class.php @@ -40,6 +40,11 @@ class MenuListPage extends SortablePage { */ public $validSortFields = ['menuID', 'title', 'position', 'items']; + /** + * @inheritDoc + */ + public $itemsPerPage = 50; + /** * @inheritDoc */ diff --git a/wcfsetup/install/files/lib/acp/page/PageListPage.class.php b/wcfsetup/install/files/lib/acp/page/PageListPage.class.php index 6d6f1d5da5..03e5318e4e 100644 --- a/wcfsetup/install/files/lib/acp/page/PageListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/PageListPage.class.php @@ -44,6 +44,11 @@ class PageListPage extends SortablePage { */ public $validSortFields = ['pageID', 'name', 'lastUpdateTime', 'pageType']; + /** + * @inheritDoc + */ + public $itemsPerPage = 50; + /** * name * @var string diff --git a/wcfsetup/install/files/lib/data/page/Page.class.php b/wcfsetup/install/files/lib/data/page/Page.class.php index 82011ef131..3e7c2d31b1 100644 --- a/wcfsetup/install/files/lib/data/page/Page.class.php +++ b/wcfsetup/install/files/lib/data/page/Page.class.php @@ -185,7 +185,7 @@ class Page extends DatabaseObject implements ILinkableObject, ITitledObject { * @return string */ public function getDisplayLink() { - return str_replace($this->getApplication()->getPageURL(), '', $this->getLink()); + return preg_replace('~^https?://~', '', $this->getLink()); } /** -- 2.20.1