Plugin Directory

Changeset 398346


Ignore:
Timestamp:
06/17/2011 12:19:23 PM (15 years ago)
Author:
namja
Message:
  • Bugfix "Invalid argument supplied for foreach"
Location:
capa
Files:
3 deleted
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • capa/tags/0.5.8.1/capa.php

    r391586 r398346  
    44Plugin URI: http://www.smatern.de/category/coding/capa/
    55Description: CaPa provides Category & Pages protection on a roles & user basis.
    6 Version: 0.5.8
     6Version: 0.5.8.1
    77Author: S. Matern
    88Author URI: http://www.smatern.de
     
    318318     * @return bool
    319319     */
    320     function user_can_access($val_id,$user,$kind,$parent_id=''){
     320    function user_can_access($val_id, $user, $kind, $parent_id=''){
    321321        global $post;
    322322
     
    339339            if (empty($user_access_page_check)){
    340340                // Group Settings
    341                     $tmp_caps = implode('',array_keys($user->caps));
     341                    $tmp_caps = implode('', array_keys($user->caps));
    342342                    $user_access_page_check = get_option("capa_protect_pag_role_{$tmp_caps}");
    343343            }
     
    719719
    720720            if(is_array($params)){
     721                $_posts = FALSE;
     722
    721723                foreach($params as $obj){
    722724                    $_posts[] = $obj->comment_post_ID;
     
    725727
    726728                $params = array();
    727                 foreach($_posts as $obj){
    728                     if(!capa_protect::post_should_be_hidden($obj)){
    729                         $params = $params + $_comments[$obj];
     729
     730                    if(is_array($_posts)){
     731                        foreach($_posts as $obj){
     732                            if(!capa_protect::post_should_be_hidden($obj)){
     733                                $params = $params + $_comments[$obj];
     734                            }
     735                        }
    730736                    }
    731                 }
    732737            }
    733738
  • capa/tags/0.5.8.1/readme.txt

    r391586 r398346  
    55Requires at least: 2.7.1
    66Tested up to: 3.1.3
    7 Stable tag: 0.5.8
     7Stable tag: 0.5.8.1
    88
    99Protects Categories, Pages and Posts for specific users & anonymous visitor
     
    6161
    6262== Changelog ==
     63
     64= v0.5.8.1 =
     65* Bugfix "Invalid argument supplied for foreach"
    6366
    6467= v0.5.8 =
  • capa/trunk/capa.php

    r391586 r398346  
    44Plugin URI: http://www.smatern.de/category/coding/capa/
    55Description: CaPa provides Category & Pages protection on a roles & user basis.
    6 Version: 0.5.8
     6Version: 0.5.8.1
    77Author: S. Matern
    88Author URI: http://www.smatern.de
     
    318318     * @return bool
    319319     */
    320     function user_can_access($val_id,$user,$kind,$parent_id=''){
     320    function user_can_access($val_id, $user, $kind, $parent_id=''){
    321321        global $post;
    322322
     
    339339            if (empty($user_access_page_check)){
    340340                // Group Settings
    341                     $tmp_caps = implode('',array_keys($user->caps));
     341                    $tmp_caps = implode('', array_keys($user->caps));
    342342                    $user_access_page_check = get_option("capa_protect_pag_role_{$tmp_caps}");
    343343            }
     
    719719
    720720            if(is_array($params)){
     721                $_posts = FALSE;
     722
    721723                foreach($params as $obj){
    722724                    $_posts[] = $obj->comment_post_ID;
     
    725727
    726728                $params = array();
    727                 foreach($_posts as $obj){
    728                     if(!capa_protect::post_should_be_hidden($obj)){
    729                         $params = $params + $_comments[$obj];
     729
     730                    if(is_array($_posts)){
     731                        foreach($_posts as $obj){
     732                            if(!capa_protect::post_should_be_hidden($obj)){
     733                                $params = $params + $_comments[$obj];
     734                            }
     735                        }
    730736                    }
    731                 }
    732737            }
    733738
  • capa/trunk/readme.txt

    r391586 r398346  
    55Requires at least: 2.7.1
    66Tested up to: 3.1.3
    7 Stable tag: 0.5.8
     7Stable tag: 0.5.8.1
    88
    99Protects Categories, Pages and Posts for specific users & anonymous visitor
     
    6161
    6262== Changelog ==
     63
     64= v0.5.8.1 =
     65* Bugfix "Invalid argument supplied for foreach"
    6366
    6467= v0.5.8 =
Note: See TracChangeset for help on using the changeset viewer.