From 69ee0efc0b355c33ec566cffb36c4b0dc429c338 Mon Sep 17 00:00:00 2001
From: Georg Ehrke <dev@georgswebsite.de>
Date: Tue, 17 Apr 2012 19:31:29 +0200
Subject: [PATCH] remove the require_once lib base from all (or nearly all)
 files

---
 apps/bookmarks/addBm.php                             | 2 +-
 apps/bookmarks/ajax/addBookmark.php                  | 2 +-
 apps/bookmarks/ajax/delBookmark.php                  | 2 +-
 apps/bookmarks/ajax/editBookmark.php                 | 2 +-
 apps/bookmarks/ajax/recordClick.php                  | 2 +-
 apps/bookmarks/ajax/updateList.php                   | 2 +-
 apps/bookmarks/index.php                             | 2 +-
 apps/calendar/ajax/calendar/activation.php           | 2 +-
 apps/calendar/ajax/calendar/delete.php               | 2 +-
 apps/calendar/ajax/calendar/edit.form.php            | 2 +-
 apps/calendar/ajax/calendar/edit.php                 | 2 +-
 apps/calendar/ajax/calendar/new.form.php             | 2 +-
 apps/calendar/ajax/calendar/new.php                  | 2 +-
 apps/calendar/ajax/calendar/overview.php             | 2 +-
 apps/calendar/ajax/calendar/update.php               | 2 +-
 apps/calendar/ajax/categories/rescan.php             | 2 +-
 apps/calendar/ajax/changeview.php                    | 2 +-
 apps/calendar/ajax/event/delete.php                  | 2 +-
 apps/calendar/ajax/event/edit.form.php               | 2 +-
 apps/calendar/ajax/event/edit.php                    | 2 +-
 apps/calendar/ajax/event/move.php                    | 2 +-
 apps/calendar/ajax/event/new.form.php                | 2 +-
 apps/calendar/ajax/event/new.php                     | 2 +-
 apps/calendar/ajax/event/resize.php                  | 2 +-
 apps/calendar/ajax/events.php                        | 2 +-
 apps/calendar/ajax/import/dialog.php                 | 2 +-
 apps/calendar/ajax/import/import.php                 | 2 +-
 apps/calendar/ajax/settings/getfirstday.php          | 2 +-
 apps/calendar/ajax/settings/gettimezonedetection.php | 2 +-
 apps/calendar/ajax/settings/guesstimezone.php        | 2 +-
 apps/calendar/ajax/settings/setfirstday.php          | 2 +-
 apps/calendar/ajax/settings/settimeformat.php        | 2 +-
 apps/calendar/ajax/settings/settimezone.php          | 2 +-
 apps/calendar/ajax/settings/timeformat.php           | 2 +-
 apps/calendar/ajax/settings/timezonedetection.php    | 2 +-
 apps/calendar/ajax/share/changepermission.php        | 2 +-
 apps/calendar/ajax/share/dropdown.php                | 2 +-
 apps/calendar/ajax/share/share.php                   | 2 +-
 apps/calendar/ajax/share/unshare.php                 | 2 +-
 apps/calendar/caldav.php                             | 2 +-
 apps/calendar/export.php                             | 2 +-
 apps/calendar/import.php                             | 2 +-
 apps/calendar/index.php                              | 2 +-
 apps/calendar/resettimezone.php                      | 2 +-
 apps/contacts/ajax/activation.php                    | 2 +-
 apps/contacts/ajax/addbook.php                       | 2 +-
 apps/contacts/ajax/addcontact.php                    | 2 +-
 apps/contacts/ajax/addproperty.php                   | 2 +-
 apps/contacts/ajax/categories/categoriesfor.php      | 2 +-
 apps/contacts/ajax/categories/delete.php             | 2 +-
 apps/contacts/ajax/categories/list.php               | 2 +-
 apps/contacts/ajax/categories/rescan.php             | 2 +-
 apps/contacts/ajax/chooseaddressbook.php             | 2 +-
 apps/contacts/ajax/contactdetails.php                | 2 +-
 apps/contacts/ajax/contacts.php                      | 2 +-
 apps/contacts/ajax/createaddressbook.php             | 2 +-
 apps/contacts/ajax/cropphoto.php                     | 2 +-
 apps/contacts/ajax/deletebook.php                    | 2 +-
 apps/contacts/ajax/deletecard.php                    | 2 +-
 apps/contacts/ajax/deleteproperty.php                | 2 +-
 apps/contacts/ajax/editaddress.php                   | 2 +-
 apps/contacts/ajax/editaddressbook.php               | 2 +-
 apps/contacts/ajax/editname.php                      | 2 +-
 apps/contacts/ajax/getdetails.php                    | 2 +-
 apps/contacts/ajax/importdialog.php                  | 2 +-
 apps/contacts/ajax/loadcard.php                      | 2 +-
 apps/contacts/ajax/loadintro.php                     | 2 +-
 apps/contacts/ajax/loadphoto.php                     | 2 +-
 apps/contacts/ajax/newcontact.php                    | 2 +-
 apps/contacts/ajax/savecrop.php                      | 2 +-
 apps/contacts/ajax/saveproperty.php                  | 2 +-
 apps/contacts/ajax/updateaddressbook.php             | 2 +-
 apps/contacts/ajax/uploadphoto.php                   | 2 +-
 apps/contacts/carddav.php                            | 2 +-
 apps/contacts/dynphoto.php                           | 2 +-
 apps/contacts/export.php                             | 2 +-
 apps/contacts/import.php                             | 2 +-
 apps/contacts/index.php                              | 2 +-
 apps/contacts/photo.php                              | 2 +-
 apps/contacts/thumbnail.php                          | 2 +-
 apps/external/ajax/setsites.php                      | 2 +-
 apps/external/index.php                              | 2 +-
 apps/files_sharing/ajax/getitem.php                  | 2 +-
 apps/files_sharing/ajax/setpermissions.php           | 2 +-
 apps/files_sharing/ajax/share.php                    | 2 +-
 apps/files_sharing/ajax/unshare.php                  | 2 +-
 apps/files_sharing/ajax/userautocomplete.php         | 2 +-
 apps/files_sharing/list.php                          | 2 +-
 apps/files_texteditor/ajax/loadfile.php              | 2 +-
 apps/files_texteditor/ajax/mtime.php                 | 2 +-
 apps/files_texteditor/ajax/savefile.php              | 2 +-
 apps/files_versioning/ajax/gethead.php               | 2 +-
 apps/files_versioning/ajax/sethead.php               | 2 +-
 apps/gallery/ajax/createAlbum.php                    | 2 +-
 apps/gallery/ajax/galleryOp.php                      | 2 +-
 apps/gallery/ajax/sharing.php                        | 2 +-
 apps/gallery/ajax/thumbnail.php                      | 2 +-
 apps/gallery/index.php                               | 2 +-
 apps/gallery/lib/album.php                           | 2 +-
 apps/gallery/lib/images_utils.php                    | 2 +-
 apps/gallery/sharing.php                             | 2 +-
 apps/media/ajax/api.php                              | 2 +-
 apps/media/ajax/autoupdate.php                       | 2 +-
 apps/media/index.php                                 | 2 +-
 apps/media/server/xml.server.php                     | 2 +-
 apps/media/tomahawk.php                              | 2 +-
 apps/remoteStorage/WebDAV.php                        | 2 +-
 apps/remoteStorage/ajax/revokeToken.php              | 2 +-
 apps/remoteStorage/auth.php                          | 2 +-
 apps/user_migrate/ajax/export.php                    | 2 +-
 apps/user_webfinger/webfinger.php                    | 2 +-
 core/ajax/appconfig.php                              | 2 +-
 core/ajax/grouplist.php                              | 2 +-
 core/ajax/translations.php                           | 2 +-
 core/ajax/userlist.php                               | 2 +-
 core/ajax/validateuser.php                           | 2 +-
 core/ajax/vcategories/add.php                        | 2 +-
 core/ajax/vcategories/delete.php                     | 2 +-
 core/ajax/vcategories/edit.php                       | 2 +-
 core/lostpassword/index.php                          | 2 +-
 core/lostpassword/resetpassword.php                  | 2 +-
 files/ajax/autocomplete.php                          | 2 +-
 files/ajax/delete.php                                | 2 +-
 files/ajax/download.php                              | 2 +-
 files/ajax/list.php                                  | 2 +-
 files/ajax/mimeicon.php                              | 2 +-
 files/ajax/move.php                                  | 2 +-
 files/ajax/newfile.php                               | 2 +-
 files/ajax/newfolder.php                             | 2 +-
 files/ajax/rawlist.php                               | 2 +-
 files/ajax/rename.php                                | 2 +-
 files/ajax/upload.php                                | 2 +-
 search/ajax/search.php                               | 2 +-
 settings/ajax/changepassword.php                     | 2 +-
 settings/ajax/creategroup.php                        | 2 +-
 settings/ajax/createuser.php                         | 2 +-
 settings/ajax/disableapp.php                         | 2 +-
 settings/ajax/enableapp.php                          | 2 +-
 settings/ajax/getlog.php                             | 2 +-
 settings/ajax/lostpassword.php                       | 2 +-
 settings/ajax/openid.php                             | 2 +-
 settings/ajax/removegroup.php                        | 2 +-
 settings/ajax/removeuser.php                         | 2 +-
 settings/ajax/setlanguage.php                        | 2 +-
 settings/ajax/setloglevel.php                        | 2 +-
 settings/ajax/setquota.php                           | 2 +-
 settings/ajax/togglegroups.php                       | 2 +-
 147 files changed, 147 insertions(+), 147 deletions(-)

