summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rwxr-xr-xapps/calendar/lib/app.php4
-rwxr-xr-xapps/contacts/lib/app.php2
-rwxr-xr-xapps/contacts/photo.php12
-rwxr-xr-xapps/contacts/thumbnail.php10
-rwxr-xr-xapps/files/download.php2
-rwxr-xr-xapps/files_sharing/get.php2
-rwxr-xr-xapps/gallery/ajax/galleryOp.php4
-rwxr-xr-xapps/gallery/ajax/sharing.php6
-rwxr-xr-x[-rw-r--r--]apps/gallery/ajax/thumbnail.php2
-rwxr-xr-xapps/media/ajax/api.php4
-rwxr-xr-xapps/media/tomahawk.php2
11 files changed, 25 insertions, 25 deletions
diff --git a/apps/calendar/lib/app.php b/apps/calendar/lib/app.php
index f3e9bea86a3..8e2679a43f4 100755
--- a/apps/calendar/lib/app.php
+++ b/apps/calendar/lib/app.php
@@ -334,8 +334,8 @@ class OC_Calendar_App{
$calendar_id = $_GET['calendar_id'];
if (is_numeric($calendar_id)) {
$calendar = self::getCalendar($calendar_id);
- OC_Response::enableCaching(0);
- OC_Response::setETagHeader($calendar['ctag']);
+ OCP\Response::enableCaching(0);
+ OCP\Response::setETagHeader($calendar['ctag']);
$events = OC_Calendar_Object::allInPeriod($calendar_id, $start, $end);
} else {
OC_Hook::emit('OC_Calendar', 'getEvents', array('calendar_id' => $calendar_id, 'events' => &$events));
diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php
index 636b9a84b9d..f4b9562605e 100755
--- a/apps/contacts/lib/app.php
+++ b/apps/contacts/lib/app.php
@@ -176,7 +176,7 @@ class OC_Contacts_App {
$rev = $contact->getAsString('REV');
if ($rev) {
$rev = DateTime::createFromFormat(DateTime::W3C, $rev);
- OC_Response::setLastModifiedHeader($rev);
+ OCP\Response::setLastModifiedHeader($rev);
}
}
}
diff --git a/apps/contacts/photo.php b/apps/contacts/photo.php
index 60723b7f0b5..6fe68cefb6d 100755
--- a/apps/contacts/photo.php
+++ b/apps/contacts/photo.php
@@ -14,9 +14,9 @@ OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('contacts');
function getStandardImage(){
- OC_Response::setExpiresHeader('P10D');
- OC_Response::enableCaching();
- OC_Response::redirect(OCP\Util::imagePath('contacts', 'person_large.png'));
+ OCP\Response::setExpiresHeader('P10D');
+ OCP\Response::enableCaching();
+ OCP\Response::redirect(OCP\Util::imagePath('contacts', 'person_large.png'));
}
$id = isset($_GET['id']) ? $_GET['id'] : null;
@@ -35,19 +35,19 @@ if(!$image) {
if( is_null($contact)) {
OCP\Util::writeLog('contacts','photo.php. The VCard for ID '.$id.' is not RFC compatible',OCP\Util::ERROR);
} else {
- OC_Response::enableCaching($caching);
+ OCP\Response::enableCaching($caching);
OC_Contacts_App::setLastModifiedHeader($contact);
// Photo :-)
if($image->loadFromBase64($contact->getAsString('PHOTO'))) {
// OK
- OC_Response::setETagHeader(md5($contact->getAsString('PHOTO')));
+ OCP\Response::setETagHeader(md5($contact->getAsString('PHOTO')));
}
else
// Logo :-/
if($image->loadFromBase64($contact->getAsString('LOGO'))) {
// OK
- OC_Response::setETagHeader(md5($contact->getAsString('LOGO')));
+ OCP\Response::setETagHeader(md5($contact->getAsString('LOGO')));
}
if ($image->valid()) {
$max_size = 200;
diff --git a/apps/contacts/thumbnail.php b/apps/contacts/thumbnail.php
index cf54b4ffd4f..d7bf1fd8c3c 100755
--- a/apps/contacts/thumbnail.php
+++ b/apps/contacts/thumbnail.php
@@ -27,9 +27,9 @@ OC_JSON::checkLoggedIn();
OCP\App::checkAppEnabled('contacts');
function getStandardImage(){
- OC_Response::setExpiresHeader('P10D');
- OC_Response::enableCaching();
- OC_Response::redirect(OCP\Util::imagePath('contacts', 'person.png'));
+ OCP\Response::setExpiresHeader('P10D');
+ OCP\Response::enableCaching();
+ OCP\Response::redirect(OCP\Util::imagePath('contacts', 'person.png'));
}
if(!function_exists('imagecreatefromjpeg')) {
@@ -49,7 +49,7 @@ if(is_null($contact)){
getStandardImage();
exit();
}
-OC_Response::enableCaching($caching);
+OCP\Response::enableCaching($caching);
OC_Contacts_App::setLastModifiedHeader($contact);
$thumbnail_size = 23;
@@ -58,7 +58,7 @@ $thumbnail_size = 23;
$image = new OC_Image();
$photo = $contact->getAsString('PHOTO');
if($photo) {
- OC_Response::setETagHeader(md5($photo));
+ OCP\Response::setETagHeader(md5($photo));
if($image->loadFromBase64($photo)) {
if($image->centerCrop()) {
diff --git a/apps/files/download.php b/apps/files/download.php
index a4077b9f042..e98cf2ecd31 100755
--- a/apps/files/download.php
+++ b/apps/files/download.php
@@ -41,7 +41,7 @@ $ftype=OC_Filesystem::getMimeType( $filename );
header('Content-Type:'.$ftype);
header('Content-Disposition: attachment; filename="'.basename($filename).'"');
-OC_Response::disableCaching();
+OCP\Response::disableCaching();
header('Content-Length: '.OC_Filesystem::filesize($filename));
@ob_end_clean();
diff --git a/apps/files_sharing/get.php b/apps/files_sharing/get.php
index a741139b929..b17dc85c5ba 100755
--- a/apps/files_sharing/get.php
+++ b/apps/files_sharing/get.php
@@ -68,7 +68,7 @@ if ($source !== false) {
//get time mimetype and set the headers
$mimetype = OC_Filesystem::getMimeType($source);
header("Content-Transfer-Encoding: binary");
- OC_Response::disableCaching();
+ OCP\Response::disableCaching();
header('Content-Disposition: filename="'.basename($source).'"');
header("Content-Type: " . $mimetype);
header("Content-Length: " . OC_Filesystem::filesize($source));
diff --git a/apps/gallery/ajax/galleryOp.php b/apps/gallery/ajax/galleryOp.php
index 75b18c6f7bf..c302a3a734c 100755
--- a/apps/gallery/ajax/galleryOp.php
+++ b/apps/gallery/ajax/galleryOp.php
@@ -41,10 +41,10 @@ function handleRemove($name) {
}
function handleGetThumbnails($albumname) {
- OC_Response::enableCaching(3600 * 24); // 24 hour
+ OCP\Response::enableCaching(3600 * 24); // 24 hour
$thumbnail = OC::$CONFIG_DATADIRECTORY.'/../gallery/'.urldecode($albumname).'.png';
header('Content-Type: '.OC_Image::getMimeTypeForFile($thumbnail));
- OC_Response::sendFile($thumbnail);
+ OCP\Response::sendFile($thumbnail);
}
function handleGalleryScanning() {
diff --git a/apps/gallery/ajax/sharing.php b/apps/gallery/ajax/sharing.php
index 04de57eb177..a1af75ad461 100755
--- a/apps/gallery/ajax/sharing.php
+++ b/apps/gallery/ajax/sharing.php
@@ -72,7 +72,7 @@ function handleGetThumbnail($token, $imgpath) {
$owner = OC_Gallery_Sharing::getTokenOwner($token);
$image = OC_Gallery_Photo::getThumbnail($imgpath, $owner);
if ($image) {
- OC_Response::enableCaching(3600 * 24); // 24 hour
+ OCP\Response::enableCaching(3600 * 24); // 24 hour
$image->show();
}
}
@@ -86,7 +86,7 @@ function handleGetAlbumThumbnail($token, $albumname)
$image->centerCrop();
$image->resize(200);
$image->fixOrientation();
- OC_Response::enableCaching(3600 * 24); // 24 hour
+ OCP\Response::enableCaching(3600 * 24); // 24 hour
$image->show();
}
}
@@ -95,7 +95,7 @@ function handleGetPhoto($token, $photo) {
$owner = OC_Gallery_Sharing::getTokenOwner($token);
$file = OCP\Config::getSystemValue( "datadirectory", OC::$SERVERROOT."/data" ).'/'.$owner.'/files'.urldecode($photo);
header('Content-Type: '.OC_Image::getMimeTypeForFile($file));
- OC_Response::sendFile($file);
+ OCP\Response::sendFile($file);
}
switch ($operation) {
diff --git a/apps/gallery/ajax/thumbnail.php b/apps/gallery/ajax/thumbnail.php
index bf42fd2becb..92e9fd4269e 100644..100755
--- a/apps/gallery/ajax/thumbnail.php
+++ b/apps/gallery/ajax/thumbnail.php
@@ -29,6 +29,6 @@ $img = $_GET['img'];
$image = OC_Gallery_Photo::getThumbnail($img);
if ($image) {
- OC_Response::enableCaching(3600 * 24); // 24 hour
+ OCP\Response::enableCaching(3600 * 24); // 24 hour
$image->show();
}
diff --git a/apps/media/ajax/api.php b/apps/media/ajax/api.php
index d648e6fe975..95259fdefa0 100755
--- a/apps/media/ajax/api.php
+++ b/apps/media/ajax/api.php
@@ -110,11 +110,11 @@ if($arguments['action']){
OC_MEDIA_COLLECTION::registerPlay($songId);
header('Content-Type:'.$ftype);
- OC_Response::enableCaching(3600 * 24); // 24 hour
+ OCP\Response::enableCaching(3600 * 24); // 24 hour
header('Accept-Ranges: bytes');
header('Content-Length: '.OC_Filesystem::filesize($arguments['path']));
$mtime = OC_Filesystem::filemtime($arguments['path']);
- OC_Response::setLastModifiedHeader($mtime);
+ OCP\Response::setLastModifiedHeader($mtime);
OC_Filesystem::readfile($arguments['path']);
exit;
diff --git a/apps/media/tomahawk.php b/apps/media/tomahawk.php
index af97c444eb5..d4f5ac6afad 100755
--- a/apps/media/tomahawk.php
+++ b/apps/media/tomahawk.php
@@ -43,7 +43,7 @@ if(isset($_POST['play']) and $_POST['play']=='true'){
$song=OC_MEDIA_COLLECTION::getSong($_POST['song']);
$ftype=OC_Filesystem::getMimeType( $song['song_path'] );
header('Content-Type:'.$ftype);
- OC_Response::disableCaching();
+ OCP\Response::disableCaching();
header('Content-Length: '.OC_Filesystem::filesize($song['song_path']));
OC_Filesystem::readfile($song['song_path']);