jenkins-bot has submitted this change and it was merged.

Change subject: Repair warning on boards with no header
......................................................................


Repair warning on boards with no header

On a brand new flow board with no header ever created
the attempt to access revision.content.content will
issue a warning from lightncandy.

The check for revision.content.content, rather than
revision.content was so we can add a blank space when
its not available.  Without the   the edit header
icon is mis-aligned.

This patch makes the   always output, which is
perfect for the no-content step and shouldn't make any
difference when content exists.

Change-Id: I5bd71c70af8536e0222914133b31889b58381722
---
M handlebars/compiled/flow_block_header.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
M handlebars/flow_block_header.handlebars
4 files changed, 8 insertions(+), 10 deletions(-)

Approvals:
  Werdna: Looks good to me, but someone else must approve
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/handlebars/compiled/flow_block_header.handlebars.php 
b/handlebars/compiled/flow_block_header.handlebars.php
index 91837cf..ab12b30 100644
--- a/handlebars/compiled/flow_block_header.handlebars.php
+++ b/handlebars/compiled/flow_block_header.handlebars.php
@@ -19,11 +19,10 @@
     );
     return '<div class="flow-board-header">
        <div class="flow-board-header-detail-view">
-               '.((LCRun3::ifvar($cx, ((is_array($in['revision']['content']) 
&& isset($in['revision']['content']['content'])) ? 
$in['revision']['content']['content'] : null))) ? '
+               '.((LCRun3::ifvar($cx, ((is_array($in['revision']) && 
isset($in['revision']['content'])) ? $in['revision']['content'] : null))) ? '
                        '.LCRun3::ch($cx, 'escapeContent', 
Array(Array(((is_array($in['revision']['content']) && 
isset($in['revision']['content']['format'])) ? 
$in['revision']['content']['format'] : 
null),((is_array($in['revision']['content']) && 
isset($in['revision']['content']['content'])) ? 
$in['revision']['content']['content'] : null)),Array()), 'encq').'
-               ' : '
-                       &nbsp;
-               ').'
+               ' : '').'
+               &nbsp;
 
                '.((!LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['isPreview'])) ? $in['isPreview'] : null))) ? '
                        <div class="flow-board-header-nav">
@@ -43,4 +42,4 @@
 </div>
 ';
 }
-?>
+?>
\ No newline at end of file
diff --git a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php 
b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
index 3bd174e..8a100db 100644
--- a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
@@ -274,4 +274,4 @@
 </div>
 ';
 }
-?>
+?>
\ No newline at end of file
diff --git a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php 
b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
index 5bac5c9..0c387ed 100644
--- a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
@@ -276,4 +276,4 @@
 </div>
 ';
 }
-?>
+?>
\ No newline at end of file
diff --git a/handlebars/flow_block_header.handlebars 
b/handlebars/flow_block_header.handlebars
index 8a80b47..a95a35c 100644
--- a/handlebars/flow_block_header.handlebars
+++ b/handlebars/flow_block_header.handlebars
@@ -1,10 +1,9 @@
 <div class="flow-board-header">
        <div class="flow-board-header-detail-view">
-               {{#if revision.content.content}}
+               {{#if revision.content}}
                        {{escapeContent revision.content.format 
revision.content.content}}
-               {{else}}
-                       &nbsp;
                {{/if}}
+               &nbsp;
 
                {{#unless isPreview}}
                        <div class="flow-board-header-nav">

-- 
To view, visit https://gerrit.wikimedia.org/r/147649
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5bd71c70af8536e0222914133b31889b58381722
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: SG <[email protected]>
Gerrit-Reviewer: Werdna <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to