<?php /** * Copyright (c) 2011 Bart Visscher <*****@*****.**> * Copyright (c) 2012 Georg Ehrke <*****@*****.**> * This file is licensed under the Affero General Public License version 3 or * later. * See the COPYING-README file. * * This class manages our app actions */ OC_Calendar_App::$l10n = OCP\Util::getL10N('calendar'); OC_Calendar_App::$tz = OC_Calendar_App::getTimezone(); class OC_Calendar_App { const CALENDAR = 'calendar'; const EVENT = 'event'; /** * @brief language object for calendar app */ public static $l10n; /** * @brief categories of the user */ protected static $categories = null; /** * @brief timezone of the user */ public static $tz; /** * @brief returns informations about a calendar
<?php \OCP\Util::addScript('ownnote', 'admin'); $folder = $_['folder']; $disableAnnouncement = $_['disableAnnouncement']; $l = OCP\Util::getL10N('ownnote'); ?> <div class="section"> <h2>ownNote</h2> <label for="ownnote-type"><?php p($l->t("How would you like to store your notes?")); ?> </label><br> <select id="ownnote-type"> <option <?php if ($folder == "") { echo "selected"; } ?> value=""><?php p($l->t("Database only")); ?> </option> <option <?php if ($folder != "") { echo "selected"; } ?> value="folder"><?php p($l->t("Database and folder"));
<?php /** * Copyright (c) 2011 Bart Visscher <*****@*****.**> * This file is licensed under the Affero General Public License version 3 or * later. * See the COPYING-README file. */ // Init owncloud $l = OCP\Util::getL10N('calendar'); // Check if we are a user OCP\JSON::checkLoggedIn(); OCP\JSON::checkAppEnabled('calendar'); OCP\JSON::callCheck(); // Get data if (isset($_POST['defaultalarms'])) { $defaultalarms = $_POST['defaultalarms']; $match = preg_match('/^(?:display){0,1}?\\b\\|?(?:email){0,1}?\\b\\|?(?:webhook){0,1}?\\b$/i', $defaultalarms); if ($match === 1 or empty($defaultalarms)) { OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'defaultalarms', strtoupper($defaultalarms)); OCP\JSON::success(array('data' => array('message' => $l->t('Default reminders changed')))); } else { OCP\JSON::error(array('data' => array('message' => $l->t('Invalid request')))); } } else { OCP\JSON::error(array('data' => array('message' => $l->t('Invalid request')))); }
* 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['OCA\\Gallery\\Thumbnail'] = 'gallery/lib/thumbnail.php'; OC::$CLASSPATH['OCA\\Gallery\\AlbumThumbnail'] = 'gallery/lib/thumbnail.php'; OC::$CLASSPATH['OCA\\Gallery\\Share\\Picture'] = 'gallery/lib/share.php'; OC::$CLASSPATH['OCA\\Gallery\\Share\\Gallery'] = 'gallery/lib/share.php'; $l = OCP\Util::getL10N('gallery'); OCP\App::addNavigationEntry(array('id' => 'gallery_index', 'order' => 3, 'href' => OCP\Util::linkTo('gallery', 'index.php'), 'icon' => OCP\Util::imagePath('core', 'places/picture.svg'), 'name' => $l->t('Pictures'))); // make slideshow available in files and public shares OCP\Util::addScript('gallery', 'jquery.mousewheel-3.1.1'); OCP\Util::addScript('gallery', 'slideshow'); OCP\Util::addScript('gallery', 'public'); OCP\Util::addStyle('gallery', 'slideshow'); // register filesystem hooks to update thumbnails OCP\Util::connectHook('OC_Filesystem', 'post_write', 'OCA\\Gallery\\Thumbnail', 'writeHook'); OCP\Util::connectHook('OC_Filesystem', 'post_delete', 'OCA\\Gallery\\Thumbnail', 'removeHook'); // register share backend OCP\Share::registerBackend('picture', 'OCA\\Gallery\\Share\\Picture', null, array('gif', 'jpeg', 'jpg', 'png', 'svg', 'svgz')); OCP\Share::registerBackend('gallery', 'OCA\\Gallery\\Share\\Gallery', 'picture');
<?php /** * ownCloud - Polls plugin * * @author Radu Vatav * 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 Affero General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ OCP\App::addNavigationEntry(array('id' => 'polls', 'order' => 77, 'href' => OCP\Util::linkTo('polls', 'index.php'), 'icon' => OCP\Util::imagePath('polls', 'app-logo-polls.svg'), 'name' => OCP\Util::getL10N('polls')->t('Polls')));
* 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 Affero General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ OCP\JSON::checkLoggedIn(); OCP\JSON::checkAppEnabled('activity'); OCP\JSON::callCheck(); $notify_email = $notify_stream = array(); $l = OCP\Util::getL10N('activity'); $data = new \OCA\Activity\Data(\OC::$server->getActivityManager()); $types = $data->getNotificationTypes($l); foreach ($types as $type => $desc) { OCP\Config::setUserValue(OCP\User::getUser(), 'activity', 'notify_email_' . $type, !empty($_POST[$type . '_email'])); OCP\Config::setUserValue(OCP\User::getUser(), 'activity', 'notify_stream_' . $type, !empty($_POST[$type . '_stream'])); } $email_batch_time = 3600; if ($_POST['notify_setting_batchtime'] == \OCA\Activity\UserSettings::EMAIL_SEND_DAILY) { $email_batch_time = 3600 * 24; } if ($_POST['notify_setting_batchtime'] == \OCA\Activity\UserSettings::EMAIL_SEND_WEEKLY) { $email_batch_time = 3600 * 24 * 7; } OCP\Config::setUserValue(OCP\User::getUser(), 'activity', 'notify_setting_batchtime', $email_batch_time); OCP\Config::setUserValue(OCP\User::getUser(), 'activity', 'notify_setting_self', !empty($_POST['notify_setting_self']));
<?php use OCP\AppFramework\App; $app = new App('passwords'); $container = $app->getContainer(); $l = OCP\Util::getL10N('passwords'); $urlGenerator = $container->query('OCP\\IURLGenerator'); $l10n = $container->query('OCP\\IL10N'); OCP\App::addNavigationEntry(array('id' => 'passwords', 'order' => 9999, 'href' => $urlGenerator->linkToRoute('passwords.page.index'), 'icon' => $urlGenerator->imagePath('passwords', 'app.svg'), 'name' => $l10n->t('Passwords')));
<?php $l = OCP\Util::getL10N('admin_dependencies_chk'); OCP\App::registerAdmin('admin_dependencies_chk', 'settings');