@@ -21,7 +21,7 @@
*
*/
-require_once('../../lib/base.php');
+
// Check if we are a user
OC_Util::checkLoggedIn();
@@ -24,7 +24,7 @@
//no apps or filesystem
$RUNTIME_NOSETUPFS=true;
-require_once('../../../lib/base.php');
OC_JSON::checkLoggedIn();
@@ -25,7 +25,7 @@
@@ -6,7 +6,7 @@
* See the COPYING-README file.
-require_once('../../../../lib/base.php');
OC_JSON::checkAppEnabled('calendar');
$calendarid = $_POST['calendarid'];
@@ -5,7 +5,7 @@
* later.
$calendarcolor_options = OC_Calendar_Calendar::getCalendarColorOptions();
$l10n = OC_L10N::get('calendar');
-require_once ("../../../lib/base.php");
$view = $_GET['v'];
if(!OC_USER::isLoggedIn()) {
die('<script type="text/javascript">document.location = oc_webroot;</script>');
$id = $_POST['id'];
-require_once ('../../../lib/base.php');
require_once('when/When.php');
$l = OC_L10N::get('calendar');
$unnamed = $l->t('unnamed');
OC_Util::checkAppEnabled('calendar');
$tmpl = new OC_Template('calendar', 'part.import');
@@ -7,7 +7,7 @@
//check for calendar rights or create new one
ob_start();
$nl = "\n\r";
$firstday = OC_Preferences::getValue( OC_User::getUser(), 'calendar', 'firstday', 'mo');
OC_JSON::encodedPrint(array('firstday' => $firstday));
OC_JSON::success(array('detection' => OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezonedetection')));
if(isset($_POST["firstday"])){
OC_Preferences::setValue(OC_User::getUser(), 'calendar', 'firstday', $_POST["firstday"]);
if(isset($_POST["timeformat"])){
OC_Preferences::setValue(OC_User::getUser(), 'calendar', 'timeformat', $_POST["timeformat"]);
// Init owncloud
$l=OC_L10N::get('calendar');
$timeformat = OC_Preferences::getValue( OC_User::getUser(), 'calendar', 'timeformat', "24");
OC_JSON::encodedPrint(array("timeformat" => $timeformat));
if($_POST['timezonedetection'] == 'on'){
$id = strip_tags($_GET['id']);
$idtype = strip_tags($_GET['idtype']);
$permission = (int) strip_tags($_GET['permission']);
$user = OC_USER::getUser();
$calid = $_GET['calid'];
$calendar = OC_Calendar_Calendar::find($calid);
switch($idtype){
@@ -9,7 +9,7 @@
// Do not load FS ...
$RUNTIME_NOSETUPFS = true;
// Backends
-require_once ('../../lib/base.php');
$cal = isset($_GET['calid']) ? $_GET['calid'] : NULL;
$nl = "\n";
@@ -1,4 +1,4 @@
<?php
-require_once ("../../lib/base.php");
OC_Preferences::deleteKey(OC_USER::getUser(), 'calendar', 'timezone');
?>
OC_JSON::checkAppEnabled('contacts');
$book = array(
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
OC_Log::write('contacts','ajax/addcontact.php: '.$msg, OC_Log::DEBUG);
OC_Log::write('contacts','ajax/contactdetails.php: '.$msg, OC_Log::DEBUG);
@@ -26,7 +26,7 @@ function bailOut($msg) {
}
$addressbook = OC_Contacts_App::getAddressbook($_GET['bookid']);
OC_Util::checkAppEnabled('contacts');
$tmpl = new OC_Template('contacts', 'part.import');
OC_Log::write('contacts','ajax/loadcard.php: '.$msg, OC_Log::DEBUG);
OC_Log::write('contacts','ajax/loadintro.php: '.$msg, OC_Log::DEBUG);
@@ -20,7 +20,7 @@
OC_Log::write('contacts','ajax/newcontact.php: '.$msg, OC_Log::DEBUG);
@@ -22,7 +22,7 @@
* Remember to delete tmp file at some point.
OC_Log::write('contacts','ajax/savecrop.php: Huzzah!!!', OC_Log::DEBUG);
// Firefox and Konqueror tries to download application/json for me. --Arthur
@@ -23,7 +23,7 @@
$tmp_path = $_GET['tmp_path'];
$maxsize = isset($_GET['maxsize']) ? $_GET['maxsize'] : -1;
header("Cache-Control: no-cache, no-store, must-revalidate");
$bookid = isset($_GET['bookid']) ? $_GET['bookid'] : NULL;
//check for addressbooks rights or create new one
//OC_Util::checkLoggedIn();
OC_Util::checkAdminUser();
$sites = array();
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
require_once('lib/external.php');
@@ -1,7 +1,7 @@
//$RUNTIME_NOAPPS = true;
OC_JSON::checkAppEnabled('files_sharing');
require_once('../lib_share.php');
require_once('lib_share.php');
@@ -4,7 +4,7 @@
* This file is licensed under the Affero General Public License version 3 or
// Fetch current commit (or HEAD if not yet set)
if(isset($_POST["file_versioning_head"])){
OC_Preferences::setValue(OC_User::getUser(), 'files_versioning', 'head', $_POST["file_versioning_head"]);
OC_JSON::checkAppEnabled('gallery');
header('Content-type: text/html; charset=UTF-8') ;
if (!isset($_GET['token']) || !isset($_GET['operation'])) {
OC_JSON::error(array('cause' => 'Not enought arguments'));
OC_Util::checkAppEnabled('gallery');
@@ -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');
if (file_exists('../../../lib/base.php'))
elseif (file_exists('lib/base.php'))
require_once('lib/base.php');