Merge branch 'master' of dev.sourcefabric.org:campcaster

This commit is contained in:
naomiaro 2010-10-18 07:05:32 -04:00
commit 46c8b0d0a8
8 changed files with 176 additions and 418 deletions

View File

@ -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
*

View File

@ -1,65 +0,0 @@
<?php
/**
* StorageServer configuration file
*
* configuration structure:
*
* <dl>
* <dt>dsn<dd> datasource setting
* <dt>tblNamePrefix <dd>prefix for table names in the database
* <dt>authCookieName <dd>secret token cookie name
* <dt>StationPrefsGr <dd>name of station preferences group
* <dt>AllGr <dd>name of 'all users' group
* <dt>storageDir <dd>main directory for storing binary media files
* <dt>bufferDir <dd>directory for temporary files
* <dt>transDir <dd>directory for incomplete transferred files
* <dt>accessDir <dd>directory for symlinks to accessed files
* <dt>isArchive <dd>local/central flag
* <dt>validate <dd>enable/disable validator
* <dt>storageUrlPath<dd>path-URL-part of storageServer base dir
* <dt>storageXMLRPC<dd>XMLRPC server script address relative to storageUrlPath
* <dt>storageUrlHost, storageUrlPort<dd>host and port of storageServer
* <dt>archiveUrlPath<dd>path-URL-part of archiveServer base dir
* <dt>archiveXMLRPC<dd>XMLRPC server script address relative to archiveUrlPath
* <dt>archiveUrlHost, archiveUrlPort<dd>host and port of archiveServer
* <dt>archiveAccountLogin, archiveAccountPass <dd>account info
* for login to archive
* </dl>
*/
$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,
);
?>

View File

@ -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;

View File

@ -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']);
//------------------------------------------------------------------------

View File

@ -1,7 +1,6 @@
<?php
/**
* @package Campcaster
* @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt
*/
@ -39,21 +38,7 @@ function camp_uninstall_delete_files($p_path)
}
rmdir($p_path);
}
// list($dirList,$fileList) = File_Find::maptree($p_path);
// foreach ($fileList as $filepath) {
// echo " * Removing file $filepath...";
// @unlink($filepath);
// echo "done.\n";
// }
// foreach ($dirList as $dirpath) {
// echo " * Removing directory $dirpath...";
// @rmdir($dirpath);
// echo "done.\n";
// }
}
// echo " * Removing $p_path...";
// @rmdir($p_path);
// echo "done.\n";
}
//------------------------------------------------------------------------
@ -64,11 +49,139 @@ function camp_uninstall_delete_files($p_path)
//------------------------------------------------------------------------
echo " * Dropping the database '".$CC_CONFIG['dsn']['database']."'...\n";
$command = "sudo -u postgres dropdb {$CC_CONFIG['dsn']['database']} 2> /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
//------------------------------------------------------------------------

View File

@ -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;