diff options
Diffstat (limited to 'apps/calendar/ajax/categories/rescan.php')
-rwxr-xr-x[-rw-r--r--] | apps/calendar/ajax/categories/rescan.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/calendar/ajax/categories/rescan.php b/apps/calendar/ajax/categories/rescan.php index 0fd878ed8f9..93e8c50954a 100644..100755 --- a/apps/calendar/ajax/categories/rescan.php +++ b/apps/calendar/ajax/categories/rescan.php @@ -6,24 +6,24 @@ * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); -OC_JSON::checkLoggedIn(); -OC_JSON::checkAppEnabled('calendar'); + +OCP\JSON::checkLoggedIn(); +OCP\JSON::checkAppEnabled('calendar'); foreach ($_POST as $key=>$element) { debug('_POST: '.$key.'=>'.print_r($element, true)); } function bailOut($msg) { - OC_JSON::error(array('data' => array('message' => $msg))); - OC_Log::write('calendar','ajax/categories/rescan.php: '.$msg, OC_Log::DEBUG); + OCP\JSON::error(array('data' => array('message' => $msg))); + OCP\Util::writeLog('calendar','ajax/categories/rescan.php: '.$msg, OCP\Util::DEBUG); exit(); } function debug($msg) { - OC_Log::write('calendar','ajax/categories/rescan.php: '.$msg, OC_Log::DEBUG); + OCP\Util::writeLog('calendar','ajax/categories/rescan.php: '.$msg, OCP\Util::DEBUG); } -$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser()); +$calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser()); if(count($calendars) == 0) { bailOut(OC_Calendar_App::$l10n->t('No calendars found.')); } @@ -39,4 +39,4 @@ if(count($events) == 0) { OC_Calendar_App::scanCategories($events); $categories = OC_Calendar_App::getCategoryOptions(); -OC_JSON::success(array('data' => array('categories'=>$categories))); +OCP\JSON::success(array('data' => array('categories'=>$categories))); |