]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - matrix-gui-v2/matrix-gui-v2.git/commitdiff
Prevent apps/scripts that doesn't have a lock from creating a -1 lock file
authorFranklin Cooper Jr <fcooper@ti.com>
Thu, 27 Oct 2011 20:29:55 +0000 (15:29 -0500)
committerFranklin Cooper Jr <fcooper@ti.com>
Thu, 27 Oct 2011 20:29:55 +0000 (15:29 -0500)
run_script.php

index 3dc38ea72330042d2b4d5458d7e34a0215b360a7..96ec2843a597392dfb8c8e4e5eb7d9ddb50a2b5a 100644 (file)
@@ -35,8 +35,7 @@ for($i = 0;$i<count($var[$submenu]["apps"]);$i++)
 $lock_list = $found_app["Lock"];
 
 //Verify that there is a lock specified for this application
-//Not sure why for this the value could be -1 int or -1 the string
-if($lock_list != -1 && $lock_list != "-1")
+if($lock_list != -1 )
 {
        $lock_list_array = explode($lock_list," ");
        //Check if the lock list only has one lock. If so add to the array
@@ -55,6 +54,8 @@ if($lock_list != -1 && $lock_list != "-1")
 
        }
 }
+else
+       $lock_list = "";
 
 if($currently_locked==false)
 {