Skip to content
This repository
Browse code

Merge pull request #5 from mattclegg/master

stops the error 'ClassName' in where clause is ambiguous
  • Loading branch information...
commit 88a3b16973c17382e81a13261dae187ba60c7cc0 2 parents d46cd6e + 3f52cf6
unclecheese authored June 07, 2011
2  code/MultipleFileUploadField.php
@@ -66,7 +66,7 @@ public function dosort() {
66 66
 	public function importlist(SS_HTTPRequest $request) {
67 67
 		if($id = $request->requestVar('FolderID')) {
68 68
 			if(is_numeric($id)) {
69  
-				$files = DataObject::get("File", "\"ParentID\" = $id AND \"ClassName\" != 'Folder'");
  69
+				$files = DataObject::get("File", "\"ParentID\" = $id AND \"File\".\"ClassName\" != 'Folder'");
70 70
 				if($files && $this->form) {
71 71
 					if($record = $this->form->getRecord()) {
72 72
 						if($relation_name = $this->getForeignRelationName($record)) {
2  code/UploadifyField.php
@@ -371,7 +371,7 @@ public function deletefile() {
371 371
 	public function importlist(SS_HTTPRequest $request) {
372 372
 		if($id = $request->requestVar('FolderID')) {
373 373
 			if(is_numeric($id)) {
374  
-				$files = DataObject::get("File", "\"ParentID\" = $id AND \"ClassName\" != 'Folder'");
  374
+				$files = DataObject::get("File", "\"ParentID\" = $id AND \"File\".\"ClassName\" != 'Folder'");
375 375
 				return $this->customise(array(
376 376
 					'Files' => $files
377 377
 				))->renderWith('ImportList');

0 notes on commit 88a3b16

Please sign in to comment.
Something went wrong with that request. Please try again.