2011-08-22 23:40:13 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com>
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or later.
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*/
|
|
|
|
|
2011-09-18 19:31:56 +00:00
|
|
|
OC_Util::checkAdminUser();
|
2012-09-28 21:15:19 +00:00
|
|
|
OC_App::loadApps();
|
2011-08-22 23:40:13 +00:00
|
|
|
|
|
|
|
OC_Util::addStyle( "settings", "settings" );
|
2011-10-16 19:08:44 +00:00
|
|
|
OC_Util::addScript( "settings", "admin" );
|
2012-04-16 10:21:12 +00:00
|
|
|
OC_Util::addScript( "settings", "log" );
|
2011-08-22 23:40:13 +00:00
|
|
|
OC_App::setActiveNavigationEntry( "admin" );
|
|
|
|
|
|
|
|
$tmpl = new OC_Template( 'settings', 'admin', 'user');
|
|
|
|
$forms=OC_App::getForms('admin');
|
2012-06-21 12:07:04 +00:00
|
|
|
$htaccessworking=OC_Util::ishtaccessworking();
|
2012-04-16 10:21:12 +00:00
|
|
|
|
|
|
|
$entries=OC_Log_Owncloud::getEntries(3);
|
2012-08-04 15:38:31 +00:00
|
|
|
$entriesremain=(count(OC_Log_Owncloud::getEntries(4)) > 3)?true:false;
|
|
|
|
|
2012-11-02 18:53:02 +00:00
|
|
|
function compareEntries($a, $b) {
|
2012-04-16 10:21:12 +00:00
|
|
|
return $b->time - $a->time;
|
|
|
|
}
|
|
|
|
usort($entries, 'compareEntries');
|
|
|
|
|
2012-11-04 10:10:46 +00:00
|
|
|
$tmpl->assign('loglevel', OC_Config::getValue( "loglevel", 2 ));
|
2012-11-02 18:53:02 +00:00
|
|
|
$tmpl->assign('entries', $entries);
|
2012-08-04 15:38:31 +00:00
|
|
|
$tmpl->assign('entriesremain', $entriesremain);
|
2012-11-02 18:53:02 +00:00
|
|
|
$tmpl->assign('htaccessworking', $htaccessworking);
|
2012-11-08 17:08:44 +00:00
|
|
|
$tmpl->assign('internetconnectionworking', OC_Util::isinternetconnectionworking());
|
2012-12-19 14:10:33 +00:00
|
|
|
$tmpl->assign('islocaleworking', OC_Util::issetlocaleworking());
|
2012-08-09 23:36:33 +00:00
|
|
|
$tmpl->assign('backgroundjobs_mode', OC_Appconfig::getValue('core', 'backgroundjobs_mode', 'ajax'));
|
2012-08-28 00:36:34 +00:00
|
|
|
$tmpl->assign('shareAPIEnabled', OC_Appconfig::getValue('core', 'shareapi_enabled', 'yes'));
|
2013-01-11 13:18:51 +00:00
|
|
|
|
|
|
|
// Check if connected using HTTPS
|
|
|
|
if (OC_Request::serverProtocol() == 'https') {
|
|
|
|
$connectedHTTPS = true;
|
|
|
|
} else {
|
|
|
|
$connectedHTTPS = false;
|
|
|
|
}
|
|
|
|
$tmpl->assign('isConnectedViaHTTPS', $connectedHTTPS);
|
|
|
|
$tmpl->assign('enforceHTTPSEnabled', OC_Config::getValue( "forcessl", false));
|
|
|
|
|
2012-08-28 00:36:34 +00:00
|
|
|
$tmpl->assign('allowLinks', OC_Appconfig::getValue('core', 'shareapi_allow_links', 'yes'));
|
|
|
|
$tmpl->assign('allowResharing', OC_Appconfig::getValue('core', 'shareapi_allow_resharing', 'yes'));
|
|
|
|
$tmpl->assign('sharePolicy', OC_Appconfig::getValue('core', 'shareapi_share_policy', 'global'));
|
2012-11-02 18:53:02 +00:00
|
|
|
$tmpl->assign('forms', array());
|
2012-09-07 13:22:01 +00:00
|
|
|
foreach($forms as $form) {
|
2012-11-02 18:53:02 +00:00
|
|
|
$tmpl->append('forms', $form);
|
2011-08-22 23:40:13 +00:00
|
|
|
}
|
2011-09-18 19:31:56 +00:00
|
|
|
$tmpl->printPage();
|