fixes #132 - thx laborix & @Fraenkiman!
This commit is contained in:
parent
e58efa9da0
commit
225e3b1b8d
39
CHANGELOG.md
39
CHANGELOG.md
@ -4,33 +4,36 @@
|
|||||||
- [README](https://github.com/flatpressblog/flatpress/blob/master/README.md): added "help and support" section
|
- [README](https://github.com/flatpressblog/flatpress/blob/master/README.md): added "help and support" section
|
||||||
|
|
||||||
## Plugins
|
## Plugins
|
||||||
- Gallery captions plugin added (see [#108](https://github.com/flatpressblog/flatpress/issues/108))
|
- Gallery captions plugin added ([#108](https://github.com/flatpressblog/flatpress/issues/108))
|
||||||
- PhotoSwipe plugin added (see [#109](https://github.com/flatpressblog/flatpress/issues/109))
|
- PhotoSwipe plugin added ([#109](https://github.com/flatpressblog/flatpress/issues/109))
|
||||||
- jQuery plugin: Updated jQuery (3.5.1 => 3.6) and jQueryUI (1.12.1 => 1.13.1)
|
- jQuery plugin: Updated jQuery (3.5.1 => 3.6) and jQueryUI (1.12.1 => 1.13.1)
|
||||||
- Media Manager plugin shows 50 items per page, not 10
|
- Media Manager plugin shows 50 items per page, not 10
|
||||||
|
- LastComments plugin will not even attempt to delete or rebuild LastComments caches if LastComments plugin is not available ([#43](https://github.com/flatpressblog/flatpress/issues/43))
|
||||||
|
|
||||||
## Themes
|
## Themes
|
||||||
- Leggero
|
- Leggero
|
||||||
- Fixed searchbox glitch in FlatMaas revisited style (see [#97](https://github.com/flatpressblog/flatpress/issues/97))
|
- Fixed searchbox glitch in FlatMaas revisited style ([#97](https://github.com/flatpressblog/flatpress/issues/97))
|
||||||
- Fixed missing bullets in preview (see [#98](https://github.com/flatpressblog/flatpress/issues/98))
|
- Fixed missing bullets in preview ([#98](https://github.com/flatpressblog/flatpress/issues/98))
|
||||||
- CSS of the Leggero style had some glitches on mobile devices
|
- CSS of the Leggero style had some glitches on mobile devices
|
||||||
- Invalid HTML output fixed (see [#106](https://github.com/flatpressblog/flatpress/issues/106))
|
- Invalid HTML output fixed ([#106](https://github.com/flatpressblog/flatpress/issues/106))
|
||||||
- Removed unneccessary external font resource (see [#112](https://github.com/flatpressblog/flatpress/issues/112))
|
- Removed unneccessary external font resource ([#112](https://github.com/flatpressblog/flatpress/issues/112))
|
||||||
- "Add comment" link has its own line (see [#135](https://github.com/flatpressblog/flatpress/issues/135))
|
- "Add comment" link has its own line ([#135](https://github.com/flatpressblog/flatpress/issues/135))
|
||||||
- Removed legacy/invalid CSS (see [#133](https://github.com/flatpressblog/flatpress/issues/133), [#134](https://github.com/flatpressblog/flatpress/issues/134))
|
- Removed legacy/invalid CSS ([#133](https://github.com/flatpressblog/flatpress/issues/133), [#134](https://github.com/flatpressblog/flatpress/issues/134))
|
||||||
- Fixed description of Leggero and Leggero v2 styles (see [#137](https://github.com/flatpressblog/flatpress/issues/137))
|
- Fixed description of Leggero and Leggero v2 styles ([#137](https://github.com/flatpressblog/flatpress/issues/137))
|
||||||
- Obsolete bullet points removed (see [#136](https://github.com/flatpressblog/flatpress/issues/136))
|
- Obsolete bullet points removed ([#136](https://github.com/flatpressblog/flatpress/issues/136))
|
||||||
- Updated preview image (see [#139](https://github.com/flatpressblog/flatpress/issues/139))
|
- Updated preview image ([#139](https://github.com/flatpressblog/flatpress/issues/139))
|
||||||
|
|
||||||
## Bugfixes
|
## Internationalization
|
||||||
- Comment Center config page threw errors (see [#90](https://github.com/flatpressblog/flatpress/issues/90))
|
|
||||||
- Fixed glitches in Spanish an Portuguese language files
|
- Fixed glitches in Spanish an Portuguese language files
|
||||||
|
- Fixed wrong pt-br country code ([#100](https://github.com/flatpressblog/flatpress/issues/100))
|
||||||
|
- Search page: Month names displayed in configured frontend language ([#132](https://github.com/flatpressblog/flatpress/issues/132))
|
||||||
|
|
||||||
|
## Other bugfixes
|
||||||
|
- Comment Center config page threw errors ([#90](https://github.com/flatpressblog/flatpress/issues/90))
|
||||||
- Plugin management page: Removed empty warning messages box
|
- Plugin management page: Removed empty warning messages box
|
||||||
- Fixed wrong pt-br country code (see [#100](https://github.com/flatpressblog/flatpress/issues/100))
|
- Fixed error at prev link on first / next link on last entry ([#95](https://github.com/flatpressblog/flatpress/issues/95))
|
||||||
- Fixed error at prev link on first / next link on last entry (see [#95](https://github.com/flatpressblog/flatpress/issues/95))
|
- Logout redirects to home page again ([#119](https://github.com/flatpressblog/flatpress/issues/119))
|
||||||
- LastComments plugin will not even attempt to delete or rebuild LastComments caches if LastComments plugin is not available (see [#43](https://github.com/flatpressblog/flatpress/issues/43))
|
- Fixed disappearing non-Latin characters in page title ([#49](https://github.com/flatpressblog/flatpress/issues/49) and [#91](https://github.com/flatpressblog/flatpress/issues/91))
|
||||||
- Logout redirects to home page again (see [#119](https://github.com/flatpressblog/flatpress/issues/119))
|
|
||||||
- Fixed disappearing non-Latin characters in page title (see [#49](https://github.com/flatpressblog/flatpress/issues/49) and [#91](https://github.com/flatpressblog/flatpress/issues/91))
|
|
||||||
|
|
||||||
## Security
|
## Security
|
||||||
- Fixed security issue reported by huntr.dev: Session cookie missed the "secure" flag
|
- Fixed security issue reported by huntr.dev: Session cookie missed the "secure" flag
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
|
*
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
* @subpackage plugins
|
* @subpackage plugins
|
||||||
*/
|
*/
|
||||||
@ -26,17 +28,19 @@
|
|||||||
* dropdown to include given date unless explicitly set (Monte)
|
* dropdown to include given date unless explicitly set (Monte)
|
||||||
* - 1.3.4 fix behaviour of 0000-00-00 00:00:00 dates to match that
|
* - 1.3.4 fix behaviour of 0000-00-00 00:00:00 dates to match that
|
||||||
* of 0000-00-00 dates (cybot, boots)
|
* of 0000-00-00 dates (cybot, boots)
|
||||||
|
*
|
||||||
* @link http://smarty.php.net/manual/en/language.function.html.select.date.php {html_select_date}
|
* @link http://smarty.php.net/manual/en/language.function.html.select.date.php {html_select_date}
|
||||||
* (Smarty online manual)
|
* (Smarty online manual)
|
||||||
* @version 1.3.4
|
* @version 1.3.4
|
||||||
* @author Andrei Zmievski
|
* @author Andrei Zmievski
|
||||||
* @author Monte Ohrt <monte at ohrt dot com>
|
* @author Monte Ohrt <monte at ohrt dot com>
|
||||||
* @param array
|
* @param
|
||||||
* @param Smarty
|
* array
|
||||||
|
* @param
|
||||||
|
* Smarty
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_function_html_select_date($params, &$smarty)
|
function smarty_function_html_select_date($params, &$smarty) {
|
||||||
{
|
|
||||||
require_once $smarty->_get_plugin_filepath('shared', 'escape_special_chars');
|
require_once $smarty->_get_plugin_filepath('shared', 'escape_special_chars');
|
||||||
require_once $smarty->_get_plugin_filepath('shared', 'make_timestamp');
|
require_once $smarty->_get_plugin_filepath('shared', 'make_timestamp');
|
||||||
require_once $smarty->_get_plugin_filepath('function', 'html_options');
|
require_once $smarty->_get_plugin_filepath('function', 'html_options');
|
||||||
@ -56,24 +60,32 @@ function smarty_function_html_select_date($params, &$smarty)
|
|||||||
$year_as_text = false;
|
$year_as_text = false;
|
||||||
/* Display years in reverse order? Ie. 2000,1999,.... */
|
/* Display years in reverse order? Ie. 2000,1999,.... */
|
||||||
$reverse_years = false;
|
$reverse_years = false;
|
||||||
/* Should the select boxes be part of an array when returned from PHP?
|
/*
|
||||||
e.g. setting it to "birthday", would create "birthday[Day]",
|
* Should the select boxes be part of an array when returned from PHP?
|
||||||
"birthday[Month]" & "birthday[Year]". Can be combined with prefix */
|
* e.g. setting it to "birthday", would create "birthday[Day]",
|
||||||
|
* "birthday[Month]" & "birthday[Year]". Can be combined with prefix
|
||||||
|
*/
|
||||||
$field_array = null;
|
$field_array = null;
|
||||||
/* <select size>'s of the different <select> tags.
|
/*
|
||||||
If not set, uses default dropdown. */
|
* <select size>'s of the different <select> tags.
|
||||||
|
* If not set, uses default dropdown.
|
||||||
|
*/
|
||||||
$day_size = null;
|
$day_size = null;
|
||||||
$month_size = null;
|
$month_size = null;
|
||||||
$year_size = null;
|
$year_size = null;
|
||||||
/* Unparsed attributes common to *ALL* the <select>/<input> tags.
|
/*
|
||||||
An example might be in the template: all_extra ='class ="foo"'. */
|
* Unparsed attributes common to *ALL* the <select>/<input> tags.
|
||||||
|
* An example might be in the template: all_extra ='class ="foo"'.
|
||||||
|
*/
|
||||||
$all_extra = null;
|
$all_extra = null;
|
||||||
/* Separate attributes for the tags. */
|
/* Separate attributes for the tags. */
|
||||||
$day_extra = null;
|
$day_extra = null;
|
||||||
$month_extra = null;
|
$month_extra = null;
|
||||||
$year_extra = null;
|
$year_extra = null;
|
||||||
/* Order in which to display the fields.
|
/*
|
||||||
"D" -> day, "M" -> month, "Y" -> year. */
|
* Order in which to display the fields.
|
||||||
|
* "D" -> day, "M" -> month, "Y" -> year.
|
||||||
|
*/
|
||||||
$field_order = 'MDY';
|
$field_order = 'MDY';
|
||||||
/* String printed between the different fields. */
|
/* String printed between the different fields. */
|
||||||
$field_separator = "\n";
|
$field_separator = "\n";
|
||||||
@ -187,10 +199,37 @@ function smarty_function_html_select_date($params, &$smarty)
|
|||||||
$month_names [''] = $month_empty;
|
$month_names [''] = $month_empty;
|
||||||
$month_values [''] = '';
|
$month_values [''] = '';
|
||||||
}
|
}
|
||||||
for ($i = 1; $i <= 12; $i++) {
|
// Using the month_names from the FlatPress language files
|
||||||
$month_names[$i] = strftime($month_format, mktime(0, 0, 0, $i, 1, 2000));
|
global $lang;
|
||||||
$month_values[$i] = strftime($month_value_format, mktime(0, 0, 0, $i, 1, 2000));
|
$replace_month_names = array();
|
||||||
|
$replace_month_names [0] = '-';
|
||||||
|
$replace_month_value_format = array(
|
||||||
|
"00",
|
||||||
|
"01",
|
||||||
|
"02",
|
||||||
|
"03",
|
||||||
|
"04",
|
||||||
|
"05",
|
||||||
|
"06",
|
||||||
|
"07",
|
||||||
|
"08",
|
||||||
|
"09",
|
||||||
|
"10",
|
||||||
|
"11",
|
||||||
|
"12"
|
||||||
|
);
|
||||||
|
$fp_lang_months = array();
|
||||||
|
$fp_lang_months = $lang ['date'] ['month'];
|
||||||
|
$fplm = 0;
|
||||||
|
for($lm = 1; $lm <= 12; $lm++) {
|
||||||
|
$replace_month_names [$lm] = $fp_lang_months [$fplm];
|
||||||
|
$fplm++;
|
||||||
}
|
}
|
||||||
|
for($i = 1; $i <= 12; $i++) {
|
||||||
|
$month_names [$i] = $replace_month_names [$i];
|
||||||
|
$month_values [$i] = $replace_month_value_format [$i];
|
||||||
|
}
|
||||||
|
// /FlatPress change
|
||||||
|
|
||||||
$month_result .= '<select name=';
|
$month_result .= '<select name=';
|
||||||
if (null !== $field_array) {
|
if (null !== $field_array) {
|
||||||
@ -209,11 +248,12 @@ function smarty_function_html_select_date($params, &$smarty)
|
|||||||
}
|
}
|
||||||
$month_result .= $extra_attrs . '>' . "\n";
|
$month_result .= $extra_attrs . '>' . "\n";
|
||||||
|
|
||||||
$month_result .= smarty_function_html_options(array('output' => $month_names,
|
$month_result .= smarty_function_html_options(array(
|
||||||
|
'output' => $month_names,
|
||||||
'values' => $month_values,
|
'values' => $month_values,
|
||||||
'selected' => (int) $time [1] ? strftime($month_value_format, mktime(0, 0, 0, (int) $time [1], 1, 2000)) : '',
|
'selected' => (int) $time [1] ? strftime($month_value_format, mktime(0, 0, 0, (int) $time [1], 1, 2000)) : '',
|
||||||
'print_result' => false),
|
'print_result' => false
|
||||||
$smarty);
|
), $smarty);
|
||||||
$month_result .= '</select>';
|
$month_result .= '</select>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,11 +285,12 @@ function smarty_function_html_select_date($params, &$smarty)
|
|||||||
$day_result .= ' ' . $day_extra;
|
$day_result .= ' ' . $day_extra;
|
||||||
}
|
}
|
||||||
$day_result .= $extra_attrs . '>' . "\n";
|
$day_result .= $extra_attrs . '>' . "\n";
|
||||||
$day_result .= smarty_function_html_options(array('output' => $days,
|
$day_result .= smarty_function_html_options(array(
|
||||||
|
'output' => $days,
|
||||||
'values' => $day_values,
|
'values' => $day_values,
|
||||||
'selected' => $time [2],
|
'selected' => $time [2],
|
||||||
'print_result' => false),
|
'print_result' => false
|
||||||
$smarty);
|
), $smarty);
|
||||||
$day_result .= '</select>';
|
$day_result .= '</select>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,11 +333,12 @@ function smarty_function_html_select_date($params, &$smarty)
|
|||||||
$year_result .= ' ' . $year_extra;
|
$year_result .= ' ' . $year_extra;
|
||||||
}
|
}
|
||||||
$year_result .= $extra_attrs . '>' . "\n";
|
$year_result .= $extra_attrs . '>' . "\n";
|
||||||
$year_result .= smarty_function_html_options(array('output' => $years,
|
$year_result .= smarty_function_html_options(array(
|
||||||
|
'output' => $years,
|
||||||
'values' => $yearvals,
|
'values' => $yearvals,
|
||||||
'selected' => $time [0],
|
'selected' => $time [0],
|
||||||
'print_result' => false),
|
'print_result' => false
|
||||||
$smarty);
|
), $smarty);
|
||||||
$year_result .= '</select>';
|
$year_result .= '</select>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user