PHP/Compat

* fixed misc issues Intellisense was nice enough to highlight.
 * mostly deprecated usage of uninitialized parameters
 * class GenericPage still needs a long, hard look and a refactor
This commit is contained in:
Sarjuuk 2024-03-11 19:40:30 +01:00
parent 3e6e43fd68
commit ec1a2afc5f
75 changed files with 387 additions and 223 deletions

View file

@ -3,7 +3,7 @@ if (!empty($this->contribute)):
?>
<div class="clear"></div>
<div class="text">
<h2><?php echo Lang::main('contribute'); ?></h2>
<h2><?=Lang::main('contribute'); ?></h2>
</div>
<div id="tabs-contribute-generic" style="width: 50%"></div>
<div class="text" style="margin-right: 310px">

View file

@ -28,7 +28,7 @@ endif;
<noscript>
<div id="noscript-bg"></div>
<div id="noscript-text"><?php echo Lang::main('noJScript'); ?></div>
<div id="noscript-text"><?=Lang::main('noJScript'); ?></div>
</noscript>
<script type="text/javascript">DomContentLoaded.now()</script>

View file

@ -4,12 +4,12 @@ echo " <table class=\"infobox\">\n";
if (!empty($this->infobox)):
?>
<tr><th id="infobox-quick-facts"><?php echo Lang::main('quickFacts'); ?></th></tr>
<tr><th id="infobox-quick-facts"><?=Lang::main('quickFacts'); ?></th></tr>
<tr><td>
<div class="infobox-spacer"></div>
<div id="infobox-contents0"></div>
<script type="text/javascript">
Markup.printHtml("<?php echo Util::jsEscape($this->infobox); ?>", "infobox-contents0", { allow: Markup.CLASS_STAFF, dbpage: true });
Markup.printHtml("<?=Util::jsEscape($this->infobox); ?>", "infobox-contents0", { allow: Markup.CLASS_STAFF, dbpage: true });
</script>
</td></tr>
<?php
@ -17,12 +17,12 @@ echo " <table class=\"infobox\">\n";
if (!empty($this->contributions)):
?>
<tr><th id="infobox-contributions"><?php echo Lang::user('contributions'); ?></th></tr>
<tr><th id="infobox-contributions"><?=Lang::user('contributions'); ?></th></tr>
<tr><td>
<div class="infobox-spacer"></div>
<div id="infobox-contents1"></div>
<script type="text/javascript">
Markup.printHtml('<?php echo Util::jsEscape($this->contributions); ?>', 'infobox-contents1', { allow: Markup.CLASS_STAFF });
Markup.printHtml('<?=Util::jsEscape($this->contributions); ?>', 'infobox-contents1', { allow: Markup.CLASS_STAFF });
</script>
</td></tr>
<?php
@ -36,14 +36,14 @@ echo " <table class=\"infobox\">\n";
if ($this->contribute & CONTRIBUTE_SS):
?>
<tr><th id="infobox-screenshots"><?php echo Lang::main('screenshots'); ?></th></tr>
<tr><th id="infobox-screenshots"><?=Lang::main('screenshots'); ?></th></tr>
<tr><td><div class="infobox-spacer"></div><div id="infobox-sticky-ss"></div></td></tr>
<?php
endif;
if ($this->contribute & CONTRIBUTE_VI && (User::isInGroup(U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO) || !empty($this->community['vi']))):
?>
<tr><th id="infobox-videos"><?php echo Lang::main('videos'); ?></th></tr>
<tr><th id="infobox-videos"><?=Lang::main('videos'); ?></th></tr>
<tr><td><div class="infobox-spacer"></div><div id="infobox-sticky-vi"></div></td></tr>
<?php
endif;

View file

@ -1,4 +1,4 @@
<h3><?php echo Lang::spell('reagents'); ?></h3>
<h3><?=Lang::spell('reagents'); ?></h3>
<?php
if ($enhanced):
@ -168,8 +168,8 @@ if ($enhanced):
<tr>
<th></th>
<th align="left">
<input type="button" style="font-size: 11px; margin-right: 0.5em" onclick="iconlist_expandall('reagent-list-generic',true);" value="<?php echo Lang::spell('_expandAll'); ?>">
<input type="button" style="font-size: 11px; margin-right: 0.5em" onclick="iconlist_expandall('reagent-list-generic',false);" value="<?php echo Lang::spell('_collapseAll'); ?>">
<input type="button" style="font-size: 11px; margin-right: 0.5em" onclick="iconlist_expandall('reagent-list-generic',true);" value="<?=Lang::spell('_expandAll'); ?>">
<input type="button" style="font-size: 11px; margin-right: 0.5em" onclick="iconlist_expandall('reagent-list-generic',false);" value="<?=Lang::spell('_collapseAll'); ?>">
</th>
</tr>
<?php

View file

@ -1,4 +1,4 @@
<tr><th id="infobox-series"><?php echo $listTitle ?: Lang::achievement('series'); ?></th></tr>
<tr><th id="infobox-series"><?=$listTitle ?: Lang::achievement('series'); ?></th></tr>
<tr><td>
<div class="infobox-spacer"></div>
<table class="series">

View file

@ -9,7 +9,7 @@ $hasBuff = !empty($this->jsGlobals[Type::SPELL][2][$this->typeId]['buff']); // n
if ($hasBuff):
?>
<h3><?php echo Lang::spell('_aura'); ?></h3>
<h3><?=Lang::spell('_aura'); ?></h3>
<div id="btt<?=$this->typeId; ?>" class="wowhead-tooltip"></div>
<?php
endif;
@ -23,7 +23,7 @@ endif;
?>
<script type="text/javascript">//<![CDATA[
$WH.ge('ic<?=$this->typeId; ?>').appendChild(Icon.create('<?php echo $this->headIcons[0]; ?>', 2, null, 0, <?php echo $this->headIcons[1]; ?>));
$WH.ge('ic<?=$this->typeId; ?>').appendChild(Icon.create('<?=$this->headIcons[0]; ?>', 2, null, 0, <?=$this->headIcons[1]; ?>));
var
tt = $WH.ge('tt<?=$this->typeId; ?>'),
<?php if ($hasBuff): ?>