*** empty log message ***

svn path=/trunk/boinc/; revision=11935
This commit is contained in:
Matt Lebofsky 2007-01-22 22:39:22 +00:00
parent 6c734087da
commit 0a720c1da0
4 changed files with 25 additions and 1 deletions

View File

@ -956,6 +956,15 @@ Matt 22 Jan 2007
html/ops html/ops
db_update.php db_update.php
Matt 22 Jan 2007
- remaining development of dev blog stuff
html/
inc/
forum_forum.inc
user/
forum_post.inc
David 22 Jan 2007 David 22 Jan 2007
- API: use boinc_fopen() instead of fopen() in - API: use boinc_fopen() instead of fopen() in
string variant of boinc_resolve_filename() string variant of boinc_resolve_filename()

View File

@ -75,6 +75,9 @@ class Forum {
function getCategory(){ function getCategory(){
return new Category($this->dbObj->category); return new Category($this->dbObj->category);
} }
function isDevBlog(){
return $this->dbObj->is_dev_blog;
}
/** /**
* Increase the post count for the forum (default by one) * Increase the post count for the forum (default by one)

View File

@ -351,6 +351,6 @@ function update_12_22_2007() {
} }
//update_11_10_2006(); //update_12_22_2007();
?> ?>

View File

@ -18,6 +18,18 @@ check_banished($logged_in_user);
$forumid = get_int("id"); $forumid = get_int("id");
$forum = new Forum($forumid); $forum = new Forum($forumid);
if ($forum->isDevBlog()){
if (
(!$logged_in_user->isSpecialUser(S_SCIENTIST)) &&
(!$logged_in_user->isSpecialUser(S_DEV)) &&
(!$logged_in_user->isSpecialUser(S_ADMIN))
) {
// Since this is a devBlog only people at the project can start threads here.
error_page("This forum is marked as a development blog, only people directly working with the project may start a new thread here. <br/>However, you may post a reply to an existing thread.");
}
}
if (!$logged_in_user->isSpecialUser(S_MODERATOR) && ($logged_in_user->getTotalCredit()<$forum->getPostMinTotalCredit() || $logged_in_user->getExpavgCredit()<$forum->getPostMinExpavgCredit())) { if (!$logged_in_user->isSpecialUser(S_MODERATOR) && ($logged_in_user->getTotalCredit()<$forum->getPostMinTotalCredit() || $logged_in_user->getExpavgCredit()<$forum->getPostMinExpavgCredit())) {
//If user haven't got enough credit (according to forum regulations) //If user haven't got enough credit (according to forum regulations)
//We do not tell the (ab)user how much this is - no need to make it easy for them to break the system. //We do not tell the (ab)user how much this is - no need to make it easy for them to break the system.