Changeset 7619
- Timestamp:
- Nov 4, 2010, 10:29:48 AM (13 years ago)
- Location:
- extensions/GMaps
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GMaps/gmaps_install.class.inc.php
r7616 r7619 233 233 $tablesCreate=array( 234 234 "CREATE TABLE `".$this->tables['cache']."` ( 235 `requestId` int(8) UNSIGNED NOT NULL default '0',235 `requestId` mediumint(8) UNSIGNED NOT NULL default '0', 236 236 `imageId` mediumint(8) NOT NULL, 237 237 `latitude` decimal(17,14) NOT NULL default '0', 238 238 `longitude` decimal(17,14) NOT NULL default '0', 239 239 PRIMARY KEY (`requestId`,`imageId`) 240 ) ;",240 )", 241 241 "CREATE TABLE `".$this->tables['cache_id']."` ( 242 242 `requestId` mediumint(8) UNSIGNED NOT NULL auto_increment, 243 243 `userId` smallint(5) NOT NULL, 244 `date` NOT NULL default '0000-00-00 00:00:00',244 `date` timestamp NOT NULL default '0000-00-00 00:00:00', 245 245 PRIMARY KEY (`requestId`) 246 246 )" 247 247 ); 248 248 249 $tablesUpdate=array(250 $this->tables['category_maps'] => array(251 'forceDisplay' => " ADD COLUMN `forceDisplay` CHAR(1) NOT NULL DEFAULT 'n' AFTER `title` ",252 )253 );254 255 249 $tablesDef = create_table_add_character_set($tablesCreate); 256 250 257 251 $tablef=new GPCTables(array($this->tables['cache'], $this->tables['cache_id'])); 258 252 $tablef->create($tablesCreate); 259 $tablef->updateTablesFields($tablesUpdate);260 253 261 254 unset($tablesCreate); 262 unset($tablesUpdate);263 255 } 264 256 -
extensions/GMaps/gmaps_root.class.inc.php
r7616 r7619 324 324 // new requestId 325 325 $sql="INSERT INTO ".$this->tables['cache_id']." 326 VALUES ('', '".$user['id']."', '".date('Y-m-d h:i:s')."');";326 VALUES ('', '".$user['id']."', '".date('Y-m-d H:i:s')."');"; 327 327 $result=pwg_query($sql); 328 328 if($result) … … 343 343 // new requestId 344 344 $sql="UPDATE ".$this->tables['cache_id']." 345 SET `date` = '".date('Y-m-d h:i:s')."'345 SET `date` = '".date('Y-m-d H:i:s')."' 346 346 WHERE requestId='$requestId';"; 347 347 pwg_query($sql); … … 356 356 protected function cleanCache($time=300) 357 357 { 358 $date=date('Y-m-d h:i:s', time()-$time);358 $date=date('Y-m-d H:i:s', time()-$time); 359 359 360 360 $sql="DELETE FROM ".$this->tables['cache']." pgc
Note: See TracChangeset
for help on using the changeset viewer.