Merge pull request #8636 from hregis/develop_pgsql

Fix: avoid Warning: A non-numeric value encountered + wrong var name
This commit is contained in:
Laurent Destailleur 2018-04-20 01:20:19 +02:00 committed by GitHub
commit 788fd62205
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2017 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2017-2018 Regis Houssin <regis.houssin@capnetworks.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -212,9 +212,9 @@ print "<br>\n";
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($optioncss != '') $param.='&optioncss='.$optioncss; if ($optioncss != '') $param.='&optioncss='.$optioncss;
if (defaulturl) $param.='&defaulturl='.urlencode(defaulturl); if ($defaulturl) $param.='&defaulturl='.urlencode($defaulturl);
if (defaultkey) $param.='&defaultkey='.urlencode(defaultkey); if ($defaultkey) $param.='&defaultkey='.urlencode($defaultkey);
if (defaultvalue) $param.='&defaultvalue='.urlencode(defaultvalue); if ($defaultvalue) $param.='&defaultvalue='.urlencode($defaultvalue);
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?debug=1':'').'" method="POST">'; print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?debug=1':'').'" method="POST">';

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2006-2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2006-2018 Regis Houssin <regis.houssin@capnetworks.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -36,7 +36,7 @@ $sortorder = GETPOST('sortorder','alpha');
$page = GETPOST('page','int'); $page = GETPOST('page','int');
if (! $sortorder) $sortorder="DESC"; if (! $sortorder) $sortorder="DESC";
if (! $sortfield) $sortfield="date"; if (! $sortfield) $sortfield="date";
if ($page < 0) { $page = 0; } if (empty($page) || $page == -1) { $page = 0; }
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$offset = $limit * $page; $offset = $limit * $page;