openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit f41276fbb9584eee26adb8d149ce32e746ba5963
parent 087ea7d44f11e8bc5fcb075e64eb98621e4f8202
Author: Jan Dankert <devnull@localhost>
Date:   Wed,  5 Sep 2018 21:55:30 +0200

Fix für PHP < 5.5: Die Funktion empty() darf als Parameter nur Variablen erhalten.

Diffstat:
modules/cms-ui/themes/default/html/views/folder/edit.php | 2+-
modules/cms-ui/themes/default/html/views/folder/preview.php | 2+-
modules/cms-ui/themes/default/html/views/group/edit.php | 2+-
modules/cms-ui/themes/default/html/views/login/login.php | 4++--
modules/cms-ui/themes/default/html/views/page/edit.php | 4++--
modules/cms-ui/themes/default/html/views/page/info.php | 2+-
modules/cms-ui/themes/default/html/views/title/show.php | 2+-
modules/cms-ui/themes/default/html/views/user/info.php | 2+-
modules/template-engine/components/html/if/If.class.php | 2+-
9 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/modules/cms-ui/themes/default/html/views/folder/edit.php b/modules/cms-ui/themes/default/html/views/folder/edit.php @@ -69,7 +69,7 @@ </td> </tr> <?php } ?> - <?php $if4=(empty($object)); if($if4){?> + <?php $if4=(($object)==FALSE); if($if4){?> <tr> <td colspan="2"> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NOT_FOUND')))); ?></span> diff --git a/modules/cms-ui/themes/default/html/views/folder/preview.php b/modules/cms-ui/themes/default/html/views/folder/preview.php @@ -45,7 +45,7 @@ </td> </tr> <?php } ?> - <?php $if3=(empty($object)); if($if3){?> + <?php $if3=(($object)==FALSE); if($if3){?> <tr> <td colspan="2"> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NOT_FOUND')))); ?></span> diff --git a/modules/cms-ui/themes/default/html/views/group/edit.php b/modules/cms-ui/themes/default/html/views/group/edit.php @@ -2,7 +2,7 @@ - <form name="" target="_self" data-target="view" action="./" data-method="<?php echo OR_METHOD ?>" data-action="<?php echo OR_ACTION ?>" data-id="<?php echo OR_ID ?>" method="post" enctype="application/x-www-form-urlencoded" class="<?php echo OR_ACTION ?>" data-async="1" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo OR_ACTION ?>" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo OR_METHOD ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <form name="" target="_self" data-target="view" action="./" data-method="edit" data-action="group" data-id="<?php echo OR_ID ?>" method="post" enctype="application/x-www-form-urlencoded" class="group" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="group" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="edit" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> <div class="line"> <div class="label"> <label for="<?php echo REQUEST_ID ?>_name" class="label"> diff --git a/modules/cms-ui/themes/default/html/views/login/login.php b/modules/cms-ui/themes/default/html/views/login/login.php @@ -4,7 +4,7 @@ <form name="" target="_self" data-target="top" action="./" data-method="login" data-action="login" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="login" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="login" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="login" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> <?php $if3=(config('login','logo','enabled')); if($if3){?> - <?php $if4=!(empty(config('login','logo','url'))); if($if4){?> + <?php $if4=!((config('login','logo','url'))==FALSE); if($if4){?> <a target="_self" data-url="<?php echo config('login','logo','url') ?>" data-action="" data-method="login" data-id="<?php echo OR_ID ?>" data-extra="[]" href="<?php echo Html::url('','','',array()) ?>"> <img class="" title="" src="<?php echo config('login','logo','image') ?>" /> @@ -16,7 +16,7 @@ <?php } ?> <?php } ?> - <?php $if3=!(empty(config('login','motd'))); if($if3){?> + <?php $if3=!((config('login','motd'))==FALSE); if($if3){?> <div class="message info"> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('login','motd')))); ?></span> diff --git a/modules/cms-ui/themes/default/html/views/page/edit.php b/modules/cms-ui/themes/default/html/views/page/edit.php @@ -1,7 +1,7 @@ <table width="100%"> - <?php $if3=!(empty($el)); if($if3){?> + <?php $if3=!(($el)==FALSE); if($if3){?> <tr class="headline"> <td class="help"> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('PAGE_ELEMENT_NAME')))); ?></span> @@ -13,7 +13,7 @@ </td> </tr> <?php } ?> - <?php $if3=(empty($el)); if($if3){?> + <?php $if3=(($el)==FALSE); if($if3){?> <tr> <td> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NOT_FOUND')))); ?></span> diff --git a/modules/cms-ui/themes/default/html/views/page/info.php b/modules/cms-ui/themes/default/html/views/page/info.php @@ -65,7 +65,7 @@ </a> <?php } ?> - <?php $if6=(empty($template_url)); if($if6){?> + <?php $if6=(($template_url)==FALSE); if($if6){?> <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/icon_template.png" /> <span class="text"><?php echo nl2br(encodeHtml(htmlentities($template_name))); ?></span> diff --git a/modules/cms-ui/themes/default/html/views/title/show.php b/modules/cms-ui/themes/default/html/views/title/show.php @@ -361,7 +361,7 @@ </div> <?php } ?> - <?php $if2=!(empty(config('login','motd'))); if($if2){?> + <?php $if2=!((config('login','motd'))==FALSE); if($if2){?> <div class="toolbar-icon menu"> <img class="image-icon image-icon--method" title="" src="./modules/cms-ui/themes/default/images/icon/method/motd.svg" /> diff --git a/modules/cms-ui/themes/default/html/views/user/info.php b/modules/cms-ui/themes/default/html/views/user/info.php @@ -2,7 +2,7 @@ - <?php $if2=!(empty($image)); if($if2){?> + <?php $if2=!(($image)==FALSE); if($if2){?> <div class="line"> <div class="line"> <img class="" title="" src="<?php echo $image ?>" /> diff --git a/modules/template-engine/components/html/if/If.class.php b/modules/template-engine/components/html/if/If.class.php @@ -37,7 +37,7 @@ HTML; elseif (! empty($this->present)) echo 'isset(' . $this->textasvarname($this->present).')'; // 'isset' verwenden! Nicht empty(), da false empty ist. elseif (! empty($this->empty)) - echo 'empty(' . $this->textasvarname($this->empty).')'; + echo '(' . $this->textasvarname($this->empty).')==FALSE'; else throw new \LogicException("Element 'if' has not enough parameters.");