From f4fefcfeae4bedf0bc8f773cf9014616132901e7 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 25 Dec 2012 21:49:48 +0100 Subject: [PATCH] Removed 'newWindow' option for page menu items Opening external links in a new window is already covered by a global option, therefore no custom handling is required. --- com.woltlab.wcf/template/mainMenu.tpl | 2 +- com.woltlab.wcf/template/mainMenuSubMenu.tpl | 2 +- .../install/files/acp/templates/pageMenuItemAdd.tpl | 6 ------ .../files/lib/acp/form/PageMenuItemAddForm.class.php | 11 +---------- .../files/lib/acp/form/PageMenuItemEditForm.class.php | 2 -- wcfsetup/install/lang/de.xml | 1 - wcfsetup/setup/db/install.sql | 1 - 7 files changed, 3 insertions(+), 22 deletions(-) diff --git a/com.woltlab.wcf/template/mainMenu.tpl b/com.woltlab.wcf/template/mainMenu.tpl index 6dcc956a68..9e103d46bd 100644 --- a/com.woltlab.wcf/template/mainMenu.tpl +++ b/com.woltlab.wcf/template/mainMenu.tpl @@ -2,7 +2,7 @@ diff --git a/com.woltlab.wcf/template/mainMenuSubMenu.tpl b/com.woltlab.wcf/template/mainMenuSubMenu.tpl index f3de76fe82..c0e5ec585c 100644 --- a/com.woltlab.wcf/template/mainMenuSubMenu.tpl +++ b/com.woltlab.wcf/template/mainMenuSubMenu.tpl @@ -2,7 +2,7 @@ {if $__wcf->getPageMenu()->getMenuItems($menuItem->menuItem)|count > 0 && $__wcf->getPageMenu()->getActiveMenuItem() == $menuItem->menuItem} {/if} diff --git a/wcfsetup/install/files/acp/templates/pageMenuItemAdd.tpl b/wcfsetup/install/files/acp/templates/pageMenuItemAdd.tpl index 02e2d2954a..ac029cf249 100644 --- a/wcfsetup/install/files/acp/templates/pageMenuItemAdd.tpl +++ b/wcfsetup/install/files/acp/templates/pageMenuItemAdd.tpl @@ -183,12 +183,6 @@ {include file='multipleLanguageInputJavascript' elementIdentifier='menuItemLink' forceSelection=false} - -
-
- -
-
diff --git a/wcfsetup/install/files/lib/acp/form/PageMenuItemAddForm.class.php b/wcfsetup/install/files/lib/acp/form/PageMenuItemAddForm.class.php index 43bbc1a704..54d21f3dd5 100644 --- a/wcfsetup/install/files/lib/acp/form/PageMenuItemAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PageMenuItemAddForm.class.php @@ -71,12 +71,6 @@ class PageMenuItemAddForm extends ACPForm { */ public $neededPermissions = array('admin.display.canManagePageMenu'); - /** - * open link in new window - * @var boolean - */ - public $newWindow = false; - /** * page menu item name * @var string @@ -140,7 +134,6 @@ class PageMenuItemAddForm extends ACPForm { if (isset($_POST['isLandingPage'])) $this->isLandingPage = true; if (isset($_POST['menuItemController'])) $this->menuItemController = StringUtil::trim($_POST['menuItemController']); if (isset($_POST['menuPosition'])) $this->menuPosition = StringUtil::trim($_POST['menuPosition']); - if (isset($_POST['newWindow'])) $this->newWindow = true; if (isset($_POST['parentMenuItem'])) $this->parentMenuItem = StringUtil::trim($_POST['parentMenuItem']); if (isset($_POST['showOrder'])) $this->showOrder = intval($_POST['showOrder']); } @@ -228,7 +221,6 @@ class PageMenuItemAddForm extends ACPForm { 'menuItemController' => $this->menuItemController, 'menuItemLink' => $this->menuItemLink, 'menuPosition' => $this->menuPosition, - 'newWindow' => ($this->newWindow) ? 1 : 0, 'parentMenuItem' => $this->parentMenuItem, 'showOrder' => $this->showOrder ))); @@ -257,7 +249,7 @@ class PageMenuItemAddForm extends ACPForm { WCF::getTPL()->assign('success', true); // reset variables - $this->isDisabled = $this->isInternalLink = $this->isLandingPage = $this->newWindow = false; + $this->isDisabled = $this->isInternalLink = $this->isLandingPage = false; $this->menuPosition = 'header'; $this->menuItemController = $this->menuItemLink = $this->pageMenuItem = $this->parentMenuItem = ''; $this->showOrder = 0; @@ -285,7 +277,6 @@ class PageMenuItemAddForm extends ACPForm { 'menuItemController' => $this->menuItemController, 'menuItemLink' => $this->menuItemLink, 'menuPosition' => $this->menuPosition, - 'newWindow' => $this->newWindow, 'pageMenuItem' => $this->pageMenuItem, 'parentMenuItem' => $this->parentMenuItem, 'showOrder' => $this->showOrder diff --git a/wcfsetup/install/files/lib/acp/form/PageMenuItemEditForm.class.php b/wcfsetup/install/files/lib/acp/form/PageMenuItemEditForm.class.php index 5893bd2663..0699c7362d 100644 --- a/wcfsetup/install/files/lib/acp/form/PageMenuItemEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PageMenuItemEditForm.class.php @@ -73,7 +73,6 @@ class PageMenuItemEditForm extends PageMenuItemAddForm { $this->menuItemController = $this->menuItem->menuItemController; $this->menuItemLink = $this->menuItem->menuItemLink; $this->menuPosition = $this->menuItem->menuPosition; - $this->newWindow = ($this->menuItem->newWindow) ? true : false; $this->pageMenuItem = $this->menuItem->menuItem; $this->parentMenuItem = $this->menuItem->parentMenuItem; $this->showOrder = $this->menuItem->showOrder; @@ -105,7 +104,6 @@ class PageMenuItemEditForm extends PageMenuItemAddForm { 'isLandingPage' => ($this->isLandingPage) ? 1 : 0, 'menuItemController' => $this->menuItemController, 'menuItemLink' => $this->menuItemLink, - 'newWindow' => ($this->newWindow) ? 1 : 0, 'parentMenuItem' => ($this->menuItem->menuPosition == 'header' ? $this->parentMenuItem : ''), 'showOrder' => $this->showOrder ))); diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index a22e993d74..cc5ef45a12 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -438,7 +438,6 @@ - diff --git a/wcfsetup/setup/db/install.sql b/wcfsetup/setup/db/install.sql index 928a6263db..f2866cb8fb 100644 --- a/wcfsetup/setup/db/install.sql +++ b/wcfsetup/setup/db/install.sql @@ -479,7 +479,6 @@ CREATE TABLE wcf1_page_menu_item ( isDisabled TINYINT(1) NOT NULL DEFAULT 0, className VARCHAR(255) NOT NULL DEFAULT '', isLandingPage TINYINT(1) NOT NULL DEFAULT 0, - newWindow TINYINT(1) NOT NULL DEFAULT 0, UNIQUE KEY (packageID, menuItem) ); -- 2.20.1