EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/147170

Change subject: Hygine: kill unless/else
......................................................................

Hygine: kill unless/else

Prefer the more standard if/else for readability purposes

Change-Id: I14a9f2cccb797e10435c237179893d02a70e5cf4
---
M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
M handlebars/compiled/flow_post.handlebars.php
M handlebars/flow_post_author.handlebars
4 files changed, 34 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/70/147170/1

diff --git a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php 
b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
index 53332e4..1e1a889 100644
--- a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
@@ -60,7 +60,14 @@
                         ' : '').'>
                <div class="flow-post-main">
                        '.LCRun3::wi($cx, ((is_array($in) && 
isset($in['creator'])) ? $in['creator'] : null), $in, function($cx, $in) 
{return '
-                               '.((!LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['isPreview'])) ? $in['isPreview'] : null))) ? '
+                               '.((LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['isPreview'])) ? $in['isPreview'] : null))) ? '
+       <span class="flow-author"><a href="#" class="mw-userlink">
+               '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['name'])) ? 
$in['name'] : null))) ? '
+                       '.htmlentities(((is_array($in) && isset($in['name'])) ? 
$in['name'] : null), ENT_QUOTES, 'UTF-8').'' : '
+                       '.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-anonymous'),Array()), 'encq').'
+               ').'
+       </a></span>
+' : '
        <span class="flow-author">
                '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['links'])) 
? $in['links'] : null))) ? '
                        '.((LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['name'])) ? $in['name'] : null))) ? '
@@ -74,13 +81,6 @@
                        <span class="mw-usertoollinks">(<a 
href="'.htmlentities(((is_array($in['links']['talk']) && 
isset($in['links']['talk']['url'])) ? $in['links']['talk']['url'] : null), 
ENT_QUOTES, 'UTF-8').'" class="'.((!LCRun3::ifvar($cx, 
((is_array($in['links']['talk']) && isset($in['links']['talk']['exists'])) ? 
$in['links']['talk']['exists'] : null))) ? 'new ' : '').' 
flow-ui-tooltip-target" title="'.htmlentities(((is_array($in['links']['talk']) 
&& isset($in['links']['talk']['title'])) ? $in['links']['talk']['title'] : 
null), ENT_QUOTES, 'UTF-8').'">'.LCRun3::ch($cx, 'l10n', 
Array(Array('talkpagelinktext'),Array()), 'encq').'</a>'.((LCRun3::ifvar($cx, 
((is_array($in['links']) && isset($in['links']['block'])) ? 
$in['links']['block'] : null))) ? ' | <a class="'.((!LCRun3::ifvar($cx, 
((is_array($in['links']['block']) && isset($in['links']['block']['exists'])) ? 
$in['links']['block']['exists'] : null))) ? 'new ' : '').' 
flow-ui-tooltip-target" href="'.htmlentities(((is_array($in['links']['block']) 
&& isset($in['links']['block']['url'])) ? $in['links']['block']['url'] : null), 
ENT_QUOTES, 'UTF-8').'" title="'.htmlentities(((is_array($in['links']['block']) 
&& isset($in['links']['block']['title'])) ? $in['links']['block']['title'] : 
null), ENT_QUOTES, 'UTF-8').'">'.LCRun3::ch($cx, 'l10n', 
Array(Array('blocklink'),Array()), 'encq').'</a>' : '').')</span>
                ' : '').'
        </span>
-' : '
-       <span class="flow-author"><a href="#" class="mw-userlink">
-               '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['name'])) ? 
$in['name'] : null))) ? '
-                       '.htmlentities(((is_array($in) && isset($in['name'])) ? 
$in['name'] : null), ENT_QUOTES, 'UTF-8').'' : '
-                       '.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-anonymous'),Array()), 'encq').'
-               ').'
-       </a></span>
 ').'
 
                        ';}).'
diff --git a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php 
b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
index 53332e4..1e1a889 100644
--- a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
@@ -60,7 +60,14 @@
                         ' : '').'>
                <div class="flow-post-main">
                        '.LCRun3::wi($cx, ((is_array($in) && 
