<?php /** * ownCloud - user_migrate * * @author Tom Needham * @copyright 2012 Tom Needham tom@owncloud.com * * 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::registerPersonal('user_migrate', 'settings'); OCP\Util::addscript('user_migrate', 'export'); OCP\Util::addstyle('user_migrate', 'style'); // add settings page to navigation $entry = array('id' => "user_migrate_settings", 'order' => 1, 'href' => OCP\Util::linkTo("user_migrate", "admin.php"), 'name' => 'Import');
* 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/>. * */ // Check if we are a user OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('conversations'); OCP\App::setActiveNavigationEntry('conversations'); // register js and css OCP\Util::addscript('conversations', 'conversations'); OCP\Util::addScript('conversations', 'jquery.infinitescroll.min'); OCP\Util::addScript('conversations', 'jquery.autosize.min'); OCP\Util::addScript('conversations', 'jquery.timeago'); OCP\Util::addstyle('conversations', 'style'); // add timeago translations $lang = OC_L10N::findLanguage('conversations'); // TODO: may find a better solution than file_exists if (in_array($lang, OC_L10N::findAvailableLanguages('conversations')) && file_exists('./apps/conversations/js/jquery.timeago.' . $lang . '.js')) { OCP\Util::addScript('conversations', 'jquery.timeago.' . $lang); } // rooms $rooms = OC_Conversations::getRooms(); $updates = OC_Conversations::updateCheck(); $rooms = array_merge_recursive($rooms, $updates); // get the page that is requested. Needed for endless scrolling $count = 5; if (isset($_GET['page'])) { $page = intval($_GET['page']) - 1; } else {
* 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/>. * */ OC_Util::checkAdminUser(); $params = array('ldap_host', 'ldap_port', 'ldap_backup_host', 'ldap_backup_port', 'ldap_override_main_server', 'ldap_dn', 'ldap_agent_password', 'ldap_base', 'ldap_base_users', 'ldap_base_groups', 'ldap_userlist_filter', 'ldap_login_filter', 'ldap_group_filter', 'ldap_display_name', 'ldap_group_display_name', 'ldap_tls', 'ldap_turn_off_cert_check', 'ldap_nocase', 'ldap_quota_def', 'ldap_quota_attr', 'ldap_email_attr', 'ldap_group_member_assoc_attribute', 'ldap_cache_ttl', 'home_folder_naming_rule'); OCP\Util::addscript('user_ldap', 'settings'); OCP\Util::addstyle('user_ldap', 'settings'); // fill template $tmpl = new OCP\Template('user_ldap', 'settings'); $prefixes = \OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes(); $tmpl->assign('serverConfigurationPrefixes', $prefixes); // assign default values if (!isset($ldap)) { $ldap = new \OCA\user_ldap\lib\Connection(); } $defaults = $ldap->getDefaults(); foreach ($defaults as $key => $default) { $tmpl->assign($key . '_default', $default); } // $tmpl->assign(); return $tmpl->fetchPage();
<?php \OCP\User::checkLoggedIn(); \OCP\App::checkAppEnabled('ocDashboard'); \OCP\Util::addscript('ocDashboard', 'settings'); OCP\Util::addstyle('ocDashboard', 'ocDashboardSettings'); $user = OCP\User::getUser(); $tmpl = new OCP\Template('ocDashboard', 'settings'); $w = array(); OC::$CLASSPATH['ocdWidgets'] = 'ocDashboard/appinfo/widgetConfigs.php'; OC::$CLASSPATH['ocdFactory'] = 'ocDashboard/lib/factory.php'; foreach (ocdWidgets::$widgets as $widget) { $confs = json_decode($widget['conf'], true); if (isset($confs) && !empty($confs)) { foreach ($confs as $k => $config) { if ($config['type'] != 'password') { $confs[$k]['value'] = OCP\Config::getUserValue($user, "ocDashboard", "ocDashboard_" . $widget['id'] . "_" . $config['id'], ""); } } } $enable = OCP\Config::getUserValue($user, "ocDashboard", "ocDashboard_" . $widget['id']); $w[] = array("widget" => $widget, "enable" => $enable, "conf" => $confs); } //print_r($w); $tmpl->assign('widgets', $w); return $tmpl->fetchPage();