]> source.dussan.org Git - nextcloud-server.git/commitdiff
Move core apps from private to public functions
authorRoeland Jago Douma <roeland@famdouma.nl>
Wed, 1 Apr 2015 10:06:04 +0000 (12:06 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Wed, 1 Apr 2015 10:06:04 +0000 (12:06 +0200)
Apps still use OC_Helper and OC_Util functions even when public ones are
already available. Sometimes the public one is even used in the same
file.

apps/files/templates/appnavigation.php
apps/files_encryption/lib/helper.php
apps/files_encryption/settings-personal.php
apps/files_encryption/templates/invalid_private_key.php
apps/files_sharing/lib/sharedstorage.php
apps/files_trashbin/lib/trashbin.php
apps/user_webdavauth/appinfo/app.php

index 8fd2b76f9c0ec862b325475cd50d952806476b15..e6237c7f485887c736c4f9eed030e301902f006a 100644 (file)
@@ -14,7 +14,7 @@
                                <h2>
                                        <label for="webdavurl"><?php p($l->t('WebDAV'));?></label>
                                </h2>
-                               <input id="webdavurl" type="text" readonly="readonly" value="<?php p(OC_Helper::linkToRemote('webdav')); ?>" />
+                               <input id="webdavurl" type="text" readonly="readonly" value="<?php p(\OCP\Util::linkToRemote('webdav')); ?>" />
                                <em><?php print_unescaped($l->t('Use this address to <a href="%s" target="_blank">access your Files via WebDAV</a>', array(link_to_docs('user-webdav'))));?></em>
                </div>
        </div>
index df90afa864ac65c1dfc674825bf2b280be670176..1ae161ce99e8844c1d9048603c5651c9a2ed1dd9 100644 (file)
@@ -395,7 +395,7 @@ class Helper {
                        }
                }
 
-               $location = \OC_Helper::linkToAbsolute('apps/files_encryption/files', 'error.php');
+               $location = \OCP\Util::linkToAbsolute('apps/files_encryption/files', 'error.php');
                $post = 0;
                if(count($_POST) > 0) {
                        $post = 1;
index e3658fb06054a1de91b92e14f20661baf41e0ce0..a9e512f89d8fc8713654f929b74ff30f9becc42c 100644 (file)
@@ -26,7 +26,7 @@
  */
 \r
 // Add CSS stylesheet\r
-\OC_Util::addStyle('files_encryption', 'settings-personal');\r
+\OCP\Util::addStyle('files_encryption', 'settings-personal');\r
 \r
 $tmpl = new OCP\Template('files_encryption', 'settings-personal');\r
 \r
index b148e65b199b27153645af026eea2b31e547d12e..700b37b58a75b665e004034ba956d337b87a3e69 100644 (file)
@@ -1,6 +1,6 @@
 <ul>
        <li class='error'>
-               <?php $location = \OC_Helper::linkToRoute( "settings_personal" ).'#changePKPasswd' ?>
+               <?php $location = \OCP\Util::linkToRoute( "settings_personal" ).'#changePKPasswd' ?>
 
                <?php p($_['message']); ?>
                <br/>
index c7285b1d5c6962f263d0279281581af2cd3180f7..ce8665c97a0b531136e71cbef64454eb84e9c51e 100644 (file)
@@ -118,7 +118,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
                        $permissions |= \OCP\Constants::PERMISSION_DELETE;
                }
 
-               if (\OC_Util::isSharingDisabledForUser()) {
+               if (\OCP\Util::isSharingDisabledForUser()) {
                        $permissions &= ~\OCP\Constants::PERMISSION_SHARE;
                }
 
index 8bc2ed8bc7a19d9f914e6037b731627b2de753f5..eaf0c705a455309924636853e62842a06786722a 100644 (file)
@@ -990,6 +990,6 @@ class Trashbin {
         * @return string
         */
        public static function preview_icon($path) {
-               return \OC_Helper::linkToRoute('core_ajax_trashbin_preview', array('x' => 36, 'y' => 36, 'file' => $path));
+               return \OCP\Util::linkToRoute('core_ajax_trashbin_preview', array('x' => 36, 'y' => 36, 'file' => $path));
        }
 }
index 573700c5607ee8a7991ac7bd6464d7561a1f81dd..d27e804d8badab16bacae1b6ae836c067dc64adf 100644 (file)
@@ -33,6 +33,6 @@ OC_User::useBackend( "WEBDAVAUTH" );
 $entry = array(
        'id' => "user_webdavauth_settings",
        'order'=>1,
-       'href' => OC_Helper::linkTo( "user_webdavauth", "settings.php" ),
+       'href' => \OCP\Util::linkTo( "user_webdavauth", "settings.php" ),
        'name' => 'WEBDAVAUTH'
 );