isset($in['creator'])) ? $in['creator'] : null), $in, function($cx, $in) 
{return '
-                               '.((!LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['isPreview'])) ? $in['isPreview'] : null))) ? '
+                               '.((LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['isPreview'])) ? $in['isPreview'] : null))) ? '
+       <span class="flow-author"><a href="#" class="mw-userlink">
+               '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['name'])) ? 
$in['name'] : null))) ? '
+                       '.htmlentities(((is_array($in) && isset($in['name'])) ? 
$in['name'] : null), ENT_QUOTES, 'UTF-8').'' : '
+                       '.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-anonymous'),Array()), 'encq').'
+               ').'
+       </a></span>
+' : '
        <span class="flow-author">
                '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['links'])) 
? $in['links'] : null))) ? '
                        '.((LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['name'])) ? $in['name'] : null))) ? '
@@ -74,13 +81,6 @@
                        <span class="mw-usertoollinks">(<a 
href="'.htmlentities(((is_array($in['links']['talk']) && 
isset($in['links']['talk']['url'])) ? $in['links']['talk']['url'] : null), 
ENT_QUOTES, 'UTF-8').'" class="'.((!LCRun3::ifvar($cx, 
((is_array($in['links']['talk']) && isset($in['links']['talk']['exists'])) ? 
$in['links']['talk']['exists'] : null))) ? 'new ' : '').' 
flow-ui-tooltip-target" title="'.htmlentities(((is_array($in['links']['talk']) 
&& isset($in['links']['talk']['title'])) ? $in['links']['talk']['title'] : 
null), ENT_QUOTES, 'UTF-8').'">'.LCRun3::ch($cx, 'l10n', 
Array(Array('talkpagelinktext'),Array()), 'encq').'</a>'.((LCRun3::ifvar($cx, 
((is_array($in['links']) && isset($in['links']['block'])) ? 
$in['links']['block'] : null))) ? ' | <a class="'.((!LCRun3::ifvar($cx, 
((is_array($in['links']['block']) && isset($in['links']['block']['exists'])) ? 
$in['links']['block']['exists'] : null))) ? 'new ' : '').' 
flow-ui-tooltip-target" href="'.htmlentities(((is_array($in['links']['block']) 
&& isset($in['links']['block']['url'])) ? $in['links']['block']['url'] : null), 
ENT_QUOTES, 'UTF-8').'" title="'.htmlentities(((is_array($in['links']['block']) 
&& isset($in['links']['block']['title'])) ? $in['links']['block']['title'] : 
null), ENT_QUOTES, 'UTF-8').'">'.LCRun3::ch($cx, 'l10n', 
Array(Array('blocklink'),Array()), 'encq').'</a>' : '').')</span>
                ' : '').'
        </span>
-' : '
-       <span class="flow-author"><a href="#" class="mw-userlink">
-               '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['name'])) ? 
$in['name'] : null))) ? '
-                       '.htmlentities(((is_array($in) && isset($in['name'])) ? 
$in['name'] : null), ENT_QUOTES, 'UTF-8').'' : '
-                       '.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-anonymous'),Array()), 'encq').'
-               ').'
-       </a></span>
 ').'
 
                        ';}).'
diff --git a/handlebars/compiled/flow_post.handlebars.php 
b/handlebars/compiled/flow_post.handlebars.php
index 0ac335f..cf54a79 100644
--- a/handlebars/compiled/flow_post.handlebars.php
+++ b/handlebars/compiled/flow_post.handlebars.php
@@ -30,7 +30,14 @@
                         ' : '').'>
                <div class="flow-post-main">
                        '.LCRun3::wi($cx, ((is_array($in) && 
isset($in['creator'])) ? $in['creator'] : null), $in, function($cx, $in) 
{return '
-                               '.((!LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['isPreview'])) ? $in['isPreview'] : null))) ? '
+                               '.((LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['isPreview'])) ? $in['isPreview'] : null))) ? '
+       <span class="flow-author"><a href="#" class="mw-userlink">
+               '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['name'])) ? 
$in['name'] : null))) ? '
+                       '.htmlentities(((is_array($in) && isset($in['name'])) ? 
$in['name'] : null), ENT_QUOTES, 'UTF-8').'' : '
+                       '.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-anonymous'),Array()), 'encq').'
+               ').'
+       </a></span>
+' : '
        <span class="flow-author">
                '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['links'])) 
