Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(80) |
Jun
(166) |
Jul
(27) |
Aug
(346) |
Sep
(166) |
Oct
(83) |
Nov
(40) |
Dec
(117) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(134) |
Feb
(424) |
Mar
(128) |
Apr
(52) |
May
(11) |
Jun
(8) |
Jul
(46) |
Aug
(75) |
Sep
(14) |
Oct
(8) |
Nov
(4) |
Dec
(5) |
2004 |
Jan
(21) |
Feb
(204) |
Mar
(105) |
Apr
(65) |
May
(158) |
Jun
(85) |
Jul
(244) |
Aug
(236) |
Sep
(163) |
Oct
(101) |
Nov
(73) |
Dec
(121) |
2005 |
Jan
(84) |
Feb
(123) |
Mar
(72) |
Apr
(122) |
May
(110) |
Jun
(80) |
Jul
(138) |
Aug
(71) |
Sep
(42) |
Oct
(24) |
Nov
(14) |
Dec
(54) |
2006 |
Jan
(45) |
Feb
(32) |
Mar
(28) |
Apr
(96) |
May
(63) |
Jun
(2) |
Jul
(15) |
Aug
(33) |
Sep
(86) |
Oct
(31) |
Nov
(21) |
Dec
(47) |
2007 |
Jan
(2) |
Feb
(31) |
Mar
(98) |
Apr
(48) |
May
(60) |
Jun
(30) |
Jul
(161) |
Aug
(77) |
Sep
(67) |
Oct
(139) |
Nov
(113) |
Dec
(45) |
2008 |
Jan
(88) |
Feb
(125) |
Mar
(83) |
Apr
(68) |
May
(87) |
Jun
(77) |
Jul
(92) |
Aug
(57) |
Sep
(81) |
Oct
(136) |
Nov
(85) |
Dec
(92) |
2009 |
Jan
(47) |
Feb
(23) |
Mar
(41) |
Apr
(54) |
May
(46) |
Jun
(97) |
Jul
(133) |
Aug
(36) |
Sep
(65) |
Oct
(126) |
Nov
(70) |
Dec
(89) |
2010 |
Jan
(80) |
Feb
(77) |
Mar
(40) |
Apr
(66) |
May
(55) |
Jun
(15) |
Jul
(10) |
Aug
(67) |
Sep
(49) |
Oct
(28) |
Nov
(21) |
Dec
(57) |
2011 |
Jan
(26) |
Feb
(59) |
Mar
(25) |
Apr
(34) |
May
(8) |
Jun
(14) |
Jul
(81) |
Aug
(20) |
Sep
(59) |
Oct
(23) |
Nov
(17) |
Dec
(78) |
2012 |
Jan
(46) |
Feb
(29) |
Mar
(50) |
Apr
(36) |
May
(39) |
Jun
(66) |
Jul
(12) |
Aug
(50) |
Sep
(47) |
Oct
(40) |
Nov
(42) |
Dec
(26) |
2013 |
Jan
(39) |
Feb
(30) |
Mar
(26) |
Apr
(64) |
May
(43) |
Jun
(16) |
Jul
(30) |
Aug
(11) |
Sep
(110) |
Oct
(114) |
Nov
(19) |
Dec
(6) |
2014 |
Jan
(56) |
Feb
(37) |
Mar
(22) |
Apr
(16) |
May
(42) |
Jun
(28) |
Jul
(20) |
Aug
(50) |
Sep
(57) |
Oct
(40) |
Nov
(64) |
Dec
(30) |
2015 |
Jan
(29) |
Feb
(24) |
Mar
(12) |
Apr
(33) |
May
(10) |
Jun
(6) |
Jul
(7) |
Aug
(29) |
Sep
(20) |
Oct
(20) |
Nov
(13) |
Dec
(36) |
2016 |
Jan
(28) |
Feb
(16) |
Mar
(31) |
Apr
(21) |
May
(27) |
Jun
(53) |
Jul
(42) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
1
(2) |
2
(5) |
3
|
4
|
5
|
6
|
7
(1) |
8
(4) |
9
|
10
|
11
(2) |
12
|
13
|
14
(8) |
15
|
16
(1) |
17
|
18
(19) |
19
|
20
|
21
|
22
(7) |
23
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
|
|
From: <git@ma...> - 2010-09-08 21:43:05
|
The branch, master-1.2.x has been updated via da9a8eff173da0e206710c0ec1b5856418d8eec2 (commit) from bce955ce73a1cb6e5c63c8fe6d37ccd9c4b836dd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit da9a8eff173da0e206710c0ec1b5856418d8eec2 Author: Franck Villaume <franck.villaume@...> Date: Thu Jun 3 10:59:41 2010 +0200 Update project description, status, name of a specific project using SOAP API Fixes #11913 Signed-off-by: Robert Munteanu <robert.munteanu@...> ----------------------------------------------------------------------- Summary of changes: api/soap/mantisconnect.php | 16 +++++++ api/soap/mc_project_api.php | 79 +++++++++++++++++++++++++++++++++ tests/soap/AllTests.php | 2 + tests/soap/ProjectTest.php | 103 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 200 insertions(+), 0 deletions(-) create mode 100644 tests/soap/ProjectTest.php ----------------------------------------------------------------------- commit da9a8eff173da0e206710c0ec1b5856418d8eec2 Author: Franck Villaume <franck.villaume@...> Date: Thu Jun 3 10:59:41 2010 +0200 Update project description, status, name of a specific project using SOAP API Fixes #11913 Signed-off-by: Robert Munteanu <robert.munteanu@...> diff --git a/api/soap/mantisconnect.php b/api/soap/mantisconnect.php index b2a46ab..cbe655a 100644 --- a/api/soap/mantisconnect.php +++ b/api/soap/mantisconnect.php @@ -1001,6 +1001,22 @@ $l_oServer->register( 'mc_project_delete', 'Add a new project to the tracker (must have admin privileges)' ); +### mc_project_update +$l_oServer->register( 'mc_project_update', + array( + 'username' => 'xsd:string', + 'password' => 'xsd:string', + 'project_id' => 'xsd:integer', + 'project' => 'tns:ProjectData' + ), + array( + 'return' => 'xsd:boolean' + ), + $t_namespace, + false, false, false, + 'Update a specific project to the tracker (must have admin privileges)' +); + ### mc_project_get_issues $l_oServer->register( 'mc_project_get_issues', array( diff --git a/api/soap/mc_project_api.php b/api/soap/mc_project_api.php index 00a5d6b..42388ad 100644 --- a/api/soap/mc_project_api.php +++ b/api/soap/mc_project_api.php @@ -653,6 +653,7 @@ function mci_project_as_array_by_id( $p_project_id ) { } ### MantisConnect Administrative Webservices ### + /** * Add a new project. * @@ -726,6 +727,84 @@ function mc_project_add( $p_username, $p_password, $p_project ) { } /** + * Update a project + * + * @param string $p_username The name of the user + * @param string $p_password The password of the user + * @param integer $p_project_id A project's id + * @param Array $p_project A new ProjectData structure + * @return bool returns true or false depending on the success of the update action + */ +function mc_project_update( $p_username, $p_password, $p_project_id, $p_project ) { + $t_user_id = mci_check_login( $p_username, $p_password ); + if( $t_user_id === false ) { + return new soap_fault( 'Client', '', 'Access Denied', 'Username/password combination was incorrect' ); + } + + if( !mci_has_administrator_access( $t_user_id, $p_project_id ) ) { + return new soap_fault( 'Client', '', 'Access Denied', 'User does not have administrator access' ); + } + + if( !project_exists( $p_project_id ) ) { + return new soap_fault( 'Client', '', "Project '$p_project_id' does not exist." ); + } + + if ( !isset( $p_project['name'] ) ) { + return new soap_fault( 'Client', '', 'Missing Field', 'Required Field Missing' ); + } else { + $t_name = $p_project['name']; + } + + // check to make sure project doesn't already exist + if ( $t_name != project_get_name( $p_project_id ) ) { + if( !project_is_name_unique( $t_name ) ) { + return new soap_fault( 'Client', '', 'Project name exists', 'The project name you attempted to add exists already' ); + } + } + + if ( !isset( $p_project['description'] ) ) { + $t_description = project_get_field( $p_project_id, 'description' ); + } else { + $t_description = $p_project['description']; + } + + if ( !isset( $p_project['status'] ) ) { + $t_status = project_get_field( $p_project_id, 'status' ); + } else { + $t_status = $p_project['status']; + } + + if ( !isset( $p_project['view_state'] ) ) { + $t_view_state = project_get_field( $p_project_id, 'view_state' ); + } else { + $t_view_state = $p_project['view_state']; + } + + if ( !isset( $p_project['file_path'] ) ) { + $t_file_path = project_get_field( $p_project_id, 'file_path' ); + } else { + $t_file_path = $p_project['file_path']; + } + + if ( !isset( $p_project['enabled'] ) ) { + $t_enabled = project_get_field( $p_project_id, 'enabled' ); + } else { + $t_enabled = $p_project['enabled']; + } + + if ( !isset( $p_project['inherit_global'] ) ) { + $t_inherit_global = project_get_field( $p_project_id, 'inherit_global' ); + } else { + $t_inherit_global = $p_project['inherit_global']; + } + + $t_project_status = mci_get_project_status_id( $t_status ); + $t_project_view_state = mci_get_project_view_state_id( $t_view_state ); + + return project_update( $p_project_id, $t_name, $t_description, $t_project_status, $t_project_view_state, $t_file_path, $t_enabled, $t_inherit_global ); +} + +/** * Delete a project. * * @param string $p_username The name of the user trying to access the versions. diff --git a/tests/soap/AllTests.php b/tests/soap/AllTests.php index 59efc29..e20cc92 100644 --- a/tests/soap/AllTests.php +++ b/tests/soap/AllTests.php @@ -35,6 +35,7 @@ require_once 'AttachmentTest.php'; require_once 'LoginTest.php'; require_once 'CategoryTest.php'; require_once 'CompressionTest.php'; +require_once 'ProjectTest.php'; /** * @package Tests @@ -67,6 +68,7 @@ class Soap_AllTests extends PHPUnit_Framework_TestSuite $suite->addTestSuite('LoginTest'); $suite->addTestSuite('CategoryTest'); $suite->addTestSuite('CompressionTest'); + $suite->addTestSuite('ProjectTest'); return $suite; } diff --git a/tests/soap/ProjectTest.php b/tests/soap/ProjectTest.php new file mode 100644 index 0000000..aca4bf6 --- /dev/null +++ b/tests/soap/ProjectTest.php @@ -0,0 +1,103 @@ +<?php +# MantisBT - a php based bugtracking system + +# MantisBT is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# MantisBT is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with MantisBT. If not, see <http://www.gnu.org/licenses/>. + +/** + * @package Tests + * @subpackage UnitTests + * @copyright Copyright (C) 2010 MantisBT Team - mantisbt-dev@... + * @link http://www.mantisbt.org + */ + +require_once 'SoapBase.php'; + +/** + * Test fixture for project webservice methods. + */ +class ProjectTest extends SoapBase { + + private $projectIdToDelete = array(); + + /** + * A test case that tests the following: + * 1. Create a project. + * 2. Rename the project. + */ + public function testAddRenameDeleteProject() { + $projectName = $this->getOriginalNameProject(); + $projectNewName = $this->getNewNameProject(); + + $projectDataStructure = array(); + $projectDataStructure['name'] = $projectName; + $projectDataStructure['status'] = "development"; + $projectDataStructure['view_state'] = 10; + + $projectId = $this->client->mc_project_add( + $this->userName, + $this->password, + $projectDataStructure); + + $this->projectIdToDelete[] = $projectId; + + $projectsArray = $this->client->mc_projects_get_user_accessible( + $this->userName, + $this->password); + + foreach ( $projectsArray as $project ) { + if ( $project->id == $projectId ) { + $this->assertEquals($projectName, $project->name); + } + } + + $projectDataStructure['name'] = $projectNewName; + + $return_bool = $this->client->mc_project_update( + $this->userName, + $this->password, + $projectId, + $projectDataStructure); + + $projectsArray = $this->client->mc_projects_get_user_accessible( + $this->userName, + $this->password); + + foreach ( $projectsArray as $project ) { + if ( $project->id == $projectId ) { + $this->assertEquals($projectNewName, $project->name); + } + } + } + + protected function tearDown() { + + parent::tearDown(); + + foreach ( $this->projectIdToDelete as $projectId ) { + $this->client->mc_project_delete( + $this->userName, + $this->password, + $projectId); + } + } + + private function getOriginalNameProject() { + return 'my_project_name'; + } + + private function getNewNameProject() { + return 'my_new_project_name'; + } + +} ----------------------------------------------------------------------- -- Mantis Bug Tracker |
From: <git@ma...> - 2010-09-08 21:43:04
|
The branch, master has been updated via 25e8a5333aa673827e541f1ffbf8a20435e49234 (commit) from 34cdf3b833fef88c65faf06c246b14aa213edf0c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 25e8a5333aa673827e541f1ffbf8a20435e49234 Author: Franck Villaume <franck.villaume@...> Date: Thu Jun 3 10:59:41 2010 +0200 Update project description, status, name of a specific project using SOAP API Fixes #11913 Signed-off-by: Robert Munteanu <robert.munteanu@...> ----------------------------------------------------------------------- Summary of changes: api/soap/mantisconnect.php | 16 +++++++ api/soap/mc_project_api.php | 79 +++++++++++++++++++++++++++++++++ tests/soap/AllTests.php | 2 + tests/soap/ProjectTest.php | 103 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 200 insertions(+), 0 deletions(-) create mode 100644 tests/soap/ProjectTest.php ----------------------------------------------------------------------- commit 25e8a5333aa673827e541f1ffbf8a20435e49234 Author: Franck Villaume <franck.villaume@...> Date: Thu Jun 3 10:59:41 2010 +0200 Update project description, status, name of a specific project using SOAP API Fixes #11913 Signed-off-by: Robert Munteanu <robert.munteanu@...> diff --git a/api/soap/mantisconnect.php b/api/soap/mantisconnect.php index c5850ef..e133270 100644 --- a/api/soap/mantisconnect.php +++ b/api/soap/mantisconnect.php @@ -1001,6 +1001,22 @@ $l_oServer->register( 'mc_project_delete', 'Add a new project to the tracker (must have admin privileges)' ); +### mc_project_update +$l_oServer->register( 'mc_project_update', + array( + 'username' => 'xsd:string', + 'password' => 'xsd:string', + 'project_id' => 'xsd:integer', + 'project' => 'tns:ProjectData' + ), + array( + 'return' => 'xsd:boolean' + ), + $t_namespace, + false, false, false, + 'Update a specific project to the tracker (must have admin privileges)' +); + ### mc_project_get_issues $l_oServer->register( 'mc_project_get_issues', array( diff --git a/api/soap/mc_project_api.php b/api/soap/mc_project_api.php index 64bf50f..fdf78f8 100644 --- a/api/soap/mc_project_api.php +++ b/api/soap/mc_project_api.php @@ -653,6 +653,7 @@ function mci_project_as_array_by_id( $p_project_id ) { } ### MantisConnect Administrative Webservices ### + /** * Add a new project. * @@ -726,6 +727,84 @@ function mc_project_add( $p_username, $p_password, $p_project ) { } /** + * Update a project + * + * @param string $p_username The name of the user + * @param string $p_password The password of the user + * @param integer $p_project_id A project's id + * @param Array $p_project A new ProjectData structure + * @return bool returns true or false depending on the success of the update action + */ +function mc_project_update( $p_username, $p_password, $p_project_id, $p_project ) { + $t_user_id = mci_check_login( $p_username, $p_password ); + if( $t_user_id === false ) { + return new soap_fault( 'Client', '', 'Access Denied', 'Username/password combination was incorrect' ); + } + + if( !mci_has_administrator_access( $t_user_id, $p_project_id ) ) { + return new soap_fault( 'Client', '', 'Access Denied', 'User does not have administrator access' ); + } + + if( !project_exists( $p_project_id ) ) { + return new soap_fault( 'Client', '', "Project '$p_project_id' does not exist." ); + } + + if ( !isset( $p_project['name'] ) ) { + return new soap_fault( 'Client', '', 'Missing Field', 'Required Field Missing' ); + } else { + $t_name = $p_project['name']; + } + + // check to make sure project doesn't already exist + if ( $t_name != project_get_name( $p_project_id ) ) { + if( !project_is_name_unique( $t_name ) ) { + return new soap_fault( 'Client', '', 'Project name exists', 'The project name you attempted to add exists already' ); + } + } + + if ( !isset( $p_project['description'] ) ) { + $t_description = project_get_field( $p_project_id, 'description' ); + } else { + $t_description = $p_project['description']; + } + + if ( !isset( $p_project['status'] ) ) { + $t_status = project_get_field( $p_project_id, 'status' ); + } else { + $t_status = $p_project['status']; + } + + if ( !isset( $p_project['view_state'] ) ) { + $t_view_state = project_get_field( $p_project_id, 'view_state' ); + } else { + $t_view_state = $p_project['view_state']; + } + + if ( !isset( $p_project['file_path'] ) ) { + $t_file_path = project_get_field( $p_project_id, 'file_path' ); + } else { + $t_file_path = $p_project['file_path']; + } + + if ( !isset( $p_project['enabled'] ) ) { + $t_enabled = project_get_field( $p_project_id, 'enabled' ); + } else { + $t_enabled = $p_project['enabled']; + } + + if ( !isset( $p_project['inherit_global'] ) ) { + $t_inherit_global = project_get_field( $p_project_id, 'inherit_global' ); + } else { + $t_inherit_global = $p_project['inherit_global']; + } + + $t_project_status = mci_get_project_status_id( $t_status ); + $t_project_view_state = mci_get_project_view_state_id( $t_view_state ); + + return project_update( $p_project_id, $t_name, $t_description, $t_project_status, $t_project_view_state, $t_file_path, $t_enabled, $t_inherit_global ); +} + +/** * Delete a project. * * @param string $p_username The name of the user trying to access the versions. diff --git a/tests/soap/AllTests.php b/tests/soap/AllTests.php index d5e94c7..1bb68f3 100644 --- a/tests/soap/AllTests.php +++ b/tests/soap/AllTests.php @@ -35,6 +35,7 @@ require_once 'AttachmentTest.php'; require_once 'LoginTest.php'; require_once 'CategoryTest.php'; require_once 'CompressionTest.php'; +require_once 'ProjectTest.php'; /** * @package Tests @@ -67,6 +68,7 @@ class Soap_AllTests extends PHPUnit_Framework_TestSuite $suite->addTestSuite('LoginTest'); $suite->addTestSuite('CategoryTest'); $suite->addTestSuite('CompressionTest'); + $suite->addTestSuite('ProjectTest'); return $suite; } diff --git a/tests/soap/ProjectTest.php b/tests/soap/ProjectTest.php new file mode 100644 index 0000000..aca4bf6 --- /dev/null +++ b/tests/soap/ProjectTest.php @@ -0,0 +1,103 @@ +<?php +# MantisBT - a php based bugtracking system + +# MantisBT is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# MantisBT is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with MantisBT. If not, see <http://www.gnu.org/licenses/>. + +/** + * @package Tests + * @subpackage UnitTests + * @copyright Copyright (C) 2010 MantisBT Team - mantisbt-dev@... + * @link http://www.mantisbt.org + */ + +require_once 'SoapBase.php'; + +/** + * Test fixture for project webservice methods. + */ +class ProjectTest extends SoapBase { + + private $projectIdToDelete = array(); + + /** + * A test case that tests the following: + * 1. Create a project. + * 2. Rename the project. + */ + public function testAddRenameDeleteProject() { + $projectName = $this->getOriginalNameProject(); + $projectNewName = $this->getNewNameProject(); + + $projectDataStructure = array(); + $projectDataStructure['name'] = $projectName; + $projectDataStructure['status'] = "development"; + $projectDataStructure['view_state'] = 10; + + $projectId = $this->client->mc_project_add( + $this->userName, + $this->password, + $projectDataStructure); + + $this->projectIdToDelete[] = $projectId; + + $projectsArray = $this->client->mc_projects_get_user_accessible( + $this->userName, + $this->password); + + foreach ( $projectsArray as $project ) { + if ( $project->id == $projectId ) { + $this->assertEquals($projectName, $project->name); + } + } + + $projectDataStructure['name'] = $projectNewName; + + $return_bool = $this->client->mc_project_update( + $this->userName, + $this->password, + $projectId, + $projectDataStructure); + + $projectsArray = $this->client->mc_projects_get_user_accessible( + $this->userName, + $this->password); + + foreach ( $projectsArray as $project ) { + if ( $project->id == $projectId ) { + $this->assertEquals($projectNewName, $project->name); + } + } + } + + protected function tearDown() { + + parent::tearDown(); + + foreach ( $this->projectIdToDelete as $projectId ) { + $this->client->mc_project_delete( + $this->userName, + $this->password, + $projectId); + } + } + + private function getOriginalNameProject() { + return 'my_project_name'; + } + + private function getNewNameProject() { + return 'my_new_project_name'; + } + +} ----------------------------------------------------------------------- -- Mantis Bug Tracker |
From: <git@ma...> - 2010-09-08 18:31:06
|
The branch, master has been updated via 34cdf3b833fef88c65faf06c246b14aa213edf0c (commit) from 7debb53caa818be0a705e95e9aacf28a51948c2d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 34cdf3b833fef88c65faf06c246b14aa213edf0c Author: Daryn Warriner <daryn@...> Date: Wed Sep 8 13:30:04 2010 -0500 Fix #12327 - Enhance plugin filters to allow developers to specify the number of columns to use in the bug filter. Feature allowing plugin filters to specify the number of table columns to span in the bug filter. If a field requires more columns than are available in the row it is placed into the next row with available columns. If the plugin specifies a colspan greater than is configured the field is given a full row. If the plugin specifies a colspan of zero the field is assigned one column. If the plugin specifies a negative number it is converted to a positive number. ----------------------------------------------------------------------- Summary of changes: core/classes/MantisFilter.class.php | 5 ++ core/filter_api.php | 84 +++++++++++++++++++++++------------ 2 files changed, 61 insertions(+), 28 deletions(-) ----------------------------------------------------------------------- commit 34cdf3b833fef88c65faf06c246b14aa213edf0c Author: Daryn Warriner <daryn@...> Date: Wed Sep 8 13:30:04 2010 -0500 Fix #12327 - Enhance plugin filters to allow developers to specify the number of columns to use in the bug filter. Feature allowing plugin filters to specify the number of table columns to span in the bug filter. If a field requires more columns than are available in the row it is placed into the next row with available columns. If the plugin specifies a colspan greater than is configured the field is given a full row. If the plugin specifies a colspan of zero the field is assigned one column. If the plugin specifies a negative number it is converted to a positive number. diff --git a/core/classes/MantisFilter.class.php b/core/classes/MantisFilter.class.php index 88719ca..9163654 100644 --- a/core/classes/MantisFilter.class.php +++ b/core/classes/MantisFilter.class.php @@ -50,6 +50,11 @@ abstract class MantisFilter { public $size = null; /** + * Number of columns to use in the bug filter. + */ + public $colspan = 1; + + /** * Validate the filter input, returning true if input is * valid, or returning false if invalid. Invalid inputs will * be replaced with the filter's default value. diff --git a/core/filter_api.php b/core/filter_api.php index afd4dd1..922cc05 100644 --- a/core/filter_api.php +++ b/core/filter_api.php @@ -2990,16 +2990,53 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e # get plugin filters $t_plugin_filters = filter_get_plugin_filters(); - $t_column = 0; - $t_fields = ''; - $t_values = ''; + $t_plugin_filter_links = array(); + $t_plugin_filter_fields = array(); + $t_column_count_by_row = array(); + $t_row = 0; + foreach( $t_plugin_filters AS $t_field_name=>$t_filter_object ) { + # be sure the colspan is an integer + $t_colspan = (int) $t_filter_object->colspan; + + # prevent silliness. + if( $t_colspan < 0 ) { + $t_colspan = abs( $t_colspan ); + } else if( $t_colspan > $t_filter_cols ) { + $t_colspan = $t_filter_cols; + } else if( $t_colspan == 0 ) { + $t_colspan = 1; + } + # the row may already have elements in it. find out. + $t_columns_available = $t_filter_cols - $t_column_count_by_row[$t_row]; + if( $t_columns_available == 0 ) { + $t_row++; + } - # output a filter form element for each plugin filter - foreach( $t_plugin_filters as $t_field_name => $t_filter_object ) { - $t_fields .= '<td class="small-caption" valign="top"> <a href="' . $t_filters_url . $t_field_name . + # see if there is room in the current row + if( $t_columns_available >= $t_colspan ) { + $t_assigned_row = $t_row; + $t_column_count_by_row[$t_row] += $t_colspan; + } else { + $t_is_assigned = false; + # find a row with space + foreach( $t_column_count_by_row AS $t_row_num=>$t_col_count ) { + if( $t_colspan <= ( $t_filter_cols - $t_col_count ) ) { + $t_assigned_row = $t_row_num; + $t_column_count_by_row[$t_row_num] += $t_colspan; + $t_is_assigned = true; + break; + } + } + if( !$t_is_assigned ) { + # no space was found in existing rows. Add a new row for it. + $t_assigned_row = count( $t_plugin_filter_links ); + $t_column_count_by_row[$t_assigned_row] = $t_colspan; + } + } + $t_colspan_attr = ( $t_colspan > 1 ? 'colspan="' . $t_colspan . '" ' : '' ); + $t_plugin_filter_links[$t_assigned_row][] = '<td ' . $t_colspan_attr . 'class="small-caption" valign="top"> <a href="' . $t_filters_url . $t_field_name . '" id="' . $t_field_name . '_filter">' . string_display_line( $t_filter_object->title ) . '</a> </td>'; - - $t_values .= '<td class="small-caption" valign="top" id="' . $t_field_name . '_filter_target"> '; + $t_values = '<td ' . $t_colspan_attr . 'class="small-caption" valign="top" id="' . $t_field_name . '_filter_target"> '; if ( !isset( $t_filter[ $t_field_name ] ) ) { $t_values .= lang_get( 'any' ); @@ -3046,28 +3083,19 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e $t_values .= '</td>'; - $t_column++; - - # wrap at the appropriate column - if ( $t_column >= $t_filter_cols ) { - echo '<tr class="', $t_trclass, '">', $t_fields, '</tr>'; - echo '<tr class="row-1">', $t_values, '</tr>'; - - $t_fields = ''; - $t_values = ''; - $t_column = 0; - } + $t_plugin_filter_fields[$t_assigned_row][] = $t_values; } - # output any remaining plugin filters - if ( $t_column > 0 ) { - if ( $t_column < $t_filter_cols ) { - $t_fields .= '<td class="small-caption" colspan="' . ( $t_filter_cols - $t_column ) . '"> </td>'; - $t_values .= '<td class="small-caption" colspan="' . ( $t_filter_cols - $t_column ) . '"> </td>'; + $t_row_count = count( $t_plugin_filter_links ); + for( $i=0; $i<$t_row_count; $i++ ) { + if( $t_column_count_by_row[$i] < $t_filter_cols ) { + $t_plugin_filter_links[$i][] = '<td class="small-caption" colspan="' . ( $t_filter_cols - $t_column_count_by_row[$i] ) . '"> </td>'; + $t_plugin_filter_fields[$i][] = '<td class="small-caption" colspan="' . ( $t_filter_cols - $t_column_count_by_row[$i] ) . '"> </td>'; } - - echo '<tr class="', $t_trclass, '">', $t_fields, '</tr>'; - echo '<tr class="row-1">', $t_values, '</tr>'; + $t_links_row = "\n\t\t" . join( "\n\t\t", $t_plugin_filter_links[$i] ); + $t_values_row = "\n\t\t" . join( "\n\t\t", $t_plugin_filter_fields[$i] ); + echo "\n\t" . '<tr class="', $t_trclass, '">', $t_links_row, "\n\t</tr>"; + echo "\n\t" . '<tr class="row-1">', $t_values_row, "\n\t</tr>\n\t"; } if( ON == config_get( 'filter_by_custom_fields' ) ) { ----------------------------------------------------------------------- -- Mantis Bug Tracker |
From: <git@ma...> - 2010-09-08 14:58:30
|
The branch, master has been updated via 7debb53caa818be0a705e95e9aacf28a51948c2d (commit) from 34a69a70f83fff916a9c517c9d94a27616f013d3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7debb53caa818be0a705e95e9aacf28a51948c2d Author: John Reese <jreese@...> Date: Wed Sep 8 10:57:12 2010 -0400 Tweaks for new publican documentation ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + docbook/Admin_Guide/publican.cfg | 2 ++ docbook/Developers_Guide/publican.cfg | 2 ++ 3 files changed, 5 insertions(+), 0 deletions(-) ----------------------------------------------------------------------- commit 7debb53caa818be0a705e95e9aacf28a51948c2d Author: John Reese <jreese@...> Date: Wed Sep 8 10:57:12 2010 -0400 Tweaks for new publican documentation diff --git a/.gitignore b/.gitignore index 9f6d704..246d60a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ mantis_offline.php docbook/*/*/builddate docbook/*/*/build docbook/*/*/install +docbook/*/tmp # Build output build/ diff --git a/docbook/Admin_Guide/publican.cfg b/docbook/Admin_Guide/publican.cfg index e2a27b0..519d156 100644 --- a/docbook/Admin_Guide/publican.cfg +++ b/docbook/Admin_Guide/publican.cfg @@ -4,4 +4,6 @@ xml_lang: en-US type: Book brand: common +doc_url: http://www.mantisbt.org +prod_url: http://www.mantisbt.org diff --git a/docbook/Developers_Guide/publican.cfg b/docbook/Developers_Guide/publican.cfg index 0937e87..4c7c377 100644 --- a/docbook/Developers_Guide/publican.cfg +++ b/docbook/Developers_Guide/publican.cfg @@ -4,4 +4,6 @@ xml_lang: en-US type: Book brand: common +doc_url: http://www.mantisbt.org +prod_url: http://www.mantisbt.org ----------------------------------------------------------------------- -- Mantis Bug Tracker |