Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Group Blogs Controller
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Blog
|
||||
* @since 03 Mar 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
@@ -56,7 +56,7 @@ class _blogs extends \IPS\Node\Controller
|
||||
$table->mainColumn = 'word_custom';
|
||||
|
||||
$table->joins = array(
|
||||
array( 'select' => 'w.word_custom', 'from' => array( 'core_sys_lang_words', 'w' ), 'where' => "w.word_key=CONCAT( 'blogs_blog_', blog_blogs.blog_id ) AND w.lang_id=" . \IPS\Member::loggedIn()->language()->id )
|
||||
array( 'select' => 'CASE WHEN blog_blogs.blog_member_id THEN blog_blogs.blog_name ELSE w.word_custom END as word_custom', 'from' => array( 'core_sys_lang_words', 'w' ), 'where' => "w.word_key=CONCAT( 'blogs_blog_', blog_blogs.blog_id ) AND w.lang_id=" . \IPS\Member::loggedIn()->language()->id )
|
||||
);
|
||||
|
||||
/* Sort stuff */
|
||||
@@ -71,9 +71,30 @@ class _blogs extends \IPS\Node\Controller
|
||||
);
|
||||
|
||||
$table->parsers = array(
|
||||
'blog_member_id' => function( $val, $row )
|
||||
'blog_member_id' => function( $val, $row )
|
||||
{
|
||||
return \IPS\Member::load( $val )->link();
|
||||
try
|
||||
{
|
||||
return \IPS\Member::load( $val )->link();
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
},
|
||||
'word_custom' => function( $val, $row )
|
||||
{
|
||||
if ( ! $val )
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack('blog_member_deleted');
|
||||
}
|
||||
|
||||
if( $row['blog_member_id'] )
|
||||
{
|
||||
$val = htmlspecialchars( $val, ENT_QUOTES | \IPS\HTMLENTITIES, 'UTF-8', FALSE );
|
||||
}
|
||||
|
||||
return $val;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user