aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/index.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-11-18 18:53:45 +0100
committerVincent Petry <pvince81@owncloud.com>2014-12-15 12:10:54 +0100
commita5bb66f4a723bce5c5fbe919a48cd5133204ef62 (patch)
treeb2e067bde8aaa1de6973adc7760fafb1e37e9084 /apps/files/index.php
parentc6be491a89a4eebe15bcb20f6e0b01f23a093761 (diff)
downloadnextcloud-server-a5bb66f4a723bce5c5fbe919a48cd5133204ef62.tar.gz
nextcloud-server-a5bb66f4a723bce5c5fbe919a48cd5133204ef62.zip
Added favorites feature to the files app
Diffstat (limited to 'apps/files/index.php')
-rw-r--r--apps/files/index.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/files/index.php b/apps/files/index.php
index 929bc5e79da..86cf2e04a56 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -20,6 +20,7 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
+use OCA\Files\Appinfo\Application;
// Check if we are a user
OCP\User::checkLoggedIn();
@@ -38,8 +39,14 @@ OCP\Util::addscript('files', 'filesummary');
OCP\Util::addscript('files', 'breadcrumb');
OCP\Util::addscript('files', 'filelist');
+\OCP\Util::addScript('files', 'favoritesfilelist');
+\OCP\Util::addScript('files', 'tagsplugin');
+\OCP\Util::addScript('files', 'favoritesplugin');
+
OCP\App::setActiveNavigationEntry('files_index');
+$l = \OC::$server->getL10N('files');
+
$isIE8 = false;
preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $matches);
if (count($matches) > 0 && $matches[1] <= 9) {
@@ -79,6 +86,16 @@ function sortNavigationItems($item1, $item2) {
return $item1['order'] - $item2['order'];
}
+\OCA\Files\App::getNavigationManager()->add(
+ array(
+ "id" => 'favorites',
+ "appname" => 'files',
+ "script" => 'simplelist.php',
+ "order" => 50,
+ "name" => $l->t('Favorites')
+ )
+);
+
$navItems = \OCA\Files\App::getNavigationManager()->getAll();
usort($navItems, 'sortNavigationItems');
$nav->assign('navigationItems', $navItems);