diff --git a/apps/bookmarks/addBm.php b/apps/bookmarks/addBm.php
index 861b677222..27e01bb3ba 100644
--- a/apps/bookmarks/addBm.php
+++ b/apps/bookmarks/addBm.php
@@ -21,7 +21,7 @@
 * 
 */
 
-require_once('../../lib/base.php');
+
 
 // Check if we are a user
 OC_Util::checkLoggedIn();
diff --git a/apps/bookmarks/ajax/addBookmark.php b/apps/bookmarks/ajax/addBookmark.php
index 8cda7f0f06..4daed58af3 100644
--- a/apps/bookmarks/ajax/addBookmark.php
+++ b/apps/bookmarks/ajax/addBookmark.php
@@ -24,7 +24,7 @@
 //no apps or filesystem
 $RUNTIME_NOSETUPFS=true;
 
-require_once('../../../lib/base.php');
+ 
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
diff --git a/apps/bookmarks/ajax/delBookmark.php b/apps/bookmarks/ajax/delBookmark.php
index 4aef86e771..655d9f825d 100644
--- a/apps/bookmarks/ajax/delBookmark.php
+++ b/apps/bookmarks/ajax/delBookmark.php
@@ -24,7 +24,7 @@
 //no apps or filesystem
 $RUNTIME_NOSETUPFS=true;
 
-require_once('../../../lib/base.php');
+ 
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
diff --git a/apps/bookmarks/ajax/editBookmark.php b/apps/bookmarks/ajax/editBookmark.php
index 35f30ebcb7..a834cd216e 100644
--- a/apps/bookmarks/ajax/editBookmark.php
+++ b/apps/bookmarks/ajax/editBookmark.php
@@ -24,7 +24,7 @@
 //no apps or filesystem
 $RUNTIME_NOSETUPFS=true;
 
-require_once('../../../lib/base.php');
+ 
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
diff --git a/apps/bookmarks/ajax/recordClick.php b/apps/bookmarks/ajax/recordClick.php
index e6fdfe043e..a542f636d8 100644
--- a/apps/bookmarks/ajax/recordClick.php
+++ b/apps/bookmarks/ajax/recordClick.php
@@ -24,7 +24,7 @@
 //no apps or filesystem
 $RUNTIME_NOSETUPFS=true;
 
-require_once('../../../lib/base.php');
+ 
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
diff --git a/apps/bookmarks/ajax/updateList.php b/apps/bookmarks/ajax/updateList.php
index 487e0d290e..6aa951bbb6 100644
--- a/apps/bookmarks/ajax/updateList.php
+++ b/apps/bookmarks/ajax/updateList.php
@@ -25,7 +25,7 @@
 //no apps or filesystem
 $RUNTIME_NOSETUPFS=true;
 
-require_once('../../../lib/base.php');
+ 
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
diff --git a/apps/bookmarks/index.php b/apps/bookmarks/index.php
index 50fea3fddb..4d604a4fd5 100644
--- a/apps/bookmarks/index.php
+++ b/apps/bookmarks/index.php
@@ -21,7 +21,7 @@
 * 
 */
 
-require_once('../../lib/base.php');
+
 
 // Check if we are a user
 OC_Util::checkLoggedIn();
diff --git a/apps/calendar/ajax/calendar/activation.php b/apps/calendar/ajax/calendar/activation.php
index 7677d85aff..c93a049571 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 a2f5311731..4bef912333 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 8922b3eba4..d3f9629f1a 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 8922b3eba4..d3f9629f1a 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 fa014351f7..3de56460c2 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 228e624772..ada28a9fc0 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 dd55f3e018..f66d1eae8f 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 f400c8c14b..9bb1307a84 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 0fd878ed8f..9273986cad 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 ae48b229b1..707c8c59eb 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 5fc12900ef..49b740656d 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 98c22eb020..1634e7ea41 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 64daffddef..53912cb4c9 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 8150fdbaa3..bfebefb8fe 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 838002a3a0..2e03c02af2 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 7070bbf05d..5e8c305e97 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 aa2d420e77..9a9d37ff3d 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 d053df2e4c..0cfee0dbdc 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 16ec54d14a..0c1a8f9494 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 d0bdab4f0d..95294948f7 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 cab5870509..63218dcd02 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 11255fe8ef..b9555900a0 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 c02b8d10b8..c0b4ef6526 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 3b65221220..3b1b5481db 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 8f65447065..374825a5d4 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 8dda28335f..b0ca9dcd94 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 e0dbe8d3cd..728b7155ef 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 f67bab901e..d29c5568e4 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 d91f87b613..5538637eab 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 eb396d38fd..85530c163e 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 d892727701..88885cd7c1 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 ec3150a89a..97ef7ab2cb 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 b710b99ea4..a319fd0522 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 2736eec96c..658df9db23 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 b1c6f91df8..f4a40e3b42 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 = "\n";
diff --git a/apps/calendar/index.php b/apps/calendar/index.php
index f964a13ef7..4aa1f695e3 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 1ef9591ae3..0996924b5a 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
diff --git a/apps/contacts/ajax/activation.php b/apps/contacts/ajax/activation.php
index d69e3dba3f..06d1a7e24f 100644
--- a/apps/contacts/ajax/activation.php
+++ b/apps/contacts/ajax/activation.php
@@ -7,7 +7,7 @@
  * See the COPYING-README file.
  */
 
