port checkAppEnabled

This commit is contained in:
Frank Karlitschek 2012-05-02 19:08:37 +02:00
parent eec7c3833c
commit 4fe90f62f4
28 changed files with 28 additions and 28 deletions

View File

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

View File

@ -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');

View File

@ -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' );

2
apps/calendar/ajax/import/dialog.php Normal file → Executable file
View File

@ -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']);

View File

@ -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';

2
apps/calendar/appinfo/remote.php Normal file → Executable file
View File

@ -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();

View File

@ -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";

View File

@ -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);

View File

@ -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);

2
apps/contacts/ajax/importdialog.php Normal file → Executable file
View File

@ -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']);

2
apps/contacts/appinfo/remote.php Normal file → Executable file
View File

@ -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();

View File

@ -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";

View File

@ -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/')){

View File

@ -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());

View File

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

View File

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

View File

@ -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");

View File

@ -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')) {

2
apps/gallery/sharing.php Normal file → Executable file
View File

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

View File

@ -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');

View File

@ -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');

2
apps/remoteStorage/WebDAV.php Normal file → Executable file
View File

@ -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');

2
apps/remoteStorage/ajax/revokeToken.php Normal file → Executable file
View File

@ -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');

View File

@ -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');

View File

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

View File

@ -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();

2
apps/user_migrate/settings.php Normal file → Executable file
View File

@ -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');

View File

@ -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);