[MediaWiki-commits] [Gerrit] installer: Allow specifying where LocalSettings.php should b... - change (mediawiki/core)

2016-06-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: installer: Allow specifying where LocalSettings.php should be 
saved
..


installer: Allow specifying where LocalSettings.php should be saved

This allows software packages to specify where the LocalSettings.php
file should be saved to when the user is downloading it from the web
installer.

Bug: T123151
Change-Id: I06ded602be9aac0a10773e9d85c4d1585a70933b
(cherry picked from commit 4dba618ae0eae04ef8902be45fa98fd55ef73483)
---
M includes/installer/WebInstaller.php
M includes/installer/WebInstallerComplete.php
M includes/installer/i18n/en.json
M includes/installer/i18n/qqq.json
4 files changed, 25 insertions(+), 2 deletions(-)

Approvals:
  Siebrand: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/installer/WebInstaller.php 
b/includes/installer/WebInstaller.php
index 4c4e6b7..c08212e 100644
--- a/includes/installer/WebInstaller.php
+++ b/includes/installer/WebInstaller.php
@@ -1157,6 +1157,20 @@
}
 
/**
+* If the software package wants the LocalSettings.php file
+* to be placed in a specific location, override this function
+* (see mw-config/overrides/README) to return the path of
+* where the file should be saved, or false for a generic
+* "in the base of your install"
+*
+* @since 1.27
+* @return string|bool
+*/
+   public function getLocalSettingsLocation() {
+   return false;
+   }
+
+   /**
 * @return bool
 */
