Resolved some TODOs and removed 'Did you know'
authorAlexander Ebert <ebert@woltlab.com>
Fri, 12 Apr 2013 21:18:16 +0000 (23:18 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 12 Apr 2013 21:18:16 +0000 (23:18 +0200)
wcfsetup/install/files/acp/templates/index.tpl
wcfsetup/install/files/lib/acp/form/LoginForm.class.php
wcfsetup/install/files/lib/acp/form/PackageUpdateAuthForm.class.php
wcfsetup/install/files/lib/acp/page/IndexPage.class.php
wcfsetup/install/files/lib/data/page/menu/item/PageMenuItemEditor.class.php

index 2a64e96c357dafcd78c31c4c7218869a9b4b0c00..ba0dc0f7268a8169fd50b3ccf9d367f55fe25a1f 100644 (file)
        }
 </style>
 
-{if $didYouKnow !== ''}
-       <p class="info">{lang}wcf.acp.index.didYouKnow{/lang}: {@$didYouKnow|language}</p>
-{/if}
-
 <p class="{@$health}">{lang}wcf.acp.index.health.summary.{@$health}{/lang}</p>
 
 {event name='boxes'}
index 5e03f77180da416771b507fd3443257c0947afe0..c6cf6321eced119943becf51b1ea0c119d6ff0f5 100755 (executable)
@@ -15,7 +15,7 @@ use wcf\util\StringUtil;
  * Shows the acp login form.
  * 
  * @author     Marcel Werk
- * @copyright  2001-2012 WoltLab GmbH
+ * @copyright  2001-2013 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @package    com.woltlab.wcf
  * @subpackage acp.form
@@ -84,19 +84,13 @@ class LoginForm extends AbstractForm {
                        $this->user = UserAuthenticationFactory::getInstance()->getUserAuthentication()->loginManually($this->username, $this->password);
                }
                catch (UserInputException $e) {
-                       // TODO: create an option for the authentication with email address
-                       if (true) {
-                               if ($e->getField() == 'username') {
-                                       try {
-                                               $this->user = EmailUserAuthentication::getInstance()->loginManually($this->username, $this->password);
-                                       }
-                                       catch (UserInputException $e2) {
-                                               if ($e2->getField() == 'username') throw $e;
-                                               throw $e2;
-                                       }
+                       if ($e->getField() == 'username') {
+                               try {
+                                       $this->user = EmailUserAuthentication::getInstance()->loginManually($this->username, $this->password);
                                }
-                               else {
-                                       throw $e;
+                               catch (UserInputException $e2) {
+                                       if ($e2->getField() == 'username') throw $e;
+                                       throw $e2;
                                }
                        }
                        else {
index 49e53212f19d6ce1264fb473138644f05d5265b9..420a3d13e20a20bbd261cc065b7bedbce63f5bda 100755 (executable)
@@ -134,7 +134,7 @@ class PackageUpdateAuthForm extends AbstractForm {
        }
        
        /**
-        * @todo        This whole page is carzy, it's manipulating the requested page, but RequestHandler does not work this way
+        * @todo        This whole page is crazy, it's manipulating the requested page, but RequestHandler does not work this way
         * @see wcf\page\IPage::readParameters()
         */
        public function readParameters() {
index b8e1752e5ef0a918d553119b39eecde41914e4e3..e03c50324a1fb474ba0ec71889d11b1fabbbded8 100755 (executable)
@@ -13,19 +13,13 @@ use wcf\system\WCF;
  * Shows the welcome page in admin control panel.
  * 
  * @author     Marcel Werk
- * @copyright  2001-2012 WoltLab GmbH
+ * @copyright  2001-2013 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @package    com.woltlab.wcf
  * @subpackage acp.page
  * @category   Community Framework
  */
 class IndexPage extends AbstractPage {
-       /**
-        * did you know language item
-        * @var string
-        */
-       public $didYouKnow = '';
-       
        /**
         * health status data
         * @var array
@@ -44,7 +38,6 @@ class IndexPage extends AbstractPage {
                else if (!empty($this->healthDetails['info'])) $health = 'info';
                
                WCF::getTPL()->assign(array(
-                       'didYouKnow' => $this->didYouKnow,
                        'health' => $health,
                        'healthDetails' => $this->healthDetails
                ));
@@ -116,15 +109,6 @@ class IndexPage extends AbstractPage {
                parent::readData();
                
                $this->calculateHealth();
-               
-               $sql = "SELECT          languageItem
-                       FROM            wcf".WCF_N."_language_item
-                       WHERE           languageCategoryID = ?
-                       ORDER BY        ".(WCF::getDB()->getDBType() == 'wcf\system\database\PostgreSQLDatabase' ? 'RANDOM()' : 'RAND()');
-               $statement = WCF::getDB()->prepareStatement($sql, 1);
-               // TODO: Change category
-               $statement->execute(array(LanguageFactory::getInstance()->getCategory('wcf.global')->languageCategoryID));
-               $this->didYouKnow = $statement->fetchColumn();
        }
        
        /**
index ffbed894d64f819f09c28ee058476030653dc643..5e834d69107e2725628a3c12818cb550c631a5c3 100644 (file)
@@ -23,8 +23,6 @@ class PageMenuItemEditor extends DatabaseObjectEditor implements IEditableCached
        
        /**
         * @see wcf\data\IEditableObject::create()
-        * 
-        * @todo Handle language id and create related language item
         */
        public static function create(array $parameters = array()) {
                // calculate show order
@@ -33,16 +31,6 @@ class PageMenuItemEditor extends DatabaseObjectEditor implements IEditableCached
                return parent::create($parameters);
        }
        
-       /**
-        * @see wcf\data\IEditableObject::update()
-        * 
-        * @todo Handle language id and update related language item
-        */
-       public function update(array $parameters = array()) {
-               1 == 0; // TODO: fix me (avoid sniffing error)
-               parent::update($parameters);
-       }
-       
        /**
         * @see wcf\data\IEditableObject::delete()
         */