/** * @brief ownCloud Games Integration * @site http://oc-apps2.sourceforge.net/ * * @author Pierre Fauconnier * @copyright 2014 Pierre Fauconnier * @license CeCILL v2.1 - http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt */ // ownCloud calls appinfo/app.php every time it runs. This is the place to // Register navigation entries, and connect signals and slots define(__NAMESPACE__.'\K_APP_NAME', 'oc_apps2_games'); \OCP\App::register(Array( 'id' => K_APP_NAME, 'order' => 60, 'name' => 'Games2 +' )); \OCP\App::addNavigationEntry(Array( 'id' => namespace\K_APP_NAME, 'order' => 60, 'href' => \OCP\Util::linkTo(K_APP_NAME, 'main.php'), 'icon' => \OCP\Util::imagePath(K_APP_NAME, 'games-card_game.png'), 'name' => 'Games2 +' )); //\OC_Hook::connect('OC_DB','install', 'installer'); //\OC_Hook::connect('OC_DB','update', 'updater'); /* $myFile = \OC_App::getAppPath('oc_apps2_games').'/appinfo/apps2_game_map.csv'; if ( @is_readable($myFile) ) {
* 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 Affero General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ namespace OCA\Documents\AppInfo; use OCA\Documents\Filter\Office; use OCA\Documents\Config; $app = new Application(); $c = $app->getContainer(); \OCP\App::register(['order' => 70, 'id' => 'documents', 'name' => 'Documents']); //\OCP\App::registerAdmin('documents', 'settings'); \OCP\App::registerAdmin('documents', 'admin'); \OCP\App::registerPersonal('documents', 'personal'); $navigationEntry = function () use($c) { return ['id' => 'documents_index', 'order' => 2, 'href' => \OCP\Util::linkTo('documents/', 'index.php'), 'icon' => \OCP\Util::imagePath('documents', 'documents.svg'), 'name' => $c->query('L10N')->t('Documents')]; }; $c->getServer()->getNavigationManager()->add($navigationEntry); //Script for registering file actions $url = \OC::$server->getRequest()->server['REQUEST_URI']; if (preg_match('%index.php/apps/files(/.*)?%', $url)) { \OCP\Util::addScript('documents', 'viewer/viewer'); } if (Config::getConverter() !== 'off') { $docFilter = new Office(['read' => ['target' => 'application/vnd.oasis.opendocument.text', 'format' => 'odt:writer8', 'extension' => 'odt'], 'write' => ['target' => 'application/msword', 'format' => 'doc', 'extension' => 'doc']]); $docxFilter = new Office(['read' => ['target' => 'application/vnd.oasis.opendocument.text', 'format' => 'odt:writer8', 'extension' => 'odt'], 'write' => ['target' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'format' => 'docx', 'extension' => 'docx']]);