Permalink
Browse files

refactoring: replace mentions of $config with $ab_config to avoid nam…

…espace issues in potentially enclosing projects
  • Loading branch information...
1 parent 3f655ba commit c6861a886f96ce25e338ab873ea399892ebac3ce @aliasaria committed May 23, 2010
Showing with 12 additions and 12 deletions.
  1. +6 −6 config/configure.php
  2. +2 −2 core.php
  3. +4 −4 report.php
View
@@ -1,18 +1,18 @@
<?php
-$config['redis_host'] = 'localhost';
-$config['redis_port'] = 6379; //redis's default port is 6379
-$config['redis_db_number'] = 0;
+$ab_config['redis_host'] = 'localhost';
+$ab_config['redis_port'] = 6379; //redis's default port is 6379
+$ab_config['redis_db_number'] = 0;
-$config['USE_AUTHENTICATION'] = true; // Use (internal) authentication - best choice if
+$ab_config['USE_AUTHENTICATION'] = true; // Use (internal) authentication - best choice if
// no other authentication is available
// If set to 0:
// There will be no further authentication. You
// will have to handle this by yourself!
// If set to 1:
// You need to change ADMIN_PASSWORD to make
// this work!
-$config['ADMIN_USERNAME'] = 'admin'; // Admin Username
-$config['ADMIN_PASSWORD'] = 'elephant'; // Admin Password - CHANGE THIS TO ENABLE!!!
+$ab_config['ADMIN_USERNAME'] = 'admin'; // Admin Username
+$ab_config['ADMIN_PASSWORD'] = 'elephant'; // Admin Password - CHANGE THIS TO ENABLE!!!
View
@@ -89,12 +89,12 @@ function ab_init ($id = -1, $developer_mode_no_redis = false)
}
else
{
- $r =& new Redis($config['redis_host'],$config['redis_port']);
+ $r =& new Redis($ab_config['redis_host'],$ab_config['redis_port']);
$redis_connected = $r->connect();
if ($redis_connected)
{
- $r->select_db($config['redis_db_number']);
+ $r->select_db($ab_config['redis_db_number']);
//set up the metrics (this should loop through them and link them to associated ab tests
ab_metrics_initialize();
View
@@ -22,8 +22,8 @@
echo '<p style=\"font-family: Zapfino, cursive;\">Text to send if user hits Cancel button</p>';
exit;
} else if (
- $_SERVER['PHP_AUTH_USER'] != $config['ADMIN_USERNAME'] &&
- $_SERVER['PHP_AUTH_PW'] != $config['ADMIN_PASSWORD']
+ $_SERVER['PHP_AUTH_USER'] != $ab_config['ADMIN_USERNAME'] &&
+ $_SERVER['PHP_AUTH_PW'] != $ab_config['ADMIN_PASSWORD']
)
{
header('WWW-Authenticate: Basic realm="My Realm"');
@@ -38,12 +38,12 @@
//connect to redis
-$r =& new Redis($config['redis_host']);
+$r =& new Redis($ab_config['redis_host']);
$connected = $r->connect();
if ($connected)
{
- $r->select_db($config['redis_db_number']); //should make it configurable later
+ $r->select_db($ab_config['redis_db_number']); //should make it configurable later
//$r->flushdb();
}
else

0 comments on commit c6861a8

Please sign in to comment.