[Phonehome-commits] r90 - trunk/server/common

lauren at garage.maemo.org lauren at garage.maemo.org
Mon Oct 20 00:55:57 EEST 2008


Author: lauren
Date: 2008-10-20 00:55:56 +0300 (Mon, 20 Oct 2008)
New Revision: 90

Modified:
   trunk/server/common/secret-dummy.php
   trunk/server/common/useful_stuff.php
Log:
1. made "db_connect()" function in "useful_stuff.php" use the values defined in "secret.php"
2. updated "secret-dummy.php" with database name values

Modified: trunk/server/common/secret-dummy.php
===================================================================
--- trunk/server/common/secret-dummy.php	2008-10-19 19:29:35 UTC (rev 89)
+++ trunk/server/common/secret-dummy.php	2008-10-19 21:55:56 UTC (rev 90)
@@ -17,10 +17,12 @@
 define("LIVE_DB_HOST","live-db-host");
 define("LIVE_DB_UNAME","live-db-username");
 define("LIVE_DB_PW","live-db-password");
+define("LIVE_DB_NAME","live-db-name");
 
 define("DEV_DB_HOST","dev-db-host");
 define("DEV_DB_UNAME","dev-db-username");
 define("DEV_DB_PW","dev-db-password");
+define("DEV_DB_NAME","dev-db-name");
 
 
 // !!!!!!!!!!!!!!!! VERY IMPORTANT !!!!!!!!!!!!!!

Modified: trunk/server/common/useful_stuff.php
===================================================================
--- trunk/server/common/useful_stuff.php	2008-10-19 19:29:35 UTC (rev 89)
+++ trunk/server/common/useful_stuff.php	2008-10-19 21:55:56 UTC (rev 90)
@@ -122,14 +122,14 @@
 //-----------------------------------------
 function db_connect()
 {
-	if (stripos($_SERVER['SERVER_NAME'],"etmaemo.gagnews") !== false){
-		@mysql_connect("db.gagfoot.com","et_maemo","melmoth");
-		if (@mysql_select_db("db_etmaemo"))
+	if (stripos($_SERVER['SERVER_NAME'],LIVE_DOMAIN) !== false){
+		@mysql_connect(LIVE_DB_HOST,LIVE_DB_UNAME,LIVE_DB_PW);
+		if (@mysql_select_db(LIVE_DB_NAME))
 			return true;
 	}
 	else {
-		@mysql_connect("localhost","et_maemo","melmoth");
-		if (@mysql_select_db("db_etmaemo"))
+		@mysql_connect(DEV_DB_HOST,DEV_DB_UNAME,DEV_DB_PW);
+		if (@mysql_select_db(DEV_DB_NAME))
 			return true;
 	}
 



More information about the Phonehome-commits mailing list