From 495562f40cbafd459abd4862ad0b82157ad25459 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 26 Mar 2015 20:26:41 +0100 Subject: Move federated cloud sharing, files externals and updater to special positions --- settings/admin.php | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'settings/admin.php') diff --git a/settings/admin.php b/settings/admin.php index 4416af1fe37..b74a4cf4c5e 100644 --- a/settings/admin.php +++ b/settings/admin.php @@ -135,6 +135,33 @@ if ($request->getServerProtocol() !== 'https' || !OC_Util::isAnnotationsWorking ) { $formsAndMore[] = array('anchor' => 'security-warning', 'section-name' => $l->t('Security & setup warnings')); } +$formsAndMore[] = array('anchor' => 'shareAPI', 'section-name' => $l->t('Sharing')); + +// Prioritize fileSharingSettings and files_external and move updater to the version +$fileSharingSettings = $filesExternal = $updaterAppPanel = ''; +foreach ($forms as $index => $form) { + if (strpos($form, 'id="fileSharingSettings"')) { + $fileSharingSettings = $form; + unset($forms[$index]); + continue; + } + if (strpos($form, 'id="files_external"')) { + $filesExternal = $form; + unset($forms[$index]); + continue; + } + if (strpos($form, 'class="updater-admin"')) { + $updaterAppPanel = $form; + unset($forms[$index]); + continue; + } +} +if ($filesExternal) { + $formsAndMore[] = array('anchor' => 'files_external', 'section-name' => $l->t('External Storage')); +} +$template->assign('fileSharingSettings', $fileSharingSettings); +$template->assign('filesExternal', $filesExternal); +$template->assign('updaterAppPanel', $updaterAppPanel); $formsMap = array_map(function ($form) { if (preg_match('%(]*>.*?)%i', $form, $regs)) { @@ -158,8 +185,6 @@ $formsAndMore = array_merge($formsAndMore, $formsMap); // add bottom hardcoded forms from the template $formsAndMore[] = array('anchor' => 'backgroundjobs', 'section-name' => $l->t('Cron')); -$formsAndMore[] = array('anchor' => 'shareAPI', 'section-name' => $l->t('Sharing')); -$formsAndMore[] = array('anchor' => 'encryptionAPI', 'section-name' => $l->t('Server Side Encryption')); $formsAndMore[] = array('anchor' => 'mail_general_settings', 'section-name' => $l->t('Email Server')); $formsAndMore[] = array('anchor' => 'log-section', 'section-name' => $l->t('Log')); $formsAndMore[] = array('anchor' => 'admin-tips', 'section-name' => $l->t('Tips & tricks')); -- cgit v1.2.3