Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -47,7 +47,7 @@ class _blogs extends \IPS\Node\Controller
|
||||
protected function manage()
|
||||
{
|
||||
/* Create the table */
|
||||
$table = new \IPS\Helpers\Table\Db( 'blog_blogs', \IPS\Http\Url::internal( 'app=blog&module=blogs&controller=blogs' ) );
|
||||
$table = new \IPS\Helpers\Table\Db( 'blog_blogs', \IPS\Http\Url::internal( 'app=blog&module=blogs&controller=blogs' ), array( array( 'blog_club_id IS NULL' ) ) );
|
||||
$table->langPrefix = 'blog_';
|
||||
|
||||
/* Column stuff */
|
||||
@@ -55,7 +55,7 @@ class _blogs extends \IPS\Node\Controller
|
||||
$table->mainColumn = 'word_custom';
|
||||
|
||||
$table->joins = array(
|
||||
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 )
|
||||
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 )
|
||||
);
|
||||
|
||||
/* Sort stuff */
|
||||
@@ -72,11 +72,13 @@ class _blogs extends \IPS\Node\Controller
|
||||
$table->parsers = array(
|
||||
'blog_member_id' => function( $val, $row )
|
||||
{
|
||||
try
|
||||
$member = \IPS\Member::load( $val );
|
||||
|
||||
if( $member->member_id )
|
||||
{
|
||||
return \IPS\Member::load( $val )->link();
|
||||
return $member->link();
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -88,12 +90,7 @@ class _blogs extends \IPS\Node\Controller
|
||||
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;
|
||||
return htmlspecialchars( $val, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user