minor changes
This commit is contained in:
parent
b9d03c9037
commit
84ab36151f
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.2 $
|
Version : $Revision: 1.3 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/example/alibExPMatrix.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/example/alibExPMatrix.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -31,14 +31,20 @@ require_once "alib_h.php";
|
||||||
|
|
||||||
$sid=$_GET['subj'];
|
$sid=$_GET['subj'];
|
||||||
|
|
||||||
foreach($alib->getAllObjects() as $it){
|
$all = $alib->getAllObjects();
|
||||||
|
foreach($alib->getClasses() as $cl)
|
||||||
|
$all[] = array('name'=>$cl['cname']." (class)", 'id'=>$cl['id']);
|
||||||
|
|
||||||
|
foreach($all as $it){
|
||||||
$aa=array();
|
$aa=array();
|
||||||
foreach($alib->getAllActions() as $a){
|
foreach($alib->getAllActions() as $a){
|
||||||
$aa[$a]=$alib->checkPerm($sid, $a, $it['id']);
|
$aa[$a] = $r = $alib->checkPerm($sid, $a, $it['id']);
|
||||||
# if(PEAR::isError($aa[$a])){ errCallback($aa[$a]); }
|
if(PEAR::isError($r)){
|
||||||
|
echo $r->getMessage()." ".$r->getUserInfo()."\n"; exit; }
|
||||||
}
|
}
|
||||||
$m[]=array($it['name'], $aa);
|
$m[]=array($it['name'], $aa);
|
||||||
}
|
}
|
||||||
|
#echo"<pre>\n"; var_dump($m);
|
||||||
$u=$alib->getSubjName($sid);
|
$u=$alib->getSubjName($sid);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -58,7 +64,7 @@ $u=$alib->getSubjName($sid);
|
||||||
<tr class="<?php echo(($o=1-$o) ? 'odd' : 'ev')?>">
|
<tr class="<?php echo(($o=1-$o) ? 'odd' : 'ev')?>">
|
||||||
<td><?php echo$obj?></td>
|
<td><?php echo$obj?></td>
|
||||||
<?php foreach($aa as $pr){?>
|
<?php foreach($aa as $pr){?>
|
||||||
<td><?php echo($pr ? 'Y' : '-')?></td>
|
<td><?php echo($pr===TRUE ? 'Y' : '-')?></td>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.2 $
|
Version : $Revision: 1.3 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/example/alibExTree.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/example/alibExTree.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -46,6 +46,7 @@ $d = array(
|
||||||
);
|
);
|
||||||
$d['msg'] = preg_replace(array("|\n|","|'|"), array("\\n","\\'"), $_SESSION['alertMsg']); unset($_SESSION['alertMsg']);
|
$d['msg'] = preg_replace(array("|\n|","|'|"), array("\\n","\\'"), $_SESSION['alertMsg']); unset($_SESSION['alertMsg']);
|
||||||
|
|
||||||
|
#echo"<pre>\n"; var_dump($d['path']);exit;
|
||||||
require_once "alib_f.php";
|
require_once "alib_f.php";
|
||||||
// template follows:
|
// template follows:
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.2 $
|
Version : $Revision: 1.3 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/example/alibHttp.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/example/alibHttp.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -96,7 +96,7 @@ switch($act)
|
||||||
break;
|
break;
|
||||||
case"removePerm";
|
case"removePerm";
|
||||||
$a = $alib->isClass($_REQUEST['oid']) ? 'classes':'editPerms';
|
$a = $alib->isClass($_REQUEST['oid']) ? 'classes':'editPerms';
|
||||||
$oid = $alib->isClass($_REQUEST['oid']) ? '':$_REQUEST['oid'];
|
$oid = $alib->isClass($_REQUEST['oid']) ? NULL:$_REQUEST['oid'];
|
||||||
if($alib->checkPerm($userid, $a, $oid))
|
if($alib->checkPerm($userid, $a, $oid))
|
||||||
$alib->removePerm($_GET['permid']);
|
$alib->removePerm($_GET['permid']);
|
||||||
else $_SESSION['alertMsg']='Access denied.';
|
else $_SESSION['alertMsg']='Access denied.';
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.1 $
|
Version : $Revision: 1.2 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/install/install.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/install/install.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -41,7 +41,6 @@ function errCallback($err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s<hr>\n");
|
|
||||||
$dbc = DB::connect($config['dsn'], TRUE);
|
$dbc = DB::connect($config['dsn'], TRUE);
|
||||||
if(PEAR::isError($dbc)){
|
if(PEAR::isError($dbc)){
|
||||||
echo "Database connection problem.\n";
|
echo "Database connection problem.\n";
|
||||||
|
@ -49,20 +48,35 @@ if(PEAR::isError($dbc)){
|
||||||
echo "Database access is defined by 'dsn' values in conf.php.\n";
|
echo "Database access is defined by 'dsn' values in conf.php.\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
#$dbc->setErrorHandling(PEAR_ERROR_PRINT, "%s<hr>\n");
|
||||||
|
$dbc->setErrorHandling(PEAR_ERROR_RETURN);
|
||||||
|
#$$dbc->setErrorHandling(PEAR_ERROR_DIE, "%s<hr>\n");
|
||||||
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||||
|
|
||||||
$alib =& new Alib($dbc, $config);
|
$alib =& new Alib($dbc, $config);
|
||||||
|
|
||||||
echo "Alib: Install ...\n";
|
echo "\n\n======\n".
|
||||||
|
"This is Alib standalone installation script, it is NOT needed to run ".
|
||||||
|
"for Livesupport.\nAlib is automatically used by storageServer without it.".
|
||||||
|
"\n======\n\n";
|
||||||
|
|
||||||
|
echo "Alib: uninstall ...\n";
|
||||||
|
$alib->uninstall();
|
||||||
|
|
||||||
|
$dbc->setErrorHandling(PEAR_ERROR_DIE, "%s<hr>\n");
|
||||||
|
echo "Alib: install ...\n";
|
||||||
$alib->install();
|
$alib->install();
|
||||||
|
|
||||||
|
#$alib->testData(); echo $alib->dumpTree(); exit;
|
||||||
|
|
||||||
echo " Testing ...\n";
|
echo " Testing ...\n";
|
||||||
$alib->test();
|
$r = $alib->test();
|
||||||
|
if($dbc->isError($r)) if($dbc->isError($r)){ echo $r->getMessage()."\n".$r->getUserInfo()."\n"; exit; }
|
||||||
$log = $alib->test_log;
|
$log = $alib->test_log;
|
||||||
echo " TESTS:\n$log\n---\n";
|
echo " TESTS:\n$log\n---\n";
|
||||||
|
|
||||||
echo " Reinstall + testdata insert ...\n";
|
echo " clean up + testdata insert ...\n";
|
||||||
$alib->reinstall();
|
$alib->deleteData();
|
||||||
$alib->testData();
|
$alib->testData();
|
||||||
|
|
||||||
echo " TREE DUMP:\n";
|
echo " TREE DUMP:\n";
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.1 $
|
Version : $Revision: 1.2 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/install/uninstall.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/install/uninstall.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -41,7 +41,6 @@ function errCallback($err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s<hr>\n");
|
|
||||||
$dbc = DB::connect($config['dsn'], TRUE);
|
$dbc = DB::connect($config['dsn'], TRUE);
|
||||||
if(PEAR::isError($dbc)){
|
if(PEAR::isError($dbc)){
|
||||||
echo "Database connection problem.\n";
|
echo "Database connection problem.\n";
|
||||||
|
@ -50,6 +49,8 @@ if(PEAR::isError($dbc)){
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s<hr>\n");
|
||||||
|
$dbc->setErrorHandling(PEAR_ERROR_RETURN);
|
||||||
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||||
$alib =& new Alib($dbc, $config);
|
$alib =& new Alib($dbc, $config);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue