Changeset 224
- Timestamp:
- Jan 9, 2007 12:47:08 AM (17 years ago)
- Location:
- trunk/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Auth_SQL.inc.php
r203 r224 529 529 530 530 // Test login with information stored in session. Skip IP matching for users from trusted networks. 531 if (isset($_SESSION['_auth_sql'][$this->_ns] )531 if (isset($_SESSION['_auth_sql'][$this->_ns]['authenticated']) 532 532 && true === $_SESSION['_auth_sql'][$this->_ns]['authenticated'] 533 533 && !empty($_SESSION['_auth_sql'][$this->_ns]['username']) … … 552 552 $app->logMsg(sprintf('User update failed. Record not found for user %s (%s).', $this->get('user_id'), $this->get('username')), LOG_NOTICE, __FILE__, __LINE__); 553 553 } 554 } else if (isset($_SESSION['_auth_sql'][$this->_ns] ) && true === $_SESSION['_auth_sql'][$this->_ns]['authenticated']) {554 } else if (isset($_SESSION['_auth_sql'][$this->_ns]['authenticated']) && true === $_SESSION['_auth_sql'][$this->_ns]['authenticated']) { 555 555 // User is authenticated, but login has expired. 556 556 if (strtotime($_SESSION['_auth_sql'][$this->_ns]['last_access_datetime']) > time() - 43200) { -
trunk/lib/ImageThumb.inc.php
r204 r224 521 521 // Create source image data in memory. 522 522 switch ($source_image_type) { 523 case IMAGETYPE_JPEG : 523 case IMAGETYPE_JPEG : // = 2 524 524 $source_image_resource = imagecreatefromjpeg($source_file); 525 525 break; 526 case IMAGETYPE_PNG : 526 case IMAGETYPE_PNG : // = 3 527 527 $source_image_resource = imagecreatefrompng($source_file); 528 528 break; 529 case IMAGETYPE_GIF : 529 case IMAGETYPE_GIF : // = 1 530 530 $source_image_resource = imagecreatefromgif($source_file); 531 531 break; 532 case IMAGETYPE_WBMP : 532 case IMAGETYPE_WBMP : // = 15 533 533 $source_image_resource = imagecreatefromwbmp($source_file); 534 case IMAGETYPE_SWF : // = 4 535 case IMAGETYPE_PSD : // = 5 536 case IMAGETYPE_BMP : // = 6 537 case IMAGETYPE_TIFF_II : // = 7 538 case IMAGETYPE_TIFF_MM : // = 8 539 case IMAGETYPE_JPC : // = 9 540 case IMAGETYPE_JP2 : // = 10 541 case IMAGETYPE_JPX : // = 11 542 case IMAGETYPE_JB2 : // = 12 543 case IMAGETYPE_SWC : // = 13 544 case IMAGETYPE_IFF : // = 14 545 case IMAGETYPE_XBM : // = 16 534 546 default : 535 547 $app->logMsg(sprintf('Source image type %s not supported.', $source_image_type), LOG_WARNING, __FILE__, __LINE__); -
trunk/lib/Utilities.inc.php
r219 r224 524 524 * @return string Comma list of array values. 525 525 */ 526 function escapedList($in )526 function escapedList($in, $separator="', '") 527 527 { 528 528 $db =& DB::getInstance(); 529 529 530 530 if (is_array($in) && !empty($in)) { 531 return "'" . join("', '", array_map(array($db, 'escapeString'), $in)) . "'";531 return join($separator, array_map(array($db, 'escapeString'), $in)); 532 532 } else { 533 533 return $db->escapeString($in); … … 549 549 // Translate the human string date into SQL-safe date format. 550 550 if (empty($date) || strpos($date, '0000-00-00') !== false || strtotime($date) === -1 || strtotime($date) === false) { 551 return '0000-00-00'; 551 // Return a string of zero time, formatted the same as $format. 552 return strtr($format, array( 553 'Y' => '0000', 554 'm' => '00', 555 'd' => '00', 556 'H' => '00', 557 'i' => '00', 558 's' => '00', 559 )); 552 560 } else { 553 561 return date($format, strtotime($date));
Note: See TracChangeset
for help on using the changeset viewer.