-require_once ("../../../lib/base.php");
+ 
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('contacts');
 
diff --git a/apps/contacts/ajax/addbook.php b/apps/contacts/ajax/addbook.php
index f5852183cc..f466d57e12 100644
--- a/apps/contacts/ajax/addbook.php
+++ b/apps/contacts/ajax/addbook.php
@@ -6,7 +6,7 @@
  * See the COPYING-README file.
  */
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('contacts');
 $book = array(
diff --git a/apps/contacts/ajax/addcontact.php b/apps/contacts/ajax/addcontact.php
index 68da54655a..152277181b 100644
--- a/apps/contacts/ajax/addcontact.php
+++ b/apps/contacts/ajax/addcontact.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 function bailOut($msg) {
 	OC_JSON::error(array('data' => array('message' => $msg)));
 	OC_Log::write('contacts','ajax/addcontact.php: '.$msg, OC_Log::DEBUG);
diff --git a/apps/contacts/ajax/addproperty.php b/apps/contacts/ajax/addproperty.php
index d2c0291e8c..9a5e59692d 100644
--- a/apps/contacts/ajax/addproperty.php
+++ b/apps/contacts/ajax/addproperty.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/categories/categoriesfor.php b/apps/contacts/ajax/categories/categoriesfor.php
index c02c37914a..39a7758c8f 100644
--- a/apps/contacts/ajax/categories/categoriesfor.php
+++ b/apps/contacts/ajax/categories/categoriesfor.php
@@ -6,7 +6,7 @@
  * See the COPYING-README file.
  */
 
-require_once('../../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('contacts');
 
diff --git a/apps/contacts/ajax/categories/delete.php b/apps/contacts/ajax/categories/delete.php
index 3ba5aa1606..3cc2dea663 100644
--- a/apps/contacts/ajax/categories/delete.php
+++ b/apps/contacts/ajax/categories/delete.php
@@ -6,7 +6,7 @@
  * See the COPYING-README file.
  */
 
-require_once('../../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('contacts');
 
diff --git a/apps/contacts/ajax/categories/list.php b/apps/contacts/ajax/categories/list.php
index 64d74c82e6..98c1c70518 100644
--- a/apps/contacts/ajax/categories/list.php
+++ b/apps/contacts/ajax/categories/list.php
@@ -6,7 +6,7 @@
  * See the COPYING-README file.
  */
 
-require_once('../../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('contacts');
 
diff --git a/apps/contacts/ajax/categories/rescan.php b/apps/contacts/ajax/categories/rescan.php
index 5f1057bab4..09208c3f68 100644
--- a/apps/contacts/ajax/categories/rescan.php
+++ b/apps/contacts/ajax/categories/rescan.php
@@ -6,7 +6,7 @@
  * See the COPYING-README file.
  */
 
-require_once('../../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('contacts');
 
diff --git a/apps/contacts/ajax/chooseaddressbook.php b/apps/contacts/ajax/chooseaddressbook.php
index d608079129..b47c872e9a 100644
--- a/apps/contacts/ajax/chooseaddressbook.php
+++ b/apps/contacts/ajax/chooseaddressbook.php
@@ -6,7 +6,7 @@
  * See the COPYING-README file.
  */
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('contacts');
 
diff --git a/apps/contacts/ajax/contactdetails.php b/apps/contacts/ajax/contactdetails.php
index 03895c862a..13c3f80c3b 100644
--- a/apps/contacts/ajax/contactdetails.php
+++ b/apps/contacts/ajax/contactdetails.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 function bailOut($msg) {
 	OC_JSON::error(array('data' => array('message' => $msg)));
 	OC_Log::write('contacts','ajax/contactdetails.php: '.$msg, OC_Log::DEBUG);
diff --git a/apps/contacts/ajax/contacts.php b/apps/contacts/ajax/contacts.php
index cf86764105..3e75e4c80e 100644
--- a/apps/contacts/ajax/contacts.php
+++ b/apps/contacts/ajax/contacts.php
@@ -6,7 +6,7 @@
  * See the COPYING-README file.
  */
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('contacts');
 
diff --git a/apps/contacts/ajax/createaddressbook.php b/apps/contacts/ajax/createaddressbook.php
index 28944fe864..5cdb9b49ef 100644
--- a/apps/contacts/ajax/createaddressbook.php
+++ b/apps/contacts/ajax/createaddressbook.php
@@ -6,7 +6,7 @@
  * later.
  * See the COPYING-README file.
  */
-require_once('../../../lib/base.php');
+ 
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/cropphoto.php b/apps/contacts/ajax/cropphoto.php
index 878fb5610c..96e66ffb69 100644
--- a/apps/contacts/ajax/cropphoto.php
+++ b/apps/contacts/ajax/cropphoto.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/deletebook.php b/apps/contacts/ajax/deletebook.php
index 46d8deb486..b80df526f9 100644
--- a/apps/contacts/ajax/deletebook.php
+++ b/apps/contacts/ajax/deletebook.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/deletecard.php b/apps/contacts/ajax/deletecard.php
index 5675aef5f1..98cdb85f0f 100644
--- a/apps/contacts/ajax/deletecard.php
+++ b/apps/contacts/ajax/deletecard.php
@@ -26,7 +26,7 @@ function bailOut($msg) {
 }
 
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/deleteproperty.php b/apps/contacts/ajax/deleteproperty.php
index ab0958cac5..73786cb10c 100644
--- a/apps/contacts/ajax/deleteproperty.php
+++ b/apps/contacts/ajax/deleteproperty.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/editaddress.php b/apps/contacts/ajax/editaddress.php
index 4e6456f604..73f34ef5c6 100644
--- a/apps/contacts/ajax/editaddress.php
+++ b/apps/contacts/ajax/editaddress.php
@@ -6,7 +6,7 @@
  * See the COPYING-README file.
  */
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('contacts');
 
diff --git a/apps/contacts/ajax/editaddressbook.php b/apps/contacts/ajax/editaddressbook.php
index a6262f39b2..ef797778d9 100644
--- a/apps/contacts/ajax/editaddressbook.php
+++ b/apps/contacts/ajax/editaddressbook.php
@@ -6,7 +6,7 @@
  * See the COPYING-README file.
  */
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('contacts');
 $addressbook = OC_Contacts_App::getAddressbook($_GET['bookid']);
diff --git a/apps/contacts/ajax/editname.php b/apps/contacts/ajax/editname.php
index 31bdd12567..9e4d681462 100644
--- a/apps/contacts/ajax/editname.php
+++ b/apps/contacts/ajax/editname.php
@@ -6,7 +6,7 @@
  * See the COPYING-README file.
  */
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('contacts');
 function bailOut($msg) {
diff --git a/apps/contacts/ajax/getdetails.php b/apps/contacts/ajax/getdetails.php
index 4819916f4c..aac69f4c52 100644
--- a/apps/contacts/ajax/getdetails.php
+++ b/apps/contacts/ajax/getdetails.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/importdialog.php b/apps/contacts/ajax/importdialog.php
index 280e462f66..cde6bb2f5c 100644
--- a/apps/contacts/ajax/importdialog.php
+++ b/apps/contacts/ajax/importdialog.php
@@ -6,7 +6,7 @@
  * See the COPYING-README file.
  */
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 OC_Util::checkAppEnabled('contacts');
 $tmpl = new OC_Template('contacts', 'part.import');
diff --git a/apps/contacts/ajax/loadcard.php b/apps/contacts/ajax/loadcard.php
index 037fe2a6df..4b2a65db91 100644
--- a/apps/contacts/ajax/loadcard.php
+++ b/apps/contacts/ajax/loadcard.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 function bailOut($msg) {
 	OC_JSON::error(array('data' => array('message' => $msg)));
 	OC_Log::write('contacts','ajax/loadcard.php: '.$msg, OC_Log::DEBUG);
diff --git a/apps/contacts/ajax/loadintro.php b/apps/contacts/ajax/loadintro.php
index 8e5673655a..7185c5cbe0 100644
--- a/apps/contacts/ajax/loadintro.php
+++ b/apps/contacts/ajax/loadintro.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 function bailOut($msg) {
 	OC_JSON::error(array('data' => array('message' => $msg)));
 	OC_Log::write('contacts','ajax/loadintro.php: '.$msg, OC_Log::DEBUG);
diff --git a/apps/contacts/ajax/loadphoto.php b/apps/contacts/ajax/loadphoto.php
index 2c8bb7bf1e..669f9e2844 100644
--- a/apps/contacts/ajax/loadphoto.php
+++ b/apps/contacts/ajax/loadphoto.php
@@ -20,7 +20,7 @@
  *
  */
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('contacts');
diff --git a/apps/contacts/ajax/newcontact.php b/apps/contacts/ajax/newcontact.php
index fcfd12ca80..36c37e039e 100644
--- a/apps/contacts/ajax/newcontact.php
+++ b/apps/contacts/ajax/newcontact.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 function bailOut($msg) {
 	OC_JSON::error(array('data' => array('message' => $msg)));
 	OC_Log::write('contacts','ajax/newcontact.php: '.$msg, OC_Log::DEBUG);
diff --git a/apps/contacts/ajax/savecrop.php b/apps/contacts/ajax/savecrop.php
index 0df4e1998c..36ba6a046d 100644
--- a/apps/contacts/ajax/savecrop.php
+++ b/apps/contacts/ajax/savecrop.php
@@ -22,7 +22,7 @@
  *       Remember to delete tmp file at some point.
  */
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 OC_Log::write('contacts','ajax/savecrop.php: Huzzah!!!', OC_Log::DEBUG);
 
 // Check if we are a user
diff --git a/apps/contacts/ajax/saveproperty.php b/apps/contacts/ajax/saveproperty.php
index 99d55e7927..e459ed733d 100644
--- a/apps/contacts/ajax/saveproperty.php
+++ b/apps/contacts/ajax/saveproperty.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/updateaddressbook.php b/apps/contacts/ajax/updateaddressbook.php
index 211df84b1d..06028db479 100644
--- a/apps/contacts/ajax/updateaddressbook.php
+++ b/apps/contacts/ajax/updateaddressbook.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/contacts/ajax/uploadphoto.php b/apps/contacts/ajax/uploadphoto.php
index 9780df4647..9623159622 100644
--- a/apps/contacts/ajax/uploadphoto.php
+++ b/apps/contacts/ajax/uploadphoto.php
@@ -20,7 +20,7 @@
  *
  */
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 
 // Check if we are a user
 // Firefox and Konqueror tries to download application/json for me.  --Arthur
diff --git a/apps/contacts/carddav.php b/apps/contacts/carddav.php
index 654aeb66a7..794fb89089 100644
--- a/apps/contacts/carddav.php
+++ b/apps/contacts/carddav.php
@@ -23,7 +23,7 @@
 // Do not load FS ...
 $RUNTIME_NOSETUPFS = true;
 
-require_once('../../lib/base.php');
+
 OC_Util::checkAppEnabled('contacts');
 
 // Backends
diff --git a/apps/contacts/dynphoto.php b/apps/contacts/dynphoto.php
index 2beac15e14..c1646e483d 100644
--- a/apps/contacts/dynphoto.php
+++ b/apps/contacts/dynphoto.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 $tmp_path = $_GET['tmp_path'];
 $maxsize = isset($_GET['maxsize']) ? $_GET['maxsize'] : -1;
 header("Cache-Control: no-cache, no-store, must-revalidate");
diff --git a/apps/contacts/export.php b/apps/contacts/export.php
index fb3e0a41ae..95d02a9afd 100644
--- a/apps/contacts/export.php
+++ b/apps/contacts/export.php
@@ -6,7 +6,7 @@
  * See the COPYING-README file.
  */
 
-require_once ("../../lib/base.php");
+ 
 OC_Util::checkLoggedIn();
 OC_Util::checkAppEnabled('contacts');
 $bookid = isset($_GET['bookid']) ? $_GET['bookid'] : NULL;
diff --git a/apps/contacts/import.php b/apps/contacts/import.php
index 04cfc397d5..8cf0a173db 100644
--- a/apps/contacts/import.php
+++ b/apps/contacts/import.php
@@ -7,7 +7,7 @@
  */
 //check for addressbooks rights or create new one
 ob_start();
-require_once ('../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 OC_Util::checkAppEnabled('calendar');
 $nl = "\n";
diff --git a/apps/contacts/index.php b/apps/contacts/index.php
index 4039b8afd3..d5545e7619 100644
--- a/apps/contacts/index.php
+++ b/apps/contacts/index.php
@@ -6,7 +6,7 @@
  * later.
  * See the COPYING-README file.
  */
-require_once('../../lib/base.php');
+
 
 // Check if we are a user
 OC_Util::checkLoggedIn();
diff --git a/apps/contacts/photo.php b/apps/contacts/photo.php
index 298f1215e3..cd0ae35010 100644
--- a/apps/contacts/photo.php
+++ b/apps/contacts/photo.php
@@ -9,7 +9,7 @@
  */
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 OC_Util::checkLoggedIn();
 OC_Util::checkAppEnabled('contacts');
 
diff --git a/apps/contacts/thumbnail.php b/apps/contacts/thumbnail.php
index 5082626499..c7d37b755f 100644
--- a/apps/contacts/thumbnail.php
+++ b/apps/contacts/thumbnail.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 OC_JSON::checkLoggedIn();
 //OC_Util::checkLoggedIn();
 OC_Util::checkAppEnabled('contacts');
diff --git a/apps/external/ajax/setsites.php b/apps/external/ajax/setsites.php
index 0537b7ea58..3223bf68d9 100644
--- a/apps/external/ajax/setsites.php
+++ b/apps/external/ajax/setsites.php
@@ -6,7 +6,7 @@
  * See the COPYING-README file.
  */
 
-require_once('../../../lib/base.php');
+ 
 OC_Util::checkAdminUser();
 
 $sites = array();
diff --git a/apps/external/index.php b/apps/external/index.php
index 1c20f59eaf..0baa62a94b 100644
--- a/apps/external/index.php
+++ b/apps/external/index.php
@@ -20,7 +20,7 @@
  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
  * 
  */
-require_once('../../lib/base.php');
+
 require_once('lib/external.php');
 
 OC_Util::checkLoggedIn();
diff --git a/apps/files_sharing/ajax/getitem.php b/apps/files_sharing/ajax/getitem.php
index ba01adffb9..c838895efb 100644
--- a/apps/files_sharing/ajax/getitem.php
+++ b/apps/files_sharing/ajax/getitem.php
@@ -1,7 +1,7 @@
 <?php
 //$RUNTIME_NOAPPS = true;
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkAppEnabled('files_sharing');
 require_once('../lib_share.php');
 
diff --git a/apps/files_sharing/ajax/setpermissions.php b/apps/files_sharing/ajax/setpermissions.php
index 200202c704..d46f6f0c7b 100644
--- a/apps/files_sharing/ajax/setpermissions.php
+++ b/apps/files_sharing/ajax/setpermissions.php
@@ -1,7 +1,7 @@
 <?php
 //$RUNTIME_NOAPPS = true;
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkAppEnabled('files_sharing');
 require_once('../lib_share.php');
 
diff --git a/apps/files_sharing/ajax/share.php b/apps/files_sharing/ajax/share.php
index 9b10260da5..cd9166913c 100644
--- a/apps/files_sharing/ajax/share.php
+++ b/apps/files_sharing/ajax/share.php
@@ -1,7 +1,7 @@
 <?php
 //$RUNTIME_NOAPPS = true;
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkAppEnabled('files_sharing');
 require_once('../lib_share.php');
 
diff --git a/apps/files_sharing/ajax/unshare.php b/apps/files_sharing/ajax/unshare.php
index d8a72a00ef..150d650486 100644
--- a/apps/files_sharing/ajax/unshare.php
+++ b/apps/files_sharing/ajax/unshare.php
@@ -1,7 +1,7 @@
 <?php
 //$RUNTIME_NOAPPS = true;
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkAppEnabled('files_sharing');
 require_once('../lib_share.php');
 
diff --git a/apps/files_sharing/ajax/userautocomplete.php b/apps/files_sharing/ajax/userautocomplete.php
index 38b673ee51..cc22a0cd1a 100644
--- a/apps/files_sharing/ajax/userautocomplete.php
+++ b/apps/files_sharing/ajax/userautocomplete.php
@@ -1,7 +1,7 @@
 <?php
 //$RUNTIME_NOAPPS = true;
 
-require_once('../../../lib/base.php');
+ 
 
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('files_sharing');
diff --git a/apps/files_sharing/list.php b/apps/files_sharing/list.php
index 721620dc92..a9006faf1a 100644
--- a/apps/files_sharing/list.php
+++ b/apps/files_sharing/list.php
@@ -20,7 +20,7 @@
  *
  */
 
-require_once('../../lib/base.php');
+
 require_once('lib_share.php');
 
 OC_Util::checkLoggedIn();
diff --git a/apps/files_texteditor/ajax/loadfile.php b/apps/files_texteditor/ajax/loadfile.php
index 8ece844aa2..a946e26f21 100644
--- a/apps/files_texteditor/ajax/loadfile.php
+++ b/apps/files_texteditor/ajax/loadfile.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 
 
 // Check if we are a user
diff --git a/apps/files_texteditor/ajax/mtime.php b/apps/files_texteditor/ajax/mtime.php
index df90a68ca7..436592c383 100644
--- a/apps/files_texteditor/ajax/mtime.php
+++ b/apps/files_texteditor/ajax/mtime.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 
 
 // Check if we are a user
diff --git a/apps/files_texteditor/ajax/savefile.php b/apps/files_texteditor/ajax/savefile.php
index 57a948478f..9f67cc4b4e 100644
--- a/apps/files_texteditor/ajax/savefile.php
+++ b/apps/files_texteditor/ajax/savefile.php
@@ -21,7 +21,7 @@
  */
 
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 
 
 // Check if we are a user
diff --git a/apps/files_versioning/ajax/gethead.php b/apps/files_versioning/ajax/gethead.php
index cc93b7a1d1..a0bfe77db5 100644
--- a/apps/files_versioning/ajax/gethead.php
+++ b/apps/files_versioning/ajax/gethead.php
@@ -4,7 +4,7 @@
  * This file is licensed under the Affero General Public License version 3 or
  * later.
  */
-require_once('../../../lib/base.php');
+ 
 
 OC_JSON::checkLoggedIn();
 // Fetch current commit (or HEAD if not yet set)
diff --git a/apps/files_versioning/ajax/sethead.php b/apps/files_versioning/ajax/sethead.php
index d1b2df9b00..dd8b924b11 100644
--- a/apps/files_versioning/ajax/sethead.php
+++ b/apps/files_versioning/ajax/sethead.php
@@ -4,7 +4,7 @@
  * This file is licensed under the Affero General Public License version 3 or
  * later.
  */
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 if(isset($_POST["file_versioning_head"])){
 	OC_Preferences::setValue(OC_User::getUser(), 'files_versioning', 'head', $_POST["file_versioning_head"]);
diff --git a/apps/gallery/ajax/createAlbum.php b/apps/gallery/ajax/createAlbum.php
index 152f5834bc..ca02c3ae20 100644
--- a/apps/gallery/ajax/createAlbum.php
+++ b/apps/gallery/ajax/createAlbum.php
@@ -21,7 +21,7 @@
 * 
 */
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('gallery');
 
diff --git a/apps/gallery/ajax/galleryOp.php b/apps/gallery/ajax/galleryOp.php
index 1b3ad48f56..98cf71ec14 100644
--- a/apps/gallery/ajax/galleryOp.php
+++ b/apps/gallery/ajax/galleryOp.php
@@ -22,7 +22,7 @@
 */
 
 header('Content-type: text/html; charset=UTF-8') ;
-require_once('../../../lib/base.php');
+ 
 
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('gallery');
diff --git a/apps/gallery/ajax/sharing.php b/apps/gallery/ajax/sharing.php
index fba85fa34e..ce56d652c6 100644
--- a/apps/gallery/ajax/sharing.php
+++ b/apps/gallery/ajax/sharing.php
@@ -21,7 +21,7 @@
 * 
 */
 
-require_once('../../../lib/base.php');
+ 
 
 if (!isset($_GET['token']) || !isset($_GET['operation'])) {
   OC_JSON::error(array('cause' => 'Not enought arguments'));
diff --git a/apps/gallery/ajax/thumbnail.php b/apps/gallery/ajax/thumbnail.php
index 184171f8fc..bf42fd2bec 100644
--- a/apps/gallery/ajax/thumbnail.php
+++ b/apps/gallery/ajax/thumbnail.php
@@ -21,7 +21,7 @@
 * 
 */
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 OC_JSON::checkAppEnabled('gallery');
 
diff --git a/apps/gallery/index.php b/apps/gallery/index.php
index 7de7c09414..8c45cfb19f 100644
--- a/apps/gallery/index.php
+++ b/apps/gallery/index.php
@@ -21,7 +21,7 @@
 * 
 */
 
-require_once('../../lib/base.php');
+
 
 OC_Util::checkLoggedIn();
 OC_Util::checkAppEnabled('gallery');
diff --git a/apps/gallery/lib/album.php b/apps/gallery/lib/album.php
index ef361a3791..efc545f020 100644
--- a/apps/gallery/lib/album.php
+++ b/apps/gallery/lib/album.php
@@ -92,7 +92,7 @@ class OC_Gallery_Album {
 	}
 
 	public static function changeThumbnailPath($oldname, $newname) {
-		require_once('../../../lib/base.php');
+		 
 		$thumbpath = OC::$CONFIG_DATADIRECTORY.'/../gallery/';
 		rename($thumbpath.$oldname.'.png', $thumbpath.$newname.'.png');
 	}
diff --git a/apps/gallery/lib/images_utils.php b/apps/gallery/lib/images_utils.php
index 126298913b..6f3959a342 100644
--- a/apps/gallery/lib/images_utils.php
+++ b/apps/gallery/lib/images_utils.php
@@ -22,7 +22,7 @@
 */
 
 if (file_exists('../../../lib/base.php'))
-  require_once('../../../lib/base.php');
+   
 elseif (file_exists('lib/base.php'))
   require_once('lib/base.php');
 
diff --git a/apps/gallery/sharing.php b/apps/gallery/sharing.php
index d7430becf4..2739f63d4e 100644
--- a/apps/gallery/sharing.php
+++ b/apps/gallery/sharing.php
@@ -25,7 +25,7 @@ if (!isset($_GET['token']) || empty($_GET['token'])) {
   exit;
 }
 
-require_once('../../lib/base.php');
+
 
 OC_Util::checkAppEnabled('gallery');
 
diff --git a/apps/media/ajax/api.php b/apps/media/ajax/api.php
index 9d9c14deb1..72235bf5db 100644
--- a/apps/media/ajax/api.php
+++ b/apps/media/ajax/api.php
@@ -23,7 +23,7 @@
 
 header('Content-type: text/html; charset=UTF-8') ;
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkAppEnabled('media');
 require_once('../lib_collection.php');
 require_once('../lib_scanner.php');
diff --git a/apps/media/ajax/autoupdate.php b/apps/media/ajax/autoupdate.php
index a78b5e25dd..ea7c5006e7 100644
--- a/apps/media/ajax/autoupdate.php
+++ b/apps/media/ajax/autoupdate.php
@@ -27,7 +27,7 @@ header('Content-type: text/html; charset=UTF-8') ;
 $RUNTIME_NOAPPS=true;
 $RUNTIME_NOSETUPFS=true;
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkAppEnabled('media');
 
 $autoUpdate=(isset($_GET['autoupdate']) and $_GET['autoupdate']=='true');
diff --git a/apps/media/index.php b/apps/media/index.php
index 419d4ae0bd..f51d62b77c 100644
--- a/apps/media/index.php
+++ b/apps/media/index.php
@@ -22,7 +22,7 @@
 */
 
 
-require_once('../../lib/base.php');
+
 
 // Check if we are a user
 OC_Util::checkLoggedIn();
diff --git a/apps/media/server/xml.server.php b/apps/media/server/xml.server.php
index cb9b68fc42..83339c91af 100644
--- a/apps/media/server/xml.server.php
+++ b/apps/media/server/xml.server.php
@@ -22,7 +22,7 @@
 */
 
 
-require_once('../../../lib/base.php');
+ 
 OC_Util::checkAppEnabled('media');
 require_once('../lib_collection.php');
 require_once('../lib_ampache.php');
diff --git a/apps/media/tomahawk.php b/apps/media/tomahawk.php
index 6dd41233f1..1ff2599e10 100644
--- a/apps/media/tomahawk.php
+++ b/apps/media/tomahawk.php
@@ -23,7 +23,7 @@
 
 $_POST=$_GET; //debug
 
-require_once('../../lib/base.php');
+
 OC_JSON::checkAppEnabled('media');
 require_once('lib_collection.php');
 
diff --git a/apps/remoteStorage/WebDAV.php b/apps/remoteStorage/WebDAV.php
index cad465181a..3522d1ed68 100644
--- a/apps/remoteStorage/WebDAV.php
+++ b/apps/remoteStorage/WebDAV.php
@@ -29,7 +29,7 @@
 // Do not load FS ...
 $RUNTIME_NOSETUPFS = true;
 
-require_once('../../lib/base.php');
+
 OC_Util::checkAppEnabled('remoteStorage');
 require_once('Sabre/autoload.php');
 require_once('lib_remoteStorage.php');
diff --git a/apps/remoteStorage/ajax/revokeToken.php b/apps/remoteStorage/ajax/revokeToken.php
index ca56cf560e..376fe29b3e 100644
--- a/apps/remoteStorage/ajax/revokeToken.php
+++ b/apps/remoteStorage/ajax/revokeToken.php
@@ -29,7 +29,7 @@
 // Do not load FS ...
 $RUNTIME_NOSETUPFS = true;
 
-require_once('../../../lib/base.php');
+ 
 OC_Util::checkAppEnabled('remoteStorage');
 require_once('Sabre/autoload.php');
 require_once('../lib_remoteStorage.php');
diff --git a/apps/remoteStorage/auth.php b/apps/remoteStorage/auth.php
index c00f9d5555..d2b9eece35 100644
--- a/apps/remoteStorage/auth.php
+++ b/apps/remoteStorage/auth.php
@@ -29,7 +29,7 @@
 // Do not load FS ...
 $RUNTIME_NOSETUPFS = true;
 
-require_once('../../lib/base.php');
+
 OC_Util::checkAppEnabled('remoteStorage');
 require_once('Sabre/autoload.php');
 require_once('lib_remoteStorage.php');
diff --git a/apps/user_migrate/ajax/export.php b/apps/user_migrate/ajax/export.php
index 86745d6b16..99503cad14 100644
--- a/apps/user_migrate/ajax/export.php
+++ b/apps/user_migrate/ajax/export.php
@@ -21,7 +21,7 @@
  *
  */
 // Init owncloud
-require_once('../../../lib/base.php');
+ 
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
diff --git a/apps/user_webfinger/webfinger.php b/apps/user_webfinger/webfinger.php
index 9ada473ca8..51686111bf 100644
--- a/apps/user_webfinger/webfinger.php
+++ b/apps/user_webfinger/webfinger.php
@@ -25,7 +25,7 @@ $SUBURI=substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen($SERVERROOT));
 $WEBROOT=substr($SUBURI,0,-34);
 */
 
-require_once('../../lib/base.php');
+
 $request = urldecode($_GET['q']);
 if($_GET['q']) {
 	$reqParts = explode('@', $request);
diff --git a/core/ajax/appconfig.php b/core/ajax/appconfig.php
index f815d71063..41e421b2fe 100644
--- a/core/ajax/appconfig.php
+++ b/core/ajax/appconfig.php
@@ -5,7 +5,7 @@
  * See the COPYING-README file.
  */
 
-require_once ("../../lib/base.php");
+ 
 OC_JSON::checkLoggedIn();
 $action=isset($_POST['action'])?$_POST['action']:$_GET['action'];
 $result=false;
diff --git a/core/ajax/grouplist.php b/core/ajax/grouplist.php
index cc15102bbc..ba079e2dae 100644
--- a/core/ajax/grouplist.php
+++ b/core/ajax/grouplist.php
@@ -22,7 +22,7 @@
 */
 
 $RUNTIME_NOAPPS = TRUE; //no apps, yet
-require_once('../../lib/base.php');
+
 
 if(!OC_User::isLoggedIn()){
 	if(!isset($_SERVER['PHP_AUTH_USER'])){
diff --git a/core/ajax/translations.php b/core/ajax/translations.php
index a6433b1964..3091926095 100644
--- a/core/ajax/translations.php
+++ b/core/ajax/translations.php
@@ -22,7 +22,7 @@
 */
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 $app = $_POST["app"];
 
diff --git a/core/ajax/userlist.php b/core/ajax/userlist.php
index c8168eaf46..d9910d5a98 100644
--- a/core/ajax/userlist.php
+++ b/core/ajax/userlist.php
@@ -22,7 +22,7 @@
 */
 
 $RUNTIME_NOAPPS = TRUE; //no apps, yet
-require_once('../../lib/base.php');
+
 
 if(!OC_User::isLoggedIn()){
         if(!isset($_SERVER['PHP_AUTH_USER'])){
diff --git a/core/ajax/validateuser.php b/core/ajax/validateuser.php
index 258bd50fca..a55c54a9a4 100644
--- a/core/ajax/validateuser.php
+++ b/core/ajax/validateuser.php
@@ -22,7 +22,7 @@
 */
 
 $RUNTIME_NOAPPS = TRUE; //no apps, yet
-require_once('../../lib/base.php');
+
 
 if(!isset($_SERVER['PHP_AUTH_USER'])){
         header('WWW-Authenticate: Basic realm="ownCloud Server"');
diff --git a/core/ajax/vcategories/add.php b/core/ajax/vcategories/add.php
index a58489228d..b0183af7fc 100644
--- a/core/ajax/vcategories/add.php
+++ b/core/ajax/vcategories/add.php
@@ -14,7 +14,7 @@ function debug($msg) {
 	OC_Log::write('core','ajax/vcategories/add.php: '.$msg, OC_Log::DEBUG);
 }
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 $category = isset($_GET['category'])?strip_tags($_GET['category']):null;
 $app = isset($_GET['app'])?$_GET['app']:null;
diff --git a/core/ajax/vcategories/delete.php b/core/ajax/vcategories/delete.php
index 75def433d3..f96add3d8c 100644
--- a/core/ajax/vcategories/delete.php
+++ b/core/ajax/vcategories/delete.php
@@ -15,7 +15,7 @@ function debug($msg) {
 	OC_Log::write('core','ajax/vcategories/delete.php: '.$msg, OC_Log::DEBUG);
 }
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 $app = isset($_POST['app'])?$_POST['app']:null;
 $categories = isset($_POST['categories'])?$_POST['categories']:null;
diff --git a/core/ajax/vcategories/edit.php b/core/ajax/vcategories/edit.php
index 252b3d3454..5b346bef28 100644
--- a/core/ajax/vcategories/edit.php
+++ b/core/ajax/vcategories/edit.php
@@ -15,7 +15,7 @@ function debug($msg) {
 	OC_Log::write('core','ajax/vcategories/edit.php: '.$msg, OC_Log::DEBUG);
 }
 
-require_once('../../../lib/base.php');
+ 
 OC_JSON::checkLoggedIn();
 $app = isset($_GET['app'])?$_GET['app']:null;
 
diff --git a/core/lostpassword/index.php b/core/lostpassword/index.php
index 89bb6cfa79..1400ec67ca 100644
--- a/core/lostpassword/index.php
+++ b/core/lostpassword/index.php
@@ -7,7 +7,7 @@
 */
 
 $RUNTIME_NOAPPS = TRUE; //no apps
-require_once('../../lib/base.php');
+
 
 // Someone lost their password:
 if (isset($_POST['user'])) {
diff --git a/core/lostpassword/resetpassword.php b/core/lostpassword/resetpassword.php
index 1c78d72094..5f16e854f4 100644
--- a/core/lostpassword/resetpassword.php
+++ b/core/lostpassword/resetpassword.php
@@ -7,7 +7,7 @@
 */
 
 $RUNTIME_NOAPPS = TRUE; //no apps
-require_once('../../lib/base.php');
+
 
 // Someone wants to reset their password:
 if(isset($_GET['token']) && isset($_GET['user']) && OC_Preferences::getValue($_GET['user'], 'owncloud', 'lostpassword') === $_GET['token']) {
diff --git a/files/ajax/autocomplete.php b/files/ajax/autocomplete.php
index 8d7a5b482b..8cdb6188a0 100644
--- a/files/ajax/autocomplete.php
+++ b/files/ajax/autocomplete.php
@@ -3,7 +3,7 @@
 
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 OC_JSON::checkLoggedIn();
 
diff --git a/files/ajax/delete.php b/files/ajax/delete.php
index 1725201fdd..d8a01d7acf 100644
--- a/files/ajax/delete.php
+++ b/files/ajax/delete.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 OC_JSON::checkLoggedIn();
 
diff --git a/files/ajax/download.php b/files/ajax/download.php
index 39852613ab..65c04c36fa 100644
--- a/files/ajax/download.php
+++ b/files/ajax/download.php
@@ -25,7 +25,7 @@
 $RUNTIME_APPTYPES=array('filesystem');
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 // Check if we are a user
 OC_Util::checkLoggedIn();
diff --git a/files/ajax/list.php b/files/ajax/list.php
index ec9ab7342d..83914332a7 100644
--- a/files/ajax/list.php
+++ b/files/ajax/list.php
@@ -4,7 +4,7 @@
 $RUNTIME_APPTYPES=array('filesystem');
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 OC_JSON::checkLoggedIn();
 
diff --git a/files/ajax/mimeicon.php b/files/ajax/mimeicon.php
index ff72ba0f5b..57898cd82d 100644
--- a/files/ajax/mimeicon.php
+++ b/files/ajax/mimeicon.php
@@ -4,7 +4,7 @@
 $RUNTIME_NOAPPS=false;
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 print OC_Helper::mimetypeIcon($_GET['mime']);
 
diff --git a/files/ajax/move.php b/files/ajax/move.php
index 9af3f80208..0ad314f873 100644
--- a/files/ajax/move.php
+++ b/files/ajax/move.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 OC_JSON::checkLoggedIn();
 
diff --git a/files/ajax/newfile.php b/files/ajax/newfile.php
index 2d1372f06e..472b577a32 100644
--- a/files/ajax/newfile.php
+++ b/files/ajax/newfile.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 OC_JSON::checkLoggedIn();
 
diff --git a/files/ajax/newfolder.php b/files/ajax/newfolder.php
index 228e369fbe..2aff95e5b3 100644
--- a/files/ajax/newfolder.php
+++ b/files/ajax/newfolder.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 OC_JSON::checkLoggedIn();
 
diff --git a/files/ajax/rawlist.php b/files/ajax/rawlist.php
index e02c5b6273..8f1990d1b8 100644
--- a/files/ajax/rawlist.php
+++ b/files/ajax/rawlist.php
@@ -4,7 +4,7 @@
 $RUNTIME_APPTYPES=array('filesystem');
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 require_once('../../lib/template.php');
 
 OC_JSON::checkLoggedIn();
diff --git a/files/ajax/rename.php b/files/ajax/rename.php
index a51b36635b..dc5d3962ab 100644
--- a/files/ajax/rename.php
+++ b/files/ajax/rename.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 OC_JSON::checkLoggedIn();
 
diff --git a/files/ajax/upload.php b/files/ajax/upload.php
index b04796e324..c60e1a3752 100644
--- a/files/ajax/upload.php
+++ b/files/ajax/upload.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 // Firefox and Konqueror tries to download application/json for me.  --Arthur
 OC_JSON::setContentTypeHeader('text/plain');
diff --git a/search/ajax/search.php b/search/ajax/search.php
index 326724d60c..8f89256b82 100644
--- a/search/ajax/search.php
+++ b/search/ajax/search.php
@@ -23,7 +23,7 @@
 
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php
index 860ea98787..0ed3c4919f 100644
--- a/settings/ajax/changepassword.php
+++ b/settings/ajax/changepassword.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 $username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser();
 $password = $_POST["password"];
diff --git a/settings/ajax/creategroup.php b/settings/ajax/creategroup.php
index 57d82e7bd9..faeccf48b5 100644
--- a/settings/ajax/creategroup.php
+++ b/settings/ajax/creategroup.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 // Check if we are a user
 if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )){
diff --git a/settings/ajax/createuser.php b/settings/ajax/createuser.php
index 1ed53efcf0..e1eb1a7866 100644
--- a/settings/ajax/createuser.php
+++ b/settings/ajax/createuser.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 // Check if we are a user
 if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )){
diff --git a/settings/ajax/disableapp.php b/settings/ajax/disableapp.php
index 53e9be379e..859c293722 100644
--- a/settings/ajax/disableapp.php
+++ b/settings/ajax/disableapp.php
@@ -1,6 +1,6 @@
 <?php
 // Init owncloud
-require_once('../../lib/base.php');
+
 OC_JSON::checkAdminUser();
 OC_JSON::setContentTypeHeader();
 
diff --git a/settings/ajax/enableapp.php b/settings/ajax/enableapp.php
index cb116ebe4e..bebcbcc903 100644
--- a/settings/ajax/enableapp.php
+++ b/settings/ajax/enableapp.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 OC_JSON::checkAdminUser();
 OC_JSON::setContentTypeHeader();
 
diff --git a/settings/ajax/getlog.php b/settings/ajax/getlog.php
index ed48b2cae1..bcb05fdd02 100644
--- a/settings/ajax/getlog.php
+++ b/settings/ajax/getlog.php
@@ -6,7 +6,7 @@
  */
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 OC_JSON::checkAdminUser();
 
diff --git a/settings/ajax/lostpassword.php b/settings/ajax/lostpassword.php
index 5874dec964..4368566992 100644
--- a/settings/ajax/lostpassword.php
+++ b/settings/ajax/lostpassword.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 OC_JSON::checkLoggedIn();
 
diff --git a/settings/ajax/openid.php b/settings/ajax/openid.php
index 58d071255c..712f5b652f 100644
--- a/settings/ajax/openid.php
+++ b/settings/ajax/openid.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 $l=OC_L10N::get('settings');
 
diff --git a/settings/ajax/removegroup.php b/settings/ajax/removegroup.php
index 4d36478189..73f86061e3 100644
--- a/settings/ajax/removegroup.php
+++ b/settings/ajax/removegroup.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 OC_JSON::checkAdminUser();
 
diff --git a/settings/ajax/removeuser.php b/settings/ajax/removeuser.php
index 2c288997a1..325549ba3b 100644
--- a/settings/ajax/removeuser.php
+++ b/settings/ajax/removeuser.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 OC_JSON::checkAdminUser();
 
diff --git a/settings/ajax/setlanguage.php b/settings/ajax/setlanguage.php
index e3b00c3bc8..bcdc3bc133 100644
--- a/settings/ajax/setlanguage.php
+++ b/settings/ajax/setlanguage.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 $l=OC_L10N::get('settings');
 
diff --git a/settings/ajax/setloglevel.php b/settings/ajax/setloglevel.php
index 298cbd6473..6383ce3c80 100644
--- a/settings/ajax/setloglevel.php
+++ b/settings/ajax/setloglevel.php
@@ -5,7 +5,7 @@
  * See the COPYING-README file.
  */
 
-require_once('../../lib/base.php');
+
 OC_Util::checkAdminUser();
 
 OC_Config::setValue( 'loglevel', $_POST['level'] );
diff --git a/settings/ajax/setquota.php b/settings/ajax/setquota.php
index f59017600a..0e2ca31f14 100644
--- a/settings/ajax/setquota.php
+++ b/settings/ajax/setquota.php
@@ -6,7 +6,7 @@
  */
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 OC_JSON::checkAdminUser();
 
diff --git a/settings/ajax/togglegroups.php b/settings/ajax/togglegroups.php
index 3ee3239dd8..9449261af7 100644
--- a/settings/ajax/togglegroups.php
+++ b/settings/ajax/togglegroups.php
@@ -1,7 +1,7 @@
 <?php
 
 // Init owncloud
-require_once('../../lib/base.php');
+
 
 OC_JSON::checkAdminUser();
 
-- 
GitLab