Merge pull request #13138 from owncloud/issue/13134-incorrect-admin-warning-overwrite-cli-url

Fix incorrect warning about setting the overwrite.cli.url
remotes/origin/fix-10825
Lukas Reschke 12 years ago
commit 8e13ee26fa
  1. 8
      settings/admin.php
  2. 4
      settings/templates/admin.php

@ -56,11 +56,11 @@ $template->assign('forceSSLforSubdomainsEnabled', $config->getSystemValue('force
// If the current web root is non-empty but the web root from the config is, // If the current web root is non-empty but the web root from the config is,
// and system cron is used, the URL generator fails to build valid URLs. // and system cron is used, the URL generator fails to build valid URLs.
$shouldSuggestOverwriteWebRoot = $config->getAppValue('core', 'backgroundjobs_mode', 'ajax') === 'cron' && $shouldSuggestOverwriteCliUrl = $config->getAppValue('core', 'backgroundjobs_mode', 'ajax') === 'cron' &&
\OC::$WEBROOT && \OC::$WEBROOT !== '/' && \OC::$WEBROOT && \OC::$WEBROOT !== '/' &&
!$config->getSystemValue('overwritewebroot', ''); !$config->getSystemValue('overwrite.cli.url', '');
$suggestedOverwriteWebRoot = ($shouldSuggestOverwriteWebRoot) ? \OC::$WEBROOT : ''; $suggestedOverwriteCliUrl = ($shouldSuggestOverwriteCliUrl) ? \OC::$WEBROOT : '';
$template->assign('suggestedOverwriteWebroot', $suggestedOverwriteWebRoot); $template->assign('suggestedOverwriteCliUrl', $suggestedOverwriteCliUrl);
$template->assign('allowLinks', $appConfig->getValue('core', 'shareapi_allow_links', 'yes')); $template->assign('allowLinks', $appConfig->getValue('core', 'shareapi_allow_links', 'yes'));
$template->assign('enforceLinkPassword', \OCP\Util::isPublicLinkPasswordRequired()); $template->assign('enforceLinkPassword', \OCP\Util::isPublicLinkPasswordRequired());

@ -178,13 +178,13 @@ if (!$_['isLocaleWorking']) {
<?php <?php
} }
if ($_['suggestedOverwriteWebroot']) { if ($_['suggestedOverwriteCliUrl']) {
?> ?>
<div class="section"> <div class="section">
<h2><?php p($l->t('URL generation in notification emails'));?></h2> <h2><?php p($l->t('URL generation in notification emails'));?></h2>
<span class="connectionwarning"> <span class="connectionwarning">
<?php p($l->t('If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the "overwritewebroot" option in your config.php file to the webroot path of your installation (Suggested: "%s")', $_['suggestedOverwriteWebroot'])); ?> <?php p($l->t('If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the "overwrite.cli.url" option in your config.php file to the webroot path of your installation (Suggested: "%s")', $_['suggestedOverwriteCliUrl'])); ?>
</span> </span>
</div> </div>

Loading…
Cancel
Save