Mollywhite has uploaded a new change for review.
https://gerrit.wikimedia.org/r/84093
Change subject: Fix some bugs with the indentation patch.
......................................................................
Fix some bugs with the indentation patch.
i18n fields were having 'field' appended to them still (probably
a rebase issue). Also check for "indentation" property in the
JSON block instead of assuming it exists.
Change-Id: I4b250ac4d6e419b0c7e274536ddc704817900f86
---
M BookManagerv2.hooks.php
M JsonEditor.php
2 files changed, 9 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BookManagerv2
refs/changes/93/84093/1
diff --git a/BookManagerv2.hooks.php b/BookManagerv2.hooks.php
index 3fbbdf8..c4fcc00 100644
--- a/BookManagerv2.hooks.php
+++ b/BookManagerv2.hooks.php
@@ -345,10 +345,14 @@
$html .= Html::openElement( 'ol', array() );
foreach ( $sections as $key => $val ) {
if ( $val->link !== $currentPageTitle ) {
- $html .= Html::openElement( 'li', array(
- 'class' => 'indent-' .
(string)$val->indentation
- ) )
- . Linker::link(
+ if ( isset( $val->indentation ) ) {
+ $html .= Html::openElement( 'li', array(
+ 'class' => 'indent-' .
(string)$val->indentation
+ ) );
+ } else {
+ $html .= Html::openElement( 'li',
array() );
+ }
+ $html .= Linker::link(
Title::newFromText( $val->link
),
$val->name
)
diff --git a/JsonEditor.php b/JsonEditor.php
index b824acd..57b18a1 100644
--- a/JsonEditor.php
+++ b/JsonEditor.php
@@ -68,7 +68,7 @@
) {
$key = htmlentities( $key );
$type = $val->type;
- $i18n = $val->additionalProperties->i18n . '-field';
+ $i18n = $val->additionalProperties->i18n;
if ( $type === 'array' ) {
// TODO: Array handling
$inputType = 'text';
--
To view, visit https://gerrit.wikimedia.org/r/84093
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b250ac4d6e419b0c7e274536ddc704817900f86
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BookManagerv2
Gerrit-Branch: master
Gerrit-Owner: Mollywhite <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits