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