浏览代码

port checkAppEnabled

Frank Karlitschek 12 年之前
父节点
当前提交
4fe90f62f4

+ 1 - 1
apps/admin_migrate/settings.php

@@ -23,7 +23,7 @@
  *
  */
 OCP\User::checkAdminUser();
-OC_Util::checkAppEnabled('admin_migrate');
+OCP\App::checkAppEnabled('admin_migrate');
 
 // Export?
 if (isset($_POST['admin_export'])) {

+ 1 - 1
apps/bookmarks/addBm.php

@@ -25,7 +25,7 @@
 
 // Check if we are a user
 OCP\User::checkLoggedIn();
-OC_Util::checkAppEnabled('bookmarks');
+OCP\App::checkAppEnabled('bookmarks');
 
 require_once('bookmarksHelper.php');
 addBookmark($_GET['url'], '', 'Read-Later');

+ 1 - 1
apps/bookmarks/index.php

@@ -25,7 +25,7 @@
 
 // Check if we are a user
 OCP\User::checkLoggedIn();
-OC_Util::checkAppEnabled('bookmarks');
+OCP\App::checkAppEnabled('bookmarks');
 
 OCP\App::setActiveNavigationEntry( 'bookmarks_index' );
 

+ 1 - 1
apps/calendar/ajax/import/dialog.php

@@ -8,7 +8,7 @@
 
  
 OC_JSON::checkLoggedIn();
-OC_Util::checkAppEnabled('calendar');
+OCP\App::checkAppEnabled('calendar');
 $tmpl = new OC_Template('calendar', 'part.import');
 $tmpl->assign('path', $_POST['path']);
 $tmpl->assign('filename', $_POST['filename']);

+ 1 - 1
apps/calendar/ajax/import/import.php

@@ -8,7 +8,7 @@
 //check for calendar rights or create new one
 ob_start();
 OC_JSON::checkLoggedIn();
-OC_Util::checkAppEnabled('calendar');
+OCP\App::checkAppEnabled('calendar');
 $nl="\r\n";
 $comps = array('VEVENT'=>true, 'VTODO'=>true, 'VJOURNAL'=>true);
 $progressfile = 'import_tmp/' . md5(session_id()) . '.txt';

+ 1 - 1
apps/calendar/appinfo/remote.php

@@ -9,7 +9,7 @@
 $RUNTIME_NOSETUPFS = true;
 require_once('../lib/base.php');
 
-OC_Util::checkAppEnabled('calendar');
+OCP\App::checkAppEnabled('calendar');
 
 // Backends
 $authBackend = new OC_Connector_Sabre_Auth();

+ 1 - 1
apps/calendar/export.php

@@ -8,7 +8,7 @@
 
  
 OCP\User::checkLoggedIn();
-OC_Util::checkAppEnabled('calendar');
+OCP\App::checkAppEnabled('calendar');
 $cal = isset($_GET['calid']) ? $_GET['calid'] : NULL;
 $event = isset($_GET['eventid']) ? $_GET['eventid'] : NULL;
 $nl = "\r\n";

+ 1 - 1
apps/calendar/index.php

@@ -8,7 +8,7 @@
 
  
 OCP\User::checkLoggedIn();
-OC_Util::checkAppEnabled('calendar');
+OCP\App::checkAppEnabled('calendar');
 
 // Create default calendar ...
 $calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser(), 1);

+ 1 - 1
apps/contacts/ajax/importaddressbook.php

@@ -8,7 +8,7 @@
 
 require_once('../../../lib/base.php');
 OC_JSON::checkLoggedIn();
-OC_Util::checkAppEnabled('contacts');
+OCP\App::checkAppEnabled('contacts');
 $upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
 $post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
 $maxUploadFilesize = min($upload_max_filesize, $post_max_size);

+ 1 - 1
apps/contacts/ajax/importdialog.php

@@ -8,7 +8,7 @@
 
  
 OC_JSON::checkLoggedIn();
-OC_Util::checkAppEnabled('contacts');
+OCP\App::checkAppEnabled('contacts');
 $tmpl = new OC_Template('contacts', 'part.import');
 $tmpl->assign('path', $_POST['path']);
 $tmpl->assign('filename', $_POST['filename']);

+ 1 - 1
apps/contacts/appinfo/remote.php

@@ -23,7 +23,7 @@
 $RUNTIME_NOSETUPFS = true;
 require_once('../lib/base.php');
 
-OC_Util::checkAppEnabled('contacts');
+OCP\App::checkAppEnabled('contacts');
 
 // Backends
 $authBackend = new OC_Connector_Sabre_Auth();

+ 1 - 1
apps/contacts/export.php

@@ -8,7 +8,7 @@
 
  
 OCP\User::checkLoggedIn();
-OC_Util::checkAppEnabled('contacts');
+OCP\App::checkAppEnabled('contacts');
 $bookid = isset($_GET['bookid']) ? $_GET['bookid'] : NULL;
 $contactid = isset($_GET['contactid']) ? $_GET['contactid'] : NULL;
 $nl = "\n";

+ 1 - 1
apps/contacts/import.php

@@ -9,7 +9,7 @@
 ob_start();
  
 OC_JSON::checkLoggedIn();
