| @@ 311-324 (lines=14) @@ | ||
| 308 | } |
|
| 309 | } |
|
| 310 | break; |
|
| 311 | case 'admin': |
|
| 312 | if (api_is_platform_admin()) { |
|
| 313 | $attributes = array( |
|
| 314 | 'title' => $title, |
|
| 315 | 'content' => $content, |
|
| 316 | 'start_date' => $start, |
|
| 317 | 'end_date' => $end, |
|
| 318 | 'all_day' => $allDay, |
|
| 319 | 'access_url_id' => api_get_current_access_url_id() |
|
| 320 | ); |
|
| 321 | ||
| 322 | $id = Database::insert($this->tbl_global_agenda, $attributes); |
|
| 323 | } |
|
| 324 | break; |
|
| 325 | } |
|
| 326 | ||
| 327 | return $id; |
|
| @@ 804-819 (lines=16) @@ | ||
| 801 | } |
|
| 802 | break; |
|
| 803 | case 'admin': |
|
| 804 | case 'platform': |
|
| 805 | if (api_is_platform_admin()) { |
|
| 806 | $attributes = array( |
|
| 807 | 'title' => $title, |
|
| 808 | 'content' => $content, |
|
| 809 | 'start_date' => $start, |
|
| 810 | 'end_date' => $end, |
|
| 811 | 'all_day' => $allDay |
|
| 812 | ); |
|
| 813 | Database::update( |
|
| 814 | $this->tbl_global_agenda, |
|
| 815 | $attributes, |
|
| 816 | array('id = ?' => $id) |
|
| 817 | ); |
|
| 818 | } |
|
| 819 | break; |
|
| 820 | } |
|
| 821 | } |
|
| 822 | ||