diff options
Diffstat (limited to 'js/callbacks/checkrelated.php')
-rw-r--r-- | js/callbacks/checkrelated.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/js/callbacks/checkrelated.php b/js/callbacks/checkrelated.php new file mode 100644 index 0000000..3ce3ee8 --- /dev/null +++ b/js/callbacks/checkrelated.php @@ -0,0 +1,20 @@ +<?php +/* + Checks if a related tasks belongs to a different project. +*/ + +define('IN_FS', true); + +require_once('../../header.php'); + +$sql = $db->query('SELECT project_id + FROM {tasks} + WHERE task_id = ?', + array(Get::val('related_task'))); + +$relatedproject = $db->fetchOne($sql); + +if (Get::val('project') == $relatedproject || !$relatedproject) { + echo 'ok'; +} +?> |