From: Darren S. <ds...@us...> - 2005-07-31 18:36:12
|
Update of /cvsroot/xine/xine_www/data/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31469/data/php Modified Files: Tag: experimental2 admin_site.inc.php Log Message: Tweak site admin so that it will (should) work correctly if installed on experimental.xinehq.de. (This may need some further alteration - I can't adequately test this on my local setup.) Index: admin_site.inc.php =================================================================== RCS file: /cvsroot/xine/xine_www/data/php/Attic/admin_site.inc.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- admin_site.inc.php 30 Jul 2005 22:48:38 -0000 1.1.2.1 +++ admin_site.inc.php 31 Jul 2005 18:36:03 -0000 1.1.2.2 @@ -1,14 +1,25 @@ <?php # $Id$ -$realsite = "xinehq"; -$testsite = "test"; +switch ($_SERVER['SERVER_NAME']) +{ + case 'xinehq.de': + case 'www.xinehq.de': + $realsite = 'xinehq'; + $testsite = 'test'; + $forreal = true; + break; + case 'experimental.xinehq.de': + $realsite = null; + $testsite = 'experimental'; + $forreal = true; + break; + default: + $forreal = false; +} $topdir = dirname ($base_dir); - set_time_limit (300); // five minutes -$forreal = ($_SERVER['SERVER_NAME'] == 'xinehq.de'); - switch ($params[0]) { case 'test': @@ -18,7 +29,7 @@ do NOT stop. See below for any errors: '; - if ($forreal) + if ($forreal && $testsite) system ("cd $topdir/$testsite 2>&1 && pwd; cvs update -AdP 2>&1", $ret); else $ret = 0; @@ -38,7 +49,7 @@ echo 'Updating real site from test site... '; - if ($forreal) + if ($forreal && $testsite && $realsite) system ("rsync -av --delete $topdir/$testsite/ $topdir/$realsite 2>&1", $ret); else $ret = 0; |