View Issue Details

IDProjectCategoryView StatusLast Update
0012366mantisbtotherpublic2014-12-08 02:08
Reportergthomas Assigned Todhx  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.0dev 
Target Version1.3.0-beta.1 
Summary0012366: core/file_api.php uses old-style db_get_table
Description

core/file_api.php uses old-style db_get_table('mantis_bug_file_table') which resolves to mantis_mantis_bug_file_table_table ...

Additional Information

patch attached

Tagspatch
Attached Files
file_api-db_get_table-git-3e17066.patch (730 bytes)   
diff --git a/core/file_api.php b/core/file_api.php
old mode 100644
new mode 100755
index a59e059..2c56893
--- a/core/file_api.php
+++ b/core/file_api.php
@@ -891,13 +891,13 @@ function file_get_content( $p_file_id, $p_type = 'bug' ) {
 	$query = '';
 	switch ( $p_type ) {
 		case 'bug':
-			$t_bug_file_table = db_get_table( 'mantis_bug_file_table' );
+			$t_bug_file_table = db_get_table( 'bug_file' );
 			$query = "SELECT *
 				FROM $t_bug_file_table
 				WHERE id=" . db_param();
 			break;
 		case 'doc':
-			$t_project_file_table = db_get_table( 'mantis_project_file_table' );
+			$t_project_file_table = db_get_table( 'project_file' );
 			$query = "SELECT *
 				FROM $t_project_file_table
 				WHERE id=" . db_param();

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 
child of 0010914 closeddhx Make db_get_table behave like plugin_table 

Activities

dhx

dhx

2010-09-17 20:56

reporter   ~0026748

Thanks for the patch, I have committed it.

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036491

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master d8a4c2ff

2010-09-17 20:50

gthomas

Committer: dhx


Details Diff
Fix 0012366: file_api uses old style calls to db_get_table

file_api uses some old style calls to db_get_table(..), similar to:
db_get_table( 'mantis_bug_file_table' )

Instead of the newer argument format:
db_get_table( 'bug_file' );

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
Affected Issues
0012366
mod - core/file_api.php Diff File