diff --git a/pages/genericPage.class.php b/pages/genericPage.class.php index 2ce1a666..3a78263e 100644 --- a/pages/genericPage.class.php +++ b/pages/genericPage.class.php @@ -550,13 +550,13 @@ class GenericPage $this->article['params']['dbpage'] = true; // convert U_GROUP_* to MARKUP.CLASS_* (as seen in js-object Markup) - if($article['editAccess'] & (U_GROUP_ADMIN | U_GROUP_VIP | U_GROUP_DEV)) + if ($article['editAccess'] & (U_GROUP_ADMIN | U_GROUP_VIP | U_GROUP_DEV)) $this->article['params']['allow'] = '$Markup.CLASS_ADMIN'; - else if($article['editAccess'] & U_GROUP_STAFF) + else if ($article['editAccess'] & U_GROUP_STAFF) $this->article['params']['allow'] = '$Markup.CLASS_STAFF'; - else if($article['editAccess'] & U_GROUP_PREMIUM) + else if ($article['editAccess'] & U_GROUP_PREMIUM) $this->article['params']['allow'] = '$Markup.CLASS_PREMIUM'; - else if($article['editAccess'] & U_GROUP_PENDING) + else if ($article['editAccess'] & U_GROUP_PENDING) $this->article['params']['allow'] = '$Markup.CLASS_PENDING'; else $this->article['params']['allow'] = '$Markup.CLASS_USER'; diff --git a/pages/guide.php b/pages/guide.php index cec296fd..3f08826a 100644 --- a/pages/guide.php +++ b/pages/guide.php @@ -202,7 +202,7 @@ class GuidePage extends GenericPage // insert Article DB::Aowow()->query('INSERT INTO ?_articles (`type`, `typeId`, `locale`, `rev`, `editAccess`, `article`) VALUES (?d, ?d, ?d, ?d, ?d, ?)', - Type::GUIDE, $this->typeId, $this->_post['locale'], $rev, User::$groups, $this->_post['body']); + Type::GUIDE, $this->typeId, $this->_post['locale'], $rev, User::$groups & U_GROUP_STAFF ? User::$groups : User::$groups | U_GROUP_BLOGGER, $this->_post['body']); // link to Guide $guideData = array(