}
</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'}
* 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
$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 {
}
/**
- * @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() {
* 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
else if (!empty($this->healthDetails['info'])) $health = 'info';
WCF::getTPL()->assign(array(
- 'didYouKnow' => $this->didYouKnow,
'health' => $health,
'healthDetails' => $this->healthDetails
));
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();
}
/**
/**
* @see wcf\data\IEditableObject::create()
- *
- * @todo Handle language id and create related language item
*/
public static function create(array $parameters = array()) {
// calculate show order
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()
*/