diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-05-03 12:23:29 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-05-03 12:23:29 +0200 |
commit | 43caa3b3b9cc9dbbf73ab2f6695a801a07a1dba5 (patch) | |
tree | f4b191f0d039cb7de942554ea23df3fff9de7ad6 /apps/media | |
parent | 375ba986452b190745b9388be92737d7e5771673 (diff) | |
download | nextcloud-server-43caa3b3b9cc9dbbf73ab2f6695a801a07a1dba5.tar.gz nextcloud-server-43caa3b3b9cc9dbbf73ab2f6695a801a07a1dba5.zip |
ported oc_json
Diffstat (limited to 'apps/media')
-rwxr-xr-x | apps/media/ajax/api.php | 14 | ||||
-rwxr-xr-x | apps/media/ajax/autoupdate.php | 4 | ||||
-rwxr-xr-x | apps/media/tomahawk.php | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/apps/media/ajax/api.php b/apps/media/ajax/api.php index 95259fdefa0..130344ac6dc 100755 --- a/apps/media/ajax/api.php +++ b/apps/media/ajax/api.php @@ -23,7 +23,7 @@ header('Content-type: text/html; charset=UTF-8') ; -OC_JSON::checkAppEnabled('media'); +OCP\JSON::checkAppEnabled('media'); require_once(OC::$APPSROOT . '/apps/media/lib_collection.php'); require_once(OC::$APPSROOT . '/apps/media/lib_scanner.php'); @@ -64,7 +64,7 @@ if($arguments['action']){ $data['artists']=OC_MEDIA_COLLECTION::getArtists(); $data['albums']=OC_MEDIA_COLLECTION::getAlbums(); $data['songs']=OC_MEDIA_COLLECTION::getSongs(); - OC_JSON::encodedPrint($data); + OCP\JSON::encodedPrint($data); break; case 'scan': OC_DB::beginTransaction(); @@ -78,13 +78,13 @@ if($arguments['action']){ echo (OC_MEDIA_SCANNER::scanFile($arguments['path']))?'true':'false'; break; case 'get_artists': - OC_JSON::encodedPrint(OC_MEDIA_COLLECTION::getArtists($arguments['search'])); + OCP\JSON::encodedPrint(OC_MEDIA_COLLECTION::getArtists($arguments['search'])); break; case 'get_albums': - OC_JSON::encodedPrint(OC_MEDIA_COLLECTION::getAlbums($arguments['artist'],$arguments['search'])); + OCP\JSON::encodedPrint(OC_MEDIA_COLLECTION::getAlbums($arguments['artist'],$arguments['search'])); break; case 'get_songs': - OC_JSON::encodedPrint(OC_MEDIA_COLLECTION::getSongs($arguments['artist'],$arguments['album'],$arguments['search'])); + OCP\JSON::encodedPrint(OC_MEDIA_COLLECTION::getSongs($arguments['artist'],$arguments['album'],$arguments['search'])); break; case 'get_path_info': if(OC_Filesystem::file_exists($arguments['path'])){ @@ -97,7 +97,7 @@ if($arguments['action']){ $song=OC_MEDIA_COLLECTION::getSong($songId); $song['artist']=OC_MEDIA_COLLECTION::getArtistName($song['song_artist']); $song['album']=OC_MEDIA_COLLECTION::getAlbumName($song['song_album']); - OC_JSON::encodedPrint($song); + OCP\JSON::encodedPrint($song); } } break; @@ -122,7 +122,7 @@ if($arguments['action']){ $music=OC_FileCache::searchByMime('audio'); $ogg=OC_FileCache::searchByMime('application','ogg'); $music=array_merge($music,$ogg); - OC_JSON::encodedPrint($music); + OCP\JSON::encodedPrint($music); exit; } } diff --git a/apps/media/ajax/autoupdate.php b/apps/media/ajax/autoupdate.php index 1efbea3acef..3122c7e6754 100755 --- a/apps/media/ajax/autoupdate.php +++ b/apps/media/ajax/autoupdate.php @@ -28,11 +28,11 @@ $RUNTIME_NOAPPS=true; $RUNTIME_NOSETUPFS=true; -OC_JSON::checkAppEnabled('media'); +OCP\JSON::checkAppEnabled('media'); $autoUpdate=(isset($_GET['autoupdate']) and $_GET['autoupdate']=='true'); OCP\Config::setUserValue(OCP\USER::getUser(),'media','autoupdate',(integer)$autoUpdate); -OC_JSON::success(array('data' => $autoUpdate)); +OCP\JSON::success(array('data' => $autoUpdate)); ?> diff --git a/apps/media/tomahawk.php b/apps/media/tomahawk.php index d4f5ac6afad..700a75bf41e 100755 --- a/apps/media/tomahawk.php +++ b/apps/media/tomahawk.php @@ -24,7 +24,7 @@ $_POST=$_GET; //debug require_once('../inc.php'); -OC_JSON::checkAppEnabled('media'); +OCP\JSON::checkAppEnabled('media'); require_once(OC::$APPSROOT . '/apps/media/lib_collection.php'); $user=isset($_POST['user'])?$_POST['user']:''; @@ -76,5 +76,5 @@ foreach($songs as $song) { 'score' => (float)1.0 ); } -OC_JSON::encodedPrint($results); +OCP\JSON::encodedPrint($results); ?> |