WordPress.org

Plugin Directory

Changeset 630179


Ignore:
Timestamp:
11/26/12 16:32:19 (17 months ago)
Author:
joedolson
Message:

Bug fix in event approvals

Location:
my-calendar/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • my-calendar/trunk/my-calendar-event-manager.php

    r627944 r630179  
    496496    <?php } ?> 
    497497<?php } else { // case: adding new event (if use can, then 1, else 0) ?> 
    498 <?php if ( current_user_can( 'mc_approve_events' ) ) { $dvalue = 1; } else { $dvalue = 0; } ?> 
     498<?php   if ( get_option( 'mc_event_approve') != 'true' ) { 
     499            $dvalue = 1; 
     500        } else if ( current_user_can( 'mc_approve_events' ) ) { $dvalue = 1; } else { $dvalue = 0; } ?> 
    499501            <input type="hidden" value="<?php echo $dvalue; ?>" name="event_approved" /> 
    500502<?php } ?> 
  • my-calendar/trunk/my-calendar-limits.php

    r627944 r630179  
    3333                $key = esc_sql(trim($key)); 
    3434                $cat = $mcdb->get_row("SELECT category_id FROM " . my_calendar_categories_table() . " WHERE category_name = '$key'"); 
    35                 $category_id = $cat->category_id; 
    36                 if ($i == 1) {  $select_category .= ($type=='all')?" WHERE (":' ('; } 
    37                 $select_category .= " $data = $category_id"; 
    38                 if ($i < $numcat) { 
    39                     $select_category .= " OR "; 
    40                 } else if ($i == $numcat) { 
    41                     $select_category .= ($type=='all')?") ":' ) AND'; 
    42                 } 
    43                 $i++;                        
     35                if ( $cat ) { 
     36                    $category_id = $cat->category_id; 
     37                    if ($i == 1) {  $select_category .= ($type=='all')?" WHERE (":' ('; } 
     38                    $select_category .= " $data = $category_id"; 
     39                    if ($i < $numcat) { 
     40                        $select_category .= " OR "; 
     41                    } else if ($i == $numcat) { 
     42                        $select_category .= ($type=='all')?") ":' ) AND'; 
     43                    } 
     44                    $i++;    
     45                } else { 
     46                    return; 
     47                } 
    4448            } 
    4549        } 
  • my-calendar/trunk/my-calendar.php

    r627944 r630179  
    66Author: Joseph C Dolson 
    77Author URI: http://www.joedolson.com 
    8 Version: 2.1.0 
     8Version: 2.1.1 
    99*/ 
    1010/*  Copyright 2009-2012  Joe Dolson (email : joe@joedolson.com) 
     
    2525*/ 
    2626global $mc_version, $wpdb; 
    27 $mc_version = '2.1.0'; 
     27$mc_version = '2.1.1'; 
    2828 
    2929// Define the tables used in My Calendar 
  • my-calendar/trunk/readme.txt

    r627944 r630179  
    44Tags: calendar, dates, times, events, scheduling, event manager, event calendar 
    55Requires at least: 3.0.6 
    6 Tested up to: 3.4.2 
     6Tested up to: 3.5.0 
    77License: GPLv2 or later 
    88Stable tag: trunk 
     
    8989 
    9090== Changelog == 
     91 
     92= 2.1.1 = 
     93 
     94* Bug fix: users without 'Approve Event' ability submitted unapproved events even when event approval was disabled. 
    9195 
    9296= 2.1.0 = 
Note: See TracChangeset for help on using the changeset viewer.