diff --git a/inc/actions.php b/inc/actions.php
index 26bc18fa2eb594951597b3db3f10e0151c3d6559..463186e8243a19971b9182320dc3ee44476a7ba0 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -194,6 +194,8 @@ function act_auth($act){
  * @author Andreas Gohr <andi@splitbrain.org>
  */
 function act_edit($act){
+  global $ID;
+
   //check if locked by anyone - if not lock for my self
   $lockedby = checklock($ID);
   if($lockedby) return 'locked';