public function envCheckPath() {
diff --git a/includes/installer/WebInstallerComplete.php 
b/includes/installer/WebInstallerComplete.php
index 11a1833..456058e 100644
--- a/includes/installer/WebInstallerComplete.php
+++ b/includes/installer/WebInstallerComplete.php
@@ -37,13 +37,20 @@
 
$this->startForm();
$this->parent->disableLinkPopups();
+   $location = $this->parent->getLocalSettingsLocation();
+   $msg = 'config-install-done';
+   if ( $location !== false ) {
+   // config-install-done-path
+   $msg .= '-path';
+   }
$this->addHTML(
$this->parent->getInfoBox(
-   wfMessage( 'config-install-done',
+   wfMessage( $msg,
$lsUrl,
$this->getVar( 'wgServer' ) .
$this->getVar( 'wgScriptPath' ) . 
'/index.php',
-   ''
+   '',
+   $location ?: ''
)->plain(), 'tick-32.png'
)
);
diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json
index 8a66ad9..2d9b991 100644
--- a/includes/installer/i18n/en.json
+++ b/includes/installer/i18n/en.json
@@ -303,6 +303,7 @@
"config-install-extension-tables": "Creating tables for enabled 
extensions",
"config-install-mainpage-failed": "Could not insert main page: $1",
"config-install-done": "Congratulations!\nYou have 
installed MediaWiki.\n\nThe installer has generated a 
LocalSettings.php file.\nIt contains all your 
configuration.\n\nYou will need to download it and put it in the base of your 
wiki installation (the same directory as index.php). The download should have 
started automatically.\n\nIf the download was not offered, or if you cancelled 
it, you can restart the download by clicking the link 
below:\n\n$3\n\nNote: If you do not do this now, this 
generated configuration file will not be available to you later if you exit the 
installation without downloading it.\n\nWhen that has been done, you can 
[$2 enter your wiki].",
+   "config-install-done-path": "Congratulations!\nYou 
have installed MediaWiki.\n\nThe installer has generated a 
LocalSettings.php file.\nIt contains all your 
configuration.\n\nYou will need to download it and put it at $4. 
The download should have started automatically.\n\nIf the download was not 
offered, or if you cancelled it, you can restart the download by clicking the 
link below:\n\n$3\n\nNote: If you do not do this now, this 
generated configuration file will not be available to you later if you exit the 
installation without downloading it.\n\nWhen that has been done, you can 
[$2 enter your wiki].",
"config-download-localsettings": "Download 
LocalSettings.php",
"config-help": "help",
"config-help-tooltip": "click to expand",
diff --git a/includes/installer/i18n/qqq.json b/includes/installer/i18n/qqq.json
index 77d4569..307cf4d 100644
--- a/includes/installer/i18n/qqq.json
+++ b/includes/installer/i18n/qqq.json
@@ -321,6 +321,7 @@

[MediaWiki-commits] [Gerrit] installer: Allow specifying where LocalSettings.php should b... - change (mediawiki/core)

2016-06-24 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/295852

Change subject: installer: Allow specifying where LocalSettings.php should be 
saved
..

installer: Allow specifying where LocalSettings.php should be saved

This allows software packages to specify where the LocalSettings.php
file should be saved to when the user is downloading it from the web
installer.

Bug: T123151
Change-Id: I06ded602be9aac0a10773e9d85c4d1585a70933b
(cherry picked from commit 4dba618ae0eae04ef8902be45fa98fd55ef73483)
---
M includes/installer/WebInstaller.php
M includes/installer/WebInstallerComplete.php
M includes/installer/i18n/en.json
M includes/installer/i18n/qqq.json
4 files changed, 25 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/52/295852/1

diff --git a/includes/installer/WebInstaller.php 
b/includes/installer/WebInstaller.php
index 4c4e6b7..c08212e 100644
--- a/includes/installer/WebInstaller.php
+++ b/includes/installer/WebInstaller.php
@@ -1157,6 +1157,20 @@
}
 
/**
+* If the software package wants the LocalSettings.php file
+* to be placed in a specific location, override this function
+* (see mw-config/overrides/README) to return the path of
+* where the file should be saved, or false for a generic
+* "in the base of your install"
+*
+* @since 1.27
+* @return string|bool
+*/
+   public function getLocalSettingsLocation() {
+   return false;
+   }
+
+   /**
 * @return bool
 */
public function envCheckPath() {
diff --git a/includes/installer/WebInstallerComplete.php 
b/includes/installer/WebInstallerComplete.php
index 11a1833..456058e 100644
--- a/includes/installer/WebInstallerComplete.php
+++ b/includes/installer/WebInstallerComplete.php
@@ -37,13 +37,20 @@
 
$this->startForm();
$this->parent->disableLinkPopups();
+   $location = $this->parent->getLocalSettingsLocation();
+   $msg = 'config-install-done';
+   if ( $location !== false ) {
+   // config-install-done-path
+   $msg .= '-path';
+   }
$this->addHTML(
$this->parent->getInfoBox(
-   wfMessage( 'config-install-done',
+   wfMessage( $msg,
$lsUrl,
$this->getVar( 'wgServer' ) .
$this->getVar( 'wgScriptPath' ) . 
'/index.php',
-   ''
+   '',
+   $location ?: ''
)->plain(), 'tick-32.png'
)
);
diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json
index 8a66ad9..2d9b991 100644
--- a/includes/installer/i18n/en.json
+++ b/includes/installer/i18n/en.json
@@ -303,6 +303,7 @@
"config-install-extension-tables": "Creating tables for enabled 
extensions",
"config-install-mainpage-failed": "Could not insert main page: $1",
"config-install-done": "Congratulations!\nYou have 
installed MediaWiki.\n\nThe installer has generated a 
LocalSettings.php file.\nIt contains all your 
configuration.\n\nYou will need to download it and put it in the base of your 
wiki installation (the same directory as index.php). The download should have 
started automatically.\n\nIf the download was not offered, or if you cancelled 
it, you can restart the download by clicking the link 
below:\n\n$3\n\nNote: If you do not do this now, this 
generated configuration file will not be available to you later if you exit the 
installation without downloading it.\n\nWhen that has been done, you can 
[$2 enter your wiki].",
+   "config-install-done-path": "Congratulations!\nYou 
have installed MediaWiki.\n\nThe installer has generated a 
LocalSettings.php file.\nIt contains all your 
configuration.\n\nYou will need to download it and put it at $4. 
The download should have started automatically.\n\nIf the download was not 
offered, or if you cancelled it, you can restart the download by clicking the 
link below:\n\n$3\n\nNote: If you do not do this now, this 
generated configuration file will not be available to you later if you exit the 
installation without downloading it.\n\nWhen that has been done, you can 
[$2 enter your wiki].",
"config-download-localsettings": "Download 
LocalSettings.php",
"config-help": "help",
"config-help-tooltip": "click to expand",
diff --git a/includes/installer/i18n/qqq.json b/includes/installer/i18n/qqq.json
index 77d4569..307cf4d 100644
--- a/includes/installer/i18n/qqq.json
+++ 

[MediaWiki-commits] [Gerrit] installer: Allow specifying where LocalSettings.php should b... - change (mediawiki/core)

2016-06-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: installer: Allow specifying where LocalSettings.php should be 
saved
..


installer: Allow specifying where LocalSettings.php should be saved

This allows software packages to specify where the LocalSettings.php
file should be saved to when the user is downloading it from the web
installer.

Bug: T123151
Change-Id: I06ded602be9aac0a10773e9d85c4d1585a70933b
---
M includes/installer/WebInstaller.php
M includes/installer/WebInstallerComplete.php
M includes/installer/i18n/en.json
M includes/installer/i18n/qqq.json
4 files changed, 25 insertions(+), 2 deletions(-)

Approvals:
  Siebrand: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/installer/WebInstaller.php 
b/includes/installer/WebInstaller.php
index 4c4e6b7..c08212e 100644
--- a/includes/installer/WebInstaller.php
+++ b/includes/installer/WebInstaller.php
@@ -1157,6 +1157,20 @@
}
 
/**
+* If the software package wants the LocalSettings.php file
+* to be placed in a specific location, override this function
+* (see mw-config/overrides/README) to return the path of
+* where the file should be saved, or false for a generic
+* "in the base of your install"
+*
+* @since 1.27
+* @return string|bool
+*/
+   public function getLocalSettingsLocation() {
+   return false;
+   }
+
+   /**
 * @return bool
 */
public function envCheckPath() {
diff --git a/includes/installer/WebInstallerComplete.php 
b/includes/installer/WebInstallerComplete.php
index 11a1833..456058e 100644
--- a/includes/installer/WebInstallerComplete.php
+++ b/includes/installer/WebInstallerComplete.php
@@ -37,13 +37,20 @@
 
$this->startForm();
$this->parent->disableLinkPopups();
+   $location = $this->parent->getLocalSettingsLocation();
+   $msg = 'config-install-done';
+   if ( $location !== false ) {
+   // config-install-done-path
+   $msg .= '-path';
+   }
$this->addHTML(
$this->parent->getInfoBox(
-   wfMessage( 'config-install-done',
+   wfMessage( $msg,
$lsUrl,
$this->getVar( 'wgServer' ) .
$this->getVar( 'wgScriptPath' ) . 
'/index.php',
-   ''
+   '',
+   $location ?: ''
)->plain(), 'tick-32.png'
)
);
diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json
index 2b7886a..79383f3 100644
--- a/includes/installer/i18n/en.json
+++ b/includes/installer/i18n/en.json
@@ -298,6 +298,7 @@
"config-install-extension-tables": "Creating tables for enabled 
extensions",
"config-install-mainpage-failed": "Could not insert main page: $1",
"config-install-done": "Congratulations!\nYou have 
installed MediaWiki.\n\nThe installer has generated a 
LocalSettings.php file.\nIt contains all your 
configuration.\n\nYou will need to download it and put it in the base of your 
wiki installation (the same directory as index.php). The download should have 
started automatically.\n\nIf the download was not offered, or if you cancelled 
it, you can restart the download by clicking the link 
below:\n\n$3\n\nNote: If you do not do this now, this 
generated configuration file will not be available to you later if you exit the 
installation without downloading it.\n\nWhen that has been done, you can 
[$2 enter your wiki].",
+   "config-install-done-path": "Congratulations!\nYou 
have installed MediaWiki.\n\nThe installer has generated a 
LocalSettings.php file.\nIt contains all your 
configuration.\n\nYou will need to download it and put it at $4. 
The download should have started automatically.\n\nIf the download was not 
offered, or if you cancelled it, you can restart the download by clicking the 
link below:\n\n$3\n\nNote: If you do not do this now, this 
generated configuration file will not be available to you later if you exit the 
installation without downloading it.\n\nWhen that has been done, you can 
[$2 enter your wiki].",
"config-download-localsettings": "Download 
LocalSettings.php",
"config-help": "help",
"config-help-tooltip": "click to expand",
diff --git a/includes/installer/i18n/qqq.json b/includes/installer/i18n/qqq.json
index 66a24c0..69a6830 100644
--- a/includes/installer/i18n/qqq.json
+++ b/includes/installer/i18n/qqq.json
@@ -316,6 +316,7 @@
"config-install-extension-tables": "Notice shown to the user during 

[MediaWiki-commits] [Gerrit] installer: Allow specifying where LocalSettings.php should b... - change (mediawiki/core)

2016-06-21 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/295352

Change subject: installer: Allow specifying where LocalSettings.php should be 
saved
..

installer: Allow specifying where LocalSettings.php should be saved

This allows software packages to specify where the LocalSettings.php
file should be saved to when the user is downloading it from the web
installer.

Bug: T123151
Change-Id: I06ded602be9aac0a10773e9d85c4d1585a70933b
---
M includes/installer/WebInstaller.php
M includes/installer/WebInstallerComplete.php
M includes/installer/i18n/en.json
M includes/installer/i18n/qqq.json
4 files changed, 25 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/52/295352/1

diff --git a/includes/installer/WebInstaller.php 
b/includes/installer/WebInstaller.php
index 4c4e6b7..c08212e 100644
--- a/includes/installer/WebInstaller.php
+++ b/includes/installer/WebInstaller.php
@@ -1157,6 +1157,20 @@
}
 
/**
+* If the software package wants the LocalSettings.php file
+* to be placed in a specific location, override this function
+* (see mw-config/overrides/README) to return the path of
+* where the file should be saved, or false for a generic
+* "in the base of your install"
+*
+* @since 1.27
+* @return string|bool
+*/
+   public function getLocalSettingsLocation() {
+   return false;
+   }
+
+   /**
 * @return bool
 */
public function envCheckPath() {
diff --git a/includes/installer/WebInstallerComplete.php 
b/includes/installer/WebInstallerComplete.php
index 11a1833..456058e 100644
--- a/includes/installer/WebInstallerComplete.php
+++ b/includes/installer/WebInstallerComplete.php
@@ -37,13 +37,20 @@
 
$this->startForm();
$this->parent->disableLinkPopups();
+   $location = $this->parent->getLocalSettingsLocation();
+   $msg = 'config-install-done';
+   if ( $location !== false ) {
+   // config-install-done-path
+   $msg .= '-path';
+   }
$this->addHTML(
$this->parent->getInfoBox(
-   wfMessage( 'config-install-done',
+   wfMessage( $msg,
$lsUrl,
$this->getVar( 'wgServer' ) .
$this->getVar( 'wgScriptPath' ) . 
'/index.php',
-   ''
+   '',
+   $location ?: ''
)->plain(), 'tick-32.png'
)
);
diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json
index 2b7886a..79383f3 100644
--- a/includes/installer/i18n/en.json
+++ b/includes/installer/i18n/en.json
@@ -298,6 +298,7 @@
"config-install-extension-tables": "Creating tables for enabled 
extensions",
"config-install-mainpage-failed": "Could not insert main page: $1",
"config-install-done": "Congratulations!\nYou have 
installed MediaWiki.\n\nThe installer has generated a 
LocalSettings.php file.\nIt contains all your 
configuration.\n\nYou will need to download it and put it in the base of your 
wiki installation (the same directory as index.php). The download should have 
started automatically.\n\nIf the download was not offered, or if you cancelled 
it, you can restart the download by clicking the link 
below:\n\n$3\n\nNote: If you do not do this now, this 
generated configuration file will not be available to you later if you exit the 
installation without downloading it.\n\nWhen that has been done, you can 
[$2 enter your wiki].",
+   "config-install-done-path": "Congratulations!\nYou 
have installed MediaWiki.\n\nThe installer has generated a 
LocalSettings.php file.\nIt contains all your 
configuration.\n\nYou will need to download it and put it at $4. 
The download should have started automatically.\n\nIf the download was not 
offered, or if you cancelled it, you can restart the download by clicking the 
link below:\n\n$3\n\nNote: If you do not do this now, this 
generated configuration file will not be available to you later if you exit the 
installation without downloading it.\n\nWhen that has been done, you can 
[$2 enter your wiki].",
"config-download-localsettings": "Download 
LocalSettings.php",
"config-help": "help",
"config-help-tooltip": "click to expand",
diff --git a/includes/installer/i18n/qqq.json b/includes/installer/i18n/qqq.json
index 66a24c0..69a6830 100644
--- a/includes/installer/i18n/qqq.json
+++ b/includes/installer/i18n/qqq.json
@@ -316,6 +316,7 @@