diff --git a/backend/BasicStor.php b/backend/BasicStor.php
index b3738ef32..44f5c1881 100644
--- a/backend/BasicStor.php
+++ b/backend/BasicStor.php
@@ -1736,7 +1736,7 @@ class BasicStor {
* @param string $realname
* @return int|PEAR_Error
*/
- public function addSubj($login, $pass=NULL, $realname='')
+ public static function addSubj($login, $pass=NULL, $realname='')
{
global $CC_CONFIG;
$uid = Subjects::AddSubj($login, $pass, $realname);
@@ -2112,80 +2112,6 @@ class BasicStor {
/* =============================================== test and debug methods */
- /**
- * Reset storageServer for debugging.
- *
- * @param boolean $loadSampleData
- * Flag for allow sample data loading
- * @param boolean $filesOnly
- * Flag for operate only on files in storage
- * @return array
- * result of localSearch with filetype 'all' and no conditions,
- * i.e. array of hashes, fields:
- * cnt : integer - number of inserted files
- * results : array of hashes:
- * gunid: string
- * type: string - audioclip | playlist | webstream
- * title: string - dc:title from metadata
- * creator: string - dc:creator from metadata
- * source: string - dc:source from metadata
- * length: string - dcterms:extent in extent format
- */
- public function resetStorage($loadSampleData=TRUE, $filesOnly=FALSE)
- {
- global $CC_CONFIG;
- if ($filesOnly) {
- $this->deleteFiles();
- } else {
- $this->deleteData();
- }
- $tr = new Transport($this);
- $tr->resetData();
- $res = array('cnt'=>0, 'results'=>array());
- if (!$loadSampleData) {
- return $res;
- }
- $samples = dirname(__FILE__)."/tests/sampleData.php";
- if (file_exists($samples)) {
- include($samples);
- } else {
- $sampleData = array();
- }
- foreach ($sampleData as $k => $it) {
- $type = $it['type'];
- $xml = $it['xml'];
- if (isset($it['gunid'])) {
- $gunid = $it['gunid'];
- } else {
- $gunid = '';
- }
- switch($type){
- case "audioclip":
- $media = $it['media'];
- $fname = basename($media);
- break;
- case "playlist":
- case "webstream":
- $media = '';
- $fname = basename($xml);
- break;
- }
- $values = array(
- "filename" => $fname,
- "filepath" => $media,
- "metadata" => $xml,
- "gunid" => $gunid,
- "filetype" => $type
- );
- $r = $this->bsPutFile($values);
- if (PEAR::isError($r)) {
- return $r;
- }
- }
- return $this->bsLocalSearch(
- array('filetype'=>'all', 'conditions'=>array())
- );
- }
/**
*
@@ -2215,117 +2141,6 @@ class BasicStor {
}
- /**
- * deleteData
- *
- * @return void
- */
- public function deleteData()
- {
- $this->deleteFiles();
- Alib::DeleteData();
- $this->initData();
- }
-
-
- /**
- * initData - initialize
- *
- */
- public function initData($p_verbose = false)
- {
- global $CC_CONFIG;
- // Create the Admin group
-// if (!empty($CC_CONFIG['AdminsGr'])) {
-// if (!Subjects::GetSubjId($CC_CONFIG['AdminsGr'])) {
-// echo " * Creating group '".$CC_CONFIG['AdminsGr']."'...";
-// // Add the admin group
-// $admid = Subjects::AddSubj($CC_CONFIG['AdminsGr']);
-// if (PEAR::isError($admid)) {
-// return $admid;
-// }
-//
-// // Add the "all" permission to the "admin" group
-// $res = Alib::AddPerm($admid, '_all', $this->storId, 'A');
-// if (PEAR::isError($res)) {
-// return $res;
-// }
-// echo "done.\n";
-// } else {
-// echo " * Skipping: group already exists: '".$CC_CONFIG['AdminsGr']."'\n";
-// }
-// }
-
- // Add the "all" group
-// if (!empty($CC_CONFIG['AllGr'])) {
-// if (!Subjects::GetSubjId($CC_CONFIG['AllGr'])) {
-// echo " * Creating group '".$CC_CONFIG['AllGr']."'...";
-// $allid = Subjects::AddSubj($CC_CONFIG['AllGr']);
-// if (PEAR::isError($allid)) {
-// return $allid;
-// }
-//
-// // Add the "read" permission to the "all" group.
-// Alib::AddPerm($allid, 'read', $this->storId, 'A');
-// echo "done.\n";
-// } else {
-// echo " * Skipping: group already exists: '".$CC_CONFIG['AllGr']."'\n";
-// }
-// }
-
- // Add the "Station Preferences" group
- if (!empty($CC_CONFIG['StationPrefsGr'])) {
- if (!Subjects::GetSubjId('scheduler')) {
- echo " * Creating group '".$CC_CONFIG['StationPrefsGr']."'...";
- $stPrefGr = Subjects::AddSubj($CC_CONFIG['StationPrefsGr']);
- if (PEAR::isError($stPrefGr)) {
- return $stPrefGr;
- }
- Subjects::AddSubjectToGroup('root', $CC_CONFIG['StationPrefsGr']);
- echo "done.\n";
- } else {
- echo " * Skipping: group already exists: '".$CC_CONFIG['StationPrefsGr']."'\n";
- }
- }
-
- // Add the root user if it doesnt exist yet.
- $rootUid = Subjects::GetSubjId('root');
- if (!$rootUid) {
- echo " * Creating user 'root'...";
- $rootUid = $this->addSubj("root", $CC_CONFIG['tmpRootPass']);
- if (PEAR::isError($rootUid)) {
- return $rootUid;
- }
-
- // Add root user to the admin group
-// $r = Subjects::AddSubjectToGroup('root', $CC_CONFIG['AdminsGr']);
-// if (PEAR::isError($r)) {
-// return $r;
-// }
- echo "done.\n";
- } else {
- echo " * Skipping: user already exists: 'root'\n";
- }
-
- // Create the user named 'scheduler'.
- if (!Subjects::GetSubjId('scheduler')) {
- echo " * Creating user 'scheduler'...";
- $subid = Subjects::AddSubj('scheduler', $CC_CONFIG['schedulerPass']);
- $res = Alib::AddPerm($subid, 'read', '0', 'A');
- if (PEAR::isError($res)) {
- return $res;
- }
- //$r = Subjects::AddSubjectToGroup('scheduler', $CC_CONFIG['AllGr']);
- echo "done.\n";
- } else {
- echo " * Skipping: user already exists: 'scheduler'\n";
- }
-
- // Need to add 'scheduler' to group StationPrefs
- Subjects::AddSubjectToGroup('scheduler', $CC_CONFIG['StationPrefsGr']);
- }
-
-
/**
* Aux logging for debug
*
diff --git a/conf_only.php.template b/conf_only.php.template
deleted file mode 100644
index b1a8db3ab..000000000
--- a/conf_only.php.template
+++ /dev/null
@@ -1,65 +0,0 @@
-
- *
dsn datasource setting
- * tblNamePrefix prefix for table names in the database
- * authCookieName secret token cookie name
- * StationPrefsGr name of station preferences group
- * AllGr name of 'all users' group
- * storageDir main directory for storing binary media files
- * bufferDir directory for temporary files
- * transDir directory for incomplete transferred files
- * accessDir directory for symlinks to accessed files
- * isArchive local/central flag
- * validate enable/disable validator
- * storageUrlPathpath-URL-part of storageServer base dir
- * storageXMLRPCXMLRPC server script address relative to storageUrlPath
- * storageUrlHost, storageUrlPorthost and port of storageServer
- * archiveUrlPathpath-URL-part of archiveServer base dir
- * archiveXMLRPCXMLRPC server script address relative to archiveUrlPath
- * archiveUrlHost, archiveUrlPorthost and port of archiveServer
- * archiveAccountLogin, archiveAccountPass account info
- * for login to archive
- *
- */
-$CC_CONFIG = array(
- /* ================================================== basic configuration */
- 'dsn' => array(
- 'username' => 'ls_dbuser',
- 'password' => 'ls_dbpassword',
- 'hostspec' => 'ls_dbserver',
- 'phptype' => 'pgsql',
- 'database' => 'ls_database',
- ),
-
- /* ==================================================== URL configuration */
- 'storageUrlPath' => 'ls_storageUrlPath',
- 'storageXMLRPC' => 'xmlrpc/xrLocStor.php',
- 'storageUrlHost' => 'ls_php_host',
- 'storageUrlPort' => ls_php_port,
-
- /* ================================================ archive configuration */
- 'archiveUrlPath' => 'ls_storageUrlPath',
- 'archiveXMLRPC' => 'xmlrpc/xrLocStor.php',
- 'archiveUrlHost' => 'ls_php_host',
- 'archiveUrlPort' => ls_php_port,
- 'archiveAccountLogin' => 'root',
- 'archiveAccountPass' => 'q',
-
- /* ============================================== scheduler configuration */
- 'schedulerUrlPath' => 'ls_scheduler_urlPrefix',
- 'schedulerXMLRPC' => 'ls_scheduler_xmlRpcPrefix',
- 'schedulerUrlHost' => 'ls_scheduler_host',
- 'schedulerUrlPort' => ls_scheduler_port,
- 'schedulerPass' => 'ls_scheduler_storage_pass',
-
- /* =================================================== cron configuration */
- //'cronUserName' => 'www-data',
- 'cronUserName' => $developer_name,
-
-);
-?>
\ No newline at end of file
diff --git a/htmlUI/ui_subjects.class.php b/htmlUI/ui_subjects.class.php
index 5d2015643..1bcdd2dce 100644
--- a/htmlUI/ui_subjects.class.php
+++ b/htmlUI/ui_subjects.class.php
@@ -90,7 +90,7 @@ class uiSubjects
}
$tmpPassword = $request['passwd']==='' ? NULL : $request['passwd'];
- $res = $this->Base->gb->addSubj($request['login'], $tmpPassword);
+ $res = BasicStor::addSubj($request['login'], $tmpPassword);
if (PEAR::isError($res)) {
$this->Base->_retMsg($res->getMessage());
return FALSE;
diff --git a/install/install.php b/install/install.php
index 34bcc1905..1dda825b7 100644
--- a/install/install.php
+++ b/install/install.php
@@ -527,13 +527,48 @@ if (!camp_db_table_exists($CC_CONFIG['prefTable'])) {
// Install default data
//------------------------------------------------------------------------
echo " *** Inserting Default Data ***\n";
-$gb = new GreenBox();
-$r = $gb->initData(true);
-if (PEAR::isError($r)) {
- echo "\n * ERROR: ";
- print_r($r);
+
+// Add the "Station Preferences" group
+if (!empty($CC_CONFIG['StationPrefsGr'])) {
+ if (!Subjects::GetSubjId('scheduler')) {
+ echo " * Creating group '".$CC_CONFIG['StationPrefsGr']."'...";
+ $stPrefGr = Subjects::AddSubj($CC_CONFIG['StationPrefsGr']);
+ Subjects::AddSubjectToGroup('root', $CC_CONFIG['StationPrefsGr']);
+ echo "done.\n";
+ } else {
+ echo " * Skipping: group already exists: '".$CC_CONFIG['StationPrefsGr']."'\n";
+ }
}
-//echo "done.\n";
+
+// Add the root user if it doesnt exist yet.
+$rootUid = Subjects::GetSubjId('root');
+if (!$rootUid) {
+ echo " * Creating user 'root'...";
+ $rootUid = BasicStor::addSubj("root", $CC_CONFIG['tmpRootPass']);
+
+ // Add root user to the admin group
+ //$r = Subjects::AddSubjectToGroup('root', $CC_CONFIG['AdminsGr']);
+ //if (PEAR::isError($r)) {
+ //return $r;
+ //}
+ echo "done.\n";
+} else {
+ echo " * Skipping: user already exists: 'root'\n";
+}
+
+// Create the user named 'scheduler'.
+if (!Subjects::GetSubjId('scheduler')) {
+ echo " * Creating user 'scheduler'...";
+ $subid = Subjects::AddSubj('scheduler', $CC_CONFIG['schedulerPass']);
+ $res = Alib::AddPerm($subid, 'read', '0', 'A');
+ //$r = Subjects::AddSubjectToGroup('scheduler', $CC_CONFIG['AllGr']);
+ echo "done.\n";
+} else {
+ echo " * Skipping: user already exists: 'scheduler'\n";
+}
+
+// Need to add 'scheduler' to group StationPrefs
+Subjects::AddSubjectToGroup('scheduler', $CC_CONFIG['StationPrefsGr']);
//------------------------------------------------------------------------
diff --git a/htmlUI/install/install.php b/install/install_twitter_plugin.php
similarity index 100%
rename from htmlUI/install/install.php
rename to install/install_twitter_plugin.php
diff --git a/install/uninstall.php b/install/uninstall.php
index 26ac94efb..bef99bb8c 100644
--- a/install/uninstall.php
+++ b/install/uninstall.php
@@ -1,7 +1,6 @@
/dev/null";
-@exec($command, $output, $results);
+//$command = "sudo -u postgres dropdb {$CC_CONFIG['dsn']['database']}";
+@exec($command, $output, $dbDeleteFailed);
+//------------------------------------------------------------------------
+// Delete DB tables
+// We do this if dropping the database fails above.
+//------------------------------------------------------------------------
+if ($dbDeleteFailed) {
+ echo " * Couldn't delete the database, so deleting all the DB tables...\n";
+ campcaster_db_connect(true);
+ if (!PEAR::isError($CC_DBC)) {
+ if (camp_db_table_exists($CC_CONFIG['prefTable'])) {
+ echo " * Removing database table ".$CC_CONFIG['prefTable']."...";
+ $sql = "DROP TABLE ".$CC_CONFIG['prefTable'];
+ camp_install_query($sql, false);
-//campcaster_db_connect(true);
-//$CC_DBC->disconnect();
+ $CC_DBC->dropSequence($CC_CONFIG['prefTable']."_id");
+ echo "done.\n";
+ } else {
+ echo " * Skipping: database table ".$CC_CONFIG['prefTable']."\n";
+ }
+ }
+
+ if (camp_db_table_exists($CC_CONFIG['transTable'])) {
+ echo " * Removing database table ".$CC_CONFIG['transTable']."...";
+ $sql = "DROP TABLE ".$CC_CONFIG['transTable'];
+ camp_install_query($sql, false);
+
+ $CC_DBC->dropSequence($CC_CONFIG['transTable']."_id");
+ echo "done.\n";
+ } else {
+ echo " * Skipping: database table ".$CC_CONFIG['transTable']."\n";
+ }
+
+ if (camp_db_table_exists($CC_CONFIG['filesTable'])) {
+ echo " * Removing database table ".$CC_CONFIG['filesTable']."...";
+ $sql = "DROP TABLE ".$CC_CONFIG['filesTable']." CASCADE";
+ camp_install_query($sql);
+ $CC_DBC->dropSequence($CC_CONFIG['filesTable']."_id");
+
+ } else {
+ echo " * Skipping: database table ".$CC_CONFIG['filesTable']."\n";
+ }
+
+ if (camp_db_table_exists($CC_CONFIG['playListTable'])) {
+ echo " * Removing database table ".$CC_CONFIG['playListTable']."...";
+ $sql = "DROP TABLE ".$CC_CONFIG['playListTable']." CASCADE";
+ camp_install_query($sql);
+ $CC_DBC->dropSequence($CC_CONFIG['playListTable']."_id");
+
+ } else {
+ echo " * Skipping: database table ".$CC_CONFIG['playListTable']."\n";
+ }
+
+ if (camp_db_table_exists($CC_CONFIG['playListContentsTable'])) {
+ echo " * Removing database table ".$CC_CONFIG['playListContentsTable']."...";
+ $sql = "DROP TABLE ".$CC_CONFIG['playListContentsTable'];
+ camp_install_query($sql);
+ $CC_DBC->dropSequence($CC_CONFIG['playListContentsTable']."_id");
+
+ } else {
+ echo " * Skipping: database table ".$CC_CONFIG['playListContentsTable']."\n";
+ }
+
+ //if (camp_db_sequence_exists($CC_CONFIG['filesSequence'])) {
+ // $sql = "DROP SEQUENCE ".$CC_CONFIG['filesSequence'];
+ // camp_install_query($sql);
+ //}
+ //
+ if (camp_db_table_exists($CC_CONFIG['accessTable'])) {
+ echo " * Removing database table ".$CC_CONFIG['accessTable']."...";
+ $sql = "DROP TABLE ".$CC_CONFIG['accessTable'];
+ camp_install_query($sql);
+ } else {
+ echo " * Skipping: database table ".$CC_CONFIG['accessTable']."\n";
+ }
+
+ if (camp_db_table_exists($CC_CONFIG['permTable'])) {
+ echo " * Removing database table ".$CC_CONFIG['permTable']."...";
+ $sql = "DROP TABLE ".$CC_CONFIG['permTable'];
+ camp_install_query($sql, false);
+
+ $CC_DBC->dropSequence($CC_CONFIG['permTable']."_id");
+ echo "done.\n";
+ } else {
+ echo " * Skipping: database table ".$CC_CONFIG['permTable']."\n";
+ }
+
+ if (camp_db_table_exists($CC_CONFIG['sessTable'])) {
+ echo " * Removing database table ".$CC_CONFIG['sessTable']."...";
+ $sql = "DROP TABLE ".$CC_CONFIG['sessTable'];
+ camp_install_query($sql);
+ } else {
+ echo " * Skipping: database table ".$CC_CONFIG['sessTable']."\n";
+ }
+
+ if (camp_db_table_exists($CC_CONFIG['subjTable'])) {
+ echo " * Removing database table ".$CC_CONFIG['subjTable']."...";
+ $CC_DBC->dropSequence($CC_CONFIG['subjTable']."_id");
+
+ $sql = "DROP TABLE ".$CC_CONFIG['subjTable']." CASCADE";
+ camp_install_query($sql, false);
+
+ echo "done.\n";
+ } else {
+ echo " * Skipping: database table ".$CC_CONFIG['subjTable']."\n";
+ }
+
+ if (camp_db_table_exists($CC_CONFIG['smembTable'])) {
+ echo " * Removing database table ".$CC_CONFIG['smembTable']."...";
+ $sql = "DROP TABLE ".$CC_CONFIG['smembTable'];
+ camp_install_query($sql, false);
+
+ $CC_DBC->dropSequence($CC_CONFIG['smembTable']."_id");
+ echo "done.\n";
+ } else {
+ echo " * Skipping: database table ".$CC_CONFIG['smembTable']."\n";
+ }
+
+ if (camp_db_table_exists($CC_CONFIG['scheduleTable'])) {
+ echo " * Removing database table ".$CC_CONFIG['scheduleTable']."...";
+ camp_install_query("DROP TABLE ".$CC_CONFIG['scheduleTable']);
+ } else {
+ echo " * Skipping: database table ".$CC_CONFIG['scheduleTable']."\n";
+ }
+
+ if (camp_db_table_exists($CC_CONFIG['backupTable'])) {
+ echo " * Removing database table ".$CC_CONFIG['backupTable']."...";
+ camp_install_query("DROP TABLE ".$CC_CONFIG['backupTable']);
+ } else {
+ echo " * Skipping: database table ".$CC_CONFIG['backupTable']."\n";
+ }
+}
//------------------------------------------------------------------------
@@ -100,132 +213,6 @@ camp_uninstall_delete_files($CC_CONFIG['storageDir']);
camp_uninstall_delete_files($CC_CONFIG['transDir']);
camp_uninstall_delete_files($CC_CONFIG['accessDir']);
-//------------------------------------------------------------------------
-// Delete DB tables
-//------------------------------------------------------------------------
-//echo " * Deleting DB tables...\n";
-//if (!PEAR::isError($CC_DBC)) {
-// if (camp_db_table_exists($CC_CONFIG['prefTable'])) {
-// echo " * Removing database table ".$CC_CONFIG['prefTable']."...";
-// $sql = "DROP TABLE ".$CC_CONFIG['prefTable'];
-// camp_install_query($sql, false);
-//
-// $CC_DBC->dropSequence($CC_CONFIG['prefTable']."_id");
-// echo "done.\n";
-// } else {
-// echo " * Skipping: database table ".$CC_CONFIG['prefTable']."\n";
-// }
-//}
-//
-//if (camp_db_table_exists($CC_CONFIG['transTable'])) {
-// echo " * Removing database table ".$CC_CONFIG['transTable']."...";
-// $sql = "DROP TABLE ".$CC_CONFIG['transTable'];
-// camp_install_query($sql, false);
-//
-// $CC_DBC->dropSequence($CC_CONFIG['transTable']."_id");
-// echo "done.\n";
-//} else {
-// echo " * Skipping: database table ".$CC_CONFIG['transTable']."\n";
-//}
-//
-//if (camp_db_table_exists($CC_CONFIG['filesTable'])) {
-// echo " * Removing database table ".$CC_CONFIG['filesTable']."...";
-// $sql = "DROP TABLE ".$CC_CONFIG['filesTable']." CASCADE";
-// camp_install_query($sql);
-// $CC_DBC->dropSequence($CC_CONFIG['filesTable']."_id");
-//
-//} else {
-// echo " * Skipping: database table ".$CC_CONFIG['filesTable']."\n";
-//}
-//
-//if (camp_db_table_exists($CC_CONFIG['playListTable'])) {
-// echo " * Removing database table ".$CC_CONFIG['playListTable']."...";
-// $sql = "DROP TABLE ".$CC_CONFIG['playListTable']." CASCADE";
-// camp_install_query($sql);
-// $CC_DBC->dropSequence($CC_CONFIG['playListTable']."_id");
-//
-//} else {
-// echo " * Skipping: database table ".$CC_CONFIG['playListTable']."\n";
-//}
-//
-//if (camp_db_table_exists($CC_CONFIG['playListContentsTable'])) {
-// echo " * Removing database table ".$CC_CONFIG['playListContentsTable']."...";
-// $sql = "DROP TABLE ".$CC_CONFIG['playListContentsTable'];
-// camp_install_query($sql);
-// $CC_DBC->dropSequence($CC_CONFIG['playListContentsTable']."_id");
-//
-//} else {
-// echo " * Skipping: database table ".$CC_CONFIG['playListContentsTable']."\n";
-//}
-//
-////if (camp_db_sequence_exists($CC_CONFIG['filesSequence'])) {
-//// $sql = "DROP SEQUENCE ".$CC_CONFIG['filesSequence'];
-//// camp_install_query($sql);
-////}
-////
-//if (camp_db_table_exists($CC_CONFIG['accessTable'])) {
-// echo " * Removing database table ".$CC_CONFIG['accessTable']."...";
-// $sql = "DROP TABLE ".$CC_CONFIG['accessTable'];
-// camp_install_query($sql);
-//} else {
-// echo " * Skipping: database table ".$CC_CONFIG['accessTable']."\n";
-//}
-//
-//if (camp_db_table_exists($CC_CONFIG['permTable'])) {
-// echo " * Removing database table ".$CC_CONFIG['permTable']."...";
-// $sql = "DROP TABLE ".$CC_CONFIG['permTable'];
-// camp_install_query($sql, false);
-//
-// $CC_DBC->dropSequence($CC_CONFIG['permTable']."_id");
-// echo "done.\n";
-//} else {
-// echo " * Skipping: database table ".$CC_CONFIG['permTable']."\n";
-//}
-//
-//if (camp_db_table_exists($CC_CONFIG['sessTable'])) {
-// echo " * Removing database table ".$CC_CONFIG['sessTable']."...";
-// $sql = "DROP TABLE ".$CC_CONFIG['sessTable'];
-// camp_install_query($sql);
-//} else {
-// echo " * Skipping: database table ".$CC_CONFIG['sessTable']."\n";
-//}
-//
-//if (camp_db_table_exists($CC_CONFIG['subjTable'])) {
-// echo " * Removing database table ".$CC_CONFIG['subjTable']."...";
-// $CC_DBC->dropSequence($CC_CONFIG['subjTable']."_id");
-//
-// $sql = "DROP TABLE ".$CC_CONFIG['subjTable']." CASCADE";
-// camp_install_query($sql, false);
-//
-// echo "done.\n";
-//} else {
-// echo " * Skipping: database table ".$CC_CONFIG['subjTable']."\n";
-//}
-//
-//if (camp_db_table_exists($CC_CONFIG['smembTable'])) {
-// echo " * Removing database table ".$CC_CONFIG['smembTable']."...";
-// $sql = "DROP TABLE ".$CC_CONFIG['smembTable'];
-// camp_install_query($sql, false);
-//
-// $CC_DBC->dropSequence($CC_CONFIG['smembTable']."_id");
-// echo "done.\n";
-//} else {
-// echo " * Skipping: database table ".$CC_CONFIG['smembTable']."\n";
-//}
-//
-//if (camp_db_table_exists($CC_CONFIG['scheduleTable'])) {
-// echo " * Removing database table ".$CC_CONFIG['scheduleTable']."...";
-// camp_install_query("DROP TABLE ".$CC_CONFIG['scheduleTable']);
-//} else {
-// echo " * Skipping: database table ".$CC_CONFIG['scheduleTable']."\n";
-//}
-//
-//if (camp_db_table_exists($CC_CONFIG['backupTable'])) {
-// echo " * Removing database table ".$CC_CONFIG['backupTable']."...";
-// camp_install_query("DROP TABLE ".$CC_CONFIG['backupTable']);
-//} else {
-// echo " * Skipping: database table ".$CC_CONFIG['backupTable']."\n";
-//}
//------------------------------------------------------------------------
// Disconnect from the database
@@ -233,20 +220,6 @@ camp_uninstall_delete_files($CC_CONFIG['accessDir']);
//echo " * Disconnecting from database...\n";
//$CC_DBC->disconnect();
-//------------------------------------------------------------------------
-// Delete the database
-// Note: we do all the table-dropping above because this command usually fails
-// because there are usually still connections to the database.
-//------------------------------------------------------------------------
-//echo " * Dropping the database ".$CC_CONFIG['dsn']['database']."...\n";
-//$command = "sudo -u postgres dropdb {$CC_CONFIG['dsn']['database']}";
-//@exec($command, $output, $results);
-//if ($results == 0) {
-// echo " * Database '{$CC_CONFIG['dsn']['database']}' deleted.\n";
-//} else {
-// echo " * Could not delete database '{$CC_CONFIG['dsn']['database']}'.\n";
-//}
-
//------------------------------------------------------------------------
// Delete the user
//------------------------------------------------------------------------
diff --git a/htmlUI/install/uninstall.php b/install/uninstall_twitter_plugin.php
similarity index 100%
rename from htmlUI/install/uninstall.php
rename to install/uninstall_twitter_plugin.php
diff --git a/utils/restore.php b/utils/restore.php
index c9e3cc9e1..0e70ee7e5 100644
--- a/utils/restore.php
+++ b/utils/restore.php
@@ -196,7 +196,7 @@ foreach ($subjects as $login => $subj) {
if (VERBOSE) {
echo " adding user $login ...\n";
}
- $uid = $bs->addSubj($login, $subj['pass'], $subj['realname'], TRUE);
+ $uid = BasicStor::addSubj($login, $subj['pass'], $subj['realname'], TRUE);
ls_restore_checkErr($uid, __LINE__);
}
break;
@@ -212,7 +212,7 @@ foreach ($subjects as $login => $subj) {
if (VERBOSE) {
echo " adding group $login ...\n";
}
- $uid = $bs->addSubj($login, NULL);
+ $uid = BasicStor::addSubj($login, NULL);
ls_restore_checkErr($uid, __LINE__);
// var_export($uid); echo " ";
break;