mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Check for userclass set in shortcode, and do not render if not permitted
This commit is contained in:
@@ -12,8 +12,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/shortcode_handler.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/shortcode_handler.php,v $
|
||||||
| $Revision: 1.16 $
|
| $Revision: 1.17 $
|
||||||
| $Date: 2009-01-08 17:23:13 $
|
| $Date: 2009-01-08 20:16:47 $
|
||||||
| $Author: mcfly_e107 $
|
| $Author: mcfly_e107 $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -175,11 +175,16 @@ class e_shortcode
|
|||||||
{
|
{
|
||||||
if (array_key_exists($code, $this->registered_codes))
|
if (array_key_exists($code, $this->registered_codes))
|
||||||
{
|
{
|
||||||
//shortcode is registered in some manner, let's parse the type
|
//shortcode is registered, let's proceed.
|
||||||
|
if(isset($this->registered_codes[$code]['perms']))
|
||||||
|
{
|
||||||
|
if(!check_class($this->registered_codes[$code]['perms'])) { return ''; }
|
||||||
|
}
|
||||||
|
|
||||||
switch($this->registered_codes[$code]['type'])
|
switch($this->registered_codes[$code]['type'])
|
||||||
{
|
{
|
||||||
case 'class':
|
case 'class':
|
||||||
//If class is set, it's a batch shortcode. Load the class and call the method
|
//It is batch shortcode. Load the class and call the method
|
||||||
$_class = $this->registered_codes[$code]['class'];
|
$_class = $this->registered_codes[$code]['class'];
|
||||||
$_method = 'get_'.strtolower($code);
|
$_method = 'get_'.strtolower($code);
|
||||||
if(!isset($this->scClasses[$_class]))
|
if(!isset($this->scClasses[$_class]))
|
||||||
|
Reference in New Issue
Block a user