Since the task formatting code in task_project_list.php
essentially duplicated the functionality found in
task_list.php, I ripped that code out of
task_project_list.php and reworked task_list.php so
that it could be called in a number of different scenerios.
task_list.php can now be included in two ways.
The OLD way:
include_once("tasks/task_list.php");
This should behave the same as it used to. It will
display the list of tasks for that project in a Tasks box.
The NEW way:
$TASKS_FULL = 0;
$TASKS_ONLY = 0;
$WHERECLAUSE = "";
include_once("tasks/task_list.php");
task_list_setup( $taskid );
$TASKS_FULL is a boolean that determines the format of
the task list. 0 uses the old project list format. 1
uses the full task list format.
$TASKS_ONLY is a boolean that determines whether or not
the tasks are displayed in a Tasks box. 0 displays a
Tasks box. 1 does not.
$WHERECLAUSE is a string that gets appended to the
standard WHERE clause in the task query. This is how
the project list continues to hide completed tasks.
task_list_setup is the function used to initiate the
task list processing and return the final task list.
The $taskid parameter should be the same type of data
as the $_REQUEST['taskid'] that gets passed to
task_list.php when it's normally called.
By default, the two files should work as before in a
stock CVS install.
If you add:
define( 'PROJECT_TASKLIST_FULL', 1);
... to your config.php file, it will change the task
format on the home page to be the same as the standard
task format. ... Which was my original goal.
I've tried to update both files to contain all of the
changes in the current CVS since 1.71. If you need to
get these working in 1.71, comment out line 346 in
task_list.php. This is the db_free_result line, which
needs other code changes to work properly in 1.71.
Updated task_project_list.php
Logged In: YES
user_id=1271579
Removed a left-over line that shouldn't have been in the
updated version of task_list.php...
Updated task_list.php May 27, 2005
Logged In: YES
user_id=1271579
Updated task_list.php again. Turns out there was a minor
bug with the home page. If a task had subtasks that were
all completed, an extra set of ul/li end tags were thrown in
at the wrong point. This was fixed by adding the
$WHERECLAUSE to the end of the "parent" query.
Updated task_list.php June 1, 2005
Updated task_project_list.php June 1, 2005
Logged In: YES
user_id=1271579
Updated task_list.php to get rid of a "Wrong datatype"
warning for an in_array call and merged in recent CVS changes.
Updated task_project_list.php with recent CVS changes.