Permalink
Browse files

replace web-dir with www-dir

git-svn-id: http://svn.php.net/repository/pear/pearweb/trunk@272556 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 9926f6a commit 79610876c8f7bcba8cf95680edbef7d1bc9f55a5 @helgi helgi committed Jan 2, 2009
Showing with 26 additions and 26 deletions.
  1. +7 −7 pearweb.php
  2. +7 −7 pearweb_election.php
  3. +12 −12 pearweb_pepr.php
View
14 pearweb.php
@@ -85,17 +85,17 @@ function initializeDatabase($answers)
'seqname_format' => 'id',
'quote_identifier' => true));
// for upgrade purposes
- if (!file_exists('@web-dir@' . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR .
+ if (!file_exists('@www-dir@' . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR .
'.pearweb-upgrade')) {
- if (!mkdir('@web-dir@' . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR .
+ if (!mkdir('@www-dir@' . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR .
'.pearweb-upgrade')) {
$this->_ui->outputData('error - make sure we can create directories');
return false;
}
}
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$c = $a->parseDatabaseDefinitionFile(
- realpath('@web-dir@/sql/pearweb_mdb2schema.xml'));
+ realpath('@www-dir@/sql/pearweb_mdb2schema.xml'));
PEAR::staticPopErrorHandling();
if (PEAR::isError($c)) {
$extra = '';
@@ -108,7 +108,7 @@ function initializeDatabase($answers)
$c['name'] = $answers['database'];
$c['create'] = 1;
$c['overwrite'] = 0;
- $dir = opendir('@web-dir@/sql/.pearweb-upgrade');
+ $dir = opendir('@www-dir@/sql/.pearweb-upgrade');
$oldversion = false;
while (false !== ($entry = readdir($dir))) {
if ($entry[0] === '.') {
@@ -130,9 +130,9 @@ function initializeDatabase($answers)
}
}
}
- if (!file_exists('@web-dir@/sql/.pearweb-upgrade/' .
+ if (!file_exists('@www-dir@/sql/.pearweb-upgrade/' .
$answers['database'] . '-@version@.ser')) {
- $fp = fopen('@web-dir@/sql/.pearweb-upgrade/' .
+ $fp = fopen('@www-dir@/sql/.pearweb-upgrade/' .
$answers['database'] . '-@version@.ser', 'w');
fwrite($fp, serialize($c));
fclose($fp);
@@ -145,7 +145,7 @@ function initializeDatabase($answers)
$oldversion = false;
}
if ($oldversion) {
- $curdef = unserialize(file_get_contents('@web-dir@/sql/.pearweb-upgrade/' .
+ $curdef = unserialize(file_get_contents('@www-dir@/sql/.pearweb-upgrade/' .
$answers['database'] . '-' . $oldversion . '.ser'));
if (!is_array($curdef)) {
$this->_ui->outputData('invalid data returned from previous version');
View
14 pearweb_election.php
@@ -78,17 +78,17 @@ function initializeDatabase($answers)
'seqname_format' => 'id',
'quote_identifier' => true));
// for upgrade purposes
- if (!file_exists('@web-dir@' . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR .
+ if (!file_exists('@www-dir@' . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR .
'.pearweb-upgrade')) {
- if (!mkdir('@web-dir@' . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR .
+ if (!mkdir('@www-dir@' . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR .
'.pearweb-upgrade')) {
$this->_ui->outputData('error - make sure we can create directories');
return false;
}
}
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$c = $a->parseDatabaseDefinitionFile(
- realpath('@web-dir@/sql/pearweb_election.xml'));
+ realpath('@www-dir@/sql/pearweb_election.xml'));
PEAR::staticPopErrorHandling();
if (PEAR::isError($c)) {
$extra = '';
@@ -101,7 +101,7 @@ function initializeDatabase($answers)
$c['name'] = $answers['database'];
$c['create'] = 1;
$c['overwrite'] = 0;
- $dir = opendir('@web-dir@/sql/.pearweb-upgrade');
+ $dir = opendir('@www-dir@/sql/.pearweb-upgrade');
$oldversion = false;
while (false !== ($entry = readdir($dir))) {
if ($entry[0] === '.') {
@@ -123,9 +123,9 @@ function initializeDatabase($answers)
}
}
}
- if (!file_exists('@web-dir@/sql/.pearweb-upgrade/' .
+ if (!file_exists('@www-dir@/sql/.pearweb-upgrade/' .
$answers['database'] . '-@version@.ser')) {
- $fp = fopen('@web-dir@/sql/.pearweb-upgrade/' .
+ $fp = fopen('@www-dir@/sql/.pearweb-upgrade/' .
$answers['database'] . '-@version@.ser', 'w');
fwrite($fp, serialize($c));
fclose($fp);
@@ -138,7 +138,7 @@ function initializeDatabase($answers)
$oldversion = false;
}
if ($oldversion) {
- $curdef = unserialize(file_get_contents('@web-dir@/sql/.pearweb-upgrade/' .
+ $curdef = unserialize(file_get_contents('@www-dir@/sql/.pearweb-upgrade/' .
$answers['database'] . '-' . $oldversion . '.ser'));
if (!is_array($curdef)) {
$this->_ui->outputData('invalid data returned from previous version');
View
24 pearweb_pepr.php
@@ -85,17 +85,17 @@ function initializeDatabase($answers)
'seqname_format' => 'id',
'quote_identifier' => true));
// for upgrade purposes
- if (!file_exists('@web-dir@' . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR .
+ if (!file_exists('@www-dir@' . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR .
'.pearweb-upgrade')) {
- if (!mkdir('@web-dir@' . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR .
+ if (!mkdir('@www-dir@' . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR .
'.pearweb-upgrade')) {
$this->_ui->outputData('error - make sure we can create directories');
return false;
}
}
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$c = $a->parseDatabaseDefinitionFile(
- realpath('@web-dir@/sql/pearweb_mdb2schema.xml'));
+ realpath('@www-dir@/sql/pearweb_mdb2schema.xml'));
PEAR::staticPopErrorHandling();
if (PEAR::isError($c)) {
$extra = '';
@@ -108,7 +108,7 @@ function initializeDatabase($answers)
$c['name'] = $answers['database'];
$c['create'] = 1;
$c['overwrite'] = 0;
- $dir = opendir('@web-dir@/sql/.pearweb-upgrade');
+ $dir = opendir('@www-dir@/sql/.pearweb-upgrade');
$oldversion = false;
while (false !== ($entry = readdir($dir))) {
if ($entry[0] === '.') {
@@ -130,9 +130,9 @@ function initializeDatabase($answers)
}
}
}
- if (!file_exists('@web-dir@/sql/.pearweb-upgrade/' .
+ if (!file_exists('@www-dir@/sql/.pearweb-upgrade/' .
$answers['database'] . '-@version@.ser')) {
- $fp = fopen('@web-dir@/sql/.pearweb-upgrade/' .
+ $fp = fopen('@www-dir@/sql/.pearweb-upgrade/' .
$answers['database'] . '-@version@.ser', 'w');
fwrite($fp, serialize($c));
fclose($fp);
@@ -145,7 +145,7 @@ function initializeDatabase($answers)
$oldversion = false;
}
if ($oldversion) {
- $curdef = unserialize(file_get_contents('@web-dir@/sql/.pearweb-upgrade/' .
+ $curdef = unserialize(file_get_contents('@www-dir@/sql/.pearweb-upgrade/' .
$answers['database'] . '-' . $oldversion . '.ser'));
if (!is_array($curdef)) {
$this->_ui->outputData('invalid data returned from previous version');
@@ -222,11 +222,11 @@ function setupHttpdconf($answers)
$middle[] = ' ServerName ' . $answers['pear'] . $eol;
$middle[] = $eol;
// apache requires all path separators to be "/" even on windows
- $middle[] = ' DocumentRoot ' . str_replace('\\', '/', '@web-dir@') . '/public_html' . $eol;
+ $middle[] = ' DocumentRoot ' . str_replace('\\', '/', '@www-dir@') . '/public_html' . $eol;
$middle[] = ' DirectoryIndex index.php index.html' . $eol;
$middle[] = $eol;
$middle[] = ' php_value include_path .' . PATH_SEPARATOR .
- str_replace('\\', '/', '@web-dir@')
+ str_replace('\\', '/', '@www-dir@')
. '/include' . PATH_SEPARATOR . str_replace('\\', '/', '@php-dir@') . $eol;
$middle[] = ' php_value auto_prepend_file pear-prepend.php' . $eol;
$middle[] = ' php_flag magic_quotes_gpc off' . $eol;
@@ -235,11 +235,11 @@ function setupHttpdconf($answers)
$middle[] = $eol;
$middle[] = ' ErrorDocument 404 /error/404.php' . $eol;
$middle[] = $eol;
- $middle[] = ' Alias /package ' . str_replace('\\', '/', '@web-dir@')
+ $middle[] = ' Alias /package ' . str_replace('\\', '/', '@www-dir@')
. '/public_html/package-info.php' . $eol;
- $middle[] = ' Alias /user ' . str_replace('\\', '/', '@web-dir@')
+ $middle[] = ' Alias /user ' . str_replace('\\', '/', '@www-dir@')
. '/public_html/account-info.php' . $eol;
- $middle[] = ' Alias /sidebar/pear.gif ' . str_replace('\\', '/', '@web-dir@')
+ $middle[] = ' Alias /sidebar/pear.gif ' . str_replace('\\', '/', '@www-dir@')
. '/public_html/gifs/pear_item.gif' . $eol;
$middle[] = ' Alias /distributions/manual/chm /var/lib/pear/chm' . $eol;
$middle[] = ' Alias /reference /var/lib/pear/apidoc' . $eol;

0 comments on commit 7961087

Please sign in to comment.