mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-17 18:49:32 +00:00
no more php warnings if userid isn't set
This commit is contained in:
parent
a2206a6551
commit
eb909aa100
|
@ -46,6 +46,7 @@ if (isset($_GET["userid"]) && (!is_numeric($_GET["userid"]) || $_GET["userid"]<-
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("unknown_user"));
|
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("unknown_user"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$userid = 0;
|
||||||
if(isset($_GET["userid"]))
|
if(isset($_GET["userid"]))
|
||||||
$userid = $_GET["userid"];
|
$userid = $_GET["userid"];
|
||||||
|
|
||||||
|
@ -71,7 +72,7 @@ if ($document->getAccessMode($user) < M_READ) {
|
||||||
|
|
||||||
// delete notification
|
// delete notification
|
||||||
if ($action == "delnotify"){
|
if ($action == "delnotify"){
|
||||||
if (isset($userid)) {
|
if ($userid) {
|
||||||
$obj = $dms->getUser($userid);
|
$obj = $dms->getUser($userid);
|
||||||
$res = $document->removeNotify($userid, true);
|
$res = $document->removeNotify($userid, true);
|
||||||
} elseif (isset($groupid)) {
|
} elseif (isset($groupid)) {
|
||||||
|
@ -134,7 +135,7 @@ if ($action == "delnotify"){
|
||||||
// add notification
|
// add notification
|
||||||
else if ($action == "addnotify") {
|
else if ($action == "addnotify") {
|
||||||
|
|
||||||
if ($userid != -1) {
|
if ($userid) {
|
||||||
$res = $document->addNotify($userid, true);
|
$res = $document->addNotify($userid, true);
|
||||||
switch ($res) {
|
switch ($res) {
|
||||||
case -1:
|
case -1:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user