diff --git a/apps/bookmarks/ajax/delBookmark.php b/apps/bookmarks/ajax/delBookmark.php old mode 100644 new mode 100755 index 655d9f825d..984a859316 --- a/apps/bookmarks/ajax/delBookmark.php +++ b/apps/bookmarks/ajax/delBookmark.php @@ -32,7 +32,7 @@ OC_JSON::checkAppEnabled('bookmarks'); $params=array( htmlspecialchars_decode($_GET["url"]), - OC_User::getUser() + OCP\USER::getUser() ); $query = OC_DB::prepare(" diff --git a/apps/bookmarks/ajax/recordClick.php b/apps/bookmarks/ajax/recordClick.php old mode 100644 new mode 100755 index a542f636d8..6519de241b --- a/apps/bookmarks/ajax/recordClick.php +++ b/apps/bookmarks/ajax/recordClick.php @@ -37,7 +37,7 @@ $query = OC_DB::prepare(" AND url LIKE ? "); -$params=array(OC_User::getUser(), htmlspecialchars_decode($_GET["url"])); +$params=array(OCP\USER::getUser(), htmlspecialchars_decode($_GET["url"])); $bookmarks = $query->execute($params); header( "HTTP/1.1 204 No Content" ); diff --git a/apps/bookmarks/bookmarksHelper.php b/apps/bookmarks/bookmarksHelper.php old mode 100644 new mode 100755 index f1464be79d..25c9b4cc7f --- a/apps/bookmarks/bookmarksHelper.php +++ b/apps/bookmarks/bookmarksHelper.php @@ -101,7 +101,7 @@ function addBookmark($url, $title, $tags='') { $params=array( htmlspecialchars_decode($url), htmlspecialchars_decode($title), - OC_User::getUser() + OCP\USER::getUser() ); $query->execute($params); diff --git a/apps/bookmarks/lib/bookmarks.php b/apps/bookmarks/lib/bookmarks.php index b1ff1f411f..3f27af0955 100755 --- a/apps/bookmarks/lib/bookmarks.php +++ b/apps/bookmarks/lib/bookmarks.php @@ -37,7 +37,7 @@ class OC_Bookmarks_Bookmarks{ //OCP\Util::writeLog('bookmarks', 'findBookmarks ' .$offset. ' '.$sqlSortColumn.' '. $filter.' '. $filterTagOnly ,OCP\Util::DEBUG); $CONFIG_DBTYPE = OC_Config::getValue( 'dbtype', 'sqlite' ); - $params=array(OC_User::getUser()); + $params=array(OCP\USER::getUser()); if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){ $_gc_separator = ', \' \''; diff --git a/apps/calendar/ajax/calendar/new.php b/apps/calendar/ajax/calendar/new.php old mode 100644 new mode 100755 index ada28a9fc0..b713698163 --- a/apps/calendar/ajax/calendar/new.php +++ b/apps/calendar/ajax/calendar/new.php @@ -16,7 +16,7 @@ if(trim($_POST['name']) == ''){ OC_JSON::error(array('message'=>'empty')); exit; } -$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser()); +$calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser()); foreach($calendars as $cal){ if($cal['displayname'] == $_POST['name']){ OC_JSON::error(array('message'=>'namenotavailable')); @@ -24,7 +24,7 @@ foreach($calendars as $cal){ } } -$userid = OC_User::getUser(); +$userid = OCP\USER::getUser(); $calendarid = OC_Calendar_Calendar::addCalendar($userid, strip_tags($_POST['name']), 'VEVENT,VTODO,VJOURNAL', null, 0, $_POST['color']); OC_Calendar_Calendar::setCalendarActive($calendarid, 1); diff --git a/apps/calendar/ajax/calendar/update.php b/apps/calendar/ajax/calendar/update.php old mode 100644 new mode 100755 index 9bb1307a84..1e35035fa4 --- a/apps/calendar/ajax/calendar/update.php +++ b/apps/calendar/ajax/calendar/update.php @@ -16,7 +16,7 @@ if(trim($_POST['name']) == ''){ OC_JSON::error(array('message'=>'empty')); exit; } -$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser()); +$calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser()); foreach($calendars as $cal){ if($cal['displayname'] == $_POST['name'] && $cal['id'] != $_POST['id']){ OC_JSON::error(array('message'=>'namenotavailable')); diff --git a/apps/calendar/ajax/categories/rescan.php b/apps/calendar/ajax/categories/rescan.php index e1b276312a..a8e62f64a5 100755 --- a/apps/calendar/ajax/categories/rescan.php +++ b/apps/calendar/ajax/categories/rescan.php @@ -23,7 +23,7 @@ function debug($msg) { 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.')); } diff --git a/apps/calendar/ajax/changeview.php b/apps/calendar/ajax/changeview.php old mode 100644 new mode 100755 index 736a562553..f53eb288b7 --- a/apps/calendar/ajax/changeview.php +++ b/apps/calendar/ajax/changeview.php @@ -17,6 +17,6 @@ switch($view){ OC_JSON::error(array('message'=>'unexspected parameter: ' . $view)); exit; } -OC_Preferences::setValue(OC_USER::getUser(), 'calendar', 'currentview', $view); +OC_Preferences::setValue(OCP\USER::getUser(), 'calendar', 'currentview', $view); OC_JSON::success(); ?> diff --git a/apps/calendar/ajax/event/edit.form.php b/apps/calendar/ajax/event/edit.form.php old mode 100644 new mode 100755 index e2b23d71f9..675a417eba --- a/apps/calendar/ajax/event/edit.form.php +++ b/apps/calendar/ajax/event/edit.form.php @@ -189,7 +189,7 @@ if($data['repeating'] == 1){ $repeat['repeat'] = 'doesnotrepeat'; } if($access == 'owner'){ - $calendar_options = OC_Calendar_Calendar::allCalendars(OC_User::getUser()); + $calendar_options = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser()); }else{ $calendar_options = array(OC_Calendar_App::getCalendar($data['calendarid'], false)); } diff --git a/apps/calendar/ajax/event/new.form.php b/apps/calendar/ajax/event/new.form.php old mode 100644 new mode 100755 index 155e3dc371..a2fa48edf8 --- a/apps/calendar/ajax/event/new.form.php +++ b/apps/calendar/ajax/event/new.form.php @@ -22,16 +22,16 @@ $end = $_POST['end']; $allday = $_POST['allday']; if (!$end){ - $duration = OC_Preferences::getValue( OC_User::getUser(), 'calendar', 'duration', '60'); + $duration = OC_Preferences::getValue( OCP\USER::getUser(), 'calendar', 'duration', '60'); $end = $start + ($duration * 60); } $start = new DateTime('@'.$start); $end = new DateTime('@'.$end); -$timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get()); +$timezone = OC_Preferences::getValue(OCP\USER::getUser(), 'calendar', 'timezone', date_default_timezone_get()); $start->setTimezone(new DateTimeZone($timezone)); $end->setTimezone(new DateTimeZone($timezone)); -$calendar_options = OC_Calendar_Calendar::allCalendars(OC_User::getUser()); +$calendar_options = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser()); $repeat_options = OC_Calendar_App::getRepeatOptions(); $repeat_end_options = OC_Calendar_App::getEndOptions(); $repeat_month_options = OC_Calendar_App::getMonthOptions(); diff --git a/apps/calendar/ajax/import/import.php b/apps/calendar/ajax/import/import.php old mode 100644 new mode 100755 index 5848cac448..eda34099ab --- a/apps/calendar/ajax/import/import.php +++ b/apps/calendar/ajax/import/import.php @@ -19,11 +19,11 @@ if(is_writable('import_tmp/')){ } $file = OC_Filesystem::file_get_contents($_POST['path'] . '/' . $_POST['file']); if($_POST['method'] == 'new'){ - $id = OC_Calendar_Calendar::addCalendar(OC_User::getUser(), $_POST['calname']); + $id = OC_Calendar_Calendar::addCalendar(OCP\USER::getUser(), $_POST['calname']); OC_Calendar_Calendar::setCalendarActive($id, 1); }else{ $calendar = OC_Calendar_App::getCalendar($_POST['id']); - if($calendar['userid'] != OC_USER::getUser()){ + if($calendar['userid'] != OCP\USER::getUser()){ OC_JSON::error(); exit(); } diff --git a/apps/calendar/ajax/settings/getfirstday.php b/apps/calendar/ajax/settings/getfirstday.php old mode 100644 new mode 100755 index 63218dcd02..3fe89c5bc5 --- a/apps/calendar/ajax/settings/getfirstday.php +++ b/apps/calendar/ajax/settings/getfirstday.php @@ -7,6 +7,6 @@ */ OC_JSON::checkLoggedIn(); -$firstday = OC_Preferences::getValue( OC_User::getUser(), 'calendar', 'firstday', 'mo'); +$firstday = OC_Preferences::getValue( OCP\USER::getUser(), 'calendar', 'firstday', 'mo'); OC_JSON::encodedPrint(array('firstday' => $firstday)); ?> diff --git a/apps/calendar/ajax/settings/gettimezonedetection.php b/apps/calendar/ajax/settings/gettimezonedetection.php old mode 100644 new mode 100755 index b9555900a0..a5a71670ca --- a/apps/calendar/ajax/settings/gettimezonedetection.php +++ b/apps/calendar/ajax/settings/gettimezonedetection.php @@ -8,4 +8,4 @@ OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); -OC_JSON::success(array('detection' => OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezonedetection'))); \ No newline at end of file +OC_JSON::success(array('detection' => OC_Preferences::getValue(OCP\USER::getUser(), 'calendar', 'timezonedetection'))); \ No newline at end of file diff --git a/apps/calendar/ajax/settings/guesstimezone.php b/apps/calendar/ajax/settings/guesstimezone.php old mode 100644 new mode 100755 index c0b4ef6526..9b86c305e4 --- a/apps/calendar/ajax/settings/guesstimezone.php +++ b/apps/calendar/ajax/settings/guesstimezone.php @@ -17,11 +17,11 @@ $lng = $_GET['long']; $timezone = OC_Geo::timezone($lat, $lng); -if($timezone == OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone')){ +if($timezone == OC_Preferences::getValue(OCP\USER::getUser(), 'calendar', 'timezone')){ OC_JSON::success(); exit; } -OC_Preferences::setValue(OC_USER::getUser(), 'calendar', 'timezone', $timezone); +OC_Preferences::setValue(OCP\USER::getUser(), 'calendar', 'timezone', $timezone); $message = array('message'=> $l->t('New Timezone:') . $timezone); OC_JSON::success($message); ?> \ No newline at end of file diff --git a/apps/calendar/ajax/settings/setfirstday.php b/apps/calendar/ajax/settings/setfirstday.php old mode 100644 new mode 100755 index 3b1b5481db..232a51733b --- a/apps/calendar/ajax/settings/setfirstday.php +++ b/apps/calendar/ajax/settings/setfirstday.php @@ -8,7 +8,7 @@ OC_JSON::checkLoggedIn(); if(isset($_POST["firstday"])){ - OC_Preferences::setValue(OC_User::getUser(), 'calendar', 'firstday', $_POST["firstday"]); + OC_Preferences::setValue(OCP\USER::getUser(), 'calendar', 'firstday', $_POST["firstday"]); OC_JSON::success(); }else{ OC_JSON::error(); diff --git a/apps/calendar/ajax/settings/settimeformat.php b/apps/calendar/ajax/settings/settimeformat.php old mode 100644 new mode 100755 index 374825a5d4..428cb4220a --- a/apps/calendar/ajax/settings/settimeformat.php +++ b/apps/calendar/ajax/settings/settimeformat.php @@ -8,7 +8,7 @@ OC_JSON::checkLoggedIn(); if(isset($_POST["timeformat"])){ - OC_Preferences::setValue(OC_User::getUser(), 'calendar', 'timeformat', $_POST["timeformat"]); + OC_Preferences::setValue(OCP\USER::getUser(), 'calendar', 'timeformat', $_POST["timeformat"]); OC_JSON::success(); }else{ OC_JSON::error(); diff --git a/apps/calendar/ajax/settings/settimezone.php b/apps/calendar/ajax/settings/settimezone.php old mode 100644 new mode 100755 index b0ca9dcd94..efc23c0f97 --- a/apps/calendar/ajax/settings/settimezone.php +++ b/apps/calendar/ajax/settings/settimezone.php @@ -18,7 +18,7 @@ OC_JSON::checkAppEnabled('calendar'); // Get data if( isset( $_POST['timezone'] ) ){ $timezone=$_POST['timezone']; - OC_Preferences::setValue( OC_User::getUser(), 'calendar', 'timezone', $timezone ); + OC_Preferences::setValue( OCP\USER::getUser(), 'calendar', 'timezone', $timezone ); OC_JSON::success(array('data' => array( 'message' => $l->t('Timezone changed') ))); }else{ OC_JSON::error(array('data' => array( 'message' => $l->t('Invalid request') ))); diff --git a/apps/calendar/ajax/settings/timeformat.php b/apps/calendar/ajax/settings/timeformat.php old mode 100644 new mode 100755 index 728b7155ef..cec0939481 --- a/apps/calendar/ajax/settings/timeformat.php +++ b/apps/calendar/ajax/settings/timeformat.php @@ -7,6 +7,6 @@ */ OC_JSON::checkLoggedIn(); -$timeformat = OC_Preferences::getValue( OC_User::getUser(), 'calendar', 'timeformat', "24"); +$timeformat = OC_Preferences::getValue( OCP\USER::getUser(), 'calendar', 'timeformat', "24"); OC_JSON::encodedPrint(array("timeformat" => $timeformat)); ?> diff --git a/apps/calendar/ajax/settings/timezonedetection.php b/apps/calendar/ajax/settings/timezonedetection.php old mode 100644 new mode 100755 index de3bd6de4f..17bd740bee --- a/apps/calendar/ajax/settings/timezonedetection.php +++ b/apps/calendar/ajax/settings/timezonedetection.php @@ -10,9 +10,9 @@ OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); if(array_key_exists('timezonedetection', $_POST)){ if($_POST['timezonedetection'] == 'on'){ - OC_Preferences::setValue(OC_USER::getUser(), 'calendar', 'timezonedetection', 'true'); + OC_Preferences::setValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'true'); }else{ - OC_Preferences::setValue(OC_USER::getUser(), 'calendar', 'timezonedetection', 'false'); + OC_Preferences::setValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'false'); } OC_JSON::success(); }else{ diff --git a/apps/calendar/ajax/share/activation.php b/apps/calendar/ajax/share/activation.php old mode 100644 new mode 100755 index a4a3ce4819..5c2fe8efd1 --- a/apps/calendar/ajax/share/activation.php +++ b/apps/calendar/ajax/share/activation.php @@ -8,5 +8,5 @@ require_once('../../../../lib/base.php'); $id = strip_tags($_GET['id']); $activation = strip_tags($_GET['activation']); -OC_Calendar_Share::set_active(OC_User::getUser(), $id, $activation); +OC_Calendar_Share::set_active(OCP\USER::getUser(), $id, $activation); OC_JSON::success(); \ No newline at end of file diff --git a/apps/calendar/ajax/share/dropdown.php b/apps/calendar/ajax/share/dropdown.php old mode 100644 new mode 100755 index 85530c163e..988e18c0b0 --- a/apps/calendar/ajax/share/dropdown.php +++ b/apps/calendar/ajax/share/dropdown.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -$user = OC_USER::getUser(); +$user = OCP\USER::getUser(); $calid = $_GET['calid']; $calendar = OC_Calendar_Calendar::find($calid); if($calendar['userid'] != $user){ diff --git a/apps/calendar/ajax/share/share.php b/apps/calendar/ajax/share/share.php old mode 100644 new mode 100755 index 70f1ec26ae..9f4dc39e52 --- a/apps/calendar/ajax/share/share.php +++ b/apps/calendar/ajax/share/share.php @@ -43,10 +43,10 @@ if($sharetype == 'group' && !OC_Group::groupExists($sharewith)){ OC_JSON::error(array('message'=>'group not found')); exit; } -if($sharetype == 'user' && OC_User::getUser() == $sharewith){ +if($sharetype == 'user' && OCP\USER::getUser() == $sharewith){ OC_JSON::error(array('meesage'=>'you can not share with yourself')); } -$success = OC_Calendar_Share::share(OC_User::getUser(), $sharewith, $sharetype, $id, (($idtype=='calendar') ? OC_Calendar_Share::CALENDAR : OC_Calendar_Share::EVENT)); +$success = OC_Calendar_Share::share(OCP\USER::getUser(), $sharewith, $sharetype, $id, (($idtype=='calendar') ? OC_Calendar_Share::CALENDAR : OC_Calendar_Share::EVENT)); if($success){ if($sharetype == 'public'){ OC_JSON::success(array('message'=>$success)); diff --git a/apps/calendar/ajax/share/unshare.php b/apps/calendar/ajax/share/unshare.php old mode 100644 new mode 100755 index c68fc23a6c..1a93748982 --- a/apps/calendar/ajax/share/unshare.php +++ b/apps/calendar/ajax/share/unshare.php @@ -34,7 +34,7 @@ if($sharetype == 'user' && !OC_User::userExists($sharewith)){ OC_JSON::error(array('message'=>'group not found')); exit; } -$success = OC_Calendar_Share::unshare(OC_User::getUser(), $sharewith, $sharetype, $id, (($idtype=='calendar') ? OC_Calendar_Share::CALENDAR : OC_Calendar_Share::EVENT)); +$success = OC_Calendar_Share::unshare(OCP\USER::getUser(), $sharewith, $sharetype, $id, (($idtype=='calendar') ? OC_Calendar_Share::CALENDAR : OC_Calendar_Share::EVENT)); if($success){ OC_JSON::success(); }else{ diff --git a/apps/calendar/index.php b/apps/calendar/index.php old mode 100644 new mode 100755 index 6bb7cfd686..beb6ac0c37 --- a/apps/calendar/index.php +++ b/apps/calendar/index.php @@ -11,10 +11,10 @@ OC_Util::checkLoggedIn(); OC_Util::checkAppEnabled('calendar'); // Create default calendar ... -$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser(), 1); +$calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser(), 1); if( count($calendars) == 0){ - OC_Calendar_Calendar::addCalendar(OC_User::getUser(),'Default calendar'); - $calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser(), 1); + OC_Calendar_Calendar::addCalendar(OCP\USER::getUser(),'Default calendar'); + $calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser(), 1); } $eventSources = array(); @@ -29,21 +29,21 @@ OC_Hook::emit('OC_Calendar', 'getSources', array('sources' => &$eventSources)); $categories = OC_Calendar_App::getCategoryOptions(); //Fix currentview for fullcalendar -if(OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'currentview', 'month') == "oneweekview"){ - OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", "agendaWeek"); +if(OC_Preferences::getValue(OCP\USER::getUser(), 'calendar', 'currentview', 'month') == "oneweekview"){ + OC_Preferences::setValue(OCP\USER::getUser(), "calendar", "currentview", "agendaWeek"); } -if(OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'currentview', 'month') == "onemonthview"){ - OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", "month"); +if(OC_Preferences::getValue(OCP\USER::getUser(), 'calendar', 'currentview', 'month') == "onemonthview"){ + OC_Preferences::setValue(OCP\USER::getUser(), "calendar", "currentview", "month"); } -if(OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'currentview', 'month') == "listview"){ - OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", "list"); +if(OC_Preferences::getValue(OCP\USER::getUser(), 'calendar', 'currentview', 'month') == "listview"){ + OC_Preferences::setValue(OCP\USER::getUser(), "calendar", "currentview", "list"); } OC_Util::addScript('3rdparty/fullcalendar', 'fullcalendar'); OCP\Util::addStyle('3rdparty/fullcalendar', 'fullcalendar'); OC_Util::addScript('3rdparty/timepicker', 'jquery.ui.timepicker'); OCP\Util::addStyle('3rdparty/timepicker', 'jquery.ui.timepicker'); -if(OC_Preferences::getValue(OC_USER::getUser(), "calendar", "timezone") == null || OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezonedetection') == 'true'){ +if(OC_Preferences::getValue(OCP\USER::getUser(), "calendar", "timezone") == null || OC_Preferences::getValue(OCP\USER::getUser(), 'calendar', 'timezonedetection') == 'true'){ OC_UTIL::addScript('calendar', 'geo'); } OC_Util::addScript('calendar', 'calendar'); diff --git a/apps/calendar/lib/app.php b/apps/calendar/lib/app.php old mode 100644 new mode 100755 index 3ce0d6fa1d..7a52bf08dc --- a/apps/calendar/lib/app.php +++ b/apps/calendar/lib/app.php @@ -9,7 +9,7 @@ * This class manages our app actions */ OC_Calendar_App::$l10n = new OC_L10N('calendar'); -OC_Calendar_App::$tz = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get()); +OC_Calendar_App::$tz = OC_Preferences::getValue(OCP\USER::getUser(), 'calendar', 'timezone', date_default_timezone_get()); class OC_Calendar_App{ const CALENDAR = 'calendar'; const EVENT = 'event'; @@ -38,12 +38,12 @@ class OC_Calendar_App{ public static function getCalendar($id, $security = true, $shared = false){ $calendar = OC_Calendar_Calendar::find($id); if($shared === true){ - if(OC_Calendar_Share::check_access(OC_User::getUser(), $id, OC_Calendar_Share::CALENDAR)){ + if(OC_Calendar_Share::check_access(OCP\USER::getUser(), $id, OC_Calendar_Share::CALENDAR)){ return $calendar; } } if($security === true){ - if($calendar['userid'] != OC_User::getUser()){ + if($calendar['userid'] != OCP\USER::getUser()){ return false; } } @@ -63,13 +63,13 @@ class OC_Calendar_App{ public static function getEventObject($id, $security = true, $shared = false){ $event = OC_Calendar_Object::find($id); if($shared === true){ - if(OC_Calendar_Share::check_access(OC_User::getUser(), $id, OC_Calendar_Share::EVENT)){ + if(OC_Calendar_Share::check_access(OCP\USER::getUser(), $id, OC_Calendar_Share::EVENT)){ return $event; } } if($security === true){ $calendar = self::getCalendar($event['calendarid'], false); - if($calendar['userid'] != OC_User::getUser()){ + if($calendar['userid'] != OCP\USER::getUser()){ return false; } } @@ -164,7 +164,7 @@ class OC_Calendar_App{ */ public static function scanCategories($events = null) { if (is_null($events)) { - $calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser()); + $calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser()); if(count($calendars) > 0) { $events = array(); foreach($calendars as $calendar) { @@ -278,12 +278,12 @@ class OC_Calendar_App{ public static function getaccess($id, $type){ if($type == self::CALENDAR){ $calendar = self::getCalendar($id, false, false); - if($calendar['userid'] == OC_User::getUser()){ + if($calendar['userid'] == OCP\USER::getUser()){ return 'owner'; } - $isshared = OC_Calendar_Share::check_access(OC_User::getUser(), $id, OC_Calendar_Share::CALENDAR); + $isshared = OC_Calendar_Share::check_access(OCP\USER::getUser(), $id, OC_Calendar_Share::CALENDAR); if($isshared){ - $writeaccess = OC_Calendar_Share::is_editing_allowed(OC_User::getUser(), $id, OC_Calendar_Share::CALENDAR); + $writeaccess = OC_Calendar_Share::is_editing_allowed(OCP\USER::getUser(), $id, OC_Calendar_Share::CALENDAR); if($writeaccess){ return 'rw'; }else{ @@ -293,12 +293,12 @@ class OC_Calendar_App{ return false; } }elseif($type == self::EVENT){ - if(OC_Calendar_Object::getowner($id) == OC_User::getUser()){ + if(OC_Calendar_Object::getowner($id) == OCP\USER::getUser()){ return 'owner'; } - $isshared = OC_Calendar_Share::check_access(OC_User::getUser(), $id, OC_Calendar_Share::EVENT); + $isshared = OC_Calendar_Share::check_access(OCP\USER::getUser(), $id, OC_Calendar_Share::EVENT); if($isshared){ - $writeaccess = OC_Calendar_Share::is_editing_allowed(OC_User::getUser(), $id, OC_Calendar_Share::EVENT); + $writeaccess = OC_Calendar_Share::is_editing_allowed(OCP\USER::getUser(), $id, OC_Calendar_Share::EVENT); if($writeaccess){ return 'rw'; }else{ @@ -320,12 +320,12 @@ class OC_Calendar_App{ public static function getrequestedEvents($calendarid, $start, $end){ $events = array(); if($calendarid == 'shared_rw' || $_GET['calendar_id'] == 'shared_r'){ - $calendars = OC_Calendar_Share::allSharedwithuser(OC_USER::getUser(), OC_Calendar_Share::CALENDAR, 1, ($_GET['calendar_id'] == 'shared_rw')?'rw':'r'); + $calendars = OC_Calendar_Share::allSharedwithuser(OCP\USER::getUser(), OC_Calendar_Share::CALENDAR, 1, ($_GET['calendar_id'] == 'shared_rw')?'rw':'r'); foreach($calendars as $calendar){ $calendarevents = OC_Calendar_Object::allInPeriod($calendar['calendarid'], $start, $end); $events = array_merge($events, $calendarevents); } - $singleevents = OC_Calendar_Share::allSharedwithuser(OC_USER::getUser(), OC_Calendar_Share::EVENT, 1, ($_GET['calendar_id'] == 'shared_rw')?'rw':'r'); + $singleevents = OC_Calendar_Share::allSharedwithuser(OCP\USER::getUser(), OC_Calendar_Share::EVENT, 1, ($_GET['calendar_id'] == 'shared_rw')?'rw':'r'); foreach($singleevents as $singleevent){ $event = OC_Calendar_Object::find($singleevent['eventid']); $events[] = $event; diff --git a/apps/calendar/lib/object.php b/apps/calendar/lib/object.php old mode 100644 new mode 100755 index ae6fce3c84..d8e9d5fb94 --- a/apps/calendar/lib/object.php +++ b/apps/calendar/lib/object.php @@ -761,7 +761,7 @@ class OC_Calendar_Object{ $vevent->setDateTime('DTSTART', $start, Sabre_VObject_Property_DateTime::DATE); $vevent->setDateTime('DTEND', $end, Sabre_VObject_Property_DateTime::DATE); }else{ - $timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get()); + $timezone = OC_Preferences::getValue(OCP\USER::getUser(), 'calendar', 'timezone', date_default_timezone_get()); $timezone = new DateTimeZone($timezone); $start = new DateTime($from.' '.$fromtime, $timezone); $end = new DateTime($to.' '.$totime, $timezone); diff --git a/apps/calendar/lib/search.php b/apps/calendar/lib/search.php old mode 100644 new mode 100755 index 0e1a903266..fc54431435 --- a/apps/calendar/lib/search.php +++ b/apps/calendar/lib/search.php @@ -1,7 +1,7 @@ assign('timezone',$timezone); $tmpl->assign('timezones',DateTimeZone::listIdentifiers()); diff --git a/apps/calendar/templates/calendar.php b/apps/calendar/templates/calendar.php old mode 100644 new mode 100755 index ba9423a66f..4a3c653d6f --- a/apps/calendar/templates/calendar.php +++ b/apps/calendar/templates/calendar.php @@ -1,13 +1,13 @@