? $in['links'] : null))) ? '
                        '.((LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['name'])) ? $in['name'] : null))) ? '
@@ -44,13 +51,6 @@
                        <span class="mw-usertoollinks">(<a 
href="'.htmlentities(((is_array($in['links']['talk']) && 
isset($in['links']['talk']['url'])) ? $in['links']['talk']['url'] : null), 
ENT_QUOTES, 'UTF-8').'" class="'.((!LCRun3::ifvar($cx, 
((is_array($in['links']['talk']) && isset($in['links']['talk']['exists'])) ? 
$in['links']['talk']['exists'] : null))) ? 'new ' : '').' 
flow-ui-tooltip-target" title="'.htmlentities(((is_array($in['links']['talk']) 
&& isset($in['links']['talk']['title'])) ? $in['links']['talk']['title'] : 
null), ENT_QUOTES, 'UTF-8').'">'.LCRun3::ch($cx, 'l10n', 
Array(Array('talkpagelinktext'),Array()), 'encq').'</a>'.((LCRun3::ifvar($cx, 
((is_array($in['links']) && isset($in['links']['block'])) ? 
$in['links']['block'] : null))) ? ' | <a class="'.((!LCRun3::ifvar($cx, 
((is_array($in['links']['block']) && isset($in['links']['block']['exists'])) ? 
$in['links']['block']['exists'] : null))) ? 'new ' : '').' 
flow-ui-tooltip-target" href="'.htmlentities(((is_array($in['links']['block']) 
&& isset($in['links']['block']['url'])) ? $in['links']['block']['url'] : null), 
ENT_QUOTES, 'UTF-8').'" title="'.htmlentities(((is_array($in['links']['block']) 
&& isset($in['links']['block']['title'])) ? $in['links']['block']['title'] : 
null), ENT_QUOTES, 'UTF-8').'">'.LCRun3::ch($cx, 'l10n', 
Array(Array('blocklink'),Array()), 'encq').'</a>' : '').')</span>
                ' : '').'
        </span>
-' : '
-       <span class="flow-author"><a href="#" class="mw-userlink">
-               '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['name'])) ? 
$in['name'] : null))) ? '
-                       '.htmlentities(((is_array($in) && isset($in['name'])) ? 
$in['name'] : null), ENT_QUOTES, 'UTF-8').'' : '
-                       '.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-anonymous'),Array()), 'encq').'
-               ').'
-       </a></span>
 ').'
 
                        ';}).'
diff --git a/handlebars/flow_post_author.handlebars 
b/handlebars/flow_post_author.handlebars
index 56141e8..9bad8f8 100644
--- a/handlebars/flow_post_author.handlebars
+++ b/handlebars/flow_post_author.handlebars
@@ -1,4 +1,12 @@
-{{#unless isPreview}}
+{{#if isPreview}}
+       <span class="flow-author"><a href="#" class="mw-userlink">
+               {{#if name}}
+                       {{~name~}}
+               {{else}}
+                       {{~l10n "flow-anonymous"}}
+               {{/if}}
+       </a></span>
+{{else}}
        <span class="flow-author">
                {{#if links}}
                        {{#if name}}
@@ -16,12 +24,4 @@
                        <span class="mw-usertoollinks">(<a 
href="{{links.talk.url}}" class="{{#unless links.talk.exists}}new {{/unless}} 
flow-ui-tooltip-target" title="{{links.talk.title}}">{{l10n 
"talkpagelinktext"}}</a>{{#if links.block}} | <a class="{{#unless 
links.block.exists}}new {{/unless}} flow-ui-tooltip-target" 
href="{{links.block.url}}" title="{{links.block.title}}">{{l10n 
"blocklink"}}</a>{{/if}})</span>
                {{/if}}
        </span>
-{{else}}
-       <span class="flow-author"><a href="#" class="mw-userlink">
-               {{#if name}}
-                       {{~name~}}
-               {{else}}
-                       {{~l10n "flow-anonymous"}}
-               {{/if}}
-       </a></span>
-{{/unless}}
+{{/if}}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14a9f2cccb797e10435c237179893d02a70e5cf4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>

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

Reply via email to