mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
- took over changes from stable version 2.0.2
This commit is contained in:
parent
92447e05ba
commit
b08d6861ed
|
@ -169,8 +169,10 @@ class UI {
|
|||
echo "<ul class=\"globalNav\">\n";
|
||||
echo "<li id=\"first\"><a href=\"../out/out.ViewFolder.php?folderid=".$settings->_rootFolderID."\">".getMLText("content")."</a></li>\n";
|
||||
if ($settings->_enableCalendar) echo "<li><a href=\"../out/out.Calendar.php?mode=".$settings->_calendarDefaultView."\">".getMLText("calendar")."</a></li>\n";
|
||||
echo "<li><a href=\"../out/out.MyDocuments.php?inProcess=1\">".getMLText("my_documents")."</a></li>\n";
|
||||
echo "<li><a href=\"../out/out.MyAccount.php\">".getMLText("my_account")."</a></li>\n";
|
||||
if ($user->getID() != $settings->_guestID) echo "<li><a href=\"../out/out.MyDocuments.php?inProcess=1\">".getMLText("my_documents")."</a></li>\n";
|
||||
|
||||
if ($user->getID() != $settings->_guestID) echo "<li><a href=\"../out/out.MyAccount.php\">".getMLText("my_account")."</a></li>\n";
|
||||
|
||||
if ($user->isAdmin()) echo "<li><a href=\"../out/out.AdminTools.php\">".getMLText("admin_tools")."</a></li>\n";
|
||||
echo "<li><a href=\"../out/out.Help.php\">".getMLText("help")."</a></li>\n";
|
||||
echo "<li id=\"search\">\n";
|
||||
|
@ -308,16 +310,17 @@ class UI {
|
|||
global $settings,$user;
|
||||
|
||||
echo "<ul class=\"localNav\">\n";
|
||||
echo "<li id=\"first\"><a href=\"../out/out.EditUserData.php\">".getMLText("edit_user_details")."</a></li>\n";
|
||||
if (!$settings->_disableSelfEdit) echo "<li id=\"first\"><a href=\"../out/out.EditUserData.php\">".getMLText("edit_user_details")."</a></li>\n";
|
||||
|
||||
if (!$user->isAdmin())
|
||||
echo "<li><a href=\"../out/out.UserDefaultKeywords.php\">".getMLText("edit_default_keywords")."</a></li>\n";
|
||||
|
||||
|
||||
echo "<li><a href=\"../out/out.ManageNotify.php\">".getMLText("edit_existing_notify")."</a></li>\n";
|
||||
|
||||
if ($settings->_enableUsersView){
|
||||
echo "<li><a href=\"../out/out.UsrView.php\">".getMLText("users")."</a></li>\n";
|
||||
echo "<li><a href=\"../out/out.GroupView.php\">".getMLText("groups")."</a></li>\n";
|
||||
}
|
||||
echo "<li><a href=\"../out/out.ManageNotify.php\">".getMLText("edit_existing_notify")."</a></li>\n";
|
||||
|
||||
echo "</ul>\n";
|
||||
return;
|
||||
|
@ -350,14 +353,16 @@ class UI {
|
|||
}
|
||||
|
||||
function calendarNavigationBar($d){
|
||||
|
||||
|
||||
global $settings,$user;
|
||||
|
||||
$ds="&day=".$d[0]."&month=".$d[1]."&year=".$d[2];
|
||||
|
||||
echo "<ul class=\"localNav\">\n";
|
||||
echo "<li><a href=\"../out/out.Calendar.php?mode=w".$ds."\">".getMLText("week_view")."</a></li>\n";
|
||||
echo "<li><a href=\"../out/out.Calendar.php?mode=m".$ds."\">".getMLText("month_view")."</a></li>\n";
|
||||
echo "<li><a href=\"../out/out.Calendar.php?mode=y".$ds."\">".getMLText("year_view")."</a></li>\n";
|
||||
echo "<li><a href=\"../out/out.AddEvent.php\">".getMLText("add_event")."</a></li>\n";
|
||||
if ($user->getID() != $settings->_guestID) echo "<li><a href=\"../out/out.AddEvent.php\">".getMLText("add_event")."</a></li>\n";
|
||||
echo "</ul>\n";
|
||||
return;
|
||||
|
||||
|
|
|
@ -280,10 +280,12 @@ class LetoDMS_User
|
|||
* muss dafür gesorgt werden, dass der Benutzer nirgendwo mehr auftaucht. D.h. auch die Tabellen tblACLs,
|
||||
* tblNotify, tblGroupMembers, tblFolders, tblDocuments und tblDocumentContent müssen berücksichtigt werden.
|
||||
*/
|
||||
function remove() {
|
||||
function remove( $assignTo=-1 ) {
|
||||
GLOBAL $db, $settings, $user;
|
||||
|
||||
if ($this->_id==$settings->_adminID) {
|
||||
|
||||
if ($assignTo==-1) $assignTo=$settings->_adminID;
|
||||
|
||||
if (($this->_id==$settings->_adminID) ||($this->_id==$settings->_guestID)) {
|
||||
return false; // Cannot delete administrator.
|
||||
}
|
||||
|
||||
|
@ -308,13 +310,13 @@ class LetoDMS_User
|
|||
if (!$db->getResult($queryStr)) return false;
|
||||
|
||||
//Der Besitz von Dokumenten oder Ordnern, deren bisheriger Besitzer der zu löschende war, geht an den Admin über
|
||||
$queryStr = "UPDATE tblFolders SET owner = " . $settings->_adminID . " WHERE owner = " . $this->_id;
|
||||
$queryStr = "UPDATE tblFolders SET owner = " . $assignTo . " WHERE owner = " . $this->_id;
|
||||
if (!$db->getResult($queryStr)) return false;
|
||||
|
||||
$queryStr = "UPDATE tblDocuments SET owner = " . $settings->_adminID . " WHERE owner = " . $this->_id;
|
||||
$queryStr = "UPDATE tblDocuments SET owner = " . $assignTo . " WHERE owner = " . $this->_id;
|
||||
if (!$db->getResult($queryStr)) return false;
|
||||
|
||||
$queryStr = "UPDATE tblDocumentContent SET createdBy = " . $settings->_adminID . " WHERE createdBy = " . $this->_id;
|
||||
$queryStr = "UPDATE tblDocumentContent SET createdBy = " . $assignTo . " WHERE createdBy = " . $this->_id;
|
||||
if (!$db->getResult($queryStr)) return false;
|
||||
|
||||
//Verweise auf Dokumente: Private löschen...
|
||||
|
@ -322,11 +324,11 @@ class LetoDMS_User
|
|||
if (!$db->getResult($queryStr)) return false;
|
||||
|
||||
//... und öffentliche an Admin übergeben
|
||||
$queryStr = "UPDATE tblDocumentLinks SET userID = " . $settings->_adminID . " WHERE userID = " . $this->_id;
|
||||
$queryStr = "UPDATE tblDocumentLinks SET userID = " . $assignTo . " WHERE userID = " . $this->_id;
|
||||
if (!$db->getResult($queryStr)) return false;
|
||||
|
||||
// set administrator for deleted user's attachments
|
||||
$queryStr = "UPDATE tblDocumentFiles SET userID = " . $settings->_adminID . " WHERE userID = " . $this->_id;
|
||||
$queryStr = "UPDATE tblDocumentFiles SET userID = " . $assignTo . " WHERE userID = " . $this->_id;
|
||||
if (!$db->getResult($queryStr)) return false;
|
||||
|
||||
//Evtl. von diesem Benutzer gelockte Dokumente werden freigegeben
|
||||
|
@ -363,7 +365,7 @@ class LetoDMS_User
|
|||
if (!$db->getResult($queryStr)) return false;
|
||||
|
||||
// set administrator for deleted user's events
|
||||
$queryStr = "UPDATE tblEvents SET userID = " . $settings->_adminID . " WHERE userID = " . $this->_id;
|
||||
$queryStr = "UPDATE tblEvents SET userID = " . $assignTo . " WHERE userID = " . $this->_id;
|
||||
if (!$db->getResult($queryStr)) return false;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user