Removed option import/export
authorAlexander Ebert <ebert@woltlab.com>
Sun, 18 Oct 2015 16:28:14 +0000 (18:28 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 18 Oct 2015 16:28:14 +0000 (18:28 +0200)
com.woltlab.wcf/acpMenu.xml
wcfsetup/install/files/acp/templates/optionImport.tpl [deleted file]
wcfsetup/install/files/lib/acp/action/OptionExportAction.class.php [deleted file]
wcfsetup/install/files/lib/acp/form/OptionImportForm.class.php [deleted file]
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 9ad6cf51058c9b4816692538a7e4166e4b682fe4..6771881814c09bac75d01c7eca42990d7f5bebb0 100644 (file)
                        <parent>wcf.acp.menu.link.option</parent>
                        <showorder>2</showorder>
                </acpmenuitem>
-               
-               <acpmenuitem name="wcf.acp.menu.link.option.importAndExport">
-                       <parent>wcf.acp.menu.link.option.management</parent>
-                       <controller><![CDATA[wcf\acp\form\OptionImportForm]]></controller>
-               </acpmenuitem>
                <!-- /options -->
                
                <!-- packages -->
diff --git a/wcfsetup/install/files/acp/templates/optionImport.tpl b/wcfsetup/install/files/acp/templates/optionImport.tpl
deleted file mode 100644 (file)
index 3a6d915..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-{include file='header' pageTitle='wcf.acp.option.import'}
-
-<header class="boxHeadline">
-       <h1>{lang}wcf.acp.option.import{/lang}</h1>
-</header>
-
-{include file='formError'}
-
-{if $success|isset}
-       <p class="success">{lang}wcf.acp.option.import.success{/lang}</p>
-{/if}
-
-<div class="contentNavigation">
-       {hascontent}
-               <nav>
-                       <ul>
-                               {content}
-                                       {event name='contentNavigationButtons'}
-                               {/content}
-                       </ul>
-               </nav>
-       {/hascontent}
-</div>
-
-<form method="post" action="{link controller='OptionImport'}{/link}" enctype="multipart/form-data">
-       <div class="container containerPadding marginTop">
-               <fieldset>
-                       <legend>{lang}wcf.acp.option.import{/lang}</legend>
-                       
-                       <dl{if $errorField == 'optionImport'} class="formError"{/if}>
-                               <dt><label for="optionImport">{lang}wcf.acp.option.import.upload{/lang}</label></dt>
-                               <dd>
-                                       <input type="file" id="optionImport" name="optionImport" value="" />
-                                       {if $errorField == 'optionImport'}
-                                               <small class="innerError">
-                                                       {if $errorType == 'empty'}
-                                                               {lang}wcf.global.form.error.empty{/lang}
-                                                       {else}
-                                                               {lang}wcf.acp.option.import.error.{@$errorType}{/lang}
-                                                       {/if}
-                                               </small>
-                                       {/if}
-                                       <small>{lang}wcf.acp.option.import.upload.description{/lang}</small>
-                               </dd>
-                       </dl>
-                       
-                       {event name='importFields'}
-               </fieldset>
-               
-               {event name='importFieldsets'}
-       </div>
-       
-       <div class="formSubmit">
-               <input type="submit" name="submitButton" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
-               {@SECURITY_TOKEN_INPUT_TAG}
-       </div>
-</form>
-
-<header class="boxHeadline">
-       <h1>{lang}wcf.acp.option.export{/lang}</h1>
-</header>
-
-<div class="container containerPadding marginTop">
-       <fieldset>
-               <legend>{lang}wcf.acp.option.export{/lang}</legend>
-               
-               <dl id="optionExportDiv">
-                       <dt><label>{lang}wcf.acp.option.export.download{/lang}</label></dt>
-                       <dd>
-                               <p><a href="{link controller='OptionExport'}{/link}" id="optionExport" class="button">{lang}wcf.acp.option.export{/lang}</a></p>
-                               <small>{lang}wcf.acp.option.export.download.description{/lang}</small>
-                       </dd>
-               </dl>
-               
-               {event name='exportFields'}
-       </fieldset>
-       
-       {event name='exportFieldsets'}
-</div>
-
-{include file='footer'}
diff --git a/wcfsetup/install/files/lib/acp/action/OptionExportAction.class.php b/wcfsetup/install/files/lib/acp/action/OptionExportAction.class.php
deleted file mode 100644 (file)
index bb107ba..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace wcf\acp\action;
-use wcf\action\AbstractAction;
-use wcf\data\option\Option;
-use wcf\util\StringUtil;
-
-/**
- * Exports the options to an XML.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf
- * @subpackage acp.action
- * @category   Community Framework
- */
-class OptionExportAction extends AbstractAction {
-       /**
-        * @see \wcf\action\AbstractAction::$neededPermissions
-        */
-       public $neededPermissions = array('admin.system.canEditOption');
-       
-       /**
-        * @see \wcf\action\IAction::execute();
-        */
-       public function execute() {
-               parent::execute();
-               
-               // header
-               @header('Content-type: text/xml');
-               
-               // file name
-               @header('Content-disposition: attachment; filename="options.xml"');
-                       
-               // no cache headers
-               @header('Pragma: no-cache');
-               @header('Expires: 0');
-               
-               // content
-               echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<options>\n";
-               
-               $options = Option::getOptions();
-               foreach ($options as $option) {
-                       if ($option->hidden) continue; // ignore hidden options
-                       
-                       echo "\t<option>\n";
-                       echo "\t\t<name><![CDATA[".StringUtil::escapeCDATA($option->optionName)."]]></name>\n";
-                       echo "\t\t<value><![CDATA[".StringUtil::escapeCDATA($option->optionValue)."]]></value>\n";
-                       echo "\t</option>\n";
-               }
-               
-               echo '</options>';
-               $this->executed();
-               exit;
-       }
-}
diff --git a/wcfsetup/install/files/lib/acp/form/OptionImportForm.class.php b/wcfsetup/install/files/lib/acp/form/OptionImportForm.class.php
deleted file mode 100755 (executable)
index f331204..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-namespace wcf\acp\form;
-use wcf\data\option\OptionAction;
-use wcf\form\AbstractForm;
-use wcf\system\exception\SystemException;
-use wcf\system\exception\UserInputException;
-use wcf\system\WCF;
-use wcf\system\WCFACP;
-use wcf\util\XML;
-
-/**
- * Shows the option import form.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf
- * @subpackage acp.form
- * @category   Community Framework
- */
-class OptionImportForm extends AbstractForm {
-       /**
-        * @see \wcf\page\AbstractPage::$activeMenuItem
-        */
-       public $activeMenuItem = 'wcf.acp.menu.link.option.importAndExport';
-       
-       /**
-        * @see \wcf\page\AbstractPage::$neededPermissions
-        */
-       public $neededPermissions = array('admin.system.canEditOption');
-       
-       /**
-        * upload file data
-        * @var array
-        */
-       public $optionImport = null;
-       
-       /**
-        * list of options
-        * @var array
-        */
-       public $options = array();
-       
-       /**
-        * @see \wcf\form\IForm::readFormParameters()
-        */
-       public function readFormParameters() {
-               parent::readFormParameters();
-               
-               if (isset($_FILES['optionImport'])) $this->optionImport = $_FILES['optionImport'];
-       }
-       
-       /**
-        * @see \wcf\form\IForm::validate()
-        */
-       public function validate() {
-               parent::validate();
-               
-               // upload
-               if ($this->optionImport && $this->optionImport['error'] != 4) {
-                       if ($this->optionImport['error'] != 0) {
-                               throw new UserInputException('optionImport', 'uploadFailed');
-                       }
-                       
-                       try {
-                               $xml = new XML();
-                               $xml->load($this->optionImport['tmp_name']);
-                               $xpath = $xml->xpath();
-                               foreach ($xpath->query('/options/option') as $option) {
-                                       $this->options[$xpath->query('name', $option)->item(0)->nodeValue] = $xpath->query('value', $option)->item(0)->nodeValue;
-                               }
-                       }
-                       catch (SystemException $e) {
-                               throw new UserInputException('optionImport', 'importFailed');
-                       }
-               }
-               else {
-                       throw new UserInputException('optionImport');
-               }
-       }
-       
-       /**
-        * @see \wcf\form\IForm::save()
-        */
-       public function save() {
-               parent::save();
-               
-               // save
-               $this->objectAction = new OptionAction(array(), 'import', array('data' => $this->options));
-               $this->objectAction->executeAction();
-               $this->saved();
-               
-               // show success message
-               WCF::getTPL()->assign('success', true);
-       }
-       
-       /**
-        * @see \wcf\page\IPage::show()
-        */
-       public function show() {
-               // check master password
-               WCFACP::checkMasterPassword();
-               
-               parent::show();
-       }
-}
index 75230e1a9aaac0e53644843bb2883b8ab1a398da..d42232bfd0cbbd81ae733e417dd6dc3bbe297e7b 100644 (file)
                <item name="wcf.acp.option.error.controllerReplacementUnknown"><![CDATA[Der Controller „{$urlControllerReplacementError}“ ist unbekannt.]]></item>
                <item name="wcf.acp.option.error.tooHigh"><![CDATA[Der angegebene Wert ist zu hoch.{if $option->maxvalue !== null} Der maximale Wert ist {#$option->maxvalue}.{/if}]]></item>
                <item name="wcf.acp.option.error.tooLow"><![CDATA[Der angegebene Wert ist zu gering.{if $option->minvalue !== null} Der minimale Wert ist {#$option->minvalue}.{/if}]]></item>
-               <item name="wcf.acp.option.export"><![CDATA[Optionen sichern]]></item>
-               <item name="wcf.acp.option.export.download"><![CDATA[Sicherung der Optionen herunterladen]]></item>
-               <item name="wcf.acp.option.export.download.description"><![CDATA[Laden Sie eine Sicherung der Optionen auf Ihren lokalen Rechner herunter.]]></item>
                <item name="wcf.acp.option.http_enable_gzip"><![CDATA[Gzip-Komprimierung aktivieren]]></item>
                <item name="wcf.acp.option.http_enable_gzip.description"><![CDATA[Aktiviert die Komprimierung der Inhalte bei der Übertragung vom Server an den Client. Dies reduziert den Traffic und kann den Ladevorgang erheblich beschleunigen.]]></item>
                <item name="wcf.acp.option.http_enable_no_cache_headers"><![CDATA[Seitencaching im Client-Browser verhindern]]></item>
                <item name="wcf.acp.option.image_adapter_type.gd"><![CDATA[GD Graphics Library (Standard)]]></item>
                <item name="wcf.acp.option.image_adapter_type.imagick"><![CDATA[ImageMagick]]></item>
                <item name="wcf.acp.option.image_adapter_type.description"><![CDATA[Bibliothek für die Generierung von Grafiken, wird z.B. für die Skalierung von hochgeladenen Bildern verwendet. „ImageMagick“ ist in der Regel deutlich schneller, steht aber nicht auf jedem Server zur Verfügung.]]></item>
-               <item name="wcf.acp.option.import"><![CDATA[Optionen importieren]]></item>
-               <item name="wcf.acp.option.import.error.importFailed"><![CDATA[Die Optionen konnten nicht erfolgreich importiert werden.]]></item>
-               <item name="wcf.acp.option.import.success"><![CDATA[Die Optionen wurden erfolgreich importiert.]]></item>
-               <item name="wcf.acp.option.import.upload"><![CDATA[Sicherung der Optionen vom lokalen Computer hochladen]]></item>
-               <item name="wcf.acp.option.import.upload.description"><![CDATA[Wählen Sie eine Sicherung der Optionen von Ihrem lokalen Rechner aus.]]></item>
-               <item name="wcf.acp.option.importAndExport"><![CDATA[Optionen sichern &amp; wiederherstellen]]></item>
                <item name="wcf.acp.option.log_ip_address"><![CDATA[Speicherung von IP-Adressen]]></item>
                <item name="wcf.acp.option.log_ip_address.description"><![CDATA[Aktiviert die Speicherung von IP-Adressen der Benutzer in z.B. Sitzungen, Benutzerprofilen, Forenbeiträgen.]]></item>
                <item name="wcf.acp.option.mail_admin_address"><![CDATA[Administrator-Adresse]]></item>
index 00c469f166f99c275cefbe9e76fafbdbcb1f31d8..40e0abe87b6d3278746e6ba1b2cba843ef3875cc 100644 (file)
@@ -751,9 +751,6 @@ Examples for medium ID detection:
                <item name="wcf.acp.option.error.controllerReplacementUnknown"><![CDATA[The controller “{$urlControllerReplacementError}” is unknown.]]></item>
                <item name="wcf.acp.option.error.tooHigh"><![CDATA[Exceeds the maximum value{if $option->maxvalue !== null} of {#$option->maxvalue}{/if}.]]></item>
                <item name="wcf.acp.option.error.tooLow"><![CDATA[Below the minimum value{if $option->minvalue !== null} of {#$option->minvalue}{/if}.]]></item>
-               <item name="wcf.acp.option.export"><![CDATA[Download Options]]></item>
-               <item name="wcf.acp.option.export.download"><![CDATA[Download Options]]></item>
-               <item name="wcf.acp.option.export.download.description"><![CDATA[Downloads a backup of the configuration settings to your local machine. This is not a replacement for a backup!]]></item>
                <item name="wcf.acp.option.http_enable_gzip"><![CDATA[Enable gzip-compression]]></item>
                <item name="wcf.acp.option.http_enable_gzip.description"><![CDATA[Compresses content transferred to users, reduces traffic and page load time. Does not affect files, e.g. images.]]></item>
                <item name="wcf.acp.option.http_enable_no_cache_headers"><![CDATA[Prevent browser-caching]]></item>
@@ -764,12 +761,6 @@ Examples for medium ID detection:
                <item name="wcf.acp.option.image_adapter_type.gd"><![CDATA[GD Graphics Library (default)]]></item>
                <item name="wcf.acp.option.image_adapter_type.imagick"><![CDATA[ImageMagick]]></item>
                <item name="wcf.acp.option.image_adapter_type.description"><![CDATA[Library used for image processing, e.g. scaling uploaded images. “ImageMagick” is a lot faster, but is not available on every machine.]]></item>
-               <item name="wcf.acp.option.import"><![CDATA[Restore Options]]></item>
-               <item name="wcf.acp.option.import.error.importFailed"><![CDATA[Unable to restore options.]]></item>
-               <item name="wcf.acp.option.import.success"><![CDATA[Options have been restored.]]></item>
-               <item name="wcf.acp.option.import.upload"><![CDATA[Upload Options]]></item>
-               <item name="wcf.acp.option.import.upload.description"><![CDATA[Upload previously downloaded options file.]]></item>
-               <item name="wcf.acp.option.importAndExport"><![CDATA[Save &amp; Restore Options]]></item>
                <item name="wcf.acp.option.log_ip_address"><![CDATA[Store IP addresses]]></item>
                <item name="wcf.acp.option.log_ip_address.description"><![CDATA[Stores IP addresses for user-generated content, e.g. sessions, profiles or forum posts.]]></item>
                <item name="wcf.acp.option.mail_admin_address"><![CDATA[Administrator]]></item>