Port of patch #16 to 2.0
This commit is contained in:
@ -52,7 +52,7 @@ function serendipity_isActiveFile($file) {
|
||||
* @param boolean Apply strict directory checks, or include subdirectories?
|
||||
* @return array Resultset of images
|
||||
*/
|
||||
function serendipity_fetchImagesFromDatabase($start=0, $limit=0, &$total, $order = false, $ordermode = false, $directory = '', $filename = '', $keywords = '', $filter = array(), $strict_directory = false) {
|
||||
function serendipity_fetchImagesFromDatabase($start=0, $limit=0, &$total=null, $order = false, $ordermode = false, $directory = '', $filename = '', $keywords = '', $filter = array(), $strict_directory = false) {
|
||||
global $serendipity;
|
||||
|
||||
$cond = array(
|
||||
@ -1132,7 +1132,7 @@ function serendipity_syncThumbs($deleteThumbs = false) {
|
||||
if ($tdim['noimage']) {
|
||||
// Delete it so it can be regenerated
|
||||
if (@unlink($fthumb)) {
|
||||
printf(DELETE_THUMBNAIL . "<br />\n", $sthumb);
|
||||
printf(DELETE_THUMBNAIL . "<br />\n", $sThumb);
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
@ -1144,7 +1144,7 @@ function serendipity_syncThumbs($deleteThumbs = false) {
|
||||
// This thumbnail is incorrect; delete it so
|
||||
// it can be regenerated
|
||||
if (@unlink($fthumb)) {
|
||||
printf(DELETE_THUMBNAIL . "<br />\n", $sthumb);
|
||||
printf(DELETE_THUMBNAIL . "<br />\n", $sThumb);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
@ -2257,7 +2257,6 @@ function serendipity_showPropertyForm(&$new_media, $keywordsPerBlock = 3, $is_ed
|
||||
$dprops = explode(';', $serendipity['mediaProperties']);
|
||||
$keywords = explode(';', $serendipity['mediaKeywords']);
|
||||
|
||||
$now = serendipity_serverOffsetHour();
|
||||
$show = array();
|
||||
foreach($new_media AS $idx => $media) {
|
||||
$props =& serendipity_fetchMediaProperties($media['image_id']);
|
||||
@ -2287,7 +2286,7 @@ function serendipity_showPropertyForm(&$new_media, $keywordsPerBlock = 3, $is_ed
|
||||
return serendipity_showMedia(
|
||||
$show,
|
||||
$mirror,
|
||||
$url,
|
||||
'',
|
||||
false,
|
||||
1,
|
||||
false,
|
||||
@ -2399,7 +2398,7 @@ function serendipity_parseMediaProperties(&$dprops, &$keywords, &$media, &$props
|
||||
if (empty($val)) {
|
||||
switch($parts[0]) {
|
||||
case 'DATE':
|
||||
$default_iptc_val = $now;
|
||||
$default_iptc_val = serendipity_serverOffsetHour();
|
||||
|
||||
case 'RUN_LENGTH':
|
||||
if (!isset($default_iptc_val)) {
|
||||
@ -2533,7 +2532,7 @@ function serendipity_mediaTypeCast($key, $val, $invert = false) {
|
||||
* @return array array('image_id') holding the last created thumbnail for immediate processing
|
||||
*
|
||||
*/
|
||||
function serendipity_insertMediaProperty($property_group, $property_subgroup = '', $image_id, &$media, $use_cast = true) {
|
||||
function serendipity_insertMediaProperty($property_group, $property_subgroup, $image_id, &$media, $use_cast = true) {
|
||||
global $serendipity;
|
||||
|
||||
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}mediaproperties
|
||||
@ -2562,7 +2561,7 @@ function serendipity_insertMediaProperty($property_group, $property_subgroup = '
|
||||
VALUES (%d, '%s', '%s', '%s', '%s')",
|
||||
$image_id,
|
||||
serendipity_db_escape_string($property_group),
|
||||
serendipity_db_escape_string($useproperty_subgroup),
|
||||
serendipity_db_escape_string($use_property_subgroup),
|
||||
serendipity_db_escape_string($insert_key),
|
||||
serendipity_db_escape_string($insert_val));
|
||||
serendipity_db_query($q);
|
||||
@ -2850,7 +2849,7 @@ function serendipity_showMedia(&$file, &$paths, $url = '', $manage = false, $lin
|
||||
'nextIMG' => serendipity_getTemplateFile('admin/img/next.png'),
|
||||
'token' => serendipity_setFormToken(),
|
||||
'form_hidden' => $form_hidden,
|
||||
'blimit_path' => basename($limit_path),
|
||||
'blimit_path' => empty($smarty_vars['limit_path']) ? '':basename($smarty_vars['limit_path']),
|
||||
'only_path' => $serendipity['GET']['only_path'],
|
||||
'only_filename' => $serendipity['GET']['only_filename'],
|
||||
'sortorder' => $serendipity['GET']['sortorder'],
|
||||
|
Reference in New Issue
Block a user