You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(32) |
Sep
|
Oct
|
Nov
(100) |
Dec
(22) |
---|
From: <jhe...@us...> - 2002-11-21 15:22:34
|
Update of /cvsroot/upcase-project/UpCase/templates/en In directory sc8-pr-cvs1:/tmp/cvs-serv9405 Modified Files: category.mxt Log Message: added bloc for warning message and link for demo page Index: category.mxt =================================================================== RCS file: /cvsroot/upcase-project/UpCase/templates/en/category.mxt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** category.mxt 20 Nov 2002 12:15:06 -0000 1.2 --- category.mxt 21 Nov 2002 15:22:30 -0000 1.3 *************** *** 8,12 **** <mx:bloc id="packages"> <center> ! <table border="0" width="50%"> <tr bgcolor="7777FF"> --- 8,13 ---- <mx:bloc id="packages"> <center> ! <table border="0" width="75%"> ! <tr bgcolor="7777FF"> *************** *** 35,38 **** --- 36,53 ---- <td align="center"> <a mxAttribut="href:pkghome"><mx:text id="pkghome" /></a> + </td> + </tr> + + <tr bgcolor="CCCCCC"> + <th>Demo Page</th> + <td align="center"> + <a mxAttribut="href:pkgdemo"><mx:text id="pkgdemo" /></a> + </td> + </tr> + + <tr> + <td colspan="2"> + <mx:bloc id="support"> + </mx:bloc id="support"> </td> </tr> |
From: <jhe...@us...> - 2002-11-21 15:21:42
|
Update of /cvsroot/upcase-project/UpCase/templates/en In directory sc8-pr-cvs1:/tmp/cvs-serv9013 Added Files: unsupported.mxt Log Message: warning message for packages that aren't fully installed via upcase intaller --- NEW FILE: unsupported.mxt --- <p> <b>Warning !</b> This package is NOT supported by the installer of upcase. That does not means that you can't install and use it. It simply means that this package will only be downloaded and unpacked by upcase in the path you specify in the installer from. All other steps of the install procedure will be handled by package provided scripts. The uninstall procedure can remove the files that this package has created, but will NOT remove any data in the database. You will have to do it manually to get rid of the whole thing. </p> |
From: <jhe...@us...> - 2002-11-21 15:20:17
|
Update of /cvsroot/upcase-project/UpCase/admin In directory sc8-pr-cvs1:/tmp/cvs-serv8286 Modified Files: installer.php Log Message: use return value of UcInstaller->install() for redirection. So, packages that provide installation scripts are handled the same way as those that uses the upcase installer Index: installer.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/admin/installer.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** installer.php 20 Nov 2002 16:20:31 -0000 1.7 --- installer.php 21 Nov 2002 15:20:14 -0000 1.8 *************** *** 78,83 **** die("You MUST specify a tables prefix"); $inst->saveMetaData($package); ! $inst->install($package, $pkgRelUrl, $tblPrefix); ! header("Location: " . $siteUrl . "/" . $pkgRelUrl); } else if ($operation == "uninstall") --- 78,83 ---- die("You MUST specify a tables prefix"); $inst->saveMetaData($package); ! $redirect = $inst->install($package, $pkgRelUrl, $tblPrefix); ! header("Location: " . $redirect); } else if ($operation == "uninstall") |
From: <jhe...@us...> - 2002-11-21 15:18:38
|
Update of /cvsroot/upcase-project/UpCase/admin In directory sc8-pr-cvs1:/tmp/cvs-serv7913 Modified Files: category.php Log Message: uninstall link, demo link, use of getPackage rather than getStatus Index: category.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/admin/category.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** category.php 20 Nov 2002 16:00:20 -0000 1.4 --- category.php 21 Nov 2002 15:18:35 -0000 1.5 *************** *** 60,85 **** $tmpl->Mxtext("packages.pkghome", $package->homePage); $tmpl->MxUrl("packages.pkghome", $package->homePage); $tmpl->MxText("packages.pkgver", $package->version); $tmpl->MxUrl("packages.installer", $ucConfig->upcaseUrl . "/admin/installer.php", array("cat" => $catname, "pkg" => $package->name)); ! $instances = $inst->getStatus($package->name); foreach ($instances as $instance) { ! $tmpl->MxText("packages.instances.pkgver", $instance["version"]); ! $tmpl->MxText("packages.instances.pkgurl", $ucConfig->siteUrl . "/" . ! $instance["url"]); ! $tmpl->MxAttribut("packages.instances.pkgurl", $ucConfig->siteUrl . "/" ! . $instance["url"]); ! $tmpl->MxText("packages.instances.pkgstatus", $instance["status"]); $tmpl->MxUrl("packages.instances.uninstall", $ucConfig->upcaseUrl . "/admin/installer.php", ! array("pkg" => $package->name, ! "ver" => $instance["version"], ! "url" => $instance["url"], ! "cat" => $catname, ! "uninstall" => "do")); $tmpl->MxBloc("packages.instances", "loop"); } $tmpl->MxBloc("packages", "loop"); } --- 60,95 ---- $tmpl->Mxtext("packages.pkghome", $package->homePage); $tmpl->MxUrl("packages.pkghome", $package->homePage); + $tmpl->Mxtext("packages.pkgdemo", $package->demoPage); + $tmpl->MxUrl("packages.pkgdemo", $package->demoPage); $tmpl->MxText("packages.pkgver", $package->version); $tmpl->MxUrl("packages.installer", $ucConfig->upcaseUrl . "/admin/installer.php", array("cat" => $catname, "pkg" => $package->name)); ! ! if ($package->supported == 0) ! $tmpl->MxBloc("packages.support", "modify", ! $ucConfig->upcaseRoot . "/templates/en/unsupported.mxt"); ! else ! $tmpl->MxBloc("packages.support", "delete"); ! ! $instances = $inst->getPackages($package->name); foreach ($instances as $instance) { ! $tmpl->MxText("packages.instances.pkgver", $instance->version); ! $tmpl->MxText("packages.instances.pkgurl", ! $ucConfig->siteUrl . "/" . $instance->path); ! $tmpl->MxAttribut("packages.instances.pkgurl", ! $ucConfig->siteUrl . "/" . $instance->path); ! $tmpl->MxText("packages.instances.pkgstatus", $instance->status); $tmpl->MxUrl("packages.instances.uninstall", $ucConfig->upcaseUrl . "/admin/installer.php", ! array("pkg" => $instance->name, ! "ver" => $instance->version, ! "url" => $instance->path, ! "cat" => $catname, ! "uninstall" => "do")); $tmpl->MxBloc("packages.instances", "loop"); } + $tmpl->MxBloc("packages", "loop"); } |
From: <jhe...@us...> - 2002-11-21 15:17:09
|
Update of /cvsroot/upcase-project/UpCase/lib In directory sc8-pr-cvs1:/tmp/cvs-serv7305 Modified Files: uc_sql-mysql.inc Log Message: added getpackage query Index: uc_sql-mysql.inc =================================================================== RCS file: /cvsroot/upcase-project/UpCase/lib/uc_sql-mysql.inc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** uc_sql-mysql.inc 20 Nov 2002 15:57:15 -0000 1.7 --- uc_sql-mysql.inc 21 Nov 2002 15:17:06 -0000 1.8 *************** *** 86,89 **** --- 86,92 ---- . " AND pkgversion LIKE '%s'" . " AND pkgpath LIKE '%s'"; + $ucsql_getpackages = "SELECT * FROM $installer_tbl WHERE pkgname LIKE '%s'" + . " AND pkgversion LIKE '%s' AND pkgpath LIKE '%s'" + . " AND tblprefix LIKE '%s' AND installed LIKE '%s'"; $ucsql_packageregister = "INSERT INTO $installer_tbl" . " (pkgname, pkgversion, pkgpath, tblprefix)" |
From: <jhe...@us...> - 2002-11-21 15:16:23
|
Update of /cvsroot/upcase-project/UpCase/lib In directory sc8-pr-cvs1:/tmp/cvs-serv6833 Modified Files: uc_installer.php Log Message: added package instance object type, replaced getStatus by getPackage, uninstall now works Index: uc_installer.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/lib/uc_installer.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** uc_installer.php 20 Nov 2002 16:06:18 -0000 1.6 --- uc_installer.php 21 Nov 2002 15:16:13 -0000 1.7 *************** *** 7,13 **** --- 7,16 ---- define("MYSQL_QUERIES", "/upcase/mysql.inc"); define("PACKAGE_SETUP", "/upcase/setup.inc"); + define("PACKAGE_FULLY_INSTALLED", 1); define("PACKAGE_PARTIALY_INSTALLED", 0); + define("LOCAL_METADATA_DIR", "/packages/db"); + class UcPackageDBInfo { *************** *** 19,22 **** --- 22,51 ---- } + class UcPackageInstance + { + var $metaDataFile; + + function UcPackageInstance($name, $version, $path, $tblPrefix) + { + $cfg = $GLOBALS["ucConfig"]; + $this->name = $name; + $this->metaDataFile = $cfg->upcaseRoot . LOCAL_METADATA_DIR + . "/" . $name . "-" . $version . ".inc"; + include($this->metaDataFile); + $this->description = $description; + $this->homePage = $home_page; + $this->version = $version; + $this->source = $source; + $this->supported = $supported; + $this->path = $path; + $this->prefix = $tblPrefix; + $this->tables = $tables; + } + + function setStatus($status) + { + $this->status = $status; + } + } class UcInstaller *************** *** 28,68 **** { $cfg = $GLOBALS["ucConfig"]; ! $this->metaBackup = $cfg->upcaseRoot . "/packages/db"; $this->db = new UcSql(); $this->tmpDir = $cfg->upcaseRoot . "/packages/dl"; } ! // Return an array of ! // [pkgversion, pkgurl, tblprefix, pkgstatus] ! function getStatus($packageName, $pkgVersion = '%', $pkgPath = '%') { ! $query = sprintf($GLOBALS["ucsql_packagestatus"], $packageName, ! $pkgVersion, $pkgPath); $res = $this->db->Execute($query) ! or die("Unable to look up package: " . $this->db->ErrorMsg() ! . "QUERY: " . $query); ! if ($res->RowCount() == 0) return array(); ! else if ($res->RowCount() > 0) { ! $ar = array(); ! while ($o = $res->FetchNextObject(true)) ! { ! $pkg = array(); ! $pkg["version"] = $o->PKGVERSION; ! $pkg["url"] = $o->PKGPATH; ! $pkg["prefix"] = $o->TBLPREFIX; ! if ($o->INSTALLED == 1) ! $pkg["status"] = PACKAGE_FULLY_INSTALLED; ! else ! $pkg["status"] = PACKAGE_PARTIALY_INSTALLED; ! $ar[] = $pkg; ! } ! return $ar; } - else - die("Error while counting: " . $this->db->ErrorMsg()); - } function saveMetaData($package) { --- 57,87 ---- { $cfg = $GLOBALS["ucConfig"]; ! $this->metaBackup = $cfg->upcaseRoot . LOCAL_METADATA_DIR; $this->db = new UcSql(); $this->tmpDir = $cfg->upcaseRoot . "/packages/dl"; } ! function getPackages($pkgName, $pkgVersion = '%', ! $pkgPath = '%', $tblPrefix='%', ! $pkgStatus = '%') { ! $query = sprintf($GLOBALS["ucsql_getpackages"], $pkgName, ! $pkgVersion, $pkgPath, $tblPrefix, $pkgStatus); $res = $this->db->Execute($query) ! or die("Unable to get packages: " . $this->db->ErrorMsg()); ! if ($res->RowCount() <= 0) return array(); ! $ret = array(); ! while (($o = $res->FetchNextObject(true))) { ! $pkg = new UcPackageInstance($o->PKGNAME, $o->PKGVERSION, ! $o->PKGPATH, $o->TBLPREFIX); ! $pkg->setStatus($o->INSTALLED); ! $ret[] = $pkg; } + return $ret; + } + function saveMetaData($package) { *************** *** 76,80 **** function download($package) { - print("Downloading<br>"); $res = download($package->sourceDir . "/" . $package->source, $this->tmpDir . "/" . $package->source); --- 95,98 ---- *************** *** 125,128 **** --- 143,149 ---- function setupMySQL($package, $sqlPath, $tblPrefix) { + if (!file_exists($sqlPath . MYSQL_QUERIES)) + return false; + $tblprefix = $tblPrefix . "_"; include($sqlPath . MYSQL_QUERIES); *************** *** 164,171 **** } ! function unregisterPackage($packageName, $packageVersion, $relPath, $tblPrefix) { $query = sprintf($GLOBALS["ucsql_packageunregister"], ! $packageName, $packageVersion, $relPath, $tblPrefix); $this->db->Execute($query) or die("Unable to unregister package: " . $this->db->ErrorMsg()); --- 185,196 ---- } ! function unregisterPackage($packageInstance) ! { $query = sprintf($GLOBALS["ucsql_packageunregister"], ! $packageInstance->name, ! $packageInstance->version, ! $packageInstance->path, ! $packageInstance->prefix); $this->db->Execute($query) or die("Unable to unregister package: " . $this->db->ErrorMsg()); *************** *** 193,206 **** or die("Invalid URL"); $this->registerPackage($package, $relPath, $tblPrefix) ! or die("Unable to register package to be installed"); createDirectory($pkgPath) or die("Unable to create directory $pkgPath"); $this->unpack($package, $pkgPath) or die("Unable to unpack package"); ! $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); } --- 218,242 ---- or die("Invalid URL"); $this->registerPackage($package, $relPath, $tblPrefix) ! or die("Unable to register package to be installed"); createDirectory($pkgPath) or die("Unable to create directory $pkgPath"); $this->unpack($package, $pkgPath) or die("Unable to unpack package"); ! if ($package->supported == 1) ! { ! $this->setupMySQL($package, $pkgPath, $tblPrefix) ! or die("Unable to set up MySQL"); ! $this->setupPackage($package, $relPath, $tblPrefix) ! or die("Unable to set up package"); ! $redirect = $cfg->siteUrl . "/" . $relPath; ! } ! else ! { ! $redirect = $cfg->siteUrl . "/" . $relPath ! . "/" . $package->setupScript ! . "?prefix=" . $tblPrefix; ! } $this->setInstallComplete($package, $relPath, $tblPrefix); + return $redirect; } *************** *** 208,224 **** { $cfg = $GLOBALS["ucConfig"]; ! $metaData = $this->metaBackup . "/" . $packageName . "-" . ! $packageVersion . ".inc"; ! $pkgAr = $this->getStatus($packageName, $packageVersion, $relUrl); ! $tblPrefix = $pkgAr[0]["prefix"]; ! include($metaData); $tablesAr = array(); ! foreach ($tables as $table) ! $tablesAr[] = $tblPrefix . "_" . $table; $tablesList = join(',', $tablesAr); $query = "DROP TABLE " . $tablesList; $this->db->Execute($query); ! // or die("Unable to drop package tables: " . $this->db->ErrorMsg()); ! $this->unregisterPackage($packageName, $packageVersion, $relUrl, $tblPrefix); rrmdir($cfg->siteRoot . "/" . $relUrl); } --- 244,256 ---- { $cfg = $GLOBALS["ucConfig"]; ! $pkgAr = $this->getPackages($packageName, $packageVersion, $relUrl); ! $package = $pkgAr[0]; $tablesAr = array(); ! foreach ($package->tables as $table) ! $tablesAr[] = $package->prefix . "_" . $table; $tablesList = join(',', $tablesAr); $query = "DROP TABLE " . $tablesList; $this->db->Execute($query); ! $this->unregisterPackage($package); rrmdir($cfg->siteRoot . "/" . $relUrl); } |
From: <jhe...@us...> - 2002-11-21 15:14:40
|
Update of /cvsroot/upcase-project/UpCase/lib In directory sc8-pr-cvs1:/tmp/cvs-serv6246 Modified Files: uc_repository.php Log Message: added demo, supported and setupScript members to package object Index: uc_repository.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/lib/uc_repository.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** uc_repository.php 14 Nov 2002 11:01:12 -0000 1.2 --- uc_repository.php 21 Nov 2002 15:14:36 -0000 1.3 *************** *** 188,193 **** --- 188,196 ---- $this->description = $description; $this->homePage = $home_page; + $this->demoPage = $demo; $this->version = $version; $this->source = $source; + $this->supported = $supported; + $this->setupScript = $setup_script; } } |
From: <jhe...@us...> - 2002-11-20 16:20:34
|
Update of /cvsroot/upcase-project/UpCase/admin In directory sc8-pr-cvs1:/tmp/cvs-serv28279 Modified Files: installer.php Log Message: uninstall come back to category page after uninstalling Index: installer.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/admin/installer.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** installer.php 20 Nov 2002 16:05:42 -0000 1.6 --- installer.php 20 Nov 2002 16:20:31 -0000 1.7 *************** *** 84,87 **** --- 84,89 ---- { $inst->uninstall($pkg, $ver, $url); + header("Location: " . $ucConfig->upcaseUrl + . "/admin/category.php?catname=" . $catname); } else if ($operation == "upgrade") |
From: <jhe...@us...> - 2002-11-20 16:06:21
|
Update of /cvsroot/upcase-project/UpCase/lib In directory sc8-pr-cvs1:/tmp/cvs-serv22511 Modified Files: uc_installer.php Log Message: no error when tryingto drop non existant tables when uninstalling Index: uc_installer.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/lib/uc_installer.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** uc_installer.php 20 Nov 2002 15:50:27 -0000 1.5 --- uc_installer.php 20 Nov 2002 16:06:18 -0000 1.6 *************** *** 218,223 **** $tablesList = join(',', $tablesAr); $query = "DROP TABLE " . $tablesList; ! $this->db->Execute($query) ! or die("Unable to drop package tables: " . $this->db->ErrorMsg()); $this->unregisterPackage($packageName, $packageVersion, $relUrl, $tblPrefix); rrmdir($cfg->siteRoot . "/" . $relUrl); --- 218,223 ---- $tablesList = join(',', $tablesAr); $query = "DROP TABLE " . $tablesList; ! $this->db->Execute($query); ! // or die("Unable to drop package tables: " . $this->db->ErrorMsg()); $this->unregisterPackage($packageName, $packageVersion, $relUrl, $tblPrefix); rrmdir($cfg->siteRoot . "/" . $relUrl); |
From: <jhe...@us...> - 2002-11-20 16:05:46
|
Update of /cvsroot/upcase-project/UpCase/admin In directory sc8-pr-cvs1:/tmp/cvs-serv22346 Modified Files: installer.php Log Message: installer redirect to package directory when done Index: installer.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/admin/installer.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** installer.php 20 Nov 2002 15:49:09 -0000 1.5 --- installer.php 20 Nov 2002 16:05:42 -0000 1.6 *************** *** 79,82 **** --- 79,83 ---- $inst->saveMetaData($package); $inst->install($package, $pkgRelUrl, $tblPrefix); + header("Location: " . $siteUrl . "/" . $pkgRelUrl); } else if ($operation == "uninstall") |
From: <jhe...@us...> - 2002-11-20 16:00:28
|
Update of /cvsroot/upcase-project/UpCase/admin In directory sc8-pr-cvs1:/tmp/cvs-serv19826 Modified Files: category.php Log Message: added cat parameter to uninstall package link Index: category.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/admin/category.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** category.php 20 Nov 2002 14:25:52 -0000 1.3 --- category.php 20 Nov 2002 16:00:20 -0000 1.4 *************** *** 78,81 **** --- 78,82 ---- "ver" => $instance["version"], "url" => $instance["url"], + "cat" => $catname, "uninstall" => "do")); $tmpl->MxBloc("packages.instances", "loop"); |
From: <jhe...@us...> - 2002-11-20 15:57:18
|
Update of /cvsroot/upcase-project/UpCase/lib In directory sc8-pr-cvs1:/tmp/cvs-serv18251 Modified Files: uc_sql-mysql.inc Log Message: query to unregister a package, query to get list of fully installed packages Index: uc_sql-mysql.inc =================================================================== RCS file: /cvsroot/upcase-project/UpCase/lib/uc_sql-mysql.inc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** uc_sql-mysql.inc 20 Nov 2002 12:53:35 -0000 1.6 --- uc_sql-mysql.inc 20 Nov 2002 15:57:15 -0000 1.7 *************** *** 89,95 **** --- 89,100 ---- . " (pkgname, pkgversion, pkgpath, tblprefix)" . " VALUES ('%s', '%s', '%s', '%s')"; + $ucsql_packageunregister = "DELETE FROM $installer_tbl" + . " WHERE pkgname = '%s' AND pkgversion = '%s'" + . " AND pkgpath = '%s' AND tblprefix = '%s'"; $ucsql_packageinstcomp = "UPDATE $installer_tbl SET installed = '1'" . " WHERE pkgname = '%s' AND pkgversion = '%s'" . " AND pkgpath = '%s' AND tblprefix = '%s'"; + $ucsql_packageinstalled = "SELECT * FROM $installer_tbl" + . " WHERE pkgname LIKE '%s' AND installed = '1'"; ?> |
From: <jhe...@us...> - 2002-11-20 15:54:08
|
Update of /cvsroot/upcase-project/UpCase/admin In directory sc8-pr-cvs1:/tmp/cvs-serv16703 Modified Files: menu.php Log Message: application menu now get its data from the installer's table Index: menu.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/admin/menu.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** menu.php 20 Nov 2002 14:26:14 -0000 1.3 --- menu.php 20 Nov 2002 15:54:04 -0000 1.4 *************** *** 51,65 **** $tmpl->MxBloc("menu", "append", "../templates/" . $uc_tmpl['APP_MENU']); ! $apps = array( "WebCalendar" => $ucConfig->siteUrl . "/WebCalendar", ! "Owl" => $ucConfig->siteUrl . "/Owl", ! "phpBB" => $ucConfig->siteUrl . "/phpBB2", ! "SPIP" => $ucConfig->siteUrl . "/SPIP"); ! foreach ($apps as $appName => $appUrl) { ! $tmpl->MxText("menu.appmenu.application", $appName); ! $tmpl->MxUrl("menu.appmenu.appurl", $appUrl); $tmpl->MxBloc("menu.appmenu", "loop"); } // append administrative menu items --- 51,69 ---- $tmpl->MxBloc("menu", "append", "../templates/" . $uc_tmpl['APP_MENU']); ! // Get all installed packages in the installer ! $query = sprintf($ucsql_packageinstalled, '%'); ! $db = new UcSql(); ! $res = $db->Execute($query) or die("Unable to execute " . $query ! . " - " . $db->ErrorMsg()); ! ! while (($o = $res->FetchNextObject(true))) { ! $tmpl->MxText("menu.appmenu.application", $o->PKGPATH); ! $tmpl->MxUrl("menu.appmenu.appurl", $ucConfig->siteUrl . "/" ! . $o->PKGPATH); $tmpl->MxBloc("menu.appmenu", "loop"); } + // append administrative menu items |
From: <jhe...@us...> - 2002-11-20 15:50:31
|
Update of /cvsroot/upcase-project/UpCase/lib In directory sc8-pr-cvs1:/tmp/cvs-serv14504 Modified Files: uc_installer.php Log Message: added unregister function, uninstall function remove every trace of a package Index: uc_installer.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/lib/uc_installer.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** uc_installer.php 20 Nov 2002 12:50:28 -0000 1.4 --- uc_installer.php 20 Nov 2002 15:50:27 -0000 1.5 *************** *** 34,38 **** // Return an array of ! // [pkgversion, pkgurl, pkgstatus] function getStatus($packageName, $pkgVersion = '%', $pkgPath = '%') { --- 34,38 ---- // Return an array of ! // [pkgversion, pkgurl, tblprefix, pkgstatus] function getStatus($packageName, $pkgVersion = '%', $pkgPath = '%') { *************** *** 52,55 **** --- 52,56 ---- $pkg["version"] = $o->PKGVERSION; $pkg["url"] = $o->PKGPATH; + $pkg["prefix"] = $o->TBLPREFIX; if ($o->INSTALLED == 1) $pkg["status"] = PACKAGE_FULLY_INSTALLED; *************** *** 163,166 **** --- 164,176 ---- } + function unregisterPackage($packageName, $packageVersion, $relPath, $tblPrefix) + { + $query = sprintf($GLOBALS["ucsql_packageunregister"], + $packageName, $packageVersion, $relPath, $tblPrefix); + $this->db->Execute($query) + or die("Unable to unregister package: " . $this->db->ErrorMsg()); + return true; + } + function setInstallComplete($package, $relPath, $tblPrefix) { *************** *** 200,208 **** $metaData = $this->metaBackup . "/" . $packageName . "-" . $packageVersion . ".inc"; include($metaData); ! $tablesList = ''; foreach ($tables as $table) ! $tablesList .= $tblPrefix . "_" . $table . ', '; $query = "DROP TABLE " . $tablesList; rrmdir($cfg->siteRoot . "/" . $relUrl); } --- 210,224 ---- $metaData = $this->metaBackup . "/" . $packageName . "-" . $packageVersion . ".inc"; + $pkgAr = $this->getStatus($packageName, $packageVersion, $relUrl); + $tblPrefix = $pkgAr[0]["prefix"]; include($metaData); ! $tablesAr = array(); foreach ($tables as $table) ! $tablesAr[] = $tblPrefix . "_" . $table; ! $tablesList = join(',', $tablesAr); $query = "DROP TABLE " . $tablesList; + $this->db->Execute($query) + or die("Unable to drop package tables: " . $this->db->ErrorMsg()); + $this->unregisterPackage($packageName, $packageVersion, $relUrl, $tblPrefix); rrmdir($cfg->siteRoot . "/" . $relUrl); } |
From: <jhe...@us...> - 2002-11-20 15:49:13
|
Update of /cvsroot/upcase-project/UpCase/admin In directory sc8-pr-cvs1:/tmp/cvs-serv13739 Modified Files: installer.php Log Message: uninstall link effectively call uninstaller Index: installer.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/admin/installer.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** installer.php 20 Nov 2002 14:29:46 -0000 1.4 --- installer.php 20 Nov 2002 15:49:09 -0000 1.5 *************** *** 82,85 **** --- 82,86 ---- else if ($operation == "uninstall") { + $inst->uninstall($pkg, $ver, $url); } else if ($operation == "upgrade") |
From: <jhe...@us...> - 2002-11-20 14:30:23
|
Update of /cvsroot/upcase-project/UpCase/admin In directory sc8-pr-cvs1:/tmp/cvs-serv32578 Modified Files: newuser.php Log Message: path correction Index: newuser.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/admin/newuser.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** newuser.php 12 Nov 2002 17:51:23 -0000 1.1 --- newuser.php 20 Nov 2002 14:30:20 -0000 1.2 *************** *** 12,16 **** { createUser($newuser); ! header("Location: " . $ucConfig->wwwRoot . "/admin/useredit.php?username=$newuser&sessid=$sessid"); } --- 12,16 ---- { createUser($newuser); ! header("Location: " . $ucConfig->upcaseUrl . "/admin/useredit.php?username=$newuser&sessid=$sessid"); } |
From: <jhe...@us...> - 2002-11-20 14:29:49
|
Update of /cvsroot/upcase-project/UpCase/admin In directory sc8-pr-cvs1:/tmp/cvs-serv32004 Modified Files: installer.php Log Message: premices of unistall operation Index: installer.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/admin/installer.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** installer.php 14 Nov 2002 11:30:20 -0000 1.3 --- installer.php 20 Nov 2002 14:29:46 -0000 1.4 *************** *** 45,48 **** --- 45,52 ---- die("Not yet implemented"); } + else if (checkVar("uninstall", false)) + { + $operation = "uninstall"; + } else $operation = "view"; *************** *** 75,78 **** --- 79,85 ---- $inst->saveMetaData($package); $inst->install($package, $pkgRelUrl, $tblPrefix); + } + else if ($operation == "uninstall") + { } else if ($operation == "upgrade") |
From: <jhe...@us...> - 2002-11-20 14:26:18
|
Update of /cvsroot/upcase-project/UpCase/admin In directory sc8-pr-cvs1:/tmp/cvs-serv30255 Modified Files: menu.php Log Message: more path corrections Index: menu.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/admin/menu.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** menu.php 20 Nov 2002 12:15:59 -0000 1.2 --- menu.php 20 Nov 2002 14:26:14 -0000 1.3 *************** *** 68,74 **** $tmpl->MxBloc("menu", "append", "../templates/" . $uc_tmpl['ADMIN_MENU']); ! $tmpl->MxUrl("menu.packages", "repository.php", ""); ! $tmpl->MxUrl("menu.accounts", "userslist.php"); ! $tmpl->MxUrl("menu.permissions", "permissions.php"); } --- 68,74 ---- $tmpl->MxBloc("menu", "append", "../templates/" . $uc_tmpl['ADMIN_MENU']); ! $tmpl->MxUrl("menu.packages", $ucConfig->upcaseUrl . "/admin/repository.php", ""); ! $tmpl->MxUrl("menu.accounts", $ucConfig->upcaseUrl . "/admin/userslist.php"); ! $tmpl->MxUrl("menu.permissions", $ucConfig->upcaseUrl . "/admin/permissions.php"); } |
From: <jhe...@us...> - 2002-11-20 14:25:55
|
Update of /cvsroot/upcase-project/UpCase/admin In directory sc8-pr-cvs1:/tmp/cvs-serv30026 Modified Files: category.php Log Message: uninstall link added Index: category.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/admin/category.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** category.php 14 Nov 2002 10:39:16 -0000 1.2 --- category.php 20 Nov 2002 14:25:52 -0000 1.3 *************** *** 51,60 **** $packages = $category->getPackages(); $tmpl->MxText("catdescr", $category->description[$user->lang]); foreach ($packages as $package) { - $tmpl->MxUrl("packages.pkgurl", $ucConfig->upcaseUrl . "/admin/package.php", - array("name" => $package->name)); $tmpl->MxText("packages.pkgname", $package->name); $tmpl->MxText("packages.pkgdescr", $package->description[$user->lang]); --- 51,59 ---- $packages = $category->getPackages(); + $tmpl->MxText("catdescr", $category->description[$user->lang]); foreach ($packages as $package) { $tmpl->MxText("packages.pkgname", $package->name); $tmpl->MxText("packages.pkgdescr", $package->description[$user->lang]); *************** *** 65,78 **** $ucConfig->upcaseUrl . "/admin/installer.php", array("cat" => $catname, "pkg" => $package->name)); ! ! $instances = $inst->getStatus($package); foreach ($instances as $instance) { $tmpl->MxText("packages.instances.pkgver", $instance["version"]); ! $tmpl->MxText("packages.instances.pkgurl", $instance["url"]); $tmpl->MxText("packages.instances.pkgstatus", $instance["status"]); $tmpl->MxBloc("packages.instances", "loop"); } - $tmpl->MxBloc("packages", "loop"); } --- 64,84 ---- $ucConfig->upcaseUrl . "/admin/installer.php", array("cat" => $catname, "pkg" => $package->name)); ! $instances = $inst->getStatus($package->name); foreach ($instances as $instance) { $tmpl->MxText("packages.instances.pkgver", $instance["version"]); ! $tmpl->MxText("packages.instances.pkgurl", $ucConfig->siteUrl . "/" . ! $instance["url"]); ! $tmpl->MxAttribut("packages.instances.pkgurl", $ucConfig->siteUrl . "/" ! . $instance["url"]); $tmpl->MxText("packages.instances.pkgstatus", $instance["status"]); + $tmpl->MxUrl("packages.instances.uninstall", + $ucConfig->upcaseUrl . "/admin/installer.php", + array("pkg" => $package->name, + "ver" => $instance["version"], + "url" => $instance["url"], + "uninstall" => "do")); $tmpl->MxBloc("packages.instances", "loop"); } $tmpl->MxBloc("packages", "loop"); } |
From: <jhe...@us...> - 2002-11-20 12:53:38
|
Update of /cvsroot/upcase-project/UpCase/lib In directory sc8-pr-cvs1:/tmp/cvs-serv26802 Modified Files: uc_sql-mysql.inc Log Message: use of sql wildcards for package status request Index: uc_sql-mysql.inc =================================================================== RCS file: /cvsroot/upcase-project/UpCase/lib/uc_sql-mysql.inc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** uc_sql-mysql.inc 12 Nov 2002 11:10:01 -0000 1.5 --- uc_sql-mysql.inc 20 Nov 2002 12:53:35 -0000 1.6 *************** *** 83,87 **** // INSTALLER $installer_tbl = $ucConfig->tblPrefix . $ucConfig->dbTables["installer"]; ! $ucsql_packagestatus = "SELECT * FROM $installer_tbl WHERE pkgname = '%s'"; $ucsql_packageregister = "INSERT INTO $installer_tbl" . " (pkgname, pkgversion, pkgpath, tblprefix)" --- 83,89 ---- // INSTALLER $installer_tbl = $ucConfig->tblPrefix . $ucConfig->dbTables["installer"]; ! $ucsql_packagestatus = "SELECT * FROM $installer_tbl WHERE pkgname = '%s'" ! . " AND pkgversion LIKE '%s'" ! . " AND pkgpath LIKE '%s'"; $ucsql_packageregister = "INSERT INTO $installer_tbl" . " (pkgname, pkgversion, pkgpath, tblprefix)" |
From: <jhe...@us...> - 2002-11-20 12:52:51
|
Update of /cvsroot/upcase-project/UpCase/lib In directory sc8-pr-cvs1:/tmp/cvs-serv26434 Removed Files: uc_packages.php Log Message: don't need it anymore with new package handling system --- uc_packages.php DELETED --- |
From: <jhe...@us...> - 2002-11-20 12:51:29
|
Update of /cvsroot/upcase-project/UpCase/lib In directory sc8-pr-cvs1:/tmp/cvs-serv25639 Modified Files: uc_utils.php Log Message: added recursive directory deletion function Index: uc_utils.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/lib/uc_utils.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** uc_utils.php 12 Nov 2002 11:11:26 -0000 1.1 --- uc_utils.php 20 Nov 2002 12:51:25 -0000 1.2 *************** *** 65,67 **** --- 65,88 ---- return true; } + + function rrmdir($path) + { + if (is_dir($path)) + { + $handle = opendir($path); + while (false !== ($file = readdir($handle))) + { + if ($file == ".." || $file == ".") + continue; + if (!is_dir($path . "/" . $file)) + unlink($path . "/" . $file); + else + rrmdir($path . "/" . $file); + } + closedir($handle); + rmdir($path); + } + else + return false; + } ?> |
From: <jhe...@us...> - 2002-11-20 12:50:31
|
Update of /cvsroot/upcase-project/UpCase/lib In directory sc8-pr-cvs1:/tmp/cvs-serv25050 Modified Files: uc_installer.php Log Message: added uninstall function Index: uc_installer.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/lib/uc_installer.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** uc_installer.php 14 Nov 2002 11:20:27 -0000 1.3 --- uc_installer.php 20 Nov 2002 12:50:28 -0000 1.4 *************** *** 7,13 **** define("MYSQL_QUERIES", "/upcase/mysql.inc"); define("PACKAGE_SETUP", "/upcase/setup.inc"); - define("PACKAGE_NOT_INSTALLED", 0); define("PACKAGE_FULLY_INSTALLED", 1); ! define("PACKAGE_PARTIALY_INSTALLED", -1); class UcPackageDBInfo --- 7,12 ---- define("MYSQL_QUERIES", "/upcase/mysql.inc"); define("PACKAGE_SETUP", "/upcase/setup.inc"); define("PACKAGE_FULLY_INSTALLED", 1); ! define("PACKAGE_PARTIALY_INSTALLED", 0); class UcPackageDBInfo *************** *** 20,23 **** --- 19,23 ---- } + class UcInstaller { *************** *** 35,41 **** // Return an array of // [pkgversion, pkgurl, pkgstatus] ! function getStatus($package) { ! $query = sprintf($GLOBALS["ucsql_packagestatus"], $package->name); $res = $this->db->Execute($query) or die("Unable to look up package: " . $this->db->ErrorMsg() --- 35,42 ---- // Return an array of // [pkgversion, pkgurl, pkgstatus] ! function getStatus($packageName, $pkgVersion = '%', $pkgPath = '%') { ! $query = sprintf($GLOBALS["ucsql_packagestatus"], $packageName, ! $pkgVersion, $pkgPath); $res = $this->db->Execute($query) or die("Unable to look up package: " . $this->db->ErrorMsg() *************** *** 53,56 **** --- 54,59 ---- if ($o->INSTALLED == 1) $pkg["status"] = PACKAGE_FULLY_INSTALLED; + else + $pkg["status"] = PACKAGE_PARTIALY_INSTALLED; $ar[] = $pkg; } *************** *** 192,197 **** } ! function uninstall() { } } --- 195,209 ---- } ! function uninstall($packageName, $packageVersion, $relUrl) { + $cfg = $GLOBALS["ucConfig"]; + $metaData = $this->metaBackup . "/" . $packageName . "-" . + $packageVersion . ".inc"; + include($metaData); + $tablesList = ''; + foreach ($tables as $table) + $tablesList .= $tblPrefix . "_" . $table . ', '; + $query = "DROP TABLE " . $tablesList; + rrmdir($cfg->siteRoot . "/" . $relUrl); } } |
From: <jhe...@us...> - 2002-11-20 12:32:15
|
Update of /cvsroot/upcase-project/UpCase/admin In directory sc8-pr-cvs1:/tmp/cvs-serv18335 Removed Files: useradmin.html users.php Log Message: bad trip, never used --- useradmin.html DELETED --- --- users.php DELETED --- |
From: <jhe...@us...> - 2002-11-20 12:30:25
|
Update of /cvsroot/upcase-project/UpCase/admin In directory sc8-pr-cvs1:/tmp/cvs-serv17703 Removed Files: packages.php pkginst.php Log Message: not used anymore with the new package management system --- packages.php DELETED --- --- pkginst.php DELETED --- |