Skip to content

Node.js based forum software built for the modern web

added compatibility for deprecated filter:header.build

psychobunnyb788e134d13b
diff --git a/src/navigation/admin.js b/src/navigation/admin.js
index ac662c00ff..a0f62035b4 100644
--- a/src/navigation/admin.js
+++ b/src/navigation/admin.js
@@ -54,7 +54,12 @@ function getAvailable(callback) {
return item;
});
- plugins.fireHook('filter:navigation.available', core, callback);
+ // DEPRECATION: backwards compatibility for filter:header.build, will be removed soon.
+ plugins.fireHook('filter:header.build', {navigation: []}, function(err, data) {
+ core = core.concat(data.navigation);
+
+ plugins.fireHook('filter:navigation.available', core, callback);
+ });
}
module.exports = admin;
\ No newline at end of file
diff --git a/src/views/admin/general/navigation.tpl b/src/views/admin/general/navigation.tpl
index 3a658efb5b..fe956cc5bc 100644
--- a/src/views/admin/general/navigation.tpl
+++ b/src/views/admin/general/navigation.tpl
@@ -51,7 +51,7 @@
</li>
<!-- BEGIN available -->
<li data-id="@index" class="alert <!-- IF available.core -->alert-info<!-- ELSE -->alert-success<!-- ENDIF available.core -->">
- <strong>{available.title}</strong> {available.route}
+ <strong>{available.text}</strong> {available.route}
<span class="pull-right badge"><!-- IF available.core -->core<!-- ELSE -->plugin<!-- ENDIF available.core --></span>
</li>
<!-- END available -->