forked from bitweaver/tasks
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdisplay_property.php
55 lines (50 loc) · 1.7 KB
/
display_property.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* $Header: /cvsroot/bitweaver/_bit_tasks/index.php,v 1.11 2010/02/08 21:27:26 wjames5 Exp $
*
* Copyright (c) 2006 bitweaver.org
* All Rights Reserved. See below for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
*
* @package tasks
* @subpackage functions
*/
/**
* required setup
*/
require_once( '../kernel/setup_inc.php' );
$gBitSystem->verifyPackage( 'tasks' );
include_once( TASKS_PKG_PATH.'Tasks.php' );
$userstate = $gBitUser->getPreference( 'task_process', 0 );
if ( $userstate ) {
$gTask = new Tasks( null, $userstate );
$gTask->load();
if( !empty( $_REQUEST['property_id'] ) ) {
$updatetask = array();
$updatetask['new_property'] = $_REQUEST['property_id'];
$gTask->store( $updatetask );
}
} else {
$gTask = new Tasks();
}
if ( $gTask->isValid() and $userstate <> 0 ) {
$gBitSmarty->assign_by_ref( 'userstate', $userstate );
$gBitSmarty->assign_by_ref( 'taskInfo', $gTask->mInfo );
$dept_tree = $gTask->listQueues();
$gBitSmarty->assign_by_ref( 'departments', $dept_tree['depts'] );
$gBitSmarty->assign_by_ref( 'tags', $dept_tree['tags'] );
$gBitSmarty->assign_by_ref( 'subtags', $dept_tree['subtags'] );
require_once( PROPERTY_PKG_PATH.'Property.php');
$gProperty = new Property( $gTask->mPropertyId, null );
$gProperty->load();
if ( $gProperty->isValid() ) {
$gProperty->loadXrefList();
$gBitSmarty->assign_by_ref( 'propertyInfo', $gProperty->mInfo );
}
$gBitSystem->setBrowserTitle("Task List Item");
$gBitSystem->display( 'bitpackage:tasks/show_task.tpl', NULL, array( 'display_mode' => 'display' ));
} else {
header ("location: ".TASKS_PKG_URL."view.php");
die;
}
?>