From: <jhe...@us...> - 2002-11-14 11:00:14
|
Update of /cvsroot/upcase-project/UpCase/lib In directory usw-pr-cvs1:/tmp/cvs-serv19051 Modified Files: uc_installer.php Log Message: renamed some paths Index: uc_installer.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/lib/uc_installer.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** uc_installer.php 12 Nov 2002 11:01:00 -0000 1.1 --- uc_installer.php 14 Nov 2002 11:00:11 -0000 1.2 *************** *** 110,128 **** } ! function unpack($package, $path) { - print("$path<br>"); $archive = new Archive_Tar($this->tmpDir . "/" . $package->source, true); ! return $archive->extractModify($path, $package->name . "-" . $package->version . "-uc"); } ! function setupMySQL($package, $path, $tblPrefix) { $tblprefix = $tblPrefix . "_"; ! include($path . MYSQL_QUERIES); ! foreach($queries as $query) { --- 110,126 ---- } ! function unpack($package, $toPath) { $archive = new Archive_Tar($this->tmpDir . "/" . $package->source, true); ! return $archive->extractModify($toPath, $package->name . "-" . $package->version . "-uc"); } ! function setupMySQL($package, $sqlPath, $tblPrefix) { $tblprefix = $tblPrefix . "_"; ! include($sqlPath . MYSQL_QUERIES); foreach($queries as $query) { *************** *** 131,139 **** . "Error: " . $this->db->ErrorMsg()); } - return true; } ! function setupPackage($package, $path, $tblPrefix) { $cfg = $GLOBALS["ucConfig"]; --- 129,136 ---- . "Error: " . $this->db->ErrorMsg()); } return true; } ! function setupPackage($package, $relPath, $tblPrefix) { $cfg = $GLOBALS["ucConfig"]; *************** *** 146,161 **** $dbinf->prefix = $tblPrefix . "_"; ! include_once($path . PACKAGE_SETUP); ! setup($dbinf, $cfg->wwwModules . "/" . basename($path), ! $path) or die("Unable to setup package"); return true; } ! function registerPackage($package, $path, $tblPrefix) { $query = sprintf($GLOBALS["ucsql_packageregister"], $package->name, $package->version, ! $path, $tblPrefix); $this->db->Execute($query) or die("Unable to register package: " . $this->db->ErrorMsg()); --- 143,158 ---- $dbinf->prefix = $tblPrefix . "_"; ! include_once($cfg->siteRoot . "/" . $relPath . PACKAGE_SETUP); ! setup($dbinf, $cfg->siteUrl . "/" . $relPath, ! $cfg->siteRoot . "/" .$relPath) or die("Unable to setup package"); return true; } ! function registerPackage($package, $relPath, $tblPrefix) { $query = sprintf($GLOBALS["ucsql_packageregister"], $package->name, $package->version, ! $relPath, $tblPrefix); $this->db->Execute($query) or die("Unable to register package: " . $this->db->ErrorMsg()); *************** *** 163,172 **** } ! function setInstallComplete($package, $path, $tblPrefix) { $query = sprintf($GLOBALS["ucsql_packageinstcomp"], $package->name, $package->version, ! $path, $tblPrefix); ! print("$query<br>"); $this->db->Execute($query) or die("Unable to flag package as installed: " . --- 160,168 ---- } ! function setInstallComplete($package, $relPath, $tblPrefix) { $query = sprintf($GLOBALS["ucsql_packageinstcomp"], $package->name, $package->version, ! $relPath, $tblPrefix); $this->db->Execute($query) or die("Unable to flag package as installed: " . *************** *** 174,181 **** } ! function install($package, $pkgRelUrl, $tblPrefix) { $cfg = $GLOBALS["ucConfig"]; ! $pkgPath = $cfg->modulesRoot . "/" . $pkgRelUrl; $this->download($package) --- 170,177 ---- } ! function install($package, $relPath, $tblPrefix) { $cfg = $GLOBALS["ucConfig"]; ! $pkgPath = $cfg->siteRoot . "/" . $relPath; $this->download($package) *************** *** 183,187 **** $this->checkPathValidity($pkgPath) or die("Invalid URL"); ! $this->registerPackage($package, $pkgRelUrl, $tblPrefix) or die("Unable to register package to be installed"); createDirectory($pkgPath) --- 179,183 ---- $this->checkPathValidity($pkgPath) or die("Invalid URL"); ! $this->registerPackage($package, $relPath, $tblPrefix) or die("Unable to register package to be installed"); createDirectory($pkgPath) *************** *** 191,197 **** $this->setupMySQL($package, $pkgPath, $tblPrefix) or die("Unable to set up MySQL"); ! $this->setupPackage($package, $pkgPath, $tblPrefix) or die("Unable to set up package"); ! $this->setInstallComplete($package, $pkgRelUrl, $tblPrefix); } --- 187,193 ---- $this->setupMySQL($package, $pkgPath, $tblPrefix) or die("Unable to set up MySQL"); ! $this->setupPackage($package, $relPath, $tblPrefix) or die("Unable to set up package"); ! $this->setInstallComplete($package, $relPath, $tblPrefix); } |