[Phpslash-commit] CVS: phpslash-ft/class Story_base.class,1.4,1.5
Brought to you by:
joestewart,
nhruby
From: Joe S. <joe...@us...> - 2002-03-14 20:38:23
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv13876/phpslash-ft/class Modified Files: Story_base.class Log Message: no echoes in Story_base.class Index: Story_base.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Story_base.class,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Story_base.class 3 Feb 2002 02:49:40 -0000 1.4 --- Story_base.class 14 Mar 2002 20:38:18 -0000 1.5 *************** *** 23,26 **** --- 23,27 ---- var $perm; var $auth; + var $message; var $article_dateformat = "\"%W %M %d, %Y \@ %h:%i%p\""; // date for the article page *************** *** 33,36 **** --- 34,40 ---- function Story_base () { $this->db = new slashDB; + $this->auth = $auth; + $this->perm = $perm; + $this->message = ''; } /* *************** *** 409,412 **** --- 413,423 ---- */ function saveStory($ary) { + + // Normal users can't edit another user's stories + if((!$this->perm->have_perm('story,root')) AND + ( $ary['author_id'] != $this->auth->auth['uid'])) { + $this->message = pslgetText("Sorry. You do not have the necessary privilege to view this page."); + return false; + } $topic_id_ary = $ary['topic_id_ary']; |