diff options
Diffstat (limited to 'apps/calendar')
37 files changed, 37 insertions, 37 deletions
diff --git a/apps/calendar/ajax/calendar/activation.php b/apps/calendar/ajax/calendar/activation.php index 7677d85aff3..c93a0495717 100644 --- a/apps/calendar/ajax/calendar/activation.php +++ b/apps/calendar/ajax/calendar/activation.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); $calendarid = $_POST['calendarid']; diff --git a/apps/calendar/ajax/calendar/delete.php b/apps/calendar/ajax/calendar/delete.php index a2f5311731c..4bef912333c 100644 --- a/apps/calendar/ajax/calendar/delete.php +++ b/apps/calendar/ajax/calendar/delete.php @@ -5,7 +5,7 @@ * later. * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); diff --git a/apps/calendar/ajax/calendar/edit.form.php b/apps/calendar/ajax/calendar/edit.form.php index 8922b3eba4e..d3f9629f1ae 100644 --- a/apps/calendar/ajax/calendar/edit.form.php +++ b/apps/calendar/ajax/calendar/edit.form.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); diff --git a/apps/calendar/ajax/calendar/edit.php b/apps/calendar/ajax/calendar/edit.php index 8922b3eba4e..d3f9629f1ae 100644 --- a/apps/calendar/ajax/calendar/edit.php +++ b/apps/calendar/ajax/calendar/edit.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); diff --git a/apps/calendar/ajax/calendar/new.form.php b/apps/calendar/ajax/calendar/new.form.php index fa014351f77..3de56460c2d 100644 --- a/apps/calendar/ajax/calendar/new.form.php +++ b/apps/calendar/ajax/calendar/new.form.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); $calendarcolor_options = OC_Calendar_Calendar::getCalendarColorOptions(); diff --git a/apps/calendar/ajax/calendar/new.php b/apps/calendar/ajax/calendar/new.php index 228e6247724..ada28a9fc07 100644 --- a/apps/calendar/ajax/calendar/new.php +++ b/apps/calendar/ajax/calendar/new.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + // Check if we are a user OC_JSON::checkLoggedIn(); diff --git a/apps/calendar/ajax/calendar/overview.php b/apps/calendar/ajax/calendar/overview.php index dd55f3e018f..f66d1eae8f8 100644 --- a/apps/calendar/ajax/calendar/overview.php +++ b/apps/calendar/ajax/calendar/overview.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + $l10n = OC_L10N::get('calendar'); OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); diff --git a/apps/calendar/ajax/calendar/update.php b/apps/calendar/ajax/calendar/update.php index f400c8c14b4..9bb1307a845 100644 --- a/apps/calendar/ajax/calendar/update.php +++ b/apps/calendar/ajax/calendar/update.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + // Check if we are a user OC_JSON::checkLoggedIn(); diff --git a/apps/calendar/ajax/categories/rescan.php b/apps/calendar/ajax/categories/rescan.php index 0fd878ed8f9..9273986cad4 100644 --- a/apps/calendar/ajax/categories/rescan.php +++ b/apps/calendar/ajax/categories/rescan.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); diff --git a/apps/calendar/ajax/changeview.php b/apps/calendar/ajax/changeview.php index ae48b229b16..707c8c59ebf 100644 --- a/apps/calendar/ajax/changeview.php +++ b/apps/calendar/ajax/changeview.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once ("../../../lib/base.php"); + OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); $view = $_GET['v']; diff --git a/apps/calendar/ajax/event/delete.php b/apps/calendar/ajax/event/delete.php index 5fc12900ef3..49b740656de 100644 --- a/apps/calendar/ajax/event/delete.php +++ b/apps/calendar/ajax/event/delete.php @@ -5,7 +5,7 @@ * later. * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); diff --git a/apps/calendar/ajax/event/edit.form.php b/apps/calendar/ajax/event/edit.form.php index 98c22eb0206..1634e7ea416 100644 --- a/apps/calendar/ajax/event/edit.form.php +++ b/apps/calendar/ajax/event/edit.form.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + if(!OC_USER::isLoggedIn()) { die('<script type="text/javascript">document.location = oc_webroot;</script>'); diff --git a/apps/calendar/ajax/event/edit.php b/apps/calendar/ajax/event/edit.php index 64daffddef0..53912cb4c93 100644 --- a/apps/calendar/ajax/event/edit.php +++ b/apps/calendar/ajax/event/edit.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); diff --git a/apps/calendar/ajax/event/move.php b/apps/calendar/ajax/event/move.php index 8150fdbaa32..bfebefb8fe0 100644 --- a/apps/calendar/ajax/event/move.php +++ b/apps/calendar/ajax/event/move.php @@ -5,7 +5,7 @@ * later. * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); $id = $_POST['id']; diff --git a/apps/calendar/ajax/event/new.form.php b/apps/calendar/ajax/event/new.form.php index 838002a3a09..2e03c02af27 100644 --- a/apps/calendar/ajax/event/new.form.php +++ b/apps/calendar/ajax/event/new.form.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + if(!OC_USER::isLoggedIn()) { die('<script type="text/javascript">document.location = oc_webroot;</script>'); diff --git a/apps/calendar/ajax/event/new.php b/apps/calendar/ajax/event/new.php index 7070bbf05d7..5e8c305e97a 100644 --- a/apps/calendar/ajax/event/new.php +++ b/apps/calendar/ajax/event/new.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); diff --git a/apps/calendar/ajax/event/resize.php b/apps/calendar/ajax/event/resize.php index aa2d420e77d..9a9d37ff3d4 100644 --- a/apps/calendar/ajax/event/resize.php +++ b/apps/calendar/ajax/event/resize.php @@ -5,7 +5,7 @@ * later. * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); $id = $_POST['id']; diff --git a/apps/calendar/ajax/events.php b/apps/calendar/ajax/events.php index d053df2e4c1..0cfee0dbdc1 100755 --- a/apps/calendar/ajax/events.php +++ b/apps/calendar/ajax/events.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once ('../../../lib/base.php'); + require_once('when/When.php'); $l = OC_L10N::get('calendar'); $unnamed = $l->t('unnamed'); diff --git a/apps/calendar/ajax/import/dialog.php b/apps/calendar/ajax/import/dialog.php index 16ec54d14a2..0c1a8f94943 100644 --- a/apps/calendar/ajax/import/dialog.php +++ b/apps/calendar/ajax/import/dialog.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_Util::checkAppEnabled('calendar'); $tmpl = new OC_Template('calendar', 'part.import'); diff --git a/apps/calendar/ajax/import/import.php b/apps/calendar/ajax/import/import.php index d0bdab4f0d5..95294948f75 100644 --- a/apps/calendar/ajax/import/import.php +++ b/apps/calendar/ajax/import/import.php @@ -7,7 +7,7 @@ */ //check for calendar rights or create new one ob_start(); -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_Util::checkAppEnabled('calendar'); $nl = "\n\r"; diff --git a/apps/calendar/ajax/settings/getfirstday.php b/apps/calendar/ajax/settings/getfirstday.php index cab5870509a..63218dcd028 100644 --- a/apps/calendar/ajax/settings/getfirstday.php +++ b/apps/calendar/ajax/settings/getfirstday.php @@ -5,7 +5,7 @@ * later. * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); $firstday = OC_Preferences::getValue( OC_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 index 11255fe8ef3..b9555900a0e 100644 --- a/apps/calendar/ajax/settings/gettimezonedetection.php +++ b/apps/calendar/ajax/settings/gettimezonedetection.php @@ -5,7 +5,7 @@ * later. * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + 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 diff --git a/apps/calendar/ajax/settings/guesstimezone.php b/apps/calendar/ajax/settings/guesstimezone.php index c02b8d10b8d..c0b4ef65263 100755 --- a/apps/calendar/ajax/settings/guesstimezone.php +++ b/apps/calendar/ajax/settings/guesstimezone.php @@ -5,7 +5,7 @@ * later. * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); diff --git a/apps/calendar/ajax/settings/setfirstday.php b/apps/calendar/ajax/settings/setfirstday.php index 3b652212205..3b1b5481db4 100644 --- a/apps/calendar/ajax/settings/setfirstday.php +++ b/apps/calendar/ajax/settings/setfirstday.php @@ -5,7 +5,7 @@ * later. * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); if(isset($_POST["firstday"])){ OC_Preferences::setValue(OC_User::getUser(), 'calendar', 'firstday', $_POST["firstday"]); diff --git a/apps/calendar/ajax/settings/settimeformat.php b/apps/calendar/ajax/settings/settimeformat.php index 8f65447065c..374825a5d40 100644 --- a/apps/calendar/ajax/settings/settimeformat.php +++ b/apps/calendar/ajax/settings/settimeformat.php @@ -5,7 +5,7 @@ * later. * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); if(isset($_POST["timeformat"])){ OC_Preferences::setValue(OC_User::getUser(), 'calendar', 'timeformat', $_POST["timeformat"]); diff --git a/apps/calendar/ajax/settings/settimezone.php b/apps/calendar/ajax/settings/settimezone.php index 8dda28335f7..b0ca9dcd944 100644 --- a/apps/calendar/ajax/settings/settimezone.php +++ b/apps/calendar/ajax/settings/settimezone.php @@ -7,7 +7,7 @@ */ // Init owncloud -require_once('../../../../lib/base.php'); + $l=OC_L10N::get('calendar'); diff --git a/apps/calendar/ajax/settings/timeformat.php b/apps/calendar/ajax/settings/timeformat.php index e0dbe8d3cd7..728b7155efe 100644 --- a/apps/calendar/ajax/settings/timeformat.php +++ b/apps/calendar/ajax/settings/timeformat.php @@ -5,7 +5,7 @@ * later. * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); $timeformat = OC_Preferences::getValue( OC_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 index f67bab901e7..d29c5568e49 100644 --- a/apps/calendar/ajax/settings/timezonedetection.php +++ b/apps/calendar/ajax/settings/timezonedetection.php @@ -5,7 +5,7 @@ * later. * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); if($_POST['timezonedetection'] == 'on'){ diff --git a/apps/calendar/ajax/share/changepermission.php b/apps/calendar/ajax/share/changepermission.php index d91f87b613f..5538637eab4 100644 --- a/apps/calendar/ajax/share/changepermission.php +++ b/apps/calendar/ajax/share/changepermission.php @@ -5,7 +5,7 @@ * later. * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + $id = strip_tags($_GET['id']); $idtype = strip_tags($_GET['idtype']); $permission = (int) strip_tags($_GET['permission']); diff --git a/apps/calendar/ajax/share/dropdown.php b/apps/calendar/ajax/share/dropdown.php index eb396d38fd9..85530c163ed 100644 --- a/apps/calendar/ajax/share/dropdown.php +++ b/apps/calendar/ajax/share/dropdown.php @@ -5,7 +5,7 @@ * later. * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + $user = OC_USER::getUser(); $calid = $_GET['calid']; $calendar = OC_Calendar_Calendar::find($calid); diff --git a/apps/calendar/ajax/share/share.php b/apps/calendar/ajax/share/share.php index d892727701a..88885cd7c10 100644 --- a/apps/calendar/ajax/share/share.php +++ b/apps/calendar/ajax/share/share.php @@ -5,7 +5,7 @@ * later. * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + $id = strip_tags($_GET['id']); $idtype = strip_tags($_GET['idtype']); switch($idtype){ diff --git a/apps/calendar/ajax/share/unshare.php b/apps/calendar/ajax/share/unshare.php index ec3150a89aa..97ef7ab2cb0 100644 --- a/apps/calendar/ajax/share/unshare.php +++ b/apps/calendar/ajax/share/unshare.php @@ -5,7 +5,7 @@ * later. * See the COPYING-README file. */ -require_once('../../../../lib/base.php'); + $id = strip_tags($_GET['id']); $idtype = strip_tags($_GET['idtype']); switch($idtype){ diff --git a/apps/calendar/caldav.php b/apps/calendar/caldav.php index b710b99ea43..a319fd05223 100644 --- a/apps/calendar/caldav.php +++ b/apps/calendar/caldav.php @@ -9,7 +9,7 @@ // Do not load FS ... $RUNTIME_NOSETUPFS = true; -require_once('../../lib/base.php'); + OC_Util::checkAppEnabled('calendar'); // Backends diff --git a/apps/calendar/export.php b/apps/calendar/export.php index db3a83c92e9..bf0503defbc 100644 --- a/apps/calendar/export.php +++ b/apps/calendar/export.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once ('../../lib/base.php'); + OC_Util::checkLoggedIn(); OC_Util::checkAppEnabled('calendar'); $cal = isset($_GET['calid']) ? $_GET['calid'] : NULL; diff --git a/apps/calendar/import.php b/apps/calendar/import.php index e5a5f0837f4..9494ed89fca 100644 --- a/apps/calendar/import.php +++ b/apps/calendar/import.php @@ -7,7 +7,7 @@ */ //check for calendar rights or create new one ob_start(); -require_once ('../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_Util::checkAppEnabled('calendar'); $nl="\r\n"; diff --git a/apps/calendar/index.php b/apps/calendar/index.php index f964a13ef79..4aa1f695e31 100644 --- a/apps/calendar/index.php +++ b/apps/calendar/index.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once ('../../lib/base.php'); + OC_Util::checkLoggedIn(); OC_Util::checkAppEnabled('calendar'); diff --git a/apps/calendar/resettimezone.php b/apps/calendar/resettimezone.php index 1ef9591ae39..0996924b5ad 100644 --- a/apps/calendar/resettimezone.php +++ b/apps/calendar/resettimezone.php @@ -1,4 +1,4 @@ <?php -require_once ("../../lib/base.php"); + OC_Preferences::deleteKey(OC_USER::getUser(), 'calendar', 'timezone'); ?>
\ No newline at end of file |