php 5.2 deps
[packages/php-pecl-memcache.git] / memcache-webapp.patch
CommitLineData
569ce73e
ER
1--- php-pecl-memcache-3.0.4/memcache.php 2010-03-25 11:37:27.313562832 +0200
2+++ php-pecl-memcache-3.0.4/memcache.php 2010-03-25 11:54:43.553667140 +0200
3@@ -19,21 +19,12 @@
4
5 $VERSION='$Id$';
6
7-define('ADMIN_USERNAME','memcache'); // Admin Username
8-define('ADMIN_PASSWORD','password'); // Admin Password
9-define('DATE_FORMAT','Y/m/d H:i:s');
10-define('GRAPH_SIZE',200);
11-define('MAX_ITEM_DUMP',50);
12-
13-$MEMCACHE_SERVERS[] = 'mymemcache-server1:11211'; // add more as an array
14-$MEMCACHE_SERVERS[] = 'mymemcache-server2:11211'; // add more as an array
15-
16-
17-////////// END OF DEFAULT CONFIG AREA /////////////////////////////////////////////////////////////
18+require_once '/etc/webapps/memcache/config.php';
19
20 ///////////////// Password protect ////////////////////////////////////////////////////////////////
21-if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']) ||
22- $_SERVER['PHP_AUTH_USER'] != ADMIN_USERNAME ||$_SERVER['PHP_AUTH_PW'] != ADMIN_PASSWORD) {
23+if (!is_null(ADMIN_USERNAME) &&
24+ (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']) ||
25+ $_SERVER['PHP_AUTH_USER'] != ADMIN_USERNAME ||$_SERVER['PHP_AUTH_PW'] != ADMIN_PASSWORD)) {
26 Header("WWW-Authenticate: Basic realm=\"Memcache Login\"");
27 Header("HTTP/1.0 401 Unauthorized");
28
This page took 0.030484 seconds and 4 git commands to generate.