From 8a818016e035ed9524b0297cafd2b7be10b9ff3a Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Thu, 28 Jul 2011 14:27:15 +0200 Subject: [PATCH] Fixed update server property serverURL In several cases $updateServer->server was used instead of $updateServer->serverURL. Also changed the related variable and language variable names. --- .../files/acp/templates/updateServerAdd.tpl | 16 +++---- .../files/acp/templates/updateServerList.tpl | 44 ++++++++++++------- .../acp/form/UpdateServerAddForm.class.php | 18 ++++---- wcfsetup/install/lang/de-informal.xml | 6 +-- wcfsetup/install/lang/de.xml | 6 +-- wcfsetup/install/lang/en.xml | 6 +-- 6 files changed, 55 insertions(+), 41 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/updateServerAdd.tpl b/wcfsetup/install/files/acp/templates/updateServerAdd.tpl index fee2cb51fe..0dfba92e30 100644 --- a/wcfsetup/install/files/acp/templates/updateServerAdd.tpl +++ b/wcfsetup/install/files/acp/templates/updateServerAdd.tpl @@ -31,25 +31,25 @@
{lang}wcf.acp.updateServer.data{/lang} -
+
- +
- - {if $errorField == 'server'} + + {if $errorField == 'serverURL'}

{if $errorType == 'empty'}{lang}wcf.global.error.empty{/lang}{/if} - {if $errorType == 'notValid'}{lang}wcf.acp.updateServer.server.error.notValid{/lang}{/if} + {if $errorType == 'notValid'}{lang}wcf.acp.updateServer.serverURL.error.notValid{/lang}{/if}

{/if}
-
diff --git a/wcfsetup/install/files/acp/templates/updateServerList.tpl b/wcfsetup/install/files/acp/templates/updateServerList.tpl index ae0d4916b4..603f71f6e0 100644 --- a/wcfsetup/install/files/acp/templates/updateServerList.tpl +++ b/wcfsetup/install/files/acp/templates/updateServerList.tpl @@ -40,32 +40,46 @@ - - - - - - + + + + + + {if $additionalHeadColumns|isset}{@$additionalHeadColumns}{/if} {foreach from=$updateServers item=updateServer} - + - - - - - - + + + + + + {if $additionalColumns[$updateServer->packageUpdateServerID]|isset}{@$additionalColumns[$updateServer->packageUpdateServerID]}{/if} diff --git a/wcfsetup/install/files/lib/acp/form/UpdateServerAddForm.class.php b/wcfsetup/install/files/lib/acp/form/UpdateServerAddForm.class.php index c219e8e687..cbee0d7e9a 100755 --- a/wcfsetup/install/files/lib/acp/form/UpdateServerAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UpdateServerAddForm.class.php @@ -37,7 +37,7 @@ class UpdateServerAddForm extends ACPForm { * server url * @var string */ - public $server = ''; + public $serverURL = ''; /** * server login username @@ -57,7 +57,7 @@ class UpdateServerAddForm extends ACPForm { public function readFormParameters() { parent::readFormParameters(); - if (isset($_POST['server'])) $this->server = StringUtil::trim($_POST['server']); + if (isset($_POST['serverURL'])) $this->serverURL = StringUtil::trim($_POST['serverURL']); if (isset($_POST['loginUsername'])) $this->loginUsername = $_POST['loginUsername']; if (isset($_POST['loginPassword'])) $this->loginPassword = $_POST['loginPassword']; } @@ -68,12 +68,12 @@ class UpdateServerAddForm extends ACPForm { public function validate() { parent::validate(); - if (empty($this->server)) { - throw new UserInputException('server'); + if (empty($this->serverURL)) { + throw new UserInputException('serverURL'); } - if (!PackageUpdateServer::isValidServerURL($this->server)) { - throw new UserInputException('server', 'notValid'); + if (!PackageUpdateServer::isValidServerURL($this->serverURL)) { + throw new UserInputException('serverURL', 'notValid'); } } @@ -85,7 +85,7 @@ class UpdateServerAddForm extends ACPForm { // save server $updateServerAction = new PackageUpdateServerAction(array(), 'create', array('data' => array( - 'server' => $this->server, + 'serverURL' => $this->serverURL, 'loginUsername' => $this->loginUsername, 'loginPassword' => $this->loginPassword ))); @@ -93,7 +93,7 @@ class UpdateServerAddForm extends ACPForm { $this->saved(); // reset values - $this->server = $this->loginUsername = $this->loginPassword = ''; + $this->serverURL = $this->loginUsername = $this->loginPassword = ''; // show success message WCF::getTPL()->assign('success', true); @@ -106,7 +106,7 @@ class UpdateServerAddForm extends ACPForm { parent::assignVariables(); WCF::getTPL()->assign(array( - 'server' => $this->server, + 'serverURL' => $this->serverURL, 'loginUsername' => $this->loginUsername, 'loginPassword' => $this->loginPassword, 'action' => 'add' diff --git a/wcfsetup/install/lang/de-informal.xml b/wcfsetup/install/lang/de-informal.xml index 916f48dddd..d5753cba00 100644 --- a/wcfsetup/install/lang/de-informal.xml +++ b/wcfsetup/install/lang/de-informal.xml @@ -637,9 +637,9 @@ - - - + + + diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index e0cd7f3c27..e2937f2bfb 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -628,9 +628,9 @@ - - - + + + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 877c1f72c8..8840e62940 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -638,9 +638,9 @@ - - - + + + -- 2.20.1

{lang}wcf.acp.updateServer.packageUpdateServerID{/lang}{if $sortField == 'packageUpdateServerID'} {/if}

{lang}wcf.acp.updateServer.server{/lang}{if $sortField == 'server'} {/if}

{lang}wcf.acp.updateServer.packages{/lang}{if $sortField == 'packages'} {/if}

{lang}wcf.acp.updateServer.status{/lang}{if $sortField == 'status'} {/if}

{lang}wcf.acp.updateServer.errorMessage{/lang}{if $sortField == 'errorMessage'} {/if}

{lang}wcf.acp.updateServer.lastUpdateTime{/lang}{if $sortField == 'lastUpdateTime'} {/if}

- + - + {if $additionalButtons[$updateServer->packageUpdateServerID]|isset}{@$additionalButtons[$updateServer->packageUpdateServerID]}{/if}

{@$updateServer->packageUpdateServerID}

{@$updateServer->serverURL}

{#$updateServer->packages}

{@$updateServer->status}

{@$updateServer->errorMessage|truncate:"30"}

{if $updateServer->lastUpdateTime}{@$updateServer->lastUpdateTime|time}{/if}

{@$updateServer->packageUpdateServerID} + + {@$updateServer->serverURL} + + + {#$updateServer->packages} + + {@$updateServer->status} + +
+ {@$updateServer->errorMessage|truncate:"30"} +
+
+ {if $updateServer->lastUpdateTime}{@$updateServer->lastUpdateTime|time}{/if} +