@@ -37,7 +37,11 @@ public static function getAction($actionId, $itemid = '')
3737 $ text = get_by_key (self ::$ actions , $ actionId , 'Idle (unknown) ' );
3838
3939 if ($ actionId == 112 ) {
40- $ text .= ' ' . $ itemid ;
40+ if (isset ($ _SESSION ['itemaction ' ]) && trim ($ _SESSION ['itemaction ' ])) {
41+ $ text = $ _SESSION ['itemaction ' ];
42+ } else {
43+ $ text .= ' ' . $ itemid ;
44+ }
4145 }
4246
4347 return sprintf ($ text , $ itemid );
@@ -61,15 +65,19 @@ public function initAndWriteLog(
6165 $ itemname = ""
6266 ) {
6367 $ this ->entry ['msg ' ] = $ msg ; // writes testmessage to the object
64- $ this ->entry ['action ' ] = empty ($ action ) ? evo ()->getManagerApi ()->action : $ action ; // writes the action to the object
68+ $ this ->entry ['action ' ] = empty ($ action ) ? evo ()->getManagerApi ()->action : $ action ; // writes the action to the object
6569
6670 // User Credentials
6771 $ this ->entry ['internalKey ' ] = $ internalKey == "" ? evo ()->getLoginUserID () : $ internalKey ;
6872 $ this ->entry ['username ' ] = $ username == "" ? evo ()->getLoginUserName () : $ username ;
6973
70- $ this ->entry ['itemId ' ] = (empty ($ itemid ) && isset ($ _REQUEST ['id ' ])) ? (int )$ _REQUEST ['id ' ] : $ itemid ; // writes the id to the object
74+ $ this ->entry ['itemId ' ] = (empty ($ itemid ) && isset ($ _REQUEST ['id ' ])) ? (int )$ _REQUEST ['id ' ] : $ itemid ; // writes the id to the object
7175 if ($ this ->entry ['itemId ' ] == 0 ) {
72- $ this ->entry ['itemId ' ] = "- " ;
76+ if (isset ($ _REQUEST ['i ' ]) && (int )$ _REQUEST ['i ' ] > 0 ) {
77+ $ this ->entry ['itemId ' ] = (int )$ _REQUEST ['i ' ];
78+ } else {
79+ $ this ->entry ['itemId ' ] = "- " ;
80+ }
7381 } // to stop items having id 0
7482
7583 $ this ->entry ['itemName ' ] = ($ itemname == "" && isset ($ _SESSION ['itemname ' ])) ? $ _SESSION ['itemname ' ] : $ itemname ; // writes the id to the object
0 commit comments