mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 13:18:06 +00:00 
			
		
		
		
	fix sql in getEventsInInterval() if user is taken into account
This commit is contained in:
		
							parent
							
								
									f0e05463af
								
							
						
					
					
						commit
						38ea04c20d
					
				|  | @ -58,9 +58,9 @@ class SeedDMS_Calendar { | |||
| 	} /* }}} */ | ||||
| 
 | ||||
| 	public function getEventsInInterval($start, $stop) { /* {{{ */ | ||||
| 		$queryStr = "SELECT * FROM `tblEvents` WHERE ( `start` <= " . (int) $start . " AND `stop` >= " . (int) $start . " ) ". | ||||
| 		$queryStr = "SELECT * FROM `tblEvents` WHERE (( `start` <= " . (int) $start . " AND `stop` >= " . (int) $start . " ) ". | ||||
| 																					 "OR ( `start` <= " . (int) $stop . " AND `stop` >= " . (int) $stop . " ) ". | ||||
| 																					 "OR ( `start` >= " . (int) $start . " AND `stop` <= " . (int) $stop . " )"; | ||||
| 																					 "OR ( `start` >= " . (int) $start . " AND `stop` <= " . (int) $stop . " ))"; | ||||
| 		if(!$this->user->isAdmin()) { | ||||
| 			$queryStr .= " AND `userID`=".$this->user->getID(); | ||||
| 		} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann