diff --git a/system/functions.php b/system/functions.php
index 89d0b860..085fa57a 100644
--- a/system/functions.php
+++ b/system/functions.php
@@ -565,7 +565,7 @@ function getCreatureName($killer, $showStatus = false, $extendedInfo = false)
if(!$showStatus)
return $str.''.$player->getName().'';
- $str .= '' . $player->getName() . '';
+ $str .= '' . $player->getName() . '';
if($extendedInfo) {
$str .= ' '.$player->getLevel().' '.$player->getVocationName().'';
}
@@ -684,25 +684,25 @@ function superAdmin() {
*
* @param int $exp Experience amount.
* @param bool $color Should result be colorized?
- * @return string Resulted message attached in tag.
+ * @return string Resulted message attached in tag.
*/
function formatExperience($exp, $color = true)
{
$ret = '';
if($color)
{
- $ret .= ' 0)
- $ret .= ' color="green">';
- elseif($exp < 0)
- $ret .= ' color="red">';
- else
+ $ret .= ' 0 ? 'green' : 'red') . '">';
+ }
+ else {
$ret .= '>';
+ }
}
$ret .= '' . ($exp > 0 ? '+' : '') . number_format($exp) . '';
if($color)
- $ret .= '';
+ $ret .= '';
return $ret;
}
diff --git a/system/libs/forum.php b/system/libs/forum.php
index bbda1481..7a15cacd 100644
--- a/system/libs/forum.php
+++ b/system/libs/forum.php
@@ -15,24 +15,24 @@ class Forum
static public function canPost($account)
{
global $db, $config;
-
+
if(!$account->isLoaded() || $account->isBanned())
return false;
-
+
if(self::isModerator())
return true;
-
+
return
$db->query(
'SELECT `id` FROM `players` WHERE `account_id` = ' . $db->quote($account->getId()) .
' AND `level` >= ' . $db->quote($config['forum_level_required']) .
' LIMIT 1')->rowCount() > 0;
}
-
+
static public function isModerator() {
return hasFlag(FLAG_CONTENT_FORUM) || superAdmin();
}
-
+
static public function add_thread($title, $body, $section_id, $player_id, $account_id, &$errors)
{
global $db;
@@ -54,10 +54,10 @@ class Forum
$thread_id = $db->lastInsertId();
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `first_post`=".(int) $thread_id." WHERE `id` = ".(int) $thread_id);
}
-
+
return $thread_id;
}
-
+
static public function add_post($thread_id, $section, $author_aid, $author_guid, $post_text, $post_topic, $smile, $html)
{
global $db;
@@ -80,7 +80,7 @@ class Forum
if(isset($name[0]) && isset($description[0]))
{
$query = $db->select(TABLE_PREFIX . 'forum_boards', array('name' => $name));
-
+
if($query === false)
{
$query =
@@ -89,7 +89,7 @@ class Forum
' FROM ' . $db->tableName(TABLE_PREFIX . 'forum_boards') .
' ORDER BY ' . $db->fieldName('ordering') . ' DESC LIMIT 1'
);
-
+
$ordering = 0;
if($query->rowCount() > 0) {
$query = $query->fetch();
@@ -102,20 +102,20 @@ class Forum
}
else
$errors[] = 'Please fill all inputs.';
-
+
return !count($errors);
}
-
+
static public function get_board($id) {
global $db;
return $db->select(TABLE_PREFIX . 'forum_boards', array('id' => $id));
}
-
+
static public function update_board($id, $name, $access, $guild, $description) {
global $db;
$db->update(TABLE_PREFIX . 'forum_boards', array('name' => $name, 'description' => $description, 'access' => $access, 'guild' => $guild), array('id' => $id));
}
-
+
static public function delete_board($id, &$errors)
{
global $db;
@@ -128,10 +128,10 @@ class Forum
}
else
$errors[] = 'id not set';
-
+
return !count($errors);
}
-
+
static public function toggleHidden_board($id, &$errors)
{
global $db;
@@ -145,10 +145,10 @@ class Forum
}
else
$errors[] = 'id not set';
-
+
return !count($errors);
}
-
+
static public function move_board($id, $i, &$errors)
{
global $db;
@@ -159,15 +159,15 @@ class Forum
$old_record = $db->select(TABLE_PREFIX . 'forum_boards', array('ordering' => $ordering));
if($old_record !== false)
$db->update(TABLE_PREFIX . 'forum_boards', array('ordering' => $query['ordering']), array('ordering' => $ordering));
-
+
$db->update(TABLE_PREFIX . 'forum_boards', array('ordering' => $ordering), array('id' => $id));
}
else
$errors[] = 'Forum board with id ' . $id . ' does not exists.';
-
+
return !count($errors);
}
-
+
public static function parseSmiles($text)
{
$smileys = array(
@@ -192,13 +192,13 @@ class Forum
':d' => 9,
';)' => 10
);
-
+
foreach($smileys as $search => $replace)
$text = str_replace($search, '', $text);
-
+
return $text;
}
-
+
public static function parseBBCode($text, $smiles)
{
$rows = 0;
@@ -221,20 +221,20 @@ class Forum
$url = substr($text, stripos($text, '[url]')+5, stripos($text, '[/url]') - stripos($text, '[url]') - 5);
$text = str_ireplace('[url]'.$url.'[/url]', ''.$url.'', $text);
}
-
+
$xhtml = false;
$tags = array(
'#\[b\](.*?)\[/b\]#si' => ($xhtml ? '\\1' : '\\1'),
'#\[i\](.*?)\[/i\]#si' => ($xhtml ? '\\1' : '\\1'),
'#\[u\](.*?)\[/u\]#si' => ($xhtml ? '\\1' : '\\1'),
'#\[s\](.*?)\[/s\]#si' => ($xhtml ? '\\1' : '\\1'),
-
+
'#\[guild\](.*?)\[/guild\]#si' => urldecode(generateLink(getGuildLink('$1', false), '$1', true)),
'#\[house\](.*?)\[/house\]#si' => urldecode(generateLink(getHouseLink('$1', false), '$1', true)),
'#\[player\](.*?)\[/player\]#si' => urldecode(generateLink(getPlayerLink('$1', false), '$1', true)),
// TODO: [poll] tag
-
- '#\[color=(.*?)\](.*?)\[/color\]#si' => ($xhtml ? '\\2' : '\\2'),
+
+ '#\[color=(.*?)\](.*?)\[/color\]#si' => ($xhtml ? '\\2' : '\\2'),
'#\[img\](.*?)\[/img\]#si' => ($xhtml ? '' : ''),
'#\[url=(.*?)\](.*?)\[/url\]#si' => '\\2',
// '#\[email\](.*?)\[/email\]#si' => '\\1',
@@ -242,13 +242,13 @@ class Forum
// '#\[align=(.*?)\](.*?)\[/align\]#si' => ($xhtml ? '
\\2
' : '
\\2
'),
// '#\[br\]#si' => ($xhtml ? ' ' : ' '),
);
-
+
foreach($tags as $search => $replace)
$text = preg_replace($search, $replace, $text);
-
+
return ($smiles ? Forum::parseSmiles($text) : $text);
}
-
+
public static function showPost($topic, $text, $smiles = true, $html = false)
{
if($html) {
@@ -262,12 +262,12 @@ class Forum
$post .= self::parseBBCode(nl2br($text), $smiles);
return $post;
}
-
+
public static function hasAccess($board_id) {
global $sections, $logged, $account_logged, $logged_access;
if(!isset($sections[$board_id]))
return false;
-
+
$hasAccess = true;
$section = $sections[$board_id];
if($section['guild'] > 0) {
@@ -283,20 +283,20 @@ class Forum
}
}
}
-
+
if (!$status) $hasAccess = false;
}
else {
$hasAccess = false;
}
}
-
+
if($section['access'] > 0) {
if($logged_access < $section['access']) {
$hasAccess = false;
}
}
-
+
return $hasAccess;
}
}
diff --git a/system/locale/de/install.php b/system/locale/de/install.php
index 4a88042f..4ed93d20 100644
--- a/system/locale/de/install.php
+++ b/system/locale/de/install.php
@@ -111,6 +111,6 @@ $locale['step_finish_homepage'] = 'Startseite';
$locale['step_finish'] = 'Fertig';
$locale['step_finish_title'] = 'Installation beendet!';
$locale['step_finish_desc'] = 'Herzlichen Glückwunsch! MyAAC ist bereit zu verwenden! Sie können sich jetzt im $ADMIN_PANEL$ anmelden, oder die $HOMEPAGE$ besuchen.
-Bitte lösche install/ Verzeichnis.
+Bitte lösche install/ Verzeichnis.
Bitte senden Sie Fehler und Vorschläge zu $LINK$, Vielen Dank!';
?>
diff --git a/system/locale/en/install.php b/system/locale/en/install.php
index 13410415..c53bfa77 100644
--- a/system/locale/en/install.php
+++ b/system/locale/en/install.php
@@ -111,6 +111,6 @@ $locale['step_finish_homepage'] = 'homepage';
$locale['step_finish'] = 'Finish';
$locale['step_finish_title'] = 'Installation finished!';
$locale['step_finish_desc'] = 'Congratulations! MyAAC is ready to use! You can now login to $ADMIN_PANEL$, or visit $HOMEPAGE$.
-Please delete install/ directory.
+Please delete install/ directory.
Post bugs and suggestions at $LINK$, thanks!';
?>
diff --git a/system/locale/pl/install.php b/system/locale/pl/install.php
index 6fdae6dd..a6957ec7 100644
--- a/system/locale/pl/install.php
+++ b/system/locale/pl/install.php
@@ -106,6 +106,6 @@ $locale['step_finish_homepage'] = 'stronę główną';
$locale['step_finish'] = 'Koniec';
$locale['step_finish_title'] = 'Instalacja zakończona!';
$locale['step_finish_desc'] = 'Gratulacje! MyAAC jest gotowy do użycia! Możesz się teraz zalogować do $ADMIN_PANEL$, albo odwiedzić $HOMEPAGE$.
-Proszę usunąć katalog install/.
+Proszę usunąć katalog install/.
Wrzuć błędy i sugestie na $LINK$, dzięki!';
?>
diff --git a/system/locale/sv/install.php b/system/locale/sv/install.php
index a0c7b911..1ed17d49 100644
--- a/system/locale/sv/install.php
+++ b/system/locale/sv/install.php
@@ -88,6 +88,6 @@ $locale['step_finish_homepage'] = 'hemsida';
$locale['step_finish'] = 'Klar';
$locale['step_finish_title'] = 'Installationen klar!';
$locale['step_finish_desc'] = 'Grattis! MyAAC är redo att användas! Du kan logga in på $ADMIN_PANEL$, eller titta till $HOMEPAGE$.
-Var vänligen ta bort installations mappen.
+Var vänligen ta bort installations mappen.
Var vänligen rapportera buggar och förslag på $LINK$, tack!';
?>
diff --git a/system/pages/account/register.php b/system/pages/account/register.php
index 56d8918d..5b168d39 100644
--- a/system/pages/account/register.php
+++ b/system/pages/account/register.php
@@ -35,7 +35,7 @@ if(isset($_POST['registeraccountsave']) && $_POST['registeraccountsave'] == "1")
}
$twig->display('success.html.twig', array(
'title' => 'Account Registered',
- 'description' => 'Thank you for registering your account! You can now recover your account if you have lost access to the assigned email address by using the following
Recovery Key: '.$new_rec_key.'
Important:
Write down this recovery key carefully.
Store it at a safe place!
' . $message . '
'
+ 'description' => 'Thank you for registering your account! You can now recover your account if you have lost access to the assigned email address by using the following
- ' . $player['name'] . '
+ ' . $player['name'] . '';
if($config['highscores_vocation']) {
if(isset($player['promotion'])) {
diff --git a/system/pages/lostaccount.php b/system/pages/lostaccount.php
index 07a8f7b4..58b168ba 100644
--- a/system/pages/lostaccount.php
+++ b/system/pages/lostaccount.php
@@ -441,7 +441,7 @@ elseif($action == 'checkcode')
$error = 'Account of this character or this character doesn\'t exist.';
}
if(!empty($error))
- echo ''.$error.' Please enter code from e-mail and name of one character from account. Then press Submit.
+ echo ''.$error.' Please enter code from e-mail and name of one character from account. Then press Submit.