Allow recent entries plugin to fixat "current" category
This commit is contained in:
parent
6358660b77
commit
b90f9b4c77
@ -498,6 +498,8 @@ switch ($serendipity['GET']['adminAction']) {
|
||||
$new_dir = serendipity_uploadSecure($serendipity['POST']['parent'] . '/' . $serendipity['POST']['name'], true);
|
||||
$new_dir = str_replace(array('..', '//'), array('', '/'), $new_dir);
|
||||
|
||||
serendipity_plugin_api::hook_event('backend_directory_create', $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $new_dir);
|
||||
|
||||
/* TODO: check if directory already exist */
|
||||
if (@mkdir($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $new_dir)) {
|
||||
printf(DIRECTORY_CREATED, $serendipity['POST']['name']);
|
||||
|
@ -21,7 +21,7 @@ class serendipity_plugin_recententries extends serendipity_plugin {
|
||||
$propbag->add('description', PLUGIN_RECENTENTRIES_BLAHBLAH);
|
||||
$propbag->add('stackable', true);
|
||||
$propbag->add('author', 'Christian Machmeier, Christian Brabandt');
|
||||
$propbag->add('version', '1.7');
|
||||
$propbag->add('version', '1.8');
|
||||
$propbag->add('requirements', array(
|
||||
'serendipity' => '0.8',
|
||||
'smarty' => '2.6.7',
|
||||
@ -92,6 +92,7 @@ class serendipity_plugin_recententries extends serendipity_plugin {
|
||||
|
||||
$select_cats = array();
|
||||
$select_cats['none'] = ALL_CATEGORIES;
|
||||
$select_cats['_cur'] = PARENT_CATEGORY;
|
||||
foreach($tmp_select_cats as $cidx => $tmp_select_cat) {
|
||||
$select_cat = explode('|||', $tmp_select_cat);
|
||||
if (!empty($select_cat[0]) && !empty($select_cat[1])) {
|
||||
@ -119,6 +120,10 @@ class serendipity_plugin_recententries extends serendipity_plugin {
|
||||
$number = $this->get_config('number');
|
||||
$dateformat = $this->get_config('dateformat');
|
||||
$category = $this->get_config('category', 'none');
|
||||
|
||||
if ($category == '_cur') {
|
||||
$category = $serendipity['GET']['category'];
|
||||
}
|
||||
$title = $this->get_config('title', $this->title);
|
||||
$number_from_sw = $this->get_config('number_from');
|
||||
$randomize = ($this->get_config('randomize') == "yes") ? true : false ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user