-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Suggest cli based updater in case the instance is bigger #23922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,9 +37,17 @@ | |
| // need to send an initial message to force-init the event source, | ||
| // which will then trigger its own CSRF check and produces its own CSRF error | ||
| // message | ||
| $eventSource->send('success', (string)$l->t('Preparing update')); | ||
| //$eventSource->send('success', (string)$l->t('Preparing update')); | ||
|
|
||
| if (OC::checkUpgrade(false)) { | ||
|
|
||
| $config = \OC::$server->getSystemConfig(); | ||
| if ($config->getValue('upgrade.disable-web', true)) { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note to self: WTF |
||
| $eventSource->send('failure', (string)$l->t('Updates need to be installed. Please use the command line updater.')); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @DeepDiver1975 Also make the message more clear: "Web based update is disabled. Please use the command line tool to upgrade" ;)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This only gets displayed if a malicious user tries to trigger the update, even though the web UI already says it must be done via occ. Doesn't need to be pretty IMHO
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I was hugely confused, what has gone wrong. Better be more clear than to throw badly worded messages. |
||
| $eventSource->close(); | ||
| exit(); | ||
| } | ||
|
|
||
| // if a user is currently logged in, their session must be ignored to | ||
| // avoid side effects | ||
| \OC_User::setIncognitoMode(true); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <div class="update" data-productname="<?php p($_['productName']) ?>" data-version="<?php p($_['version']) ?>"> | ||
| <div class="updateOverview"> | ||
| <h2 class="title"><?php p($l->t('Update needed')) ?></h2> | ||
| <div class="infogroup"> | ||
| <?php if ($_['tooBig']) { | ||
| p($l->t('Please use the command line updater because you have a big instance.')); | ||
| } else { | ||
| p($l->t('Please use the command line updater because automatic updating is disabled in the config.php.')); | ||
| } ?><br><br> | ||
| <?php | ||
| print_unescaped($l->t('For help, see the <a target="_blank" rel="noreferrer" href="%s">documentation</a>.', [link_to_docs('admin-cli-upgrade')])); ?><br><br> | ||
| </div> | ||
| </div> | ||
| </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: WTF