コード例 #1
0
ファイル: get.php プロジェクト: blablubli/owncloudapps
<?php

/**
* ownCloud - Internal Bookmarks plugin
*
* @author Xavier Beurois
* @copyright 2012 Xavier Beurois www.djazz-lab.net
* 
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either 
* version 3 of the License, or any later version.
* 
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*  
* You should have received a copy of the GNU Lesser General Public 
* License along with this library.  If not, see <http://www.gnu.org/licenses/>.
* 
*/
require_once '../../../lib/base.php';
OC_JSON::checkAppEnabled('internal_bookmarks');
$c = $_POST['c'];
$k = OC_IntBks::getItemByTarget($c);
if (count($k) > 0) {
    OC_JSON::encodedPrint($k);
}
コード例 #2
0
ファイル: settings.php プロジェクト: blablubli/owncloudapps
<?php

/**
* ownCloud - Internal Bookmarks plugin
*
* @author Xavier Beurois
* @copyright 2012 Xavier Beurois www.djazz-lab.net
* 
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either 
* version 3 of the License, or any later version.
* 
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*  
* You should have received a copy of the GNU Lesser General Public 
* License along with this library.  If not, see <http://www.gnu.org/licenses/>.
* 
*/
OC_Util::checkAppEnabled('internal_bookmarks');
OC_Util::checkLoggedIn();
$tmpl = new OC_Template('internal_bookmarks', 'settings.tpl');
$tmpl->assign('bk_list', OC_IntBks::getAllItemsByUser());
return $tmpl->fetchPage();
コード例 #3
0
ファイル: app.php プロジェクト: blablubli/owncloudapps
/**
* ownCloud - Internal Bookmarks plugin
*
* @author Xavier Beurois
* @copyright 2012 Xavier Beurois www.djazz-lab.net
* 
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either 
* version 3 of the License, or any later version.
* 
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*  
* You should have received a copy of the GNU Lesser General Public 
* License along with this library.  If not, see <http://www.gnu.org/licenses/>.
* 
*/
OC::$CLASSPATH['OC_IntBks'] = 'apps/internal_bookmarks/lib/intbks.class.php';
OC_App::register(array('order' => 70, 'id' => 'internal_bookmarks', 'name' => 'Internal Bookmarks'));
OC_Util::addScript("internal_bookmarks", "actlink.min");
$i = 0;
foreach (OC_IntBks::getAllItemsByUser() as $item) {
    OC_App::addNavigationEntry(array('id' => 'internal_bookmarks_index_' . $item['bkid'], 'order' => 70 + $item['bkorder'] / 100, 'href' => OC_Helper::linkTo('files', 'index.php?dir=' . $item['bktarget']), 'icon' => OC_Helper::imagePath('internal_bookmarks', 'star_on.png'), 'name' => $item['bktitle']));
    $i++;
}
if ($i > 0) {
    OC_App::registerPersonal('internal_bookmarks', 'settings');
}
コード例 #4
0
ファイル: order.php プロジェクト: blablubli/owncloudapps
/**
* ownCloud - Internal Bookmarks plugin
*
* @author Xavier Beurois
* @copyright 2012 Xavier Beurois www.djazz-lab.net
* 
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either 
* version 3 of the License, or any later version.
* 
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*  
* You should have received a copy of the GNU Lesser General Public 
* License along with this library.  If not, see <http://www.gnu.org/licenses/>.
* 
*/
require_once '../../../lib/base.php';
OC_JSON::checkAppEnabled('internal_bookmarks');
if (count($_POST['o']) > 1) {
    $c = 1;
    foreach ($_POST['o'] as $b) {
        $b = substr($b, strrpos($b, '_') + 1);
        OC_IntBks::updateItemOrder($b, $c);
        $c++;
    }
}