fixes warnings in the httpd server error logs
This commit is contained in:
parent
d9cb5686ef
commit
b8fea7d93c
7 changed files with 19 additions and 19 deletions
|
@ -34,7 +34,7 @@ if (!empty($_GET["message"])) {
|
|||
$message = $_GET["message"];
|
||||
}
|
||||
|
||||
$action = $_GET["action"];
|
||||
$action = isset($_GET["action"]) ? $_GET["action"] : "";
|
||||
|
||||
if ($action == "insert" || $action == "update") {
|
||||
/* validate the data. */
|
||||
|
@ -123,8 +123,6 @@ $smarty->assign('category', $category);
|
|||
if (isset($category_error)) {
|
||||
$smarty->assign('category_error', $category_error);
|
||||
}
|
||||
$smarty->assign('haserror', $haserror);
|
||||
$smarty->assign('isadmin', $_SESSION["admin"]);
|
||||
$smarty->assign('opt', $smarty->opt());
|
||||
$smarty->assign('haserror', isset($haserror) ? $haserror : false);
|
||||
$smarty->display('categories.tpl');
|
||||
?>
|
||||
|
|
|
@ -197,7 +197,7 @@ try {
|
|||
$smarty->assign('message', $message);
|
||||
}
|
||||
$smarty->assign('action', $action);
|
||||
$smarty->assign('haserror', $haserror);
|
||||
$smarty->assign('haserror', isset($haserror) ? $haserror : false);
|
||||
$smarty->assign('events', $events);
|
||||
$smarty->assign('eventdate', $eventdate->format($opt["date_format"]));
|
||||
if (isset($eventdate_error)) {
|
||||
|
|
|
@ -27,10 +27,10 @@ class MySmarty extends Smarty {
|
|||
return $opt;
|
||||
}
|
||||
|
||||
public function display($t) {
|
||||
parent::assign('isadmin', $_SESSION['admin']);
|
||||
public function display($template, $cache_id = "", $compile_id = "") {
|
||||
parent::assign('isadmin', isset($_SESSION['admin']) ? $_SESSION['admin'] : false);
|
||||
parent::assign('opt', $this->opt());
|
||||
parent::display($t);
|
||||
parent::display($template, $cache_id, $compile_id);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -87,7 +87,7 @@ if (!empty($_REQUEST["action"])) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!$haserror) {
|
||||
if (isset($haserror) && !$haserror && isset($_REQUEST["image"])) {
|
||||
if ($_REQUEST["image"] == "remove" || $_REQUEST["image"] == "replace") {
|
||||
deleteImageForItem((int) $_REQUEST["itemid"], $smarty->dbh(), $smarty->opt());
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ while ($row = $stmt->fetch()) {
|
|||
|
||||
$smarty->assign('userid', $userid);
|
||||
$smarty->assign('action', $action);
|
||||
$smarty->assign('haserror', $haserror);
|
||||
$smarty->assign('haserror', isset($haserror) ? $haserror : false);
|
||||
if (isset($_REQUEST['itemid'])) {
|
||||
$smarty->assign('itemid', (int) $_REQUEST['itemid']);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ if (!empty($_GET["message"])) {
|
|||
$message = $_GET["message"];
|
||||
}
|
||||
|
||||
$action = $_GET["action"];
|
||||
$action = isset($_GET["action"]) ? $_GET["action"] : "";
|
||||
|
||||
if ($action == "insert" || $action == "update") {
|
||||
/* validate the data. */
|
||||
|
@ -160,7 +160,7 @@ $smarty->assign('rendered', $rendered);
|
|||
if (isset($rendered_error)) {
|
||||
$smarty->assign('rendered_error', $rendered_error);
|
||||
}
|
||||
$smarty->assign('ranking', $_GET["ranking"]);
|
||||
$smarty->assign('haserror', $haserror);
|
||||
$smarty->assign('ranking', isset($_GET["ranking"]) ? (int) $_GET["ranking"] : "");
|
||||
$smarty->assign('haserror', isset($haserror) ? $haserror : false);
|
||||
$smarty->display('ranks.tpl');
|
||||
?>
|
||||
|
|
|
@ -105,11 +105,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
<div class="row">
|
||||
<div class="span12">
|
||||
<form name="categoryform" id="categoryform" method="get" action="categories.php" class="well form-horizontal">
|
||||
{if $action == "edit" || (isset($haserror) && $action == "update")}
|
||||
<input type="hidden" name="categoryid" value="{$categoryid}">
|
||||
<input type="hidden" name="action" value="update">
|
||||
{elseif $action == "" || (isset($haserror) && $action == "insert")}
|
||||
<input type="hidden" name="action" value="insert">
|
||||
{if isset($action)}
|
||||
{if $action == "edit" || (isset($haserror) && $action == "update")}
|
||||
<input type="hidden" name="categoryid" value="{$categoryid}">
|
||||
<input type="hidden" name="action" value="update">
|
||||
{elseif $action == "" || (isset($haserror) && $action == "insert")}
|
||||
<input type="hidden" name="action" value="insert">
|
||||
{/if}
|
||||
{/if}
|
||||
<fieldset>
|
||||
<legend>{if $action == "edit"}Edit Category '{$category|escape:'htmlall'}'{else}Add Category{/if}</legend>
|
||||
|
|
|
@ -197,7 +197,7 @@ while ($row = $stmt->fetch()) {
|
|||
}
|
||||
|
||||
$smarty->assign('action', $action);
|
||||
$smarty->assign('edituserid', (int) $_GET["userid"]);
|
||||
$smarty->assign('edituserid', isset($_GET["userid"]) ? (int) $_GET["userid"] : -1);
|
||||
$smarty->assign('username', $username);
|
||||
if (isset($username_error)) {
|
||||
$smarty->assign('username_error', $username_error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue