Changeset 14447

Show
Ignore:
Timestamp:
01/17/08 09:49:32 (11 months ago)
Author:
bergie
Message:

Backporting [14446]: Require moderation privs to access

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/MidCOM_2_8/net.nemein.discussion/config/manifest.inc

    r14363 r14447  
    22'icon' => 'stock-icons/16x16/stock-discussion.png', 
    33'purecode' => false, 
    4 'version' => '2.0.3beta13', 
     4'version' => '2.0.3beta14', 
    55'state' => 'beta', 
    66'privileges' => array 
  • branches/MidCOM_2_8/net.nemein.discussion/handler/index.php

    r14361 r14447  
    4949    } 
    5050 
     51    /** 
     52     * 
     53     * @param mixed $handler_id The ID of the handler. 
     54     * @param mixed &$data The local request data. 
     55     */ 
    5156    function _show_index($handler_id, &$data) 
    5257    { 
  • branches/MidCOM_2_8/net.nemein.discussion/handler/latest.php

    r14361 r14447  
    8080    } 
    8181 
     82    /** 
     83     * @param mixed $handler_id The ID of the handler. 
     84     * @param mixed &$data The local request data. 
     85     */ 
    8286    function _show_latest($handler_id, &$data) 
    8387    { 
     
    162166    } 
    163167 
     168    /** 
     169     * @param mixed $handler_id The ID of the handler. 
     170     * @param mixed &$data The local request data. 
     171     */ 
    164172    function _show_latest_all($handler_id, &$data) 
    165173    { 
     
    176184    /** 
    177185     * Show latest posts in HTML format 
     186     * 
     187     * @param mixed &$data The local request data. 
    178188     */ 
    179189    function _show_latest_posts(&$data) 
     
    195205    /** 
    196206     * Show latest posts as RSS feed 
     207     * 
     208     * @param mixed $handler_id The ID of the handler. 
     209     * @param mixed &$data The local request data. 
    197210     */ 
    198211    function _show_rss(&$data) 
  • branches/MidCOM_2_8/net.nemein.discussion/handler/moderate.php

    r14334 r14447  
    5757     * @param Array $args The argument list. 
    5858     * @param Array &$data The local request data. 
    59      * @return bool Indicating success. 
     59     * @return boolean Indicating success. 
    6060     */ 
    6161    function _handler_report($handler_id, $args, &$data) 
     
    183183     * @param Array $args The argument list. 
    184184     * @param Array &$data The local request data. 
    185      * @return bool Indicating success. 
     185     * @return boolean Indicating success. 
    186186     */ 
    187187    function _handler_moderate($handler_id, $args, &$data) 
     
    189189        $_MIDCOM->auth->require_valid_user(); 
    190190        $_MIDCOM->cache->content->enable_live_mode(); 
     191        $this->_topic->require_do('net.nemein.discussion:moderation'); 
    191192         
    192193        $qb = new org_openpsa_qbpager('net_nemein_discussion_post_dba', 'net_nemein_discussion_posts'); 
     
    229230    } 
    230231 
     232    /** 
     233     * 
     234     * @param mixed $handler_id The ID of the handler. 
     235     * @param mixed &$data The local request data. 
     236     */ 
    231237    function _show_moderate($handler_id, &$data) 
    232238    { 
  • branches/MidCOM_2_8/net.nemein.discussion/handler/post.php

    r14187 r14447  
    222222     * @param Array $args The argument list. 
    223223     * @param Array &$data The local request data. 
    224      * @return bool Indicating success. 
     224     * @return boolean Indicating success. 
    225225     */ 
    226226    function _handler_create($handler_id, $args, &$data) 
     
    237237                $this->_thread->name = midcom_generate_urlname_from_string($this->_post->subject); 
    238238                $this->_thread->posts = 1; 
     239                $this->_thread->firstpost = $this->_post->id; 
    239240                $this->_thread->latestpost = $this->_post->id; 
    240                 $this->_thread->firstpost = $this->_post->id; 
    241241                $this->_thread->latestposttime = $this->_post->metadata->published; 
    242242                $i = 0; 
     
    303303    /** 
    304304     * Show thread posting form 
     305     * 
     306     * @param mixed $handler_id The ID of the handler. 
     307     * @param mixed &$data The local request data. 
    305308     */ 
    306309    function _show_create($handler_id, &$data) 
     
    316319     * @param Array $args The argument list. 
    317320     * @param Array &$data The local request data. 
    318      * @return bool Indicating success. 
     321     * @return boolean Indicating success. 
    319322     */ 
    320323    function _handler_reply($handler_id, $args, &$data) 
     
    410413    /** 
    411414     * Show reply form 
     415     * 
     416     * @param mixed $handler_id The ID of the handler. 
     417     * @param mixed &$data The local request data. 
    412418     */ 
    413419    function _show_reply($handler_id, &$data) 
  • branches/MidCOM_2_8/net.nemein.discussion/handler/thread.php

    r14361 r14447  
    192192    } 
    193193 
     194    /** 
     195     * 
     196     * @param mixed $handler_id The ID of the handler. 
     197     * @param mixed &$data The local request data. 
     198     */ 
    194199    function _show_thread($handler_id, &$data) 
    195200    { 
     
    206211    } 
    207212 
     213    /** 
     214     * 
     215     * @param mixed $handler_id The ID of the handler. 
     216     * @param mixed &$data The local request data. 
     217     */ 
    208218    function _show_thread_threaded($handler_id, &$data) 
    209219    { 
     
    322332    } 
    323333 
     334    /** 
     335     * 
     336     * @param mixed $handler_id The ID of the handler. 
     337     * @param mixed &$data The local request data. 
     338     */ 
    324339    function _show_thread_flat($handler_id, &$data) 
    325340    { 
     
    431446    } 
    432447 
     448    /** 
     449     * 
     450     * @param mixed $handler_id The ID of the handler. 
     451     * @param mixed &$data The local request data. 
     452     */ 
    433453    function _show_post($handler_id, &$data) 
    434454    {