-OC_Util::checkAppEnabled('contacts');
+OCP\App::checkAppEnabled('contacts');
 $nl = "\n";
 $progressfile = 'import_tmp/' . md5(session_id()) . '.txt';
 if(is_writable('import_tmp/')){

+ 1 - 1
apps/contacts/index.php

@@ -10,7 +10,7 @@
 
 // Check if we are a user
 OCP\User::checkLoggedIn();
-OC_Util::checkAppEnabled('contacts');
+OCP\App::checkAppEnabled('contacts');
 
 // Get active address books. This creates a default one if none exists.
 $ids = OC_Contacts_Addressbook::activeIds(OCP\USER::getUser());

+ 1 - 1
apps/contacts/photo.php

@@ -11,7 +11,7 @@
 // Init owncloud
 
 OCP\User::checkLoggedIn();
-OC_Util::checkAppEnabled('contacts');
+OCP\App::checkAppEnabled('contacts');
 
 function getStandardImage(){
 	OC_Response::setExpiresHeader('P10D');

+ 1 - 1
apps/contacts/thumbnail.php

@@ -24,7 +24,7 @@
 
 OC_JSON::checkLoggedIn();
 //OCP\User::checkLoggedIn();
-OC_Util::checkAppEnabled('contacts');
+OCP\App::checkAppEnabled('contacts');
 
 function getStandardImage(){
 	OC_Response::setExpiresHeader('P10D');

+ 1 - 1
apps/files_sharing/list.php

@@ -24,7 +24,7 @@
 require_once('lib_share.php');
 
 OCP\User::checkLoggedIn();
-OC_Util::checkAppEnabled('files_sharing');
+OCP\App::checkAppEnabled('files_sharing');
 
 OCP\App::setActiveNavigationEntry("files_sharing_list");
 

+ 1 - 1
apps/gallery/index.php

@@ -24,7 +24,7 @@
 
 
 OCP\User::checkLoggedIn();
-OC_Util::checkAppEnabled('gallery');
+OCP\App::checkAppEnabled('gallery');
 OCP\App::setActiveNavigationEntry( 'gallery_index' );
 
 if (!file_exists(OCP\Config::getSystemValue("datadirectory").'/'. OCP\USER::getUser() .'/gallery')) {

+ 1 - 1
apps/gallery/sharing.php

@@ -27,7 +27,7 @@ if (!isset($_GET['token']) || empty($_GET['token'])) {
 
 
 
-OC_Util::checkAppEnabled('gallery');
+OCP\App::checkAppEnabled('gallery');
 
 ?>
 <!doctype html>

+ 1 - 1
apps/media/index.php

@@ -26,7 +26,7 @@
 
 // Check if we are a user
 OCP\User::checkLoggedIn();
-OC_Util::checkAppEnabled('media');
+OCP\App::checkAppEnabled('media');
 
 require_once(OC::$APPSROOT . '/apps/media/lib_collection.php');
 require_once(OC::$APPSROOT . '/apps/media/lib_scanner.php');

+ 1 - 1
apps/media/server/xml.server.php

@@ -23,7 +23,7 @@
 
 require_once('../../inc.php');
 
-OC_Util::checkAppEnabled('media');
+OCP\App::checkAppEnabled('media');
  require_once(OC::$APPSROOT . '/apps/media/lib_collection.php');
  require_once(OC::$APPSROOT . '/apps/media/lib_ampache.php');
 

+ 1 - 1
apps/remoteStorage/WebDAV.php

@@ -30,7 +30,7 @@
 $RUNTIME_NOSETUPFS = true;
 
 
-OC_Util::checkAppEnabled('remoteStorage');
+OCP\App::checkAppEnabled('remoteStorage');
 require_once('Sabre/autoload.php');
 require_once('lib_remoteStorage.php');
 require_once('BearerAuth.php');

+ 1 - 1
apps/remoteStorage/ajax/revokeToken.php

@@ -30,7 +30,7 @@
 $RUNTIME_NOSETUPFS = true;
 
  
-OC_Util::checkAppEnabled('remoteStorage');
+OCP\App::checkAppEnabled('remoteStorage');
 require_once('Sabre/autoload.php');
 require_once('../lib_remoteStorage.php');
 

+ 1 - 1
apps/remoteStorage/auth.php

@@ -30,7 +30,7 @@
 $RUNTIME_NOSETUPFS = true;
 
 
-OC_Util::checkAppEnabled('remoteStorage');
+OCP\App::checkAppEnabled('remoteStorage');
 require_once('Sabre/autoload.php');
 require_once('lib_remoteStorage.php');
 require_once('oauth_ro_auth.php');

+ 1 - 1
apps/user_migrate/admin.php

@@ -21,7 +21,7 @@
  *
  */
 OCP\User::checkAdminUser();
-OC_Util::checkAppEnabled('user_migrate');
+OCP\App::checkAppEnabled('user_migrate');
 
 // Import?
 if (isset($_POST['user_import'])) {

+ 1 - 1
apps/user_migrate/ajax/export.php

@@ -25,7 +25,7 @@
 
 // Check if we are a user
 OC_JSON::checkLoggedIn();
-OC_Util::checkAppEnabled('user_migrate');
+OCP\App::checkAppEnabled('user_migrate');
 // Which operation
 if( $_GET['operation']=='create' ){
 	$uid = !empty( $_POST['uid'] ) ? $_POST['uid'] :  OCP\USER::getUser();

+ 1 - 1
apps/user_migrate/settings.php

@@ -22,7 +22,7 @@
  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-OC_Util::checkAppEnabled('user_migrate');
+OCP\App::checkAppEnabled('user_migrate');
 
 // fill template
 $tmpl = new OC_Template('user_migrate', 'settings');

+ 1 - 1
apps/user_openid/user.php

@@ -37,7 +37,7 @@ if($USERNAME=='' and isset($_SERVER['PHP_AUTH_USER'])){
 $RUNTIME_NOAPPS=true;
 $RUNTIME_NOAPPS=false;
 require_once '../../lib/base.php';
-OC_Util::checkAppEnabled('user_openid');
+OCP\App::checkAppEnabled('user_openid');
 
 if(!OCP\User::userExists($USERNAME)){
 	OCP\Util::writeLog('user_openid',$USERNAME.' doesn\'t exist',OCP\Util::WARN);