Version 4.7.0
This commit is contained in:
1 parent
517a5e1f70
commit
8ba7d43898
1933 files changed
+65613
-11332
No files matched your search
@@ -156,7 +156,7 @@ class _ranks extends \IPS\Node\Controller
|
||||
}
|
||||
catch( \Exception $e )
|
||||
{
|
||||
\IPS\Output::i()->error( $e->getMessage(), '2C163/1', 403, '' );
|
||||
\IPS\Output::i()->error( $e->getMessage(), '2C423/1', 403, '' );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=achievements&controller=ranks' ), 'completed' );
|
||||
@@ -173,7 +173,7 @@ class _ranks extends \IPS\Node\Controller
|
||||
$xml = \IPS\Xml\SimpleXML::create('ranks');
|
||||
$langs = [];
|
||||
|
||||
foreach( \IPS\Db::i()->select('word_key, word_default', 'core_sys_lang_words', [ \IPS\Db::i()->like( 'word_key', 'core_member_rank_') ] ) as $row )
|
||||
foreach( \IPS\Db::i()->select('word_key, word_default', 'core_sys_lang_words', [ "lang_id=? AND word_key LIKE 'core_member_rank_%'", \IPS\Member::loggedIn()->language()->id ] ) as $row )
|
||||
{
|
||||
$langs[ \mb_substr( $row['word_key'], 17 ) ] = $row['word_default'];
|
||||
}
|
||||
@@ -182,8 +182,7 @@ class _ranks extends \IPS\Node\Controller
|
||||
foreach ( \IPS\Db::i()->select( '*', 'core_member_ranks') as $row )
|
||||
{
|
||||
$forXml = [
|
||||
'posts' => $row['posts'],
|
||||
'title' => isset( $langs[ $row['id'] ] ) ? $langs[ $row['id'] ] : NULL,
|
||||
'title' => $langs[$row['id']] ?? NULL,
|
||||
'points' => $row['points']
|
||||
];
|
||||
|
||||
@@ -191,7 +190,7 @@ class _ranks extends \IPS\Node\Controller
|
||||
{
|
||||
try
|
||||
{
|
||||
$icon = \IPS\File::get( 'core_Badges', $row['icon'] );
|
||||
$icon = \IPS\File::get( 'core_Ranks', $row['icon'] );
|
||||
$forXml['icon_name'] = $icon->originalFilename;
|
||||
$forXml['icon_data'] = base64_encode( $icon->contents() );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user