| @@ 306-319 (lines=14) @@ | ||
| 303 | } |
|
| 304 | } |
|
| 305 | break; |
|
| 306 | case 'admin': |
|
| 307 | if (api_is_platform_admin()) { |
|
| 308 | $attributes = array( |
|
| 309 | 'title' => $title, |
|
| 310 | 'content' => $content, |
|
| 311 | 'start_date' => $start, |
|
| 312 | 'end_date' => $end, |
|
| 313 | 'all_day' => $allDay, |
|
| 314 | 'access_url_id' => api_get_current_access_url_id() |
|
| 315 | ); |
|
| 316 | ||
| 317 | $id = Database::insert($this->tbl_global_agenda, $attributes); |
|
| 318 | } |
|
| 319 | break; |
|
| 320 | } |
|
| 321 | ||
| 322 | return $id; |
|
| @@ 794-809 (lines=16) @@ | ||
| 791 | } |
|
| 792 | break; |
|
| 793 | case 'admin': |
|
| 794 | case 'platform': |
|
| 795 | if (api_is_platform_admin()) { |
|
| 796 | $attributes = array( |
|
| 797 | 'title' => $title, |
|
| 798 | 'content' => $content, |
|
| 799 | 'start_date' => $start, |
|
| 800 | 'end_date' => $end, |
|
| 801 | 'all_day' => $allDay |
|
| 802 | ); |
|
| 803 | Database::update( |
|
| 804 | $this->tbl_global_agenda, |
|
| 805 | $attributes, |
|
| 806 | array('id = ?' => $id) |
|
| 807 | ); |
|
| 808 | } |
|
| 809 | break; |
|
| 810 | } |
|
| 811 | } |
|
| 812 | ||