OSDN Git Service

AdminActionsクラスのコード整理
authorsakamocchi <o-takashi@sakamocchi.jp>
Sat, 26 May 2012 12:31:29 +0000 (21:31 +0900)
committersakamocchi <o-takashi@sakamocchi.jp>
Sat, 26 May 2012 12:31:29 +0000 (21:31 +0900)
IDEのバグを踏んだため、配列の表記を中心として、前回のコミットでコードフォーマットが崩れていた。

nucleus/libs/AdminActions.php

index f81e916..105c6e8 100644 (file)
@@ -158,7 +158,7 @@ class AdminActions extends BaseActions
        {
                // call constructor of superclass first
                parent::__construct();
        {
                // call constructor of superclass first
                parent::__construct();
-
+               
                /* alias */
                if ( $type == 'admntemplateoverview' )
                {
                /* alias */
                if ( $type == 'admntemplateoverview' )
                {
@@ -181,7 +181,7 @@ class AdminActions extends BaseActions
        public function getAvailableActions()
        {
                $extra_actions = array();
        public function getAvailableActions()
        {
                $extra_actions = array();
-
+               
                switch ( $this->skintype )
                {
                        case 'actionlog':
                switch ( $this->skintype )
                {
                        case 'actionlog':
@@ -678,9 +678,9 @@ class AdminActions extends BaseActions
                        default:
                                break;
                }
                        default:
                                break;
                }
-       
+               
                $defined_actions = array_merge(self::$default_actions, $extra_actions);
                $defined_actions = array_merge(self::$default_actions, $extra_actions);
-
+               
                return array_merge($defined_actions, parent::getAvailableActions());
        }
        
                return array_merge($defined_actions, parent::getAvailableActions());
        }
        
@@ -695,7 +695,7 @@ class AdminActions extends BaseActions
        {
                $query = "SELECT * FROM %s ORDER BY timestamp DESC;";
                $query = sprintf($query, sql_table('actionlog'));
        {
                $query = "SELECT * FROM %s ORDER BY timestamp DESC;";
                $query = sprintf($query, sql_table('actionlog'));
-
+               
                $resource = DB::getResult($query);
                if ( $resource->rowCount() > 0 )
                {
                $resource = DB::getResult($query);
                if ( $resource->rowCount() > 0 )
                {
@@ -727,19 +727,19 @@ class AdminActions extends BaseActions
                {
                        $template =& $manager->getTemplate($template_name);
                }
                {
                        $template =& $manager->getTemplate($template_name);
                }
-       
+               
                $key = postVar('ackey');
                if ( !$key )
                {
                        Admin::error(_ERROR_ACTIVATE);
                }
                $key = postVar('ackey');
                if ( !$key )
                {
                        Admin::error(_ERROR_ACTIVATE);
                }
-       
+               
                $info = MEMBER::getActivationInfo($key);
                if ( !$info )
                {
                        Admin::error(_ERROR_ACTIVATE);
                }
                $info = MEMBER::getActivationInfo($key);
                if ( !$info )
                {
                        Admin::error(_ERROR_ACTIVATE);
                }
-       
+               
                $mem =& $manager->getMember($info->vmember);
                if ( !$mem )
                {
                $mem =& $manager->getMember($info->vmember);
                if ( !$mem )
                {
@@ -803,8 +803,8 @@ class AdminActions extends BaseActions
                                break;
                }
                $aVars = array(
                                break;
                }
                $aVars = array(
-               'memberName'    => Entity::hsc($mem->getDisplayName()),
-               'realName'              => Entity::hsc($mem->getRealName()),
+                       'memberName'    => Entity::hsc($mem->getDisplayName()),
+                       'realName'              => Entity::hsc($mem->getRealName()),
                );
                switch ( $type )
                {
                );
                switch ( $type )
                {
@@ -846,10 +846,10 @@ class AdminActions extends BaseActions
        public function parse_adminbanlist($template_name = '')
        {
                $blogid = intRequestVar('blogid');
        public function parse_adminbanlist($template_name = '')
        {
                $blogid = intRequestVar('blogid');
-
+               
                $query = "SELECT * FROM %s WHERE blogid=%d ORDER BY iprange;";
                $query = sprintf($query, sql_table('ban'), (integer) $blogid);
                $query = "SELECT * FROM %s WHERE blogid=%d ORDER BY iprange;";
                $query = sprintf($query, sql_table('ban'), (integer) $blogid);
-
+               
                $resource = DB::getResult($query);
                if ( $resource->rowCount() > 0 )
                {
                $resource = DB::getResult($query);
                if ( $resource->rowCount() > 0 )
                {
@@ -887,12 +887,12 @@ class AdminActions extends BaseActions
        {
                global $manager;
                $templates = array();
        {
                global $manager;
                $templates = array();
-
+               
                if ( !empty($template_name) )
                {
                        $templates =& $manager->getTemplate($template_name);
                }
                if ( !empty($template_name) )
                {
                        $templates =& $manager->getTemplate($template_name);
                }
-       
+               
                if ( !array_key_exists('ADMIN_BATCHLIST', $templates) || empty($templates['ADMIN_BATCHLIST']) )
                {
                        $template = '<li><%text(_BATCH_EXECUTING)%>&nbsp;'
                if ( !array_key_exists('ADMIN_BATCHLIST', $templates) || empty($templates['ADMIN_BATCHLIST']) )
                {
                        $template = '<li><%text(_BATCH_EXECUTING)%>&nbsp;'
@@ -906,10 +906,10 @@ class AdminActions extends BaseActions
                {
                        $template = $templates['ADMIN_BATCHLIST'];
                }
                {
                        $template = $templates['ADMIN_BATCHLIST'];
                }
-       
+               
                $selected = requestIntArray('batch');
                $action = requestVar('batchaction');
                $selected = requestIntArray('batch');
                $action = requestVar('batchaction');
-
+               
                switch ( $this->skintype )
                {
                        case 'batchitem':
                switch ( $this->skintype )
                {
                        case 'batchitem':
@@ -946,7 +946,7 @@ class AdminActions extends BaseActions
                                $destid                 = intRequestVar('destblogid');
                                break;
                }
                                $destid                 = intRequestVar('destblogid');
                                break;
                }
-       
+               
                // walk over all selectedids and perform action
                foreach ( $selected as $selectedid )
                {
                // walk over all selectedids and perform action
                foreach ( $selected as $selectedid )
                {
@@ -989,10 +989,10 @@ class AdminActions extends BaseActions
                        }
                                
                        $data = array(
                        }
                                
                        $data = array(
-                       'batchid'                       => $selectedid,
-                       'batchlisttype'         => Entity::hsc($batchlisttype),
-                       'adminbatchaction'      => Entity::hsc($action),
-                       'batchlistmsg'          => $error ? $error : _BATCH_SUCCESS,
+                               'batchid'                       => $selectedid,
+                               'batchlisttype'         => Entity::hsc($batchlisttype),
+                               'adminbatchaction'      => Entity::hsc($action),
+                               'batchlistmsg'          => $error ? $error : _BATCH_SUCCESS,
                        );
                                
                        $this->parser->parse(Template::fill($template, $data));
                        );
                                
                        $this->parser->parse(Template::fill($template, $data));
@@ -1014,12 +1014,12 @@ class AdminActions extends BaseActions
                $blogid =  intRequestVar('blogid');
                $blog   =& $manager->getBlog($blogid);
                $templates = array();
                $blogid =  intRequestVar('blogid');
                $blog   =& $manager->getBlog($blogid);
                $templates = array();
-
+               
                if ( !empty($template_name) )
                {
                        $templates =& $manager->getTemplate($template_name);
                }
                if ( !empty($template_name) )
                {
                        $templates =& $manager->getTemplate($template_name);
                }
-       
+               
                if ( !array_key_exists('ADMIN_BLOGLINK', $templates) || empty($templates['ADMIN_BLOGLINK']) )
                {
                        $template = '<a href="<%url%>" title="<%adminbloglinktitle%>"><%blogname%></a>';
                if ( !array_key_exists('ADMIN_BLOGLINK', $templates) || empty($templates['ADMIN_BLOGLINK']) )
                {
                        $template = '<a href="<%url%>" title="<%adminbloglinktitle%>"><%blogname%></a>';
@@ -1028,13 +1028,13 @@ class AdminActions extends BaseActions
                {
                        $template = $templates['ADMIN_BLOGLINK'];
                }
                {
                        $template = $templates['ADMIN_BLOGLINK'];
                }
-       
+               
                $data = array(
                $data = array(
-               'url'                                   => Entity::hsc($blog->getURL()),
-               'adminbloglinktitle'    => _BLOGLIST_TT_VISIT,
-               'blogname'                              => Entity::hsc($blog->getName())
+                       'url'                                   => Entity::hsc($blog->getURL()),
+                       'adminbloglinktitle'    => _BLOGLIST_TT_VISIT,
+                       'blogname'                              => Entity::hsc($blog->getName())
                );
                );
-
+               
                echo Template::fill($template, $data);
                return;
        }
                echo Template::fill($template, $data);
                return;
        }
@@ -1050,7 +1050,7 @@ class AdminActions extends BaseActions
        {
                global $CONF;
                $message = '';
        {
                global $CONF;
                $message = '';
-
+               
                if ( requestVar('errormessage') )
                {
                        $message = requestVar('errormessage');
                if ( requestVar('errormessage') )
                {
                        $message = requestVar('errormessage');
@@ -1078,7 +1078,7 @@ class AdminActions extends BaseActions
        {
                $type = strtolower(trim(requestVar('type')));
                $skinid = intRequestVar('skinid');
        {
                $type = strtolower(trim(requestVar('type')));
                $skinid = intRequestVar('skinid');
-
+               
                if ( !preg_match('#^admin#', $this->skintype) )
                {
                        $skin = new Skin($skinid);
                if ( !preg_match('#^admin#', $this->skintype) )
                {
                        $skin = new Skin($skinid);
@@ -1089,14 +1089,14 @@ class AdminActions extends BaseActions
                        $skin = new Skin($skinid, 'AdminActions');
                        $tag = 'adminskinvar';
                }
                        $skin = new Skin($skinid, 'AdminActions');
                        $tag = 'adminskinvar';
                }
-       
+               
                $actions = $skin->getAllowedActionsForType($type);
                sort($actions);
                $actions = $skin->getAllowedActionsForType($type);
                sort($actions);
-
+               
                while ( $current = array_shift($actions) )
                {
                        echo helplink("{$tag}-{$current}") . "$current</a>\n";
                while ( $current = array_shift($actions) )
                {
                        echo helplink("{$tag}-{$current}") . "$current</a>\n";
-
+                       
                        if ( count($actions) != 0 )
                        {
                                echo ", ";
                        if ( count($actions) != 0 )
                        {
                                echo ", ";
@@ -1115,13 +1115,13 @@ class AdminActions extends BaseActions
        public function parse_banlistdeletedlist($template_name = '')
        {
                global $manager;
        public function parse_banlistdeletedlist($template_name = '')
        {
                global $manager;
-
+               
                $templates = array();
                if ( $template_name )
                {
                        $templates =& $manager->getTemplate($template_name);
                }
                $templates = array();
                if ( $template_name )
                {
                        $templates =& $manager->getTemplate($template_name);
                }
-       
+               
                if ( !array_key_exists('BANLIST_DELETED_LIST', $templates) || empty($templates['BANLIST_DELETED_LIST']) )
                {
                        $template = "<li><%blogname%></li>\n";
                if ( !array_key_exists('BANLIST_DELETED_LIST', $templates) || empty($templates['BANLIST_DELETED_LIST']) )
                {
                        $template = "<li><%blogname%></li>\n";
@@ -1130,17 +1130,17 @@ class AdminActions extends BaseActions
                {
                        $template = $templates['BANLIST_DELETED_LIST'];
                }
                {
                        $template = $templates['BANLIST_DELETED_LIST'];
                }
-       
+               
                $deleted = requestArray('delblogs');
                foreach ( $deleted as $delblog )
                {
                        $blog =& $manager->getBlog($delblog);
                        $data =  array(
                $deleted = requestArray('delblogs');
                foreach ( $deleted as $delblog )
                {
                        $blog =& $manager->getBlog($delblog);
                        $data =  array(
-       'blogname' => Entity::hsc($blog->getName())
+                               'blogname' => Entity::hsc($blog->getName())
                        );
                        echo Template::fill($template, $data);
                }
                        );
                        echo Template::fill($template, $data);
                }
-       
+               
                return;
        }
        
                return;
        }
        
@@ -1155,7 +1155,7 @@ class AdminActions extends BaseActions
        {
                $selected = requestIntArray('batch');
                $index  = 0;
        {
                $selected = requestIntArray('batch');
                $index  = 0;
-
+               
                foreach ( $selected as $select )
                {
                        echo '<input type="hidden" name="batch[' . ($index++) . ']" value="' . intval($select) . "\" />\n";
                foreach ( $selected as $select )
                {
                        echo '<input type="hidden" name="batch[' . ($index++) . ']" value="' . intval($select) . "\" />\n";
@@ -1274,7 +1274,7 @@ class AdminActions extends BaseActions
                $blogid = intRequestVar('blogid');
                $query = "SELECT * FROM %s WHERE cblog = %d ORDER BY cname;";
                $query = sprintf($query, sql_table('category'), (integer) $blogid);
                $blogid = intRequestVar('blogid');
                $query = "SELECT * FROM %s WHERE cblog = %d ORDER BY cname;";
                $query = sprintf($query, sql_table('category'), (integer) $blogid);
-
+               
                $resource = DB::getResult($query);
                if ( $resource->rowCount() > 0 )
                {
                $resource = DB::getResult($query);
                if ( $resource->rowCount() > 0 )
                {
@@ -1287,7 +1287,7 @@ class AdminActions extends BaseActions
                        /* TODO: nothing to be shown */
                }
                $resource->closeCursor();
                        /* TODO: nothing to be shown */
                }
                $resource->closeCursor();
-
+               
                return;
        }
        
                return;
        }
        
@@ -1316,7 +1316,7 @@ class AdminActions extends BaseActions
                global $manager;
                $blogid =  intRequestVar('blogid');
                $blog   =& $manager->getBlog($blogid);
                global $manager;
                $blogid =  intRequestVar('blogid');
                $blog   =& $manager->getBlog($blogid);
-
+               
                switch ( $type )
                {
                        case 'comment':
                switch ( $type )
                {
                        case 'comment':
@@ -1469,7 +1469,7 @@ class AdminActions extends BaseActions
        public function parse_blogtime($type, $format = '%H:%M', $offset = 0)
        {
                global $manager;
        public function parse_blogtime($type, $format = '%H:%M', $offset = 0)
        {
                global $manager;
-
+               
                if ( $type != 'blogtime' )
                {
                        /* return server time */
                if ( $type != 'blogtime' )
                {
                        /* return server time */
@@ -1515,11 +1515,11 @@ class AdminActions extends BaseActions
        public function parse_categories($startidx = 0)
        {
                global $manager;
        public function parse_categories($startidx = 0)
        {
                global $manager;
-
+               
                $item = FALSE;
                $itemid =  intRequestVar('itemid');
                $item   = &$manager->getItem($itemid, 1, 1);
                $item = FALSE;
                $itemid =  intRequestVar('itemid');
                $item   = &$manager->getItem($itemid, 1, 1);
-
+               
                $blog = FALSE;
                if ( !$item )
                {
                $blog = FALSE;
                if ( !$item )
                {
@@ -1530,19 +1530,19 @@ class AdminActions extends BaseActions
                        $blogid =  $item['blogid'];
                }
                $blog   = &$manager->getBlog($blogid);
                        $blogid =  $item['blogid'];
                }
                $blog   = &$manager->getBlog($blogid);
-
+               
                if ( $item && $blog->convertBreaks() && requestVar('action') == 'itemedit' )
                {
                        $item['body'] = removeBreaks($item['body']);
                        $item['more'] = removeBreaks($item['more']);
                }
                if ( $item && $blog->convertBreaks() && requestVar('action') == 'itemedit' )
                {
                        $item['body'] = removeBreaks($item['body']);
                        $item['more'] = removeBreaks($item['more']);
                }
-       
+               
                $contents = array();
                if ( requestVar('action') == 'itemedit' )
                {
                        $contents = $item;
                }
                $contents = array();
                if ( requestVar('action') == 'itemedit' )
                {
                        $contents = $item;
                }
-       
+               
                if ( !array_key_exists('catid', $contents) || empty($contents['catid']) )
                {
                        // on add item
                if ( !array_key_exists('catid', $contents) || empty($contents['catid']) )
                {
                        // on add item
@@ -1553,9 +1553,9 @@ class AdminActions extends BaseActions
                        // on edit item
                        $catid = $contents['catid'];
                }
                        // on edit item
                        $catid = $contents['catid'];
                }
-       
+               
                $this->selectBlog('catid', 'category', $catid, $startidx, 1, $blog->getID());
                $this->selectBlog('catid', 'category', $catid, $startidx, 1, $blog->getID());
-
+               
                return;
        }
        
                return;
        }
        
@@ -1591,7 +1591,7 @@ class AdminActions extends BaseActions
                $query  = "SELECT * FROM %s WHERE cblog = %d AND catid = %d;";
                $query  = sprintf($query, sql_table('category'), (integer) $blogid, (integer) $catid);
                $row    = DB::getRow($query);
                $query  = "SELECT * FROM %s WHERE cblog = %d AND catid = %d;";
                $query  = sprintf($query, sql_table('category'), (integer) $blogid, (integer) $catid);
                $row    = DB::getRow($query);
-
+               
                if ( $type != 'name' )
                {
                        echo Entity::hsc($row['cdesc']);
                if ( $type != 'name' )
                {
                        echo Entity::hsc($row['cdesc']);
@@ -1615,19 +1615,19 @@ class AdminActions extends BaseActions
        public function parse_checkedonval($value, $name)
        {
                global $manager;
        public function parse_checkedonval($value, $name)
        {
                global $manager;
-
+               
                $item = false;
                $itemid = intRequestVar('itemid');
                $item =& $manager->getItem($itemid, 1, 1);
                $item = false;
                $itemid = intRequestVar('itemid');
                $item =& $manager->getItem($itemid, 1, 1);
-
+               
                $blog =& $manager->getBlog(getBlogIDFromItemID($itemid));
                $blog =& $manager->getBlog(getBlogIDFromItemID($itemid));
-
+               
                if ( $item && $blog->convertBreaks() && requestVar('action') == 'itemedit' )
                {
                        $item['body'] = removeBreaks($item['body']);
                        $item['more'] = removeBreaks($item['more']);
                }
                if ( $item && $blog->convertBreaks() && requestVar('action') == 'itemedit' )
                {
                        $item['body'] = removeBreaks($item['body']);
                        $item['more'] = removeBreaks($item['more']);
                }
-       
+               
                $contents = array();
                if ( requestVar('action') == 'itemedit' )
                {
                $contents = array();
                if ( requestVar('action') == 'itemedit' )
                {
@@ -1670,7 +1670,7 @@ class AdminActions extends BaseActions
        public function parse_commentnavlist()
        {
                global $CONF, $manager, $member;
        public function parse_commentnavlist()
        {
                global $CONF, $manager, $member;
-
+               
                // start index
                if ( postVar('start') )
                {
                // start index
                if ( postVar('start') )
                {
@@ -1680,7 +1680,7 @@ class AdminActions extends BaseActions
                {
                        $start = 0;
                }
                {
                        $start = 0;
                }
-       
+               
                // amount of items to show
                if ( postVar('amount') )
                {
                // amount of items to show
                if ( postVar('amount') )
                {
@@ -1699,7 +1699,7 @@ class AdminActions extends BaseActions
                . 'LEFT OUTER JOIN %s ON  mnumber=cmember '
                . 'WHERE ';
                $query = sprintf($query, sql_table('comment'), sql_table('member'));
                . 'LEFT OUTER JOIN %s ON  mnumber=cmember '
                . 'WHERE ';
                $query = sprintf($query, sql_table('comment'), sql_table('member'));
-
+               
                if ( $this->skintype == 'itemcommentlist' )
                {
                        $itemid                                 = intRequestVar('itemid');
                if ( $this->skintype == 'itemcommentlist' )
                {
                        $itemid                                 = intRequestVar('itemid');
@@ -1724,15 +1724,15 @@ class AdminActions extends BaseActions
                        $bid                                    = intRequestVar('blogid');
                        $nonComments                    = _NOCOMMENTS_BLOG;
                }
                        $bid                                    = intRequestVar('blogid');
                        $nonComments                    = _NOCOMMENTS_BLOG;
                }
-       
+               
                $search = postVar('search');
                if ( !empty($search) )
                {
                        $query .= ' and cbody LIKE ' . DB::quoteValue('%'.$search.'%');
                }
                $search = postVar('search');
                if ( !empty($search) )
                {
                        $query .= ' and cbody LIKE ' . DB::quoteValue('%'.$search.'%');
                }
-       
+               
                $query .= " ORDER BY ctime ASC LIMIT {$start},{$amount}";
                $query .= " ORDER BY ctime ASC LIMIT {$start},{$amount}";
-
+               
                $resource = DB::getResult($query);
                if ( $resource->rowCount() > 0 )
                {
                $resource = DB::getResult($query);
                if ( $resource->rowCount() > 0 )
                {
@@ -1754,7 +1754,7 @@ class AdminActions extends BaseActions
                        /* TODO: nothing to be shown */
                }
                $resource->closeCursor();
                        /* TODO: nothing to be shown */
                }
                $resource->closeCursor();
-
+               
                return;
        }
        
                return;
        }
        
@@ -1893,7 +1893,7 @@ class AdminActions extends BaseActions
        public function parse_normalskinlist($template_name = '')
        {
                global $CONF, $manager;
        public function parse_normalskinlist($template_name = '')
        {
                global $CONF, $manager;
-
+               
                if ( !preg_match('#^admin#', $this->skintype) )
                {
                        $skin = new Skin($CONF['BaseSkin']);
                if ( !preg_match('#^admin#', $this->skintype) )
                {
                        $skin = new Skin($CONF['BaseSkin']);
@@ -1906,22 +1906,22 @@ class AdminActions extends BaseActions
                        $template['editaction'] = 'adminskinedittype';
                        /* TODO: removeaction? */
                }
                        $template['editaction'] = 'adminskinedittype';
                        /* TODO: removeaction? */
                }
-       
+               
                $temporary = $skin->getDefaultTypes();
                $normal_skintype = array();
                foreach ( $temporary as $type => $label )
                {
                        $normal_skintype[] = array(
                $temporary = $skin->getDefaultTypes();
                $normal_skintype = array();
                foreach ( $temporary as $type => $label )
                {
                        $normal_skintype[] = array(
-                       'skintype'              => $type,
-                       'skintypename'  => $label
+                               'skintype'              => $type,
+                               'skintypename'  => $label
                        );
                }
                        );
                }
-       
+               
                $template['tabindex'] = 10;
                $template['skinid'] = $skin->getID();
                $template['skinname'] = $skin->getName();
                $this->parser->parse(showlist($normal_skintype, 'list_normalskinlist', $template, $template_name));
                $template['tabindex'] = 10;
                $template['skinid'] = $skin->getID();
                $template['skinname'] = $skin->getName();
                $this->parser->parse(showlist($normal_skintype, 'list_normalskinlist', $template, $template_name));
-
+               
                return;
        }
        
                return;
        }
        
@@ -1935,15 +1935,15 @@ class AdminActions extends BaseActions
        public function parse_defblogselect($template_name = '')
        {
                global $CONF;
        public function parse_defblogselect($template_name = '')
        {
                global $CONF;
-
+               
                $query = "SELECT bname as text, bnumber as value FROM %s;";
                $query = sprintf($query, sql_table('blog'));
                $query = "SELECT bname as text, bnumber as value FROM %s;";
                $query = sprintf($query, sql_table('blog'));
-
+               
                $template['name'] = 'DefaultBlog';
                $template['selected'] = $CONF['DefaultBlog'];
                $template['tabindex'] = 10;
                $this->parser->parse(showlist($query, 'select', $template, $template_name));
                $template['name'] = 'DefaultBlog';
                $template['selected'] = $CONF['DefaultBlog'];
                $template['tabindex'] = 10;
                $this->parser->parse(showlist($query, 'select', $template, $template_name));
-
+               
                return;
        }
        
                return;
        }
        
@@ -1957,19 +1957,19 @@ class AdminActions extends BaseActions
        public function parse_defcatselect($template_name = '')
        {
                global $manager;
        public function parse_defcatselect($template_name = '')
        {
                global $manager;
-
+               
                $blogid = intRequestVar('blogid');
                $blog =& $manager->getBlog($blogid);
                $blogid = intRequestVar('blogid');
                $blog =& $manager->getBlog($blogid);
-
+               
                $query = "SELECT cname as text, catid as value FROM %s WHERE cblog=%d;";
                $query = sprintf($query, sql_table('category'), (integer) $blog->getID());
                $query = "SELECT cname as text, catid as value FROM %s WHERE cblog=%d;";
                $query = sprintf($query, sql_table('category'), (integer) $blog->getID());
-
+               
                $template['name']        = 'defcat';
                $template['selected'] = $blog->getDefaultCategory();
                $template['tabindex'] = 110;
                $template['name']        = 'defcat';
                $template['selected'] = $blog->getDefaultCategory();
                $template['tabindex'] = 110;
-
+               
                $this->parser->parse(showlist($query, 'select', $template, $template_name));
                $this->parser->parse(showlist($query, 'select', $template, $template_name));
-
+               
                return;
        }
        
                return;
        }
        
@@ -1984,7 +1984,7 @@ class AdminActions extends BaseActions
        public function parse_defskinselect($type = 'blog', $template_name = '')
        {
                global $CONF, $manager, $member;
        public function parse_defskinselect($type = 'blog', $template_name = '')
        {
                global $CONF, $manager, $member;
-
+               
                if ( !preg_match('#^admin#', $this->skintype) )
                {
                        $blogid = intRequestVar('blogid');
                if ( !preg_match('#^admin#', $this->skintype) )
                {
                        $blogid = intRequestVar('blogid');
@@ -2016,12 +2016,12 @@ class AdminActions extends BaseActions
                        $template['name'] = 'AdminSkin';
                        $query = "SELECT sdname as text, sdnumber as value FROM %s WHERE sdname LIKE 'admin/%%';";
                }
                        $template['name'] = 'AdminSkin';
                        $query = "SELECT sdname as text, sdnumber as value FROM %s WHERE sdname LIKE 'admin/%%';";
                }
-       
+               
                $query = sprintf($query, sql_table('skin_desc'));
                $template['tabindex'] = 50;
                $query = sprintf($query, sql_table('skin_desc'));
                $template['tabindex'] = 50;
-
+               
                $this->parser->parse(showlist($query, 'select', $template, $template_name));
                $this->parser->parse(showlist($query, 'select', $template, $template_name));
-
+               
                return;
        }
        
                return;
        }
        
@@ -2036,7 +2036,7 @@ class AdminActions extends BaseActions
        {
                $commentid      = intRequestVar('commentid');
                $comment        = COMMENT::getComment($commentid);
        {
                $commentid      = intRequestVar('commentid');
                $comment        = COMMENT::getComment($commentid);
-
+               
                switch ( $type )
                {
                        case 'id':
                switch ( $type )
                {
                        case 'id':
@@ -2069,14 +2069,14 @@ class AdminActions extends BaseActions
        public function parse_deleteitembody()
        {
                global $manager;
        public function parse_deleteitembody()
        {
                global $manager;
-
+               
                $itemid =  intRequestVar('itemid');
                $item =& $manager->getItem($itemid, 1, 1);
                $itemid =  intRequestVar('itemid');
                $item =& $manager->getItem($itemid, 1, 1);
-
+               
                $body =  strip_tags($item['body']);
                $body =  strip_tags($item['body']);
-
+               
                echo Entity::hsc(shorten($body, 300, '...'));
                echo Entity::hsc(shorten($body, 300, '...'));
-
+               
                return;
        }
        
                return;
        }
        
@@ -2103,12 +2103,12 @@ class AdminActions extends BaseActions
        public function parse_deleteitemtitle()
        {
                global $manager;
        public function parse_deleteitemtitle()
        {
                global $manager;
-
+               
                $itemid = intRequestVar('itemid');
                $item =& $manager->getItem($itemid, 1, 1);
                $itemid = intRequestVar('itemid');
                $item =& $manager->getItem($itemid, 1, 1);
-
+               
                echo Entity::hsc(strip_tags($item['title']));
                echo Entity::hsc(strip_tags($item['title']));
-
+               
                return;
        }
        
                return;
        }
        
@@ -2122,12 +2122,12 @@ class AdminActions extends BaseActions
        public function parse_editcomment($type = 'id')
        {
                global $manager;
        public function parse_editcomment($type = 'id')
        {
                global $manager;
-
+               
                $commentid      = intRequestVar('commentid');
                $comment        = COMMENT::getComment($commentid);
                $commentid      = intRequestVar('commentid');
                $comment        = COMMENT::getComment($commentid);
-
+               
                $manager->notify('PrepareCommentForEdit', array('comment' => &$comment));
                $manager->notify('PrepareCommentForEdit', array('comment' => &$comment));
-
+               
                switch ( $type )
                {
                        case 'id':
                switch ( $type )
                {
                        case 'id':
@@ -2219,10 +2219,10 @@ class AdminActions extends BaseActions
        public function parse_editmember($type = 'id', $template_name = '')
        {
                global $CONF, $manager, $member;
        public function parse_editmember($type = 'id', $template_name = '')
        {
                global $CONF, $manager, $member;
-
+               
                $memberid = intRequestVar('memberid');
                $mem =& $manager->getMember($memberid);
                $memberid = intRequestVar('memberid');
                $mem =& $manager->getMember($memberid);
-
+               
                switch ( $type )
                {
                        case 'id':
                switch ( $type )
                {
                        case 'id':
@@ -2283,7 +2283,7 @@ class AdminActions extends BaseActions
        public function parse_editpluginfo($type)
        {
                global $manager;
        public function parse_editpluginfo($type)
        {
                global $manager;
-
+               
                $pid = intRequestVar('plugid');
                switch ( $type )
                {
                $pid = intRequestVar('plugid');
                switch ( $type )
                {
@@ -2307,29 +2307,29 @@ class AdminActions extends BaseActions
        public function parse_editplugoptionslist($template_name = '')
        {
                global $manager;
        public function parse_editplugoptionslist($template_name = '')
        {
                global $manager;
-
+               
                $pid = intRequestVar('plugid');
                $aOptions = array();
                $aOIDs  = array();
                $pid = intRequestVar('plugid');
                $aOptions = array();
                $aOIDs  = array();
-
+               
                $query  = "SELECT * FROM %s WHERE ocontext='global' AND opid=%d ORDER BY oid ASC;";
                $query = sprintf($query, sql_table('plugin_option_desc'), (integer) $pid);
                $resource = DB::getResult($query);
                $query  = "SELECT * FROM %s WHERE ocontext='global' AND opid=%d ORDER BY oid ASC;";
                $query = sprintf($query, sql_table('plugin_option_desc'), (integer) $pid);
                $resource = DB::getResult($query);
-
+               
                foreach ( $resource as $row )
                {
                        $aOIDs[] = $row['oid'];
                        $aOptions[$row['oid']] = array(
                foreach ( $resource as $row )
                {
                        $aOIDs[] = $row['oid'];
                        $aOptions[$row['oid']] = array(
-                       'oid'                   => $row['oid'],
-                       'value'                 => $row['odef'],
-                       'name'                  => $row['oname'],
-                       'description'   => $row['odesc'],
-                       'type'                  => $row['otype'],
-                       'typeinfo'              => $row['oextra'],
-                       'contextid'             => 0
+                               'oid'                   => $row['oid'],
+                               'value'                 => $row['odef'],
+                               'name'                  => $row['oname'],
+                               'description'   => $row['odesc'],
+                               'type'                  => $row['otype'],
+                               'typeinfo'              => $row['oextra'],
+                               'contextid'             => 0
                        );
                }
                        );
                }
-       
+               
                // fill out actual values
                if ( count($aOIDs) > 0 )
                {
                // fill out actual values
                if ( count($aOIDs) > 0 )
                {
@@ -2345,12 +2345,12 @@ class AdminActions extends BaseActions
        
                // call plugins
                $data = array(
        
                // call plugins
                $data = array(
-               'context'       =>  'global',
-               'plugid'        =>  $pid,
-               'options'       => &$aOptions
+                       'context'       =>  'global',
+                       'plugid'        =>  $pid,
+                       'options'       => &$aOptions
                );
                $manager->notify('PrePluginOptionsEdit', $data);
                );
                $manager->notify('PrePluginOptionsEdit', $data);
-
+               
                if ( sizeof($aOptions) > 0 )
                {
                        $template['content'] = 'plugoptionlist';
                if ( sizeof($aOptions) > 0 )
                {
                        $template['content'] = 'plugoptionlist';
@@ -2373,7 +2373,7 @@ class AdminActions extends BaseActions
        public function parse_editskin($type = 'id')
        {
                $skinid = intRequestVar('skinid');
        public function parse_editskin($type = 'id')
        {
                $skinid = intRequestVar('skinid');
-
+               
                if ( !preg_match('#^admin#', $this->skintype) )
                {
                        $skin = new SKIN($skinid);
                if ( !preg_match('#^admin#', $this->skintype) )
                {
                        $skin = new SKIN($skinid);
@@ -2382,7 +2382,7 @@ class AdminActions extends BaseActions
                {
                        $skin = new SKIN($skinid, 'AdminActions');
                }
                {
                        $skin = new SKIN($skinid, 'AdminActions');
                }
-       
+               
                switch ( $type )
                {
                        case 'id':
                switch ( $type )
                {
                        case 'id':
@@ -2522,24 +2522,24 @@ class AdminActions extends BaseActions
                static $id = NULL;
                static $name = NULL;
                static $desc = NULL;
                static $id = NULL;
                static $name = NULL;
                static $desc = NULL;
-
+               
                if ( $id == NULL )
                {
                        $id = intRequestVar('templateid');
                }
                if ( $id == NULL )
                {
                        $id = intRequestVar('templateid');
                }
-       
+               
                if ( $name == NULL )
                {
                        $name = Template::getNameFromId($id);
                }
                if ( $name == NULL )
                {
                        $name = Template::getNameFromId($id);
                }
-       
+               
                if ( $desc == NULL )
                {
                        $desc = Template::getDesc($id);
                }
                if ( $desc == NULL )
                {
                        $desc = Template::getDesc($id);
                }
-       
+               
                $template =& $manager->getTemplate($name);
                $template =& $manager->getTemplate($name);
-
+               
                switch ( $format )
                {
                        case 'id':
                switch ( $format )
                {
                        case 'id':
@@ -2562,7 +2562,7 @@ class AdminActions extends BaseActions
                                {
                                        $manager->notify('AdminTemplateExtraFields', array('fields' => &$pluginfields));
                                }
                                {
                                        $manager->notify('AdminTemplateExtraFields', array('fields' => &$pluginfields));
                                }
-       
+                               
                                foreach ( $pluginfields as $ptkey => $ptvalue )
                                {
                                        $tmplt = array();
                                foreach ( $pluginfields as $ptkey => $ptvalue )
                                {
                                        $tmplt = array();
@@ -2575,15 +2575,15 @@ class AdminActions extends BaseActions
                                        if ( !array_key_exists('TEMPLATE_EDIT_EXPLUGNAME', $tmplt) || empty($tmplt['TEMPLATE_EDIT_EXPLUGNAME']) )
                                        {
                                                $base = "</tr>\n"
                                        if ( !array_key_exists('TEMPLATE_EDIT_EXPLUGNAME', $tmplt) || empty($tmplt['TEMPLATE_EDIT_EXPLUGNAME']) )
                                        {
                                                $base = "</tr>\n"
-                                               . "<tr>\n"
-                                               . "<th colspan=\"2\"><%explugtplname%></th>\n";
+                                                     . "<tr>\n"
+                                                     . "<th colspan=\"2\"><%explugtplname%></th>\n";
                                        }
                                        else
                                        {
                                                $base = $tmplt['TEMPLATE_EDIT_EXPLUGNAME'];
                                        }
                                        $data = array(
                                        }
                                        else
                                        {
                                                $base = $tmplt['TEMPLATE_EDIT_EXPLUGNAME'];
                                        }
                                        $data = array(
-                       'explugtplname' => Entity::hsc($ptkey)
+                                               'explugtplname' => Entity::hsc($ptkey)
                                        );
                                        echo Template::fill($base, $data);
                                                
                                        );
                                        echo Template::fill($base, $data);
                                                
@@ -2605,7 +2605,7 @@ class AdminActions extends BaseActions
                        default:
                                $typedesc = defined($typedesc) ? constant($typedesc) : $typedesc;
                                $typename = defined($typename) ? constant($typename) : $typename;
                        default:
                                $typedesc = defined($typedesc) ? constant($typedesc) : $typedesc;
                                $typename = defined($typename) ? constant($typename) : $typename;
-
+                               
                                if ( !array_key_exists($typename, $template) )
                                {
                                        $content = '';
                                if ( !array_key_exists($typename, $template) )
                                {
                                        $content = '';
@@ -2617,7 +2617,7 @@ class AdminActions extends BaseActions
                                $this->parser->parse(listplug_templateEditRow($content, $typedesc, $typename, $help, $tabindex, $big, $template_name));
                                break;
                }
                                $this->parser->parse(listplug_templateEditRow($content, $typedesc, $typename, $help, $tabindex, $big, $template_name));
                                break;
                }
-       
+               
                return;
        }
        
                return;
        }
        
@@ -2631,9 +2631,9 @@ class AdminActions extends BaseActions
        public function parse_eventformextra($type = 'activation')
        {
                global $manager;
        public function parse_eventformextra($type = 'activation')
        {
                global $manager;
-
+               
                $data = array();
                $data = array();
-
+               
                switch ( $type )
                {
                        case 'activation':
                switch ( $type )
                {
                        case 'activation':
@@ -2653,8 +2653,8 @@ class AdminActions extends BaseActions
                                        Admin::error(_ERROR_ACTIVATE);
                                }
                                $data = array(
                                        Admin::error(_ERROR_ACTIVATE);
                                }
                                $data = array(
-               'type'          => 'activation',
-               'member'        => $mem
+                                       'type'          => 'activation',
+                                       'member'        => $mem
                                );
                                break;
                        case 'membermailform-notloggedin':
                                );
                                break;
                        case 'membermailform-notloggedin':
@@ -2672,14 +2672,14 @@ class AdminActions extends BaseActions
        public function parse_extrahead()
        {
                global $manager;
        public function parse_extrahead()
        {
                global $manager;
-
+               
                $extrahead = Admin::getAdminextrahead();
                $extrahead = Admin::getAdminextrahead();
-
+               
                $data = array(
                $data = array(
-'extrahead'    => &$extrahead,
-'action'       => Admin::getAdminAction()
+                       'extrahead'     => &$extrahead,
+                       'action'        => Admin::getAdminAction()
                );
                );
-
+               
                $manager->notify('AdminPrePageHead', $data);
                echo $extrahead;
                return;
                $manager->notify('AdminPrePageHead', $data);
                echo $extrahead;
                return;
@@ -2696,7 +2696,7 @@ class AdminActions extends BaseActions
        public function parse_member($what)
        {
                global $memberinfo, $member, $CONF;
        public function parse_member($what)
        {
                global $memberinfo, $member, $CONF;
-
+               
                // 1. only allow the member-details-page specific variables on member pages
                if ( $this->skintype == 'member' )
                {
                // 1. only allow the member-details-page specific variables on member pages
                if ( $this->skintype == 'member' )
                {
@@ -2722,7 +2722,7 @@ class AdminActions extends BaseActions
                                        break;
                        }
                }
                                        break;
                        }
                }
-       
+               
                // 2. the next bunch of options is available everywhere, as long as the user is logged in
                if ( $member->isLoggedIn() )
                {
                // 2. the next bunch of options is available everywhere, as long as the user is logged in
                if ( $member->isLoggedIn() )
                {
@@ -2826,7 +2826,7 @@ class AdminActions extends BaseActions
        public function parse_getblogsetting($which)
        {
                global $blog, $manager;
        public function parse_getblogsetting($which)
        {
                global $blog, $manager;
-
+               
                if ( $blog )
                {
                        $b =& $blog;
                if ( $blog )
                {
                        $b =& $blog;
@@ -3073,13 +3073,13 @@ class AdminActions extends BaseActions
        public function parse_init()
        {
                global $manager;
        public function parse_init()
        {
                global $manager;
-
+               
                $authorid = '';
                if ( requestVar('action') == 'itemedit' )
                {
                        $authorid = Admin::$contents['authorid'];
                }
                $authorid = '';
                if ( requestVar('action') == 'itemedit' )
                {
                        $authorid = Admin::$contents['authorid'];
                }
-       
+               
                Admin::$blog->insertJavaScriptInfo($authorid);
                return;
        }
                Admin::$blog->insertJavaScriptInfo($authorid);
                return;
        }
@@ -3134,7 +3134,7 @@ class AdminActions extends BaseActions
        public function parse_insplugoptcontent()
        {
                $option = Admin::getAdminaOption();
        public function parse_insplugoptcontent()
        {
                $option = Admin::getAdminaOption();
-
+               
                $meta = NucleusPlugin::getOptionMeta($option['typeinfo']);
                if ( array_key_exists('access', $meta) && $meta['access'] != 'hidden' )
                {
                $meta = NucleusPlugin::getOptionMeta($option['typeinfo']);
                if ( array_key_exists('access', $meta) && $meta['access'] != 'hidden' )
                {
@@ -3181,13 +3181,13 @@ class AdminActions extends BaseActions
        public function parse_itemnavlist($template_name)
        {
                global $CONF, $manager, $member;
        public function parse_itemnavlist($template_name)
        {
                global $CONF, $manager, $member;
-
+               
                $query  = "SELECT bshortname, cname, mname, ititle, ibody, inumber, idraft, itime"
                $query  = "SELECT bshortname, cname, mname, ititle, ibody, inumber, idraft, itime"
-               . " FROM %s, %s, %s, %s"
-               . " WHERE iblog=bnumber AND iauthor=mnumber AND icat=catid";
-
+                     . " FROM %s, %s, %s, %s"
+                     . " WHERE iblog=bnumber AND iauthor=mnumber AND icat=catid";
+               
                $query = sprintf($query, sql_table('item'), sql_table('blog'), sql_table('member'), sql_table('category'));
                $query = sprintf($query, sql_table('item'), sql_table('blog'), sql_table('member'), sql_table('category'));
-
+               
                if ( $this->skintype == 'itemlist' )
                {
                        $blog = FALSE;
                if ( $this->skintype == 'itemlist' )
                {
                        $blog = FALSE;
@@ -3218,17 +3218,17 @@ class AdminActions extends BaseActions
                        $blogid = 0;
                        $template['now'] = time();
                }
                        $blogid = 0;
                        $template['now'] = time();
                }
-       
+               
                // search through items
                $search = postVar('search');
                // search through items
                $search = postVar('search');
-
+               
                if ( !empty($search) )
                {
                        $query .= ' AND ((ititle LIKE ' . DB::quoteValue('%'.$search.'%') . ') '
                        . '  OR  (ibody LIKE ' . DB::quoteValue('%'.$search.'%') . ') '
                        . '  OR  (imore LIKE ' . DB::quoteValue('%'.$search.'%') . '))';
                }
                if ( !empty($search) )
                {
                        $query .= ' AND ((ititle LIKE ' . DB::quoteValue('%'.$search.'%') . ') '
                        . '  OR  (ibody LIKE ' . DB::quoteValue('%'.$search.'%') . ') '
                        . '  OR  (imore LIKE ' . DB::quoteValue('%'.$search.'%') . '))';
                }
-       
+               
                if ( postVar('start') )
                {
                        $start = intPostVar('start');
                if ( postVar('start') )
                {
                        $start = intPostVar('start');
@@ -3237,7 +3237,7 @@ class AdminActions extends BaseActions
                {
                        $start = 0;
                }
                {
                        $start = 0;
                }
-       
+               
                // amount of items to show
                if ( postVar('amount') )
                {
                // amount of items to show
                if ( postVar('amount') )
                {
@@ -3251,10 +3251,10 @@ class AdminActions extends BaseActions
                                $amount = 10;
                        }
                }
                                $amount = 10;
                        }
                }
-       
+               
                $query .= ' ORDER BY itime DESC'
                $query .= ' ORDER BY itime DESC'
-               . " LIMIT {$start},{$amount}";
-
+                       . " LIMIT {$start},{$amount}";
+               
                $resource = DB::getResult($query);
                if ( $resource->rowCount() > 0 )
                {
                $resource = DB::getResult($query);
                if ( $resource->rowCount() > 0 )
                {
@@ -3290,19 +3290,19 @@ class AdminActions extends BaseActions
        public function parse_itemtime($key)
        {
                global $manager;
        public function parse_itemtime($key)
        {
                global $manager;
-
+               
                $item = false;
                $itemid = intRequestVar('itemid');
                $item =& $manager->getItem($itemid, 1, 1);
                $item = false;
                $itemid = intRequestVar('itemid');
                $item =& $manager->getItem($itemid, 1, 1);
-
+               
                $blog   =& $manager->getBlog(getBlogIDFromItemID($itemid));
                $blog   =& $manager->getBlog(getBlogIDFromItemID($itemid));
-
+               
                if ( $item && $blog->convertBreaks() && requestVar('action') == 'itemedit' )
                {
                        $item['body'] = removeBreaks($item['body']);
                        $item['more'] = removeBreaks($item['more']);
                }
                if ( $item && $blog->convertBreaks() && requestVar('action') == 'itemedit' )
                {
                        $item['body'] = removeBreaks($item['body']);
                        $item['more'] = removeBreaks($item['more']);
                }
-       
+               
                $contents = array();
                if ( requestVar('action') == 'itemedit' )
                {
                $contents = array();
                if ( requestVar('action') == 'itemedit' )
                {
@@ -3311,8 +3311,8 @@ class AdminActions extends BaseActions
                elseif ( requestVar('action') == 'createitem' )
                {
                        $data = array(
                elseif ( requestVar('action') == 'createitem' )
                {
                        $data = array(
-                       'contents'      => &$contents,
-                       'blog'          => &$this->blog
+                               'contents'      => &$contents,
+                               'blog'          => &$this->blog
                        );
                        $manager->notify('PreAddItemForm', $data);
                }
                        );
                        $manager->notify('PreAddItemForm', $data);
                }
@@ -3332,11 +3332,11 @@ class AdminActions extends BaseActions
        {
                global $CONF;
                $options = array(
        {
                global $CONF;
                $options = array(
-               _SETTINGS_JSTOOLBAR_NONE,
-               _SETTINGS_JSTOOLBAR_SIMPLE,
-               _SETTINGS_JSTOOLBAR_FULL
+                       _SETTINGS_JSTOOLBAR_NONE,
+                       _SETTINGS_JSTOOLBAR_SIMPLE,
+                       _SETTINGS_JSTOOLBAR_FULL
                );
                );
-
+               
                $i = 1;
                foreach ( $options as $option )
                {
                $i = 1;
                foreach ( $options as $option )
                {
@@ -3357,9 +3357,9 @@ class AdminActions extends BaseActions
        public function parse_localeselectoptions()
        {
                global $manager;
        public function parse_localeselectoptions()
        {
                global $manager;
-
+               
                $locales = i18n::get_available_locale_list();
                $locales = i18n::get_available_locale_list();
-
+               
                $memid = intRequestVar('memberid');
                if ( $memid )
                {
                $memid = intRequestVar('memberid');
                if ( $memid )
                {
@@ -3505,11 +3505,11 @@ class AdminActions extends BaseActions
        public function parse_newestcompare()
        {
                global $nucleus;
        public function parse_newestcompare()
        {
                global $nucleus;
-
+               
                $newestVersion  = getLatestVersion();
                $newestCompare  = str_replace('/', '.', $newestVersion);
                $currentVersion = str_replace(array('/', 'v'), array('.', ''), $nucleus['version']);
                $newestVersion  = getLatestVersion();
                $newestCompare  = str_replace('/', '.', $newestVersion);
                $currentVersion = str_replace(array('/', 'v'), array('.', ''), $nucleus['version']);
-
+               
                if ( $newestVersion && version_compare($newestCompare, $currentVersion, '>') )
                {
                        echo '<br /><a style="color:red" href="http://nucleuscms.org/upgrade.php" title="' . _ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TITLE . '">';
                if ( $newestVersion && version_compare($newestCompare, $currentVersion, '>') )
                {
                        echo '<br /><a style="color:red" href="http://nucleuscms.org/upgrade.php" title="' . _ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TITLE . '">';
@@ -3528,24 +3528,24 @@ class AdminActions extends BaseActions
        public function parse_newmemberselect($template_name = '')
        {
                $blogid = intRequestVar('blogid');
        public function parse_newmemberselect($template_name = '')
        {
                $blogid = intRequestVar('blogid');
-
+               
                $query = "SELECT tmember FROM %s WHERE tblog=%d;";
                $query = sprintf($query, sql_table('team'), (integer) $blogid);
                $res = DB::getResult($query);
                $query = "SELECT tmember FROM %s WHERE tblog=%d;";
                $query = sprintf($query, sql_table('team'), (integer) $blogid);
                $res = DB::getResult($query);
-
+               
                $tmem = array();
                foreach ( $res as $row )
                {
                        $tmem[] = intval($row['tmember']);
                }
                $tmem = array();
                foreach ( $res as $row )
                {
                        $tmem[] = intval($row['tmember']);
                }
-       
+               
                $query  = "SELECT mname as text, mnumber as value FROM %s WHERE mnumber NOT IN (%s);";
                $query = sprintf($query, sql_table('member'), implode(', ', $tmem));
                $query  = "SELECT mname as text, mnumber as value FROM %s WHERE mnumber NOT IN (%s);";
                $query = sprintf($query, sql_table('member'), implode(', ', $tmem));
-
+               
                $template = array(
                $template = array(
-               'name'          => 'memberid',
-               'tabindex'      => 10000,
-               'selected'      => 0
+                       'name'          => 'memberid',
+                       'tabindex'      => 10000,
+                       'selected'      => 0
                );
                $this->parser->parse(showlist($query, 'select', $template, $template_name));
                return;
                );
                $this->parser->parse(showlist($query, 'select', $template, $template_name));
                return;
@@ -3578,7 +3578,7 @@ class AdminActions extends BaseActions
        public function parse_outputspecialdirs($type)
        {
                global $DIR_MEDIA, $DIR_NUCLEUS;
        public function parse_outputspecialdirs($type)
        {
                global $DIR_MEDIA, $DIR_NUCLEUS;
-
+               
                switch ( $type )
                {
                        case 'nucleusdir':
                switch ( $type )
                {
                        case 'nucleusdir':
@@ -3602,7 +3602,7 @@ class AdminActions extends BaseActions
        {
                $passvar   = Admin::getAdminpassvar();
                $oldaction = postVar('oldaction');
        {
                $passvar   = Admin::getAdminpassvar();
                $oldaction = postVar('oldaction');
-
+               
                if ( ($oldaction != 'logout')
                && ($oldaction != 'login')
                && $passvar
                if ( ($oldaction != 'logout')
                && ($oldaction != 'login')
                && $passvar
@@ -3623,7 +3623,7 @@ class AdminActions extends BaseActions
        public function parse_pluginextras($type = 'global')
        {
                global $manager;
        public function parse_pluginextras($type = 'global')
        {
                global $manager;
-
+               
                switch ( $type )
                {
                        case 'member':
                switch ( $type )
                {
                        case 'member':
@@ -3638,14 +3638,14 @@ class AdminActions extends BaseActions
                                break;
                        case 'createaccount':
                                $data = array(
                                break;
                        case 'createaccount':
                                $data = array(
-               'type'          => 'createaccount.php',
-               'prelabel'      => '',
-               'postlabel'     => '<br />',
-               'prefield'      => '',
-               'postfield'     => '<br /><br />'
-               );
-               $manager->notify('RegistrationFormExtraFields', $data);
-               break;
+                                       'type'          => 'createaccount.php',
+                                       'prelabel'      => '',
+                                       'postlabel'     => '<br />',
+                                       'prefield'      => '',
+                                       'postfield'     => '<br /><br />'
+                               );
+                               $manager->notify('RegistrationFormExtraFields', $data);
+                               break;
                        default:
                                $manager->notify('GeneralSettingsFormExtras', array());
                                break;
                        default:
                                $manager->notify('GeneralSettingsFormExtras', array());
                                break;
@@ -3663,11 +3663,11 @@ class AdminActions extends BaseActions
        public function parse_pluginhelp()
        {
                global $manager, $DIR_PLUGINS;
        public function parse_pluginhelp()
        {
                global $manager, $DIR_PLUGINS;
-
+               
                $plugid = intGetVar('plugid');
                $plugName = $manager->getPluginNameFromPid($plugid);
                $plug =& $manager->getPlugin($plugName);
                $plugid = intGetVar('plugid');
                $plugName = $manager->getPluginNameFromPid($plugid);
                $plug =& $manager->getPlugin($plugName);
-
+               
                if ( $plug->supportsFeature('HelpPage') > 0 )
                {
                        $helpfile = $DIR_PLUGINS . $plug->getShortName() . '/help.';
                if ( $plug->supportsFeature('HelpPage') > 0 )
                {
                        $helpfile = $DIR_PLUGINS . $plug->getShortName() . '/help.';
@@ -3698,12 +3698,12 @@ class AdminActions extends BaseActions
        {
                $query = "SELECT * FROM %s ORDER BY porder ASC;";
                $query = sprintf($query, sql_table('plugin'));
        {
                $query = "SELECT * FROM %s ORDER BY porder ASC;";
                $query = sprintf($query, sql_table('plugin'));
-
+               
                $template['content']  = 'pluginlist';
                $template['tabindex'] = 10;
                $template['content']  = 'pluginlist';
                $template['tabindex'] = 10;
-
+               
                $this->parser->parse(showlist($query, 'table', $template, $template_name));
                $this->parser->parse(showlist($query, 'table', $template, $template_name));
-
+               
                return;
        }
        
                return;
        }
        
@@ -3717,7 +3717,7 @@ class AdminActions extends BaseActions
        public function parse_pluginoptions($context='global', $template_name='')
        {
                global $itemid, $manager;
        public function parse_pluginoptions($context='global', $template_name='')
        {
                global $itemid, $manager;
-
+               
                switch ( $context )
                {
                        case 'member':
                switch ( $context )
                {
                        case 'member':
@@ -3733,7 +3733,7 @@ class AdminActions extends BaseActions
                                $contextid = $itemid;
                                break;
                }
                                $contextid = $itemid;
                                break;
                }
-       
+               
                /* Actually registererd plugin options */
                $aIdToValue = array();
                $query = "SELECT oid, ovalue FROM %s WHERE ocontextid=%d;";
                /* Actually registererd plugin options */
                $aIdToValue = array();
                $query = "SELECT oid, ovalue FROM %s WHERE ocontextid=%d;";
@@ -3743,12 +3743,12 @@ class AdminActions extends BaseActions
                {
                        $aIdToValue[$row['oid']] = $row['ovalue'];
                }
                {
                        $aIdToValue[$row['oid']] = $row['ovalue'];
                }
-       
+               
                /* Currently available plugin options */
                $query  = "SELECT * FROM %s, %s WHERE opid=pid and ocontext= %s ORDER BY porder, oid ASC;";
                $query  = sprintf($query, sql_table('plugin_option_desc'), sql_table('plugin'), DB::quoteValue($context));
                $res    = DB::getResult($query);
                /* Currently available plugin options */
                $query  = "SELECT * FROM %s, %s WHERE opid=pid and ocontext= %s ORDER BY porder, oid ASC;";
                $query  = sprintf($query, sql_table('plugin_option_desc'), sql_table('plugin'), DB::quoteValue($context));
                $res    = DB::getResult($query);
-
+               
                $options = array();
                foreach ($res as $row )
                {
                $options = array();
                foreach ($res as $row )
                {
@@ -3760,28 +3760,28 @@ class AdminActions extends BaseActions
                        {
                                $value = $aIdToValue[$row['oid']];
                        }
                        {
                                $value = $aIdToValue[$row['oid']];
                        }
-       
+                       
                        $options[] = array(
                        $options[] = array(
-       'pid'                   => $row['pid'],
-       'pfile'                 => $row['pfile'],
-       'oid'                   => $row['oid'],
-       'value'                 => $value,
-       'name'                  => $row['oname'],
-       'description'   => $row['odesc'],
-       'type'                  => $row['otype'],
-       'typeinfo'              => $row['oextra'],
-       'contextid'             => $contextid,
-       'extra'                 => ''
-       );
+                               'pid'                   => $row['pid'],
+                               'pfile'                 => $row['pfile'],
+                               'oid'                   => $row['oid'],
+                               'value'                 => $value,
+                               'name'                  => $row['oname'],
+                               'description'   => $row['odesc'],
+                               'type'                  => $row['otype'],
+                               'typeinfo'              => $row['oextra'],
+                               'contextid'             => $contextid,
+                               'extra'                 => ''
+                       );
                }
                }
-       
+               
                $data = array(
                $data = array(
-'context'      =>  $context,
-'contextid'    =>  $contextid,
-'options'      => &$options
+                       'context'       =>  $context,
+                       'contextid'     =>  $contextid,
+                       'options'       => &$options
                );
                $manager->notify('PrePluginOptionsEdit', $data);
                );
                $manager->notify('PrePluginOptionsEdit', $data);
-
+               
                $template = array();
                if ( $template_name )
                {
                $template = array();
                if ( $template_name )
                {
@@ -3796,7 +3796,7 @@ class AdminActions extends BaseActions
                        {
                                $template['title'] = $templates['INSERT_PLUGOPTION_TITLE'];
                        }
                        {
                                $template['title'] = $templates['INSERT_PLUGOPTION_TITLE'];
                        }
-       
+                       
                        if ( !array_key_exists('INSERT_PLUGOPTION_BODY', $templates) || empty($templates['INSERT_PLUGOPTION_BODY']) )
                        {
                                $template['body'] = "<tr>"
                        if ( !array_key_exists('INSERT_PLUGOPTION_BODY', $templates) || empty($templates['INSERT_PLUGOPTION_BODY']) )
                        {
                                $template['body'] = "<tr>"
@@ -3808,9 +3808,9 @@ class AdminActions extends BaseActions
                                $template['body'] = $templates['INSERT_PLUGOPTION_BODY'];
                        }
                }
                                $template['body'] = $templates['INSERT_PLUGOPTION_BODY'];
                        }
                }
-       
+               
                $prevPid = -1;
                $prevPid = -1;
-
+               
                foreach ( $options as $option )
                {
                        // new plugin?
                foreach ( $options as $option )
                {
                        // new plugin?
@@ -3819,9 +3819,9 @@ class AdminActions extends BaseActions
                                $prevPid  = $option['pid'];
                                $this->parser->parse($template['title']);
                        }
                                $prevPid  = $option['pid'];
                                $this->parser->parse($template['title']);
                        }
-       
+                       
                        $meta = NucleusPlugin::getOptionMeta($option['typeinfo']);
                        $meta = NucleusPlugin::getOptionMeta($option['typeinfo']);
-
+                       
                        if ( @$meta['access'] != 'hidden' )
                        {
                                $parsed = $this->parser->parse($template['body']);
                        if ( @$meta['access'] != 'hidden' )
                        {
                                $parsed = $this->parser->parse($template['body']);
@@ -3853,7 +3853,7 @@ class AdminActions extends BaseActions
                        $query =  'SELECT bnumber as value, bname as text FROM %s, %s WHERE tblog=bnumber and tmember=%d ORDER BY bname;';
                        $query = sprintf($query, sql_table('blog'), sql_table('team'), (integer) $member->getID());
                }
                        $query =  'SELECT bnumber as value, bname as text FROM %s, %s WHERE tblog=bnumber and tmember=%d ORDER BY bname;';
                        $query = sprintf($query, sql_table('blog'), sql_table('team'), (integer) $member->getID());
                }
-       
+               
                $template['name']               = 'blogid';
                $template['tabindex']   = 15000;
                $template['extra']              = _QMENU_ADD_SELECT;
                $template['name']               = 'blogid';
                $template['tabindex']   = 15000;
                $template['extra']              = _QMENU_ADD_SELECT;
@@ -3861,9 +3861,9 @@ class AdminActions extends BaseActions
                $template['shorten']    = 10;
                $template['shortenel']  = '';
                $template['javascript'] = 'onchange="return form.submit()"';
                $template['shorten']    = 10;
                $template['shortenel']  = '';
                $template['javascript'] = 'onchange="return form.submit()"';
-
+               
                $this->parser->parse(showlist($query, 'select', $template, $template_name));
                $this->parser->parse(showlist($query, 'select', $template, $template_name));
-
+               
                return;
        }
        
                return;
        }
        
@@ -3878,14 +3878,14 @@ class AdminActions extends BaseActions
        {
                global $manager;
                $templates = array();
        {
                global $manager;
                $templates = array();
-
+               
                if ( !empty($template_name) )
                {
                        $templates = & $manager->getTemplate($template_name);
                }
                $pluginExtras = array();
                $manager->notify('QuickMenu', array('options' => &$pluginExtras));
                if ( !empty($template_name) )
                {
                        $templates = & $manager->getTemplate($template_name);
                }
                $pluginExtras = array();
                $manager->notify('QuickMenu', array('options' => &$pluginExtras));
-
+               
                $template  = array();
                if ( count($pluginExtras) > 0 )
                {
                $template  = array();
                if ( count($pluginExtras) > 0 )
                {
@@ -3898,7 +3898,7 @@ class AdminActions extends BaseActions
                        {
                                $template['head'] = $templates['PLUGIN_QUICKMENU_HEAD'];
                        }
                        {
                                $template['head'] = $templates['PLUGIN_QUICKMENU_HEAD'];
                        }
-       
+                       
                        if ( !array_key_exists('PLUGIN_QUICKMENU_BODY', $templates) && empty($templates['PLUGIN_QUICKMENU_BODY']) )
                        {
                                $template['body'] = "<li><a href=\"<%plugadminurl%>\" title=\"<%plugadmintooltip%>\"><%plugadmintitle%></a></li>\n";
                        if ( !array_key_exists('PLUGIN_QUICKMENU_BODY', $templates) && empty($templates['PLUGIN_QUICKMENU_BODY']) )
                        {
                                $template['body'] = "<li><a href=\"<%plugadminurl%>\" title=\"<%plugadmintooltip%>\"><%plugadmintitle%></a></li>\n";
@@ -3907,7 +3907,7 @@ class AdminActions extends BaseActions
                        {
                                $template['body'] = $templates['PLUGIN_QUICKMENU_BODY'];
                        }
                        {
                                $template['body'] = $templates['PLUGIN_QUICKMENU_BODY'];
                        }
-       
+                       
                        if ( !array_key_exists('PLUGIN_QUICKMENU_FOOT', $templates) || empty($templates['PLUGIN_QUICKMENU_FOOT']) )
                        {
                                $template['foot'] = "</ul>\n";
                        if ( !array_key_exists('PLUGIN_QUICKMENU_FOOT', $templates) || empty($templates['PLUGIN_QUICKMENU_FOOT']) )
                        {
                                $template['foot'] = "</ul>\n";
@@ -3916,14 +3916,14 @@ class AdminActions extends BaseActions
                        {
                                $template['foot'] = $templates['PLUGIN_QUICKMENU_FOOT'];
                        }
                        {
                                $template['foot'] = $templates['PLUGIN_QUICKMENU_FOOT'];
                        }
-       
+                       
                        $this->parser->parse($template['head']);
                        foreach ( $pluginExtras as $aInfo )
                        {
                                $data = array(
                        $this->parser->parse($template['head']);
                        foreach ( $pluginExtras as $aInfo )
                        {
                                $data = array(
-               'plugadminurl'          => Entity::hsc($aInfo['url']),
-               'plugadmintooltip'      => Entity::hsc($aInfo['tooltip']),
-               'plugadmintitle'        => Entity::hsc($aInfo['title']),
+                                       'plugadminurl'          => Entity::hsc($aInfo['url']),
+                                       'plugadmintooltip'      => Entity::hsc($aInfo['tooltip']),
+                                       'plugadmintitle'        => Entity::hsc($aInfo['title']),
                                );
                                $this->parser->parse(Template::fill($template['body'], $data));
                        }
                                );
                                $this->parser->parse(Template::fill($template['body'], $data));
                        }
@@ -3975,12 +3975,12 @@ class AdminActions extends BaseActions
        public function parse_selectlocalskinfiles()
        {
                global $DIR_SKINS;
        public function parse_selectlocalskinfiles()
        {
                global $DIR_SKINS;
-
+               
                if ( !class_exists('SkinImport', FALSE) )
                {
                        include_libs('skinie.php');
                }
                if ( !class_exists('SkinImport', FALSE) )
                {
                        include_libs('skinie.php');
                }
-       
+               
                if ( !preg_match('#^admin#', $this->skintype) )
                {
                        $skindir = $DIR_SKINS;
                if ( !preg_match('#^admin#', $this->skintype) )
                {
                        $skindir = $DIR_SKINS;
@@ -3989,7 +3989,7 @@ class AdminActions extends BaseActions
                {
                        $skindir = "{$DIR_SKINS}admin/";
                }
                {
                        $skindir = "{$DIR_SKINS}admin/";
                }
-       
+               
                $candidates = SkinImport::searchForCandidates($skindir);
                foreach ( $candidates as $skinname => $skinfile )
                {
                $candidates = SkinImport::searchForCandidates($skindir);
                foreach ( $candidates as $skinname => $skinfile )
                {
@@ -4016,7 +4016,7 @@ class AdminActions extends BaseActions
                        case 'blog':
                                $query = "SELECT bshortname, bname FROM %s;";
                                $show  = array(
                        case 'blog':
                                $query = "SELECT bshortname, bname FROM %s;";
                                $show  = array(
-                               'content' => 'shortblognames'
+                                       'content' => 'shortblognames'
                                );
                                $query = sprintf($query, sql_table('blog'));
                                break;
                                );
                                $query = sprintf($query, sql_table('blog'));
                                break;
@@ -4030,7 +4030,7 @@ class AdminActions extends BaseActions
                                        $query = "SELECT tdname as name, tddesc as description FROM %s WHERE tdname LIKE 'admin/%%';";
                                }
                                $show  = array(
                                        $query = "SELECT tdname as name, tddesc as description FROM %s WHERE tdname LIKE 'admin/%%';";
                                }
                                $show  = array(
-                               'content' => 'shortnames'
+                                       'content' => 'shortnames'
                                );
                                $query = sprintf($query, sql_table('template_desc'));
                                break;
                                );
                                $query = sprintf($query, sql_table('template_desc'));
                                break;
@@ -4051,7 +4051,7 @@ class AdminActions extends BaseActions
        public function parse_skinielist($type, $template_name = '')
        {
                global $manager;
        public function parse_skinielist($type, $template_name = '')
        {
                global $manager;
-
+               
                $templates = array();
                if ( $template_name )
                {
                $templates = array();
                if ( $template_name )
                {
@@ -4071,7 +4071,7 @@ class AdminActions extends BaseActions
                {
                        $template = $templates['SKINIE_EXPORT_LIST'];
                }
                {
                        $template = $templates['SKINIE_EXPORT_LIST'];
                }
-       
+               
                switch ( $type )
                {
                        case 'skin':
                switch ( $type )
                {
                        case 'skin':
@@ -4086,10 +4086,10 @@ class AdminActions extends BaseActions
                                foreach ( $res as $row )
                                {
                                        $data = array(
                                foreach ( $res as $row )
                                {
                                        $data = array(
-                       'typeid'        => 'skin[' . $row['sdnumber'] . ']',
-                       'expid'         => 'skinexp' . $row['sdnumber'],
-                       'expname'       => Entity::hsc($row['sdname']),
-                       'expdesc'       => Entity::hsc($row['sddesc'])
+                                               'typeid'        => 'skin[' . $row['sdnumber'] . ']',
+                                               'expid'         => 'skinexp' . $row['sdnumber'],
+                                               'expname'       => Entity::hsc($row['sdname']),
+                                               'expdesc'       => Entity::hsc($row['sddesc'])
                                        );
                                        echo Template::fill($template, $data);
                                }
                                        );
                                        echo Template::fill($template, $data);
                                }
@@ -4098,7 +4098,6 @@ class AdminActions extends BaseActions
                                if ( !preg_match('#^admin#', $this->skintype) )
                                {
                                        $res = DB::getResult('SELECT * FROM '.sql_table('template_desc'). " WHERE tdname NOT LIKE 'admin/%%';");
                                if ( !preg_match('#^admin#', $this->skintype) )
                                {
                                        $res = DB::getResult('SELECT * FROM '.sql_table('template_desc'). " WHERE tdname NOT LIKE 'admin/%%';");
-
                                }
                                else
                                {
                                }
                                else
                                {
@@ -4107,10 +4106,10 @@ class AdminActions extends BaseActions
                                foreach ( $res as $row )
                                {
                                        $data = array(
                                foreach ( $res as $row )
                                {
                                        $data = array(
-                       'typeid'        => 'template[' . $row['tdnumber'] . ']',
-                       'expid'         => 'templateexp' . $row['tdnumber'],
-                       'expname'       => Entity::hsc($row['tdname']),
-                       'expdesc'       => Entity::hsc($row['tddesc'])
+                                               'typeid'        => 'template[' . $row['tdnumber'] . ']',
+                                               'expid'         => 'templateexp' . $row['tdnumber'],
+                                               'expname'       => Entity::hsc($row['tdname']),
+                                               'expdesc'       => Entity::hsc($row['tddesc'])
                                        );
                                        echo Template::fill($template, $data);
                                }
                                        );
                                        echo Template::fill($template, $data);
                                }
@@ -4129,7 +4128,7 @@ class AdminActions extends BaseActions
        public function parse_skinoverview($template_name = '')
        {
                global $CONF;
        public function parse_skinoverview($template_name = '')
        {
                global $CONF;
-
+               
                $template = array();
                if ( !preg_match('#^admin#', $this->skintype) )
                {
                $template = array();
                if ( !preg_match('#^admin#', $this->skintype) )
                {
@@ -4150,12 +4149,12 @@ class AdminActions extends BaseActions
                        $template['default'] = $CONF['AdminSkin'];
                }
                $query = sprintf($query, sql_table('skin_desc'));
                        $template['default'] = $CONF['AdminSkin'];
                }
                $query = sprintf($query, sql_table('skin_desc'));
-
+               
                $template['tabindex'] = 10;
                $template['content'] = 'skinlist';
                $template['tabindex'] = 10;
                $template['content'] = 'skinlist';
-
+               
                $this->parser->parse(showlist($query, 'table', $template, $template_name));
                $this->parser->parse(showlist($query, 'table', $template, $template_name));
-
+               
                return;
        }
        
                return;
        }
        
@@ -4181,17 +4180,17 @@ class AdminActions extends BaseActions
                {
                        /* TODO: use Skin class */
                        $regularType = array(
                {
                        /* TODO: use Skin class */
                        $regularType = array(
-       'index',
-       'item',
-       'archivelist',
-       'archive',
-       'search',
-       'error',
-       'member',
-       'imagepopup'
-       );
+                               'index',
+                               'item',
+                               'archivelist',
+                               'archive',
+                               'search',
+                               'error',
+                               'member',
+                               'imagepopup'
+                       );
                }
                }
-       
+               
                if ( in_array($nowSkinType, $regularType) )
                {
                        help('skinpart' . $nowSkinType);
                if ( in_array($nowSkinType, $regularType) )
                {
                        help('skinpart' . $nowSkinType);
@@ -4213,11 +4212,11 @@ class AdminActions extends BaseActions
        public function parse_specialskinlist($template_name = '')
        {
                global $CONF, $manager;
        public function parse_specialskinlist($template_name = '')
        {
                global $CONF, $manager;
-
+               
                $template = array();
                $template = array();
-
+               
                $skinid = intRequestVar('skinid');
                $skinid = intRequestVar('skinid');
-
+               
                if ( !preg_match('#^admin#', $this->skintype) )
                {
                        $skin = new Skin($skinid);
                if ( !preg_match('#^admin#', $this->skintype) )
                {
                        $skin = new Skin($skinid);
@@ -4232,19 +4231,19 @@ class AdminActions extends BaseActions
                }
                $normal_types = $skin->getDefaultTypes();
                $available_types = $skin->getAvailableTypes();
                }
                $normal_types = $skin->getDefaultTypes();
                $available_types = $skin->getAvailableTypes();
-
+               
                $special_skintypes = array();
                foreach( $available_types as $skintype => $skinname )
                {
                        if ( !array_key_exists($skintype, $normal_types) )
                        {
                                $special_skintypes[] = array(
                $special_skintypes = array();
                foreach( $available_types as $skintype => $skinname )
                {
                        if ( !array_key_exists($skintype, $normal_types) )
                        {
                                $special_skintypes[] = array(
-               'skintype'              => $skintype,
-               'skintypename'  => $skinname
+                                       'skintype'              => $skintype,
+                                       'skintypename'  => $skinname
                                );
                        }
                }
                                );
                        }
                }
-       
+               
                if ( sizeof($special_skintypes) > 0 )
                {
                        $template['tabindex'] = 75;
                if ( sizeof($special_skintypes) > 0 )
                {
                        $template['tabindex'] = 75;
@@ -4278,7 +4277,7 @@ class AdminActions extends BaseActions
                {
                        $base = constant($which);
                }
                {
                        $base = constant($which);
                }
-       
+               
                if ( preg_match('#[^<|%].*[^%|>]#', $val, $matchies) )
                {
                        if ( !preg_match('#[(].*[^)]#', $matchies[0], $args) )
                if ( preg_match('#[^<|%].*[^%|>]#', $val, $matchies) )
                {
                        if ( !preg_match('#[(].*[^)]#', $matchies[0], $args) )
@@ -4290,13 +4289,13 @@ class AdminActions extends BaseActions
                                $arg = trim($args[0], '()');
                                $met = 'parse_' . substr($matchies[0], 0, strpos($matchies[0], '('));
                        }
                                $arg = trim($args[0], '()');
                                $met = 'parse_' . substr($matchies[0], 0, strpos($matchies[0], '('));
                        }
-       
+                       
                        if ( method_exists($this, $met) )
                        {
                                $value = call_user_func(array(&$this, $met), $arg);
                        }
                }
                        if ( method_exists($this, $met) )
                        {
                                $value = call_user_func(array(&$this, $met), $arg);
                        }
                }
-       
+               
                if ( !isset($value) || empty($value) )
                {
                        $value = $val;
                if ( !isset($value) || empty($value) )
                {
                        $value = $val;
@@ -4316,12 +4315,12 @@ class AdminActions extends BaseActions
        public function parse_systemsettings($type = 'phpinfo', $template_name = '')
        {
                global $manager, $member, $CONF, $nucleus;
        public function parse_systemsettings($type = 'phpinfo', $template_name = '')
        {
                global $manager, $member, $CONF, $nucleus;
-
+               
                $member->isAdmin() or Admin::disallow();
                $member->isAdmin() or Admin::disallow();
-
+               
                $enable  = _ADMIN_SYSTEMOVERVIEW_ENABLE;
                $disable = _ADMIN_SYSTEMOVERVIEW_DISABLE;
                $enable  = _ADMIN_SYSTEMOVERVIEW_ENABLE;
                $disable = _ADMIN_SYSTEMOVERVIEW_DISABLE;
-
+               
                switch ( $type )
                {
                        case 'phpversion':
                switch ( $type )
                {
                        case 'phpversion':
@@ -4359,9 +4358,9 @@ class AdminActions extends BaseActions
                                {
                                        $template = $templates['SYSTEMINFO_GDSETTINGS'];
                                }
                                {
                                        $template = $templates['SYSTEMINFO_GDSETTINGS'];
                                }
-       
+                               
                                $gdinfo = gd_info();
                                $gdinfo = gd_info();
-
+                               
                                foreach ( $gdinfo as $key => $value )
                                {
                                        if ( is_bool($value) )
                                foreach ( $gdinfo as $key => $value )
                                {
                                        if ( is_bool($value) )
@@ -4373,8 +4372,8 @@ class AdminActions extends BaseActions
                                                $value = Entity::hsc($value);
                                        }
                                        $data = array(
                                                $value = Entity::hsc($value);
                                        }
                                        $data = array(
-                       'key'   => $key,
-                       'value' => $value,
+                                               'key'   => $key,
+                                               'value' => $value,
                                        );
                                        echo Template::fill($template, $data);
                                }
                                        );
                                        echo Template::fill($template, $data);
                                }
@@ -4438,12 +4437,12 @@ class AdminActions extends BaseActions
                        $template['cloneaction'] = 'admintemplateclone';
                }
                $query = sprintf($query, sql_table('template_desc'));
                        $template['cloneaction'] = 'admintemplateclone';
                }
                $query = sprintf($query, sql_table('template_desc'));
-
+               
                $template['tabindex'] = 10;
                $template['content'] = 'templatelist';
                $template['tabindex'] = 10;
                $template['content'] = 'templatelist';
-
+               
                $this->parser->parse(showlist($query, 'table', $template, $template_name));
                $this->parser->parse(showlist($query, 'table', $template, $template_name));
-
+               
                return;
        }
        
                return;
        }
        
@@ -4485,7 +4484,7 @@ class AdminActions extends BaseActions
        {
                global $member;
                $showAll = requestVar('showall');
        {
                global $member;
                $showAll = requestVar('showall');
-
+               
                if ( $member->isAdmin() && ($showAll == 'yes') )
                {
                        // Super-Admins have access to all blogs! (no add item support though)
                if ( $member->isAdmin() && ($showAll == 'yes') )
                {
                        // Super-Admins have access to all blogs! (no add item support though)
@@ -4502,7 +4501,7 @@ class AdminActions extends BaseActions
                        . " ORDER BY bnumber;";
                        $query = sprintf($query, sql_table('blog'), sql_table('team'), (integer) $member->getID());
                }
                        . " ORDER BY bnumber;";
                        $query = sprintf($query, sql_table('blog'), sql_table('team'), (integer) $member->getID());
                }
-       
+               
                $resource = DB::getResult($query);
                if ( ($showAll != 'yes') && $member->isAdmin() )
                {
                $resource = DB::getResult($query);
                if ( ($showAll != 'yes') && $member->isAdmin() )
                {
@@ -4514,7 +4513,7 @@ class AdminActions extends BaseActions
                                echo '<p><a href="index.php?action=overview&amp;showall=yes">' . _OVERVIEW_SHOWALL . '</a></p>';
                        }
                }
                                echo '<p><a href="index.php?action=overview&amp;showall=yes">' . _OVERVIEW_SHOWALL . '</a></p>';
                        }
                }
-       
+               
                if ( $resource->rowCount() > 0 )
                {
                        $template['content']    = 'bloglist';
                if ( $resource->rowCount() > 0 )
                {
                        $template['content']    = 'bloglist';
@@ -4545,7 +4544,7 @@ class AdminActions extends BaseActions
                        echo _OVERVIEW_NOBLOGS;
                }
                $resource->closeCursor();
                        echo _OVERVIEW_NOBLOGS;
                }
                $resource->closeCursor();
-
+               
                return;
        }
        
                return;
        }
        
@@ -4561,7 +4560,7 @@ class AdminActions extends BaseActions
        protected function checkCondition($field, $name='', $value = '')
        {
                global $CONF, $archiveprevexists, $archivenextexists, $blog, $catid, $itemidnext, $itemidprev, $manager, $member;
        protected function checkCondition($field, $name='', $value = '')
        {
                global $CONF, $archiveprevexists, $archivenextexists, $blog, $catid, $itemidnext, $itemidprev, $manager, $member;
-
+               
                $condition = 0;
                switch ( $field )
                {
                $condition = 0;
                switch ( $field )
                {
@@ -4757,16 +4756,16 @@ class AdminActions extends BaseActions
        private function ifPlugin($name, $key = '', $value = '')
        {
                global $manager;
        private function ifPlugin($name, $key = '', $value = '')
        {
                global $manager;
-
+               
                $plugin =& $manager->getPlugin("NP_{$name}");
                if ( !$plugin )
                {
                        return;
                }
                $plugin =& $manager->getPlugin("NP_{$name}");
                if ( !$plugin )
                {
                        return;
                }
-       
+               
                $params = func_get_args();
                array_shift($params);
                $params = func_get_args();
                array_shift($params);
-
+               
                return call_user_func_array(array(&$plugin, 'doIf'), $params);
        }
        
                return call_user_func_array(array(&$plugin, 'doIf'), $params);
        }
        
@@ -4781,13 +4780,13 @@ class AdminActions extends BaseActions
        private function ifCategory($key = '', $value='')
        {
                global $blog, $catid;
        private function ifCategory($key = '', $value='')
        {
                global $blog, $catid;
-
+               
                // when no parameter is defined, just check if a category is selected
                if (($key != 'catname' && $key != 'catid') || ($value == ''))
                {
                        return $blog->isValidCategory($catid);
                }
                // when no parameter is defined, just check if a category is selected
                if (($key != 'catname' && $key != 'catid') || ($value == ''))
                {
                        return $blog->isValidCategory($catid);
                }
-       
+               
                // check category name
                if ( $key == 'catname' )
                {
                // check category name
                if ( $key == 'catname' )
                {
@@ -4797,13 +4796,13 @@ class AdminActions extends BaseActions
                                return $blog->isValidCategory($catid);
                        }
                }
                                return $blog->isValidCategory($catid);
                        }
                }
-       
+               
                // check category id
                if (($key == 'catid') && ($value == $catid))
                {
                        return $blog->isValidCategory($catid);
                }
                // check category id
                if (($key == 'catid') && ($value == $catid))
                {
                        return $blog->isValidCategory($catid);
                }
-       
+               
                return FALSE;
        }
        
                return FALSE;
        }
        
@@ -4817,19 +4816,19 @@ class AdminActions extends BaseActions
        private function ifOnTeam($blogName = '')
        {
                global $blog, $member, $manager;
        private function ifOnTeam($blogName = '')
        {
                global $blog, $member, $manager;
-
+               
                // when no blog found
                if ( ($blogName == '') && !is_object($blog) )
                {
                        return 0;
                }
                // when no blog found
                if ( ($blogName == '') && !is_object($blog) )
                {
                        return 0;
                }
-       
+               
                // explicit blog selection
                if ($blogName != '')
                {
                        $blogid = getBlogIDFromName($blogName);
                }
                // explicit blog selection
                if ($blogName != '')
                {
                        $blogid = getBlogIDFromName($blogName);
                }
-       
+               
                if (($blogName == '') || !$manager->existsBlogID($blogid))
                {
                        // use current blog
                if (($blogName == '') || !$manager->existsBlogID($blogid))
                {
                        // use current blog
@@ -4848,19 +4847,19 @@ class AdminActions extends BaseActions
        private function ifAdmin($blogName = '')
        {
                global $blog, $member, $manager;
        private function ifAdmin($blogName = '')
        {
                global $blog, $member, $manager;
-
+               
                // when no blog found
                if (($blogName == '') && (!is_object($blog)))
                {
                        return 0;
                }
                // when no blog found
                if (($blogName == '') && (!is_object($blog)))
                {
                        return 0;
                }
-       
+               
                // explicit blog selection
                if ($blogName != '')
                {
                        $blogid = getBlogIDFromName($blogName);
                }
                // explicit blog selection
                if ($blogName != '')
                {
                        $blogid = getBlogIDFromName($blogName);
                }
-       
+               
                if (($blogName == '') || !$manager->existsBlogID($blogid))
                {
                        // use current blog
                if (($blogName == '') || !$manager->existsBlogID($blogid))
                {
                        // use current blog
@@ -4939,14 +4938,14 @@ class AdminActions extends BaseActions
        static function customHelplink($id, $tplName = '', $url = '', $title = '', $onclick = '')
        {
                global $CONF, $manager;
        static function customHelplink($id, $tplName = '', $url = '', $title = '', $onclick = '')
        {
                global $CONF, $manager;
-
+               
                $templates = array();
                $templates = array();
-
+               
                if ( $tplName )
                {
                        $templates =& $manager->getTemplate($tplName);
                }
                if ( $tplName )
                {
                        $templates =& $manager->getTemplate($tplName);
                }
-       
+               
                if ( !array_key_exists('ADMIN_CUSTOMHELPLINK_ANCHOR', $templates) || empty($templates['ADMIN_CUSTOMHELPLINK_ANCHOR']) )
                {
                        $template = "<a href=\"<%helpurl%>#<%helptarget%>\" title=\"<%title%>\" <%onclick%>>\n";
                if ( !array_key_exists('ADMIN_CUSTOMHELPLINK_ANCHOR', $templates) || empty($templates['ADMIN_CUSTOMHELPLINK_ANCHOR']) )
                {
                        $template = "<a href=\"<%helpurl%>#<%helptarget%>\" title=\"<%title%>\" <%onclick%>>\n";
@@ -4955,12 +4954,12 @@ class AdminActions extends BaseActions
                {
                        $template = $templates['ADMIN_CUSTOMHELPLINK_ANCHOR'];
                }
                {
                        $template = $templates['ADMIN_CUSTOMHELPLINK_ANCHOR'];
                }
-       
+               
                if ( empty($url) )
                {
                        $url = $CONF['AdminURL'] . 'documentation/customHelp.html';
                }
                if ( empty($url) )
                {
                        $url = $CONF['AdminURL'] . 'documentation/customHelp.html';
                }
-       
+               
                if ( empty($onclick) )
                {
                        $onclick = 'onclick="if (event &amp;&amp; event.preventDefault) event.preventDefault(); return help(this.href);"';
                if ( empty($onclick) )
                {
                        $onclick = 'onclick="if (event &amp;&amp; event.preventDefault) event.preventDefault(); return help(this.href);"';
@@ -4973,12 +4972,12 @@ class AdminActions extends BaseActions
                {
                        $onclick = 'onclick="' . $onclick . '"';
                }
                {
                        $onclick = 'onclick="' . $onclick . '"';
                }
-       
+               
                $data = array(
                $data = array(
-'helpurl'              => $url,
-'helptarget'   => $id,
-'onclick'              => $onclick,
-'title'                        => (isset($title) && !empty($title)) ? $title : _HELP_TT,
+                       'helpurl'               => $url,
+                       'helptarget'    => $id,
+                       'onclick'               => $onclick,
+                       'title'                 => (isset($title) && !empty($title)) ? $title : _HELP_TT,
                );
                return Template::fill($template, $data);
        }
                );
                return Template::fill($template, $data);
        }
@@ -4990,9 +4989,9 @@ class AdminActions extends BaseActions
        private function customHelpHtml($id, $tplName = '', $url = '', $iconURL = '', $alt = '', $title = '', $onclick = '')
        {
                global $CONF, $manager;
        private function customHelpHtml($id, $tplName = '', $url = '', $iconURL = '', $alt = '', $title = '', $onclick = '')
        {
                global $CONF, $manager;
-
+               
                $templates = array();
                $templates = array();
-
+               
                if ( $tplName )
                {
                        $templates =& $manager->getTemplate($tplName);
                if ( $tplName )
                {
                        $templates =& $manager->getTemplate($tplName);
@@ -5005,30 +5004,30 @@ class AdminActions extends BaseActions
                {
                        $template = $templates['ADMIN_CUSTOMHELPLINK_ICON'];
                }
                {
                        $template = $templates['ADMIN_CUSTOMHELPLINK_ICON'];
                }
-       
+               
                if ( empty($iconURL) )
                {
                        $iconURL = $CONF['AdminURL'] . 'documentation/icon-help.gif';
                }
                if ( empty($iconURL) )
                {
                        $iconURL = $CONF['AdminURL'] . 'documentation/icon-help.gif';
                }
-       
+               
                if ( function_exists('getimagesize') )
                {
                        $size   = getimagesize($iconURL);
                        $width  = 'width="'  . $size[0] . '" ';
                        $height = 'height="' . $size[1] . '" ';
                }
                if ( function_exists('getimagesize') )
                {
                        $size   = getimagesize($iconURL);
                        $width  = 'width="'  . $size[0] . '" ';
                        $height = 'height="' . $size[1] . '" ';
                }
-       
+               
                $data = array(
                $data = array(
-'iconurl'      => $iconURL,
-'width'                => $width,
-'height'       => $height,
-'alt'          => (isset($alt) && !empty($alt))         ? $alt   : _HELP_TT,
-'title'                => (isset($title) && !empty($title)) ? $title : _HELP_TT,
+                       'iconurl'       => $iconURL,
+                       'width'         => $width,
+                       'height'        => $height,
+                       'alt'           => (isset($alt) && !empty($alt))         ? $alt   : _HELP_TT,
+                       'title'         => (isset($title) && !empty($title)) ? $title : _HELP_TT,
                );
                );
-
+               
                $icon = Template::fill($template, $data);
                $help = $this->customHelplink($id, $tplName, $url, $title, $onclick);
                $icon = Template::fill($template, $data);
                $help = $this->customHelplink($id, $tplName, $url, $title, $onclick);
-
+               
                return $help . $icon;
        }
        
                return $help . $icon;
        }
        
@@ -5042,19 +5041,19 @@ class AdminActions extends BaseActions
        private function existsNewPlugin()
        {
                global $DIR_PLUGINS;
        private function existsNewPlugin()
        {
                global $DIR_PLUGINS;
-
+               
                $query = "SELECT * FROM %s;";
                $query = sprintf($query, sql_table('plugin'));
                $res  = DB::getResult($query);
                $query = "SELECT * FROM %s;";
                $query = sprintf($query, sql_table('plugin'));
                $res  = DB::getResult($query);
-
+               
                $installed = array();
                foreach( $res as $row )
                {
                        $installed[] = $row['pfile'];
                }
                $installed = array();
                foreach( $res as $row )
                {
                        $installed[] = $row['pfile'];
                }
-       
+               
                $files = scandir($DIR_PLUGINS);
                $files = scandir($DIR_PLUGINS);
-
+               
                $candidates = array();
                foreach ( $files as $file )
                {
                $candidates = array();
                foreach ( $files as $file )
                {
@@ -5080,19 +5079,19 @@ class AdminActions extends BaseActions
        public function parse_pagehead()
        {
                global $member, $nucleus, $CONF, $manager;
        public function parse_pagehead()
        {
                global $member, $nucleus, $CONF, $manager;
-
+               
                $extrahead = Admin::getAdminextrahead();
                $data = array(
                $extrahead = Admin::getAdminextrahead();
                $data = array(
-'extrahead'    => &$extrahead,
-'action'       =>  Admin::getAdminAction()
+                       'extrahead'     => &$extrahead,
+                       'action'        =>  Admin::getAdminAction()
                );
                $manager->notify('AdminPrePageHead', $data);
                );
                $manager->notify('AdminPrePageHead', $data);
-
+               
                $content = $this->parser->skin->getContentFromDB('pagehead');
                if ( !$content )
                {
                        $baseUrl = Entity::hsc($CONF['SkinsURL']);
                $content = $this->parser->skin->getContentFromDB('pagehead');
                if ( !$content )
                {
                        $baseUrl = Entity::hsc($CONF['SkinsURL']);
-
+                       
                        /*
                         * TODO: obsoleted
                         if ( !array_key_exists('AdminCSS', $CONF) )
                        /*
                         * TODO: obsoleted
                         if ( !array_key_exists('AdminCSS', $CONF) )
@@ -5101,11 +5100,11 @@ class AdminActions extends BaseActions
                         $CONF['AdminCSS'] = 'original';
                         }
                         */
                         $CONF['AdminCSS'] = 'original';
                         }
                         */
-
+                       
                        /* HTTP 1.1 application for no caching */
                        header("Cache-Control: no-cache, must-revalidate");
                        header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
                        /* HTTP 1.1 application for no caching */
                        header("Cache-Control: no-cache, must-revalidate");
                        header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
-
+                       
                        $root_element = 'html';
                        $charset = i18n::get_current_charset();
                        $locale = preg_replace('#_#', '-', i18n::get_current_locale());
                        $root_element = 'html';
                        $charset = i18n::get_current_charset();
                        $locale = preg_replace('#_#', '-', i18n::get_current_locale());
@@ -5113,7 +5112,7 @@ class AdminActions extends BaseActions
                        $formal_public_identifier = self::$formal_public_identifier;
                        $system_identifier = self::$system_identifier;
                        $xhtml_namespace = self::$xhtml_namespace;
                        $formal_public_identifier = self::$formal_public_identifier;
                        $system_identifier = self::$system_identifier;
                        $xhtml_namespace = self::$xhtml_namespace;
-
+                       
                        echo "<?xml version=\"{$xml_version_info}\" encoding=\"{$charset}\" ?>\n";
                        echo "<!DOCTYPE {$root_element} PUBLIC \"{$formal_public_identifier}\" \"{$system_identifier}\">\n";
                        echo "<{$root_element} xmlns=\"{$xhtml_namespace}\" xml:lang=\"{$locale}\" lang=\"{$locale}\">\n";
                        echo "<?xml version=\"{$xml_version_info}\" encoding=\"{$charset}\" ?>\n";
                        echo "<!DOCTYPE {$root_element} PUBLIC \"{$formal_public_identifier}\" \"{$system_identifier}\">\n";
                        echo "<{$root_element} xmlns=\"{$xhtml_namespace}\" xml:lang=\"{$locale}\" lang=\"{$locale}\">\n";
@@ -5137,7 +5136,7 @@ class AdminActions extends BaseActions
                        echo "<div id=\"container\">\n";
                        echo "<div id=\"content\">\n";
                        echo "<div class=\"loginname\">\n";
                        echo "<div id=\"container\">\n";
                        echo "<div id=\"content\">\n";
                        echo "<div class=\"loginname\">\n";
-
+                       
                        if ( !$member->isLoggedIn() )
                        {
                                echo '<a href="index.php?action=showlogin" title="Log in">' . _NOTLOGGEDIN . "</a><br />\n";
                        if ( !$member->isLoggedIn() )
                        {
                                echo '<a href="index.php?action=showlogin" title="Log in">' . _NOTLOGGEDIN . "</a><br />\n";
@@ -5147,10 +5146,10 @@ class AdminActions extends BaseActions
                                echo _LOGGEDINAS . ' ' . $member->getDisplayName() ." - <a href='index.php?action=logout'>" . _LOGOUT. "</a><br />\n";
                                echo "<a href='index.php?action=overview'>" . _ADMINHOME . "</a> - ";
                        }
                                echo _LOGGEDINAS . ' ' . $member->getDisplayName() ." - <a href='index.php?action=logout'>" . _LOGOUT. "</a><br />\n";
                                echo "<a href='index.php?action=overview'>" . _ADMINHOME . "</a> - ";
                        }
-       
+                       
                        echo "<a href='".$CONF['IndexURL']."'>"._YOURSITE."</a><br />\n";
                        echo '(';
                        echo "<a href='".$CONF['IndexURL']."'>"._YOURSITE."</a><br />\n";
                        echo '(';
-
+                       
                        if ( !array_key_exists('codename', $nucleus) || empty($nucleus['codename']) )
                        {
                                $codenamestring = '';
                        if ( !array_key_exists('codename', $nucleus) || empty($nucleus['codename']) )
                        {
                                $codenamestring = '';
@@ -5159,16 +5158,16 @@ class AdminActions extends BaseActions
                        {
                                $codenamestring = ' &quot;' . $nucleus['codename'].'&quot;';
                        }
                        {
                                $codenamestring = ' &quot;' . $nucleus['codename'].'&quot;';
                        }
-       
+                       
                        if ( $member->isLoggedIn() && $member->isAdmin() )
                        {
                                $checkURL = sprintf(_ADMIN_SYSTEMOVERVIEW_VERSIONCHECK_URL, getNucleusVersion(), getNucleusPatchLevel());
                                echo '<a href="' . $checkURL . '" title="' . _ADMIN_SYSTEMOVERVIEW_VERSIONCHECK_TITLE . '">Nucleus CMS ' . $nucleus['version'] . $codenamestring . '</a>';
                        if ( $member->isLoggedIn() && $member->isAdmin() )
                        {
                                $checkURL = sprintf(_ADMIN_SYSTEMOVERVIEW_VERSIONCHECK_URL, getNucleusVersion(), getNucleusPatchLevel());
                                echo '<a href="' . $checkURL . '" title="' . _ADMIN_SYSTEMOVERVIEW_VERSIONCHECK_TITLE . '">Nucleus CMS ' . $nucleus['version'] . $codenamestring . '</a>';
-
+                               
                                $newestVersion = getLatestVersion();
                                $newestCompare = str_replace('/', '.', $newestVersion);
                                $currentVersion = str_replace(array('/','v'), array('.',''), $nucleus['version']);
                                $newestVersion = getLatestVersion();
                                $newestCompare = str_replace('/', '.', $newestVersion);
                                $currentVersion = str_replace(array('/','v'), array('.',''), $nucleus['version']);
-
+                               
                                if ( $newestVersion && version_compare($newestCompare, $currentVersion) > 0 )
                                {
                                        echo "<br />\n";
                                if ( $newestVersion && version_compare($newestCompare, $currentVersion) > 0 )
                                {
                                        echo "<br />\n";
@@ -5188,7 +5187,7 @@ class AdminActions extends BaseActions
                {
                        $this->parser->parse($content);
                }
                {
                        $this->parser->parse($content);
                }
-       
+               
                return;
        }
        
                return;
        }
        
@@ -5202,12 +5201,12 @@ class AdminActions extends BaseActions
        public function parse_pagefoot()
        {
                global $action, $member, $manager, $blogid;
        public function parse_pagefoot()
        {
                global $action, $member, $manager, $blogid;
-
+               
                $data = array(
                $data = array(
-               'action' => Admin::getAdminAction()
+                       'action' => Admin::getAdminAction()
                );
                $manager->notify('AdminPrePageFoot', $data);
                );
                $manager->notify('AdminPrePageFoot', $data);
-
+               
                $content = $this->parser->skin->getContentFromDB('pagefoot');
                if ( !$content )
                {
                $content = $this->parser->skin->getContentFromDB('pagefoot');
                if ( !$content )
                {
@@ -5219,7 +5218,7 @@ class AdminActions extends BaseActions
                                echo '<li><a href="index.php?action=logout">' .  _LOGOUT . "</a></li>\n";
                                echo "</ul>\n";
                        }
                                echo '<li><a href="index.php?action=logout">' .  _LOGOUT . "</a></li>\n";
                                echo "</ul>\n";
                        }
-                               
+                       
                        echo "<div class=\"foot\">\n";
                        echo '<a href="' . _ADMINPAGEFOOT_OFFICIALURL . '">Nucleus CMS</a> &copy; 2002-' . date('Y') . ' ' . _ADMINPAGEFOOT_COPYRIGHT;
                        echo '-';
                        echo "<div class=\"foot\">\n";
                        echo '<a href="' . _ADMINPAGEFOOT_OFFICIALURL . '">Nucleus CMS</a> &copy; 2002-' . date('Y') . ' ' . _ADMINPAGEFOOT_COPYRIGHT;
                        echo '-';
@@ -5233,14 +5232,14 @@ class AdminActions extends BaseActions
                                echo "<ul>\n";
                                echo '<li><a href="index.php?action=overview">' . _QMENU_HOME . "</a></li>\n";
                                echo "</ul>\n";
                                echo "<ul>\n";
                                echo '<li><a href="index.php?action=overview">' . _QMENU_HOME . "</a></li>\n";
                                echo "</ul>\n";
-
+                               
                                echo '<h2>' . _QMENU_ADD . "</h2>\n";
                                echo "<form method=\"get\" action=\"index.php\">\n";
                                echo "<p>\n";
                                echo "<input type=\"hidden\" name=\"action\" value=\"createitem\" />\n";
                                echo '<h2>' . _QMENU_ADD . "</h2>\n";
                                echo "<form method=\"get\" action=\"index.php\">\n";
                                echo "<p>\n";
                                echo "<input type=\"hidden\" name=\"action\" value=\"createitem\" />\n";
-
+                               
                                $showAll = requestVar('showall');
                                $showAll = requestVar('showall');
-
+                               
                                if ( ($member->isAdmin()) && ($showAll == 'yes') )
                                {
                                        // Super-Admins have access to all blogs! (no add item support though)
                                if ( ($member->isAdmin()) && ($showAll == 'yes') )
                                {
                                        // Super-Admins have access to all blogs! (no add item support though)
@@ -5260,17 +5259,17 @@ class AdminActions extends BaseActions
                                $template['shortenel']  = '';
                                $template['javascript'] = 'onchange="return form.submit()"';
                                $this->parser->parse(showlist($query, 'select', $template));
                                $template['shortenel']  = '';
                                $template['javascript'] = 'onchange="return form.submit()"';
                                $this->parser->parse(showlist($query, 'select', $template));
-
+                               
                                echo "</p>\n";
                                echo "</form>\n";
                                echo "</p>\n";
                                echo "</form>\n";
-
+                               
                                echo "<h2>{$member->getDisplayName()}</h2>\n";
                                echo "<ul>\n";
                                echo '<li><a href="index.php?action=editmembersettings">' . _QMENU_USER_SETTINGS . "</a></li>\n";
                                echo '<li><a href="index.php?action=browseownitems">' . _QMENU_USER_ITEMS . "</a></li>\n";
                                echo '<li><a href="index.php?action=browseowncomments">' . _QMENU_USER_COMMENTS . "</a></li>\n";
                                echo "</ul>\n";
                                echo "<h2>{$member->getDisplayName()}</h2>\n";
                                echo "<ul>\n";
                                echo '<li><a href="index.php?action=editmembersettings">' . _QMENU_USER_SETTINGS . "</a></li>\n";
                                echo '<li><a href="index.php?action=browseownitems">' . _QMENU_USER_ITEMS . "</a></li>\n";
                                echo '<li><a href="index.php?action=browseowncomments">' . _QMENU_USER_COMMENTS . "</a></li>\n";
                                echo "</ul>\n";
-
+                               
                                if ( $member->isAdmin() )
                                {
                                        echo '<h2>' . _QMENU_MANAGE . "</h2>\n";
                                if ( $member->isAdmin() )
                                {
                                        echo '<h2>' . _QMENU_MANAGE . "</h2>\n";
@@ -5291,10 +5290,10 @@ class AdminActions extends BaseActions
                                        echo '<li><a href="index.php?action=skinieoverview">' . _QMENU_LAYOUT_IEXPORT . "</a></li>\n";
                                        echo "</ul>\n";
                                }
                                        echo '<li><a href="index.php?action=skinieoverview">' . _QMENU_LAYOUT_IEXPORT . "</a></li>\n";
                                        echo "</ul>\n";
                                }
-       
+                               
                                $data = array('options' => array());
                                $manager->notify('QuickMenu', $data);
                                $data = array('options' => array());
                                $manager->notify('QuickMenu', $data);
-
+                               
                                if ( count($data['options']) > 0 )
                                {
                                        echo "<h2>" . _QMENU_PLUGINS . "</h2>\n";
                                if ( count($data['options']) > 0 )
                                {
                                        echo "<h2>" . _QMENU_PLUGINS . "</h2>\n";
@@ -5359,14 +5358,14 @@ class AdminActions extends BaseActions
        private function selectBlog($name, $mode='blog', $selected = 0, $tabindex = 0, $showNewCat = 0, $iForcedBlogInclude = -1)
        {
                global $member, $CONF;
        private function selectBlog($name, $mode='blog', $selected = 0, $tabindex = 0, $showNewCat = 0, $iForcedBlogInclude = -1)
        {
                global $member, $CONF;
-
+               
                // 0. get IDs of blogs to which member can post items (+ forced blog)
                $aBlogIds = array();
                if ( $iForcedBlogInclude != -1 )
                {
                        $aBlogIds[] = intval($iForcedBlogInclude);
                }
                // 0. get IDs of blogs to which member can post items (+ forced blog)
                $aBlogIds = array();
                if ( $iForcedBlogInclude != -1 )
                {
                        $aBlogIds[] = intval($iForcedBlogInclude);
                }
-       
+               
                if ( $member->isAdmin() && array_key_exists('ShowAllBlogs', $CONF) && $CONF['ShowAllBlogs'] )
                {
                        $query =  "SELECT bnumber FROM %s ORDER BY bname;";
                if ( $member->isAdmin() && array_key_exists('ShowAllBlogs', $CONF) && $CONF['ShowAllBlogs'] )
                {
                        $query =  "SELECT bnumber FROM %s ORDER BY bname;";
@@ -5377,7 +5376,7 @@ class AdminActions extends BaseActions
                        $query =  "SELECT bnumber FROM %s, %s WHERE tblog=bnumber AND tmember=%d;";
                        $query = sprintf($query, sql_table('blog'), sql_table('team'), (integer) $member->getID());
                }
                        $query =  "SELECT bnumber FROM %s, %s WHERE tblog=bnumber AND tmember=%d;";
                        $query = sprintf($query, sql_table('blog'), sql_table('team'), (integer) $member->getID());
                }
-       
+               
                $rblogids = DB::getResult($query);
                foreach ( $rblogids as $row )
                {
                $rblogids = DB::getResult($query);
                foreach ( $rblogids as $row )
                {