1
0

Merge pull request #650 from stephanbrunker/master

Fix a lot of single issues and overhaul the language settings
This commit is contained in:
Garvin Hicking
2019-10-17 13:46:06 +02:00
committed by GitHub
18 changed files with 723 additions and 597 deletions

View File

@@ -1,3 +1,9 @@
1.41.4:
-------
* removed 'WHERE' keyword from fetchentries event hook, because that should be handled
by the issuing sql
1.41.3:
-------
* Add missing English language constant.

View File

@@ -19,7 +19,7 @@ class serendipity_event_entryproperties extends serendipity_event
$propbag->add('description', PLUGIN_EVENT_ENTRYPROPERTIES_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Garvin Hicking');
$propbag->add('version', '1.41.3');
$propbag->add('version', '1.41.4');
$propbag->add('requirements', array(
'serendipity' => '1.6',
'smarty' => '2.6.27',
@@ -915,9 +915,7 @@ class serendipity_event_entryproperties extends serendipity_event
if (count($conds) > 0) {
$cond = implode(' AND ', $conds);
if (empty($eventData['and'])) {
$eventData['and'] = " WHERE $cond ";
} else {
if (!empty($eventData['and'])) {
$eventData['and'] .= " AND $cond ";
}
}
@@ -934,7 +932,7 @@ class serendipity_event_entryproperties extends serendipity_event
$conds[] = 'ep_cache_body.value AS ep_cache_body,';
}
$cond = implode("\n", $conds);
$cond = implode("\n", $conds) . "\n";
if (empty($eventData['addkey'])) {
$eventData['addkey'] = $cond;
} else {

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,8 @@
2.38.2
-------
* Fix a call to NULL if no connection to the repositiory could
be archieved.
2.38.1:
-------
* Fix count_plugin_upgrades():

View File

@@ -27,7 +27,7 @@ class serendipity_event_spartacus extends serendipity_event
$propbag->add('description', PLUGIN_EVENT_SPARTACUS_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Garvin Hicking');
$propbag->add('version', '2.38.1');
$propbag->add('version', '2.38.2');
$propbag->add('requirements', array(
'serendipity' => '1.6',
));
@@ -457,7 +457,7 @@ class serendipity_event_spartacus extends serendipity_event
$resolved_url = $url . ' (IP ' . $url_ip . ')';
$this->outputMSG('error', sprintf(PLUGIN_EVENT_SPARTACUS_FETCHERROR, $resolved_url));
//--JAM: START FIREWALL DETECTION
if ($response->getStatus()) {
if ((isset($response) && $response->getStatus())) {
$this->outputMSG('error', sprintf(PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR, $response->getStatus()));
}
$check_health = true;

View File

@@ -0,0 +1,2 @@
2.05.2
* Strip the translation tags in the category links if multilingual plugin is active

View File

@@ -15,7 +15,7 @@ class serendipity_plugin_categories extends serendipity_plugin
$propbag->add('description', CATEGORY_PLUGIN_DESC);
$propbag->add('stackable', true);
$propbag->add('author', 'Serendipity Team');
$propbag->add('version', '2.05.2');
$propbag->add('version', '2.05.3');
$propbag->add('configuration', array('title', 'authorid', 'parent_base', 'hide_parent', 'image', 'sort_order', 'sort_method', 'allow_select', 'hide_parallel', 'show_count', 'show_all', 'smarty'));
$propbag->add('groups', array('FRONTEND_VIEWS'));
}
@@ -213,6 +213,9 @@ class serendipity_plugin_categories extends serendipity_plugin
if (is_array($categories) && count($categories)) {
$categories = serendipity_walkRecursive($categories, 'categoryid', 'parentid', VIEWMODE_THREADED);
// strip language tags if multilingual plugin is active
serendipity_plugin_api::hook_event('multilingual_strip_langs', $categories, 'category_name');
foreach ($categories as $cid => $cat) {
// Hide parents not wanted
if ($use_parent && $use_parent != 'all') {

View File

@@ -0,0 +1,4 @@
2.7
* using the sql condition set aquired by event_hook::'frontend_fetchentries'
to get the multilingual data set
* $this->title (= title in backend) set to plugin name

View File

@@ -15,13 +15,11 @@ class serendipity_plugin_recententries extends serendipity_plugin
function introspect(&$propbag)
{
$this->title = $this->get_config('title', $this->title);
$propbag->add('name', PLUGIN_RECENTENTRIES_TITLE);
$propbag->add('description', PLUGIN_RECENTENTRIES_BLAHBLAH);
$propbag->add('stackable', true);
$propbag->add('author', 'Christian Machmeier, Christian Brabandt, Judebert, Don Chambers');
$propbag->add('version', '2.6');
$propbag->add('version', '2.7');
$propbag->add('requirements', array(
'serendipity' => '1.6',
'smarty' => '2.6.7',
@@ -212,16 +210,16 @@ class serendipity_plugin_recententries extends serendipity_plugin
$sql_condition['joins'] = ' LEFT OUTER JOIN ' . $serendipity['dbPrefix'] . 'entrycat AS ec ON id = ec.entryid ' . $sql_condition['joins'];
}
// get 'hide untranslated entries' option from multilingual plugin via SQL
serendipity_plugin_api::hook_event('frontend_fetchentries', $sql_condition, array('noSticky' => true));
$sql_condition['addkey'] = rtrim($sql_condition['addkey'],",\n") . "\n";
$entries_query = "SELECT DISTINCT id,
title,
timestamp,
epm.value AS multilingual_title
{$sql_condition['addkey']}
FROM {$serendipity['dbPrefix']}entries AS e
{$sql_condition['joins']}
LEFT OUTER JOIN {$serendipity['dbPrefix']}entryproperties AS epm
ON (epm.entryid = e.id AND epm.property = 'multilingual_title_" . $serendipity['lang'] . "')
WHERE isdraft = 'false' {$sql_condition['and']}
$sql_order
$sql_number";

View File

@@ -14,7 +14,7 @@ class serendipity_plugin_superuser extends serendipity_plugin
$propbag->add('description', ALLOWS_YOU_BLAHBLAH);
$propbag->add('stackable', false);
$propbag->add('author', 'Serendipity Team');
$propbag->add('version', '1.1');
$propbag->add('version', '1.1.1');
$propbag->add('configuration', array('https'));
$propbag->add('groups', array('FRONTEND_FEATURES'));
}
@@ -46,7 +46,7 @@ class serendipity_plugin_superuser extends serendipity_plugin
$base = $serendipity['serendipityHTTPPath'];
}
$link = $base . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] .'?/' : '') . PATH_ADMIN;
$link = $base . ($serendipity['rewrite'] == 'none' ? 'serendipity_admin.php' : PATH_ADMIN);
$text = (($_SESSION['serendipityAuthedUser'] === true) ? SUPERUSER_OPEN_ADMIN : SUPERUSER_OPEN_LOGIN);
echo '<a href="' . $link . '" rel="nofollow" title="'. $text .'">'. $text .'</a>';
}