Merge pull request #524 from DanielOaks/fix-notes-for-sqlite
Fix the notes extension to work properly on SQLite
This commit is contained in:
		
						commit
						3e0dc69766
					
				| @ -276,8 +276,7 @@ class Notes extends Extension { | |||||||
| 				(?, ?, ?, ?, now(), ?, ?, ?, ?, ?)",
 | 				(?, ?, ?, ?, now(), ?, ?, ?, ?, ?)",
 | ||||||
| 				array(1, $imageID, $user_id, $_SERVER['REMOTE_ADDR'], $noteX1, $noteY1, $noteHeight, $noteWidth, $noteText)); | 				array(1, $imageID, $user_id, $_SERVER['REMOTE_ADDR'], $noteX1, $noteY1, $noteHeight, $noteWidth, $noteText)); | ||||||
| 
 | 
 | ||||||
| 		$result = $database->get_row("SELECT LAST_INSERT_ID() AS noteID", array()); | 		$noteID = $database->get_last_insert_id('notes_id_seq'); | ||||||
| 		$noteID = $result["noteID"]; |  | ||||||
| 
 | 
 | ||||||
| 		log_info("notes", "Note added {$noteID} by {$user->name}"); | 		log_info("notes", "Note added {$noteID} by {$user->name}"); | ||||||
| 
 | 
 | ||||||
| @ -304,9 +303,9 @@ class Notes extends Extension { | |||||||
| 				(?, ?, now())",
 | 				(?, ?, now())",
 | ||||||
| 				array($image_id, $user_id)); | 				array($image_id, $user_id)); | ||||||
| 
 | 
 | ||||||
| 		$result = $database->get_row("SELECT LAST_INSERT_ID() AS requestID", array()); | 		$resultID = $database->get_last_insert_id('note_request_id_seq'); | ||||||
| 
 | 
 | ||||||
| 		log_info("notes", "Note requested {$result["requestID"]} by {$user->name}"); | 		log_info("notes", "Note requested {$requestID} by {$user->name}"); | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	 | 	 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user