From 53ec4223e4f175d19d158a9e487e7c6d447d76de Mon Sep 17 00:00:00 2001
From: Brenda Wallace
Date: Fri, 28 Aug 2009 21:04:15 +1200
Subject: fix for postgres - was using a non-existent variable to work out if
should write quote_identifiers=true
---
install.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'install.php')
diff --git a/install.php b/install.php
index 4c5bc38ae..f4dcef2e8 100644
--- a/install.php
+++ b/install.php
@@ -624,7 +624,7 @@ function writeConf($sitename, $server, $path, $fancy, $db)
// database
"\$config['db']['database'] = '{$db['database']}';\n\n".
- ($type == 'pgsql' ? "\$config['db']['quote_identifiers'] = true;\n\n":'').
+ ($db['type'] == 'pgsql' ? "\$config['db']['quote_identifiers'] = true;\n\n":'').
"\$config['db']['type'] = '{$db['type']}';\n\n".
"?>";
--
cgit v1.2.3-54-g00ecf
From 0ae4c7a80ce4869faac102386ed33f97a401ca0f Mon Sep 17 00:00:00 2001
From: Craig Andrews
Date: Wed, 2 Sep 2009 13:33:54 -0400
Subject: The 'tidy' extension is a requirement
Fixes http://status.net/trac/ticket/1844
---
install.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'install.php')
diff --git a/install.php b/install.php
index a59b9469d..c49043e5c 100644
--- a/install.php
+++ b/install.php
@@ -230,7 +230,7 @@ function checkPrereqs()
}
$reqs = array('gd', 'curl',
- 'xmlwriter', 'mbstring');
+ 'xmlwriter', 'mbstring','tidy');
foreach ($reqs as $req) {
if (!checkExtension($req)) {
--
cgit v1.2.3-54-g00ecf
From 4181c6f04ad6a2321b2957d8784abc7dfef5779f Mon Sep 17 00:00:00 2001
From: Brion Vibber
Date: Sun, 13 Sep 2009 17:53:15 -0700
Subject: bug 1814: installer now only offers DB types which are available.
Abstracted a couple of hardcoded lists of mysql/pgsql checks and radio button creation to use a nice little array of names, installer funcs, and modules to check.
Only those DB types whose modules are present will be presented in the installer; if all are missing, we throw an error and list out all the possibilities we were looking for.
---
install.php | 52 +++++++++++++++++++++++++++++++++++++---------------
1 file changed, 37 insertions(+), 15 deletions(-)
(limited to 'install.php')
diff --git a/install.php b/install.php
index e828fa814..092172d35 100644
--- a/install.php
+++ b/install.php
@@ -181,6 +181,18 @@ $external_libraries=array(
'check_class'=>'Validate'
)
);
+$dbModules = array(
+ 'mysql' => array(
+ 'name' => 'MySQL',
+ 'check_module' => 'mysql', // mysqli?
+ 'installer' => 'mysql_db_installer',
+ ),
+ 'pgsql' => array(
+ 'name' => 'PostgreSQL',
+ 'check_module' => 'pgsql',
+ 'installer' => 'pgsql_db_installer',
+ ),
+);
function main()
{
@@ -238,8 +250,18 @@ function checkPrereqs()
$pass = false;
}
}
- if (!checkExtension('pgsql') && !checkExtension('mysql')) {
- ?>Cannot find mysql or pgsql extension. You need one or the other:
$info) {
+ if (!checkExtension($info['check_module'])) {
+ $missingExtensions[] = $info['check_module'];
+ }
+ }
+ if (count($missingExtensions) == count($dbModules)) {
+ $req = implode(', ', $missingExtensions);
+ ?>Cannot find database support. You need at least one of these PHP extensions installed:
$info) {
+ if (checkExtension($info['check_module'])) {
+ $dbRadios .= " $info[name]
\n";
+ $checked = '';
+ }
+ }
echo<<
@@ -376,8 +407,7 @@ function showForm()
- MySQL
- PostgreSQL
+ $dbRadios
Database type
@@ -465,17 +495,9 @@ function handlePost()
return;
}
- // FIXME: use PEAR::DB or PDO instead of our own switch
-
- switch($dbtype) {
- case 'mysql':
- $db = mysql_db_installer($host, $database, $username, $password);
- break;
- case 'pgsql':
- $db = pgsql_db_installer($host, $database, $username, $password);
- break;
- default:
- }
+ global $dbModules;
+ $db = call_user_func($dbModules[$dbtype]['installer'],
+ $host, $database, $username, $password);
if (!$db) {
// database connection failed, do not move on to create config file.
--
cgit v1.2.3-54-g00ecf
From 222ef4d1869485426e893f85caf8a3014f814faa Mon Sep 17 00:00:00 2001
From: Brenda Wallace
Date: Sun, 13 Sep 2009 17:43:02 +1200
Subject: added doxygen tags
---
install.php | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
(limited to 'install.php')
diff --git a/install.php b/install.php
index 092172d35..5754c717a 100644
--- a/install.php
+++ b/install.php
@@ -1,5 +1,5 @@
.
+ *
+ * @category Installation
+ * @package Installation
+ * @license GNU Affero General Public License http://www.gnu.org/licenses/
+ *
*/
+
+
define('INSTALLDIR', dirname(__FILE__));
--
cgit v1.2.3-54-g00ecf
From 711fe39700e868ad2cea595b109d2958752d4aa6 Mon Sep 17 00:00:00 2001
From: Brenda Wallace
Date: Sun, 13 Sep 2009 17:43:48 +1200
Subject: changed curly bracks on if, else, foreach to match pear code styles
---
install.php | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
(limited to 'install.php')
diff --git a/install.php b/install.php
index 5754c717a..75646c852 100644
--- a/install.php
+++ b/install.php
@@ -203,14 +203,13 @@ $dbModules = array(
function main()
{
- if (!checkPrereqs())
- {
+ if (!checkPrereqs()) {
return;
}
- if( $_GET['checklibs'] ){
+ if ($_GET['checklibs']) {
showLibs();
- }else{
+ } else {
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
handlePost();
} else {
@@ -221,13 +220,13 @@ function main()
function haveExternalLibrary($external_library)
{
- if(isset($external_library['include']) && ! include_once($external_library['include'])){
+ if (isset($external_library['include']) && ! include_once $external_library['include'] ) {
return false;
}
- if(isset($external_library['check_function']) && ! function_exists($external_library['check_function'])){
+ if (isset($external_library['check_function']) && ! function_exists($external_library['check_function'])) {
return false;
}
- if(isset($external_library['check_class']) && ! class_exists($external_library['check_class'])){
+ if (isset($external_library['check_class']) && ! class_exists($external_library['check_class'])) {
return false;
}
return true;
@@ -309,10 +308,10 @@ function showLibs()
global $external_libraries;
$present_libraries=array();
$absent_libraries=array();
- foreach($external_libraries as $external_library){
- if(haveExternalLibrary($external_library)){
+ foreach ($external_libraries as $external_library){
+ if (haveExternalLibrary($external_library)) {
$present_libraries[]=$external_library;
- }else{
+ } else {
$absent_libraries[]=$external_library;
}
}
--
cgit v1.2.3-54-g00ecf
From c2e156dc492925d6aa94b91d5cee9ceb615bc2ab Mon Sep 17 00:00:00 2001
From: Brenda Wallace
Date: Sun, 13 Sep 2009 17:44:22 +1200
Subject: added doxygen for main()
---
install.php | 6 ++++++
1 file changed, 6 insertions(+)
(limited to 'install.php')
diff --git a/install.php b/install.php
index 75646c852..221e4746f 100644
--- a/install.php
+++ b/install.php
@@ -201,6 +201,12 @@ $dbModules = array(
),
);
+/**
+ * the actual installation.
+ * If call libraries are present, then install
+ *
+ * @return void
+ */
function main()
{
if (!checkPrereqs()) {
--
cgit v1.2.3-54-g00ecf
From 20764dc08b0231e4be07c4e181c8603b005c20b5 Mon Sep 17 00:00:00 2001
From: Brenda Wallace
Date: Mon, 14 Sep 2009 19:05:14 +1200
Subject: removed most of the that was making this hard to read
Conflicts:
install.php
---
install.php | 58 +++++++++++++++++++++++++++-------------------------------
1 file changed, 27 insertions(+), 31 deletions(-)
(limited to 'install.php')
diff --git a/install.php b/install.php
index 221e4746f..6f8bff91e 100644
--- a/install.php
+++ b/install.php
@@ -240,17 +240,16 @@ function haveExternalLibrary($external_library)
function checkPrereqs()
{
- $pass = true;
+ $pass = true;
if (file_exists(INSTALLDIR.'/config.php')) {
- ?>Config file "config.php" already exists.
- Config file "config.php" already exists.
');
$pass = false;
}
if (version_compare(PHP_VERSION, '5.2.3', '<')) {
- ?>Require PHP version 5.2.3 or greater.
Require PHP version 5.2.3 or greater.');
+ $pass = false;
}
$reqs = array('gd', 'curl',
@@ -258,11 +257,10 @@ function checkPrereqs()
foreach ($reqs as $req) {
if (!checkExtension($req)) {
- ?>Cannot load required extension:
Cannot load required extension: %s
', $req);
+ $pass = false;
}
- }
-
+ }
// Make sure we have at least one database module available
global $dbModules;
$missingExtensions = array();
@@ -273,30 +271,28 @@ function checkPrereqs()
}
if (count($missingExtensions) == count($dbModules)) {
$req = implode(', ', $missingExtensions);
- ?>Cannot find database support. You need at least one of these PHP extensions installed:
Cannot find mysql or pgsql extension. You need one or the other: %s
', $req);
+ $pass = false;
+ }
+
+ if (!is_writable(INSTALLDIR)) {
+ printf('Cannot write config file to: %s
', INSTALLDIR);
+ printf('On your server, try this command: chmod a+w %s
', INSTALLDIR);
+ $pass = false;
+ }
+
+ // Check the subdirs used for file uploads
+ $fileSubdirs = array('avatar', 'background', 'file');
+ foreach ($fileSubdirs as $fileSubdir) {
+ $fileFullPath = INSTALLDIR."/$fileSubdir/";
+ if (!is_writable($fileFullPath)) {
+ printf('
Cannot write to %s directory: %s
', $fileSubdir, $fileFullPath);
+ printf('On your server, try this command: chmod a+w %s
', $fileFullPath);
+ $pass = false;
+ }
}
- if (!is_writable(INSTALLDIR)) {
- ?>Cannot write config file to:
- On your server, try this command: chmod a+w
-
Cannot write directory:
- On your server, try this command: chmod a+w
-
Date: Sun, 13 Sep 2009 17:59:42 +1200
Subject: fixed missing semisolon
---
install.php | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
(limited to 'install.php')
diff --git a/install.php b/install.php
index 6f8bff91e..64c8fd9b1 100644
--- a/install.php
+++ b/install.php
@@ -444,10 +444,8 @@ E_O_T;
function updateStatus($status, $error=false)
{
-?>
- >
-
-$status";
}
function handlePost()
--
cgit v1.2.3-54-g00ecf
From 61d5d51cf55909e8fa2b4a362b47741a9cde25ae Mon Sep 17 00:00:00 2001
From: Brenda Wallace
Date: Sun, 13 Sep 2009 18:22:32 +1200
Subject: lotsa tabulation changed to 4 spaces
---
install.php | 205 +++++++++++++++++++++++++++++++-----------------------------
1 file changed, 105 insertions(+), 100 deletions(-)
(limited to 'install.php')
diff --git a/install.php b/install.php
index 64c8fd9b1..9d59f25b9 100644
--- a/install.php
+++ b/install.php
@@ -450,9 +450,6 @@ function updateStatus($status, $error=false)
function handlePost()
{
-?>
-
-
+ echo <<
Page notice
-server_encoding != 'UTF8') {
- updateStatus("StatusNet requires UTF8 character encoding. Your database is ". htmlentities($record->server_encoding));
- showForm();
- return false;
- }
-
- updateStatus("Running database script...");
- //wrap in transaction;
- pg_query($conn, 'BEGIN');
- $res = runDbScript(INSTALLDIR.'/db/statusnet_pg.sql', $conn, 'pgsql');
-
- if ($res === false) {
- updateStatus("Can't run database script.", true);
- showForm();
- return false;
- }
- foreach (array('sms_carrier' => 'SMS carrier',
+ $connstring = "dbname=$database host=$host user=$username";
+
+ //No password would mean trust authentication used.
+ if (!empty($password)) {
+ $connstring .= " password=$password";
+ }
+ updateStatus("Starting installation...");
+ updateStatus("Checking database...");
+ $conn = pg_connect($connstring);
+
+ if ($conn ===false) {
+ updateStatus("Failed to connect to database: $connstring");
+ showForm();
+ return false;
+ }
+
+ //ensure database encoding is UTF8
+ $record = pg_fetch_object(pg_query($conn, 'SHOW server_encoding'));
+ if ($record->server_encoding != 'UTF8') {
+ updateStatus("StatusNet requires UTF8 character encoding. Your database is ". htmlentities($record->server_encoding));
+ showForm();
+ return false;
+ }
+
+ updateStatus("Running database script...");
+ //wrap in transaction;
+ pg_query($conn, 'BEGIN');
+ $res = runDbScript(INSTALLDIR.'/db/statusnet_pg.sql', $conn, 'pgsql');
+
+ if ($res === false) {
+ updateStatus("Can't run database script.", true);
+ showForm();
+ return false;
+ }
+ foreach (array('sms_carrier' => 'SMS carrier',
'notice_source' => 'notice source',
'foreign_services' => 'foreign service')
as $scr => $name) {
- updateStatus(sprintf("Adding %s data to database...", $name));
- $res = runDbScript(INSTALLDIR.'/db/'.$scr.'.sql', $conn, 'pgsql');
- if ($res === false) {
- updateStatus(sprintf("Can't run %d script.", $name), true);
- showForm();
- return false;
- }
- }
- pg_query($conn, 'COMMIT');
-
- if (empty($password)) {
- $sqlUrl = "pgsql://$username@$host/$database";
- }
- else {
- $sqlUrl = "pgsql://$username:$password@$host/$database";
- }
-
- $db = array('type' => 'pgsql', 'database' => $sqlUrl);
-
- return $db;
+ updateStatus(sprintf("Adding %s data to database...", $name));
+ $res = runDbScript(INSTALLDIR.'/db/'.$scr.'.sql', $conn, 'pgsql');
+ if ($res === false) {
+ updateStatus(sprintf("Can't run %d script.", $name), true);
+ showForm();
+ return false;
+ }
+ }
+ pg_query($conn, 'COMMIT');
+
+ if (empty($password)) {
+ $sqlUrl = "pgsql://$username@$host/$database";
+ }
+ else {
+ $sqlUrl = "pgsql://$username:$password@$host/$database";
+ }
+
+ $db = array('type' => 'pgsql', 'database' => $sqlUrl);
+
+ return $db;
}
function mysql_db_installer($host, $database, $username, $password) {
- updateStatus("Starting installation...");
- updateStatus("Checking database...");
-
- $conn = mysql_connect($host, $username, $password);
- if (!$conn) {
- updateStatus("Can't connect to server '$host' as '$username'.", true);
- showForm();
- return false;
- }
- updateStatus("Changing to database...");
- $res = mysql_select_db($database, $conn);
- if (!$res) {
- updateStatus("Can't change to database.", true);
- showForm();
- return false;
- }
- updateStatus("Running database script...");
- $res = runDbScript(INSTALLDIR.'/db/statusnet.sql', $conn);
- if ($res === false) {
- updateStatus("Can't run database script.", true);
- showForm();
- return false;
- }
- foreach (array('sms_carrier' => 'SMS carrier',
+ updateStatus("Starting installation...");
+ updateStatus("Checking database...");
+
+ $conn = mysql_connect($host, $username, $password);
+ if (!$conn) {
+ updateStatus("Can't connect to server '$host' as '$username'.", true);
+ showForm();
+ return false;
+ }
+ updateStatus("Changing to database...");
+ $res = mysql_select_db($database, $conn);
+ if (!$res) {
+ updateStatus("Can't change to database.", true);
+ showForm();
+ return false;
+ }
+ updateStatus("Running database script...");
+ $res = runDbScript(INSTALLDIR.'/db/statusnet.sql', $conn);
+ if ($res === false) {
+ updateStatus("Can't run database script.", true);
+ showForm();
+ return false;
+ }
+ foreach (array('sms_carrier' => 'SMS carrier',
'notice_source' => 'notice source',
'foreign_services' => 'foreign service')
as $scr => $name) {
- updateStatus(sprintf("Adding %s data to database...", $name));
- $res = runDbScript(INSTALLDIR.'/db/'.$scr.'.sql', $conn);
- if ($res === false) {
- updateStatus(sprintf("Can't run %d script.", $name), true);
- showForm();
- return false;
- }
- }
-
- $sqlUrl = "mysqli://$username:$password@$host/$database";
- $db = array('type' => 'mysql', 'database' => $sqlUrl);
- return $db;
+ updateStatus(sprintf("Adding %s data to database...", $name));
+ $res = runDbScript(INSTALLDIR.'/db/'.$scr.'.sql', $conn);
+ if ($res === false) {
+ updateStatus(sprintf("Can't run %d script.", $name), true);
+ showForm();
+ return false;
+ }
+ }
+
+ $sqlUrl = "mysqli://$username:$password@$host/$database";
+ $db = array('type' => 'mysql', 'database' => $sqlUrl);
+ return $db;
}
function writeConf($sitename, $server, $path, $fancy, $db)
@@ -662,6 +659,14 @@ function writeConf($sitename, $server, $path, $fancy, $db)
return $res;
}
+/**
+ * Install schema into the database
+ *
+ * @param filename $filename location of database schema file
+ * @param conn $conn connection to database
+ * @param type $type type of database, currently mysql or pgsql
+ * @return boolean - indicating success or failure
+ */
function runDbScript($filename, $conn, $type = 'mysql')
{
$sql = trim(file_get_contents($filename));
--
cgit v1.2.3-54-g00ecf
From 36aa89d6959d0d03f3fe3c769f867f314aba8bf9 Mon Sep 17 00:00:00 2001
From: Brenda Wallace
Date: Sun, 13 Sep 2009 18:29:10 +1200
Subject: many doxygen comments added
---
install.php | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
(limited to 'install.php')
diff --git a/install.php b/install.php
index 9d59f25b9..787edb20f 100644
--- a/install.php
+++ b/install.php
@@ -224,6 +224,13 @@ function main()
}
}
+/**
+ * checks if an external libary is present
+ *
+ * @param string $external_library Name of library
+ *
+ * @return boolean indicates if library present
+ */
function haveExternalLibrary($external_library)
{
if (isset($external_library['include']) && ! include_once $external_library['include'] ) {
@@ -238,6 +245,11 @@ function haveExternalLibrary($external_library)
return true;
}
+/**
+ * Check if all is ready for installation
+ *
+ * @return void
+ */
function checkPrereqs()
{
$pass = true;
@@ -295,6 +307,13 @@ function checkPrereqs()
return $pass;
}
+/**
+ * Checks if a php extension is both installed and loaded
+ *
+ * @param string $name of extension to check
+ *
+ * @return boolean whether extension is installed and loaded
+ */
function checkExtension($name)
{
if (!extension_loaded($name)) {
@@ -305,6 +324,11 @@ function checkExtension($name)
return true;
}
+/**
+ * Show list of libraries
+ *
+ * @return void
+ */
function showLibs()
{
global $external_libraries;
@@ -356,9 +380,9 @@ E_O_T;
foreach($present_libraries as $library)
{
echo '- ';
- if($library['url']){
+ if ($library['url']) {
echo ''.htmlentities($library['name']).'';
- }else{
+ } else {
echo htmlentities($library['name']);
}
echo '
';
--
cgit v1.2.3-54-g00ecf
From f5b7ea739660cf15abb92f534b30fc1cfd5e07c6 Mon Sep 17 00:00:00 2001
From: Brenda Wallace
Date: Sun, 13 Sep 2009 18:31:44 +1200
Subject: fixed up curly brackets and spaces around for, if, else
---
install.php | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
(limited to 'install.php')
diff --git a/install.php b/install.php
index 787edb20f..30c6780ab 100644
--- a/install.php
+++ b/install.php
@@ -334,7 +334,7 @@ function showLibs()
global $external_libraries;
$present_libraries=array();
$absent_libraries=array();
- foreach ($external_libraries as $external_library){
+ foreach ($external_libraries as $external_library) {
if (haveExternalLibrary($external_library)) {
$present_libraries[]=$external_library;
} else {
@@ -352,22 +352,21 @@ function showLibs()
Absent Libraries
E_O_T;
- foreach($absent_libraries as $library)
- {
+ foreach ($absent_libraries as $library) {
echo '- ';
- if($library['url']){
+ if ($library['url']) {
echo ''.htmlentities($library['name']).'';
- }else{
+ } else {
echo htmlentities($library['name']);
}
echo '
';
- if($library['deb']){
+ if ($library['deb']) {
echo '- deb: ' . htmlentities($library['deb']) . '
';
}
- if($library['rpm']){
+ if ($library['rpm']) {
echo '- rpm: ' . htmlentities($library['rpm']) . '
';
}
- if($library['pear']){
+ if ($library['pear']) {
echo '- pear: ' . htmlentities($library['pear']) . '
';
}
echo '
';
@@ -377,8 +376,7 @@ E_O_T;
Installed Libraries
E_O_T;
- foreach($present_libraries as $library)
- {
+ foreach ($present_libraries as $library) {
echo '- ';
if ($library['url']) {
echo ''.htmlentities($library['name']).'';
@@ -514,11 +512,11 @@ STR;
if (empty($sitename)) {
updateStatus("No sitename specified.", true);
- $fail = true;
+ $fail = true;
}
- if($fail){
- showForm();
+ if ($fail) {
+ showForm();
return;
}
@@ -603,8 +601,7 @@ function pgsql_db_installer($host, $database, $username, $password) {
if (empty($password)) {
$sqlUrl = "pgsql://$username@$host/$database";
- }
- else {
+ } else {
$sqlUrl = "pgsql://$username:$password@$host/$database";
}
--
cgit v1.2.3-54-g00ecf
From 93605dce99832868c3fdbb8af42db507a8005e97 Mon Sep 17 00:00:00 2001
From: Brenda Wallace
Date: Sun, 13 Sep 2009 18:32:59 +1200
Subject: removed commented out code we no longer want
---
install.php | 5 -----
1 file changed, 5 deletions(-)
(limited to 'install.php')
diff --git a/install.php b/install.php
index 30c6780ab..6e7e833a3 100644
--- a/install.php
+++ b/install.php
@@ -505,11 +505,6 @@ STR;
$fail = true;
}
-// if (empty($password)) {
-// updateStatus("No password specified.", true);
-// $fail = true;
-// }
-
if (empty($sitename)) {
updateStatus("No sitename specified.", true);
$fail = true;
--
cgit v1.2.3-54-g00ecf
From dbc08ef0a09e481e0884a38ee704f4d193edef6a Mon Sep 17 00:00:00 2001
From: Brenda Wallace
Date: Mon, 14 Sep 2009 19:08:05 +1200
Subject: most of code style errors gone
Conflicts:
install.php
---
install.php | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
(limited to 'install.php')
diff --git a/install.php b/install.php
index 6e7e833a3..dea03fc5e 100644
--- a/install.php
+++ b/install.php
@@ -516,8 +516,7 @@ STR;
}
global $dbModules;
- $db = call_user_func($dbModules[$dbtype]['installer'],
- $host, $database, $username, $password);
+ $db = call_user_func($dbModules[$dbtype]['installer'], $host, $database, $username, $password);
if (!$db) {
// database connection failed, do not move on to create config file.
@@ -540,12 +539,10 @@ STR;
updateStatus("StatusNet has been installed at $link");
updateStatus("You can visit your new StatusNet site.");
-?>
-
-
Date: Mon, 14 Sep 2009 19:19:11 +1200
Subject: pulled @author from git logs
Conflicts:
install.php
---
index.php | 14 ++++++++++++++
install.php | 21 ++++++++++++++++-----
2 files changed, 30 insertions(+), 5 deletions(-)
(limited to 'install.php')
diff --git a/index.php b/index.php
index b8d9c7c69..a1d983dce 100644
--- a/index.php
+++ b/index.php
@@ -19,6 +19,20 @@
* @category StatusNet
* @package StatusNet
* @license GNU Affero General Public License http://www.gnu.org/licenses/
+ * @author Brenda Wallace
+ * @author Christopher Vollick
+ * @author CiaranG
+ * @author Craig Andrews
+ * @author Evan Prodromou
+ * @author Evan Prodromou
+ * @author Evan Prodromou
+ * @author Evan Prodromou
+ * @author Gina Haeussge
+ * @author Jeffery To
+ * @author Mike Cochrane
+ * @author Robin Millette
+ * @author Sarven Capadisli
+ * @author Tom Adams
*/
define('INSTALLDIR', dirname(__FILE__));
diff --git a/install.php b/install.php
index dea03fc5e..07a7bfaaf 100644
--- a/install.php
+++ b/install.php
@@ -18,12 +18,22 @@
*
* @category Installation
* @package Installation
- * @license GNU Affero General Public License http://www.gnu.org/licenses/
*
+ * @author Adrian Lang
+ * @author Brenda Wallace
+ * @author Brett Taylor
+ * @author Brion Vibber
+ * @author CiaranG
+ * @author Craig Andrews
+ * @author Eric Helgeson
+ * @author Evan Prodromou
+ * @author Evan Prodromou
+ * @author Robin Millette
+ * @author Sarven Capadisli
+ * @author Tom Adams
+ * @license GNU Affero General Public License http://www.gnu.org/licenses/
*/
-
-
define('INSTALLDIR', dirname(__FILE__));
$external_libraries=array(
@@ -281,6 +291,7 @@ function checkPrereqs()
$missingExtensions[] = $info['check_module'];
}
}
+
if (count($missingExtensions) == count($dbModules)) {
$req = implode(', ', $missingExtensions);
printf('
Cannot find mysql or pgsql extension. You need one or the other: %s
', $req);
@@ -682,7 +693,7 @@ function writeConf($sitename, $server, $path, $fancy, $db)
*
* @return boolean - indicating success or failure
*/
-function runDbScript($filename, $conn, $type = 'mysql')
+function runDbScript($filename, $conn, $type = 'mysqli')
{
$sql = trim(file_get_contents($filename));
$stmts = explode(';', $sql);
@@ -693,7 +704,7 @@ function runDbScript($filename, $conn, $type = 'mysql')
}
// FIXME: use PEAR::DB or PDO instead of our own switch
switch ($type) {
- case 'mysql':
+ case 'mysqli':
$res = mysql_query($stmt, $conn);
if ($res === false) {
$error = mysql_error();
--
cgit v1.2.3-54-g00ecf