@@ 1210-1222 (lines=13) @@ | ||
1207 | } |
|
1208 | ||
1209 | ||
1210 | if (! EE_Registry::instance()->CAP->current_user_can('ee_read_others_venues', 'get_venues')) { |
|
1211 | $where['VNU_wp_user'] = get_current_user_id(); |
|
1212 | } else { |
|
1213 | if (! EE_Registry::instance()->CAP->current_user_can('ee_read_private_venues', 'get_venues')) { |
|
1214 | $where['OR'] = array( |
|
1215 | 'status*restrict_private' => array('!=', 'private'), |
|
1216 | 'AND' => array( |
|
1217 | 'status*inclusive' => array('=', 'private'), |
|
1218 | 'VNU_wp_user' => get_current_user_id(), |
|
1219 | ), |
|
1220 | ); |
|
1221 | } |
|
1222 | } |
|
1223 | ||
1224 | ||
1225 | if (isset($this->_req_data['s'])) { |
@@ 1844-1858 (lines=15) @@ | ||
1841 | ->format(implode(' ', $start_formats)); |
|
1842 | $where['Datetime.DTT_EVT_start'] = array('BETWEEN', array($start, $end)); |
|
1843 | } |
|
1844 | if (! EE_Registry::instance()->CAP->current_user_can('ee_read_others_events', 'get_events')) { |
|
1845 | $where['EVT_wp_user'] = get_current_user_id(); |
|
1846 | } else { |
|
1847 | if (! isset($where['status'])) { |
|
1848 | if (! EE_Registry::instance()->CAP->current_user_can('ee_read_private_events', 'get_events')) { |
|
1849 | $where['OR'] = array( |
|
1850 | 'status*restrict_private' => array('!=', 'private'), |
|
1851 | 'AND' => array( |
|
1852 | 'status*inclusive' => array('=', 'private'), |
|
1853 | 'EVT_wp_user' => get_current_user_id(), |
|
1854 | ), |
|
1855 | ); |
|
1856 | } |
|
1857 | } |
|
1858 | } |
|
1859 | if (isset($this->_req_data['EVT_wp_user'])) { |
|
1860 | if ($this->_req_data['EVT_wp_user'] != get_current_user_id() |
|
1861 | && EE_Registry::instance()->CAP->current_user_can('ee_read_others_events', 'get_events') |