Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -23,14 +23,28 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
* @brief Content Router extension: Entries
|
||||
*/
|
||||
class _Blog
|
||||
{
|
||||
/**
|
||||
* @brief Content Item Classes
|
||||
*/
|
||||
public $classes = array( 'IPS\blog\Entry' );
|
||||
|
||||
{
|
||||
/**
|
||||
* @brief Owned Node Classes
|
||||
*/
|
||||
public $ownedNodes = array( 'IPS\blog\Blog' );
|
||||
|
||||
/**
|
||||
* @brief Content Item Classes
|
||||
*/
|
||||
public $classes = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \IPS\Member|NULL $member If checking access, the member to check for, or NULL to not check access
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( \IPS\Member $member = NULL )
|
||||
{
|
||||
if ( $member === NULL or $member->canAccessModule( \IPS\Application\Module::get( 'blog', 'blogs', 'front' ) ) )
|
||||
{
|
||||
$this->classes[] = 'IPS\blog\Entry';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,8 +22,18 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
/**
|
||||
* Front Navigation Extension: Blogs
|
||||
*/
|
||||
class _Blogs
|
||||
class _Blogs extends \IPS\core\FrontNavigation\FrontNavigationAbstract
|
||||
{
|
||||
/**
|
||||
* Get Type Title which will display in the AdminCP Menu Manager
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function typeTitle()
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack('frontnavigation_blogs');
|
||||
}
|
||||
|
||||
/**
|
||||
* Can access?
|
||||
*
|
||||
@@ -31,7 +41,7 @@ class _Blogs
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return !\IPS\Application::load('blog')->hide_tab and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'blog', 'blogs' ) );
|
||||
return parent::canView() and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'blog', 'blogs' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,14 +73,4 @@ class _Blogs
|
||||
{
|
||||
return \IPS\Dispatcher::i()->application->directory === 'blog';
|
||||
}
|
||||
|
||||
/**
|
||||
* Children
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function children()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ class _Blog
|
||||
/**
|
||||
* Process Form
|
||||
*
|
||||
* @param \IPS\Form\Tabbed $form The form
|
||||
* @param \IPS\Helpers\Form $form The form
|
||||
* @param \IPS\Member\Group $group Existing Group
|
||||
* @return void
|
||||
*/
|
||||
@@ -40,8 +40,9 @@ class _Blog
|
||||
$form->add(new \IPS\Helpers\Form\YesNo('g_blog_allowprivate', $group->g_blog_allowprivate, FALSE, array(), NULL, NULL, NULL, 'g_blog_allowprivate'));
|
||||
$form->add(new \IPS\Helpers\Form\YesNo('g_blog_allowownmod', $group->g_blog_allowownmod, FALSE, array(), NULL, NULL, NULL, 'g_blog_allowownmod'));
|
||||
$form->add(new \IPS\Helpers\Form\YesNo('g_blog_allowdelete', $group->g_blog_allowdelete, FALSE, array(), NULL, NULL, NULL, 'g_blog_allowdelete'));
|
||||
$form->add(new \IPS\Helpers\Form\YesNo('g_blog_allowcomment', $group->g_blog_allowcomment));
|
||||
}
|
||||
|
||||
$form->add(new \IPS\Helpers\Form\YesNo('g_blog_allowcomment', $group->g_blog_allowcomment));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -60,7 +61,8 @@ class _Blog
|
||||
$group->g_blog_allowprivate = $values['g_blog_allowprivate'];
|
||||
$group->g_blog_allowownmod = $values['g_blog_allowownmod'];
|
||||
$group->g_blog_allowdelete = $values['g_blog_allowdelete'];
|
||||
$group->g_blog_allowcomment = $values['g_blog_allowcomment'];
|
||||
}
|
||||
|
||||
$group->g_blog_allowcomment = $values['g_blog_allowcomment'];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user