From 36f890f973d717754ad2cdc20bf68be0c66cc251 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 27 Feb 2024 14:05:53 +0100 Subject: [PATCH] Fix: GETPOST(...,'int') to GETPOSTINT(...) (#28448) * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: Update spelling exceptions * Qual: Ignore Phan Notice --- .../codespell/codespell-lines-ignore.txt | 31 +-- htdocs/accountancy/admin/account.php | 20 +- htdocs/accountancy/admin/accountmodel.php | 6 +- htdocs/accountancy/admin/card.php | 4 +- htdocs/accountancy/admin/categories.php | 10 +- htdocs/accountancy/admin/categories_list.php | 10 +- htdocs/accountancy/admin/defaultaccounts.php | 8 +- htdocs/accountancy/admin/export.php | 2 +- htdocs/accountancy/admin/fiscalyear.php | 4 +- htdocs/accountancy/admin/fiscalyear_card.php | 6 +- htdocs/accountancy/admin/fiscalyear_info.php | 2 +- htdocs/accountancy/admin/index.php | 26 +- htdocs/accountancy/admin/journals_list.php | 6 +- htdocs/accountancy/admin/productaccount.php | 8 +- htdocs/accountancy/admin/subaccount.php | 10 +- htdocs/accountancy/bookkeeping/balance.php | 22 +- htdocs/accountancy/bookkeeping/card.php | 4 +- htdocs/accountancy/bookkeeping/export.php | 78 +++--- htdocs/accountancy/bookkeeping/list.php | 76 +++--- .../accountancy/bookkeeping/listbyaccount.php | 52 ++-- htdocs/accountancy/closure/index.php | 20 +- htdocs/accountancy/customer/card.php | 4 +- htdocs/accountancy/customer/index.php | 8 +- htdocs/accountancy/customer/lines.php | 22 +- htdocs/accountancy/customer/list.php | 20 +- htdocs/accountancy/expensereport/card.php | 4 +- htdocs/accountancy/expensereport/index.php | 8 +- htdocs/accountancy/expensereport/lines.php | 22 +- htdocs/accountancy/expensereport/list.php | 16 +- htdocs/accountancy/index.php | 4 +- htdocs/accountancy/journal/bankjournal.php | 14 +- .../journal/expensereportsjournal.php | 2 +- .../accountancy/journal/purchasesjournal.php | 2 +- htdocs/accountancy/journal/sellsjournal.php | 2 +- htdocs/accountancy/journal/variousjournal.php | 2 +- htdocs/accountancy/supplier/card.php | 4 +- htdocs/accountancy/supplier/index.php | 8 +- htdocs/accountancy/supplier/lines.php | 22 +- htdocs/accountancy/supplier/list.php | 20 +- htdocs/adherents/admin/member_emails.php | 2 +- htdocs/adherents/admin/website.php | 2 +- htdocs/adherents/agenda.php | 6 +- .../actions_adherentcard_common.class.php | 8 +- htdocs/adherents/card.php | 42 ++-- htdocs/adherents/document.php | 6 +- htdocs/adherents/index.php | 4 +- htdocs/adherents/ldap.php | 2 +- htdocs/adherents/list.php | 22 +- htdocs/adherents/note.php | 2 +- htdocs/adherents/partnership.php | 6 +- htdocs/adherents/stats/index.php | 4 +- htdocs/adherents/subscription.php | 50 ++-- htdocs/adherents/subscription/card.php | 6 +- htdocs/adherents/subscription/info.php | 2 +- htdocs/adherents/subscription/list.php | 10 +- htdocs/adherents/type.php | 14 +- htdocs/adherents/type_ldap.php | 2 +- htdocs/adherents/type_translation.php | 4 +- htdocs/adherents/vcard.php | 2 +- htdocs/admin/accountant.php | 8 +- htdocs/admin/agenda_extsites.php | 2 +- htdocs/admin/agenda_xcal.php | 4 +- htdocs/admin/barcode.php | 2 +- htdocs/admin/boxes.php | 8 +- htdocs/admin/company.php | 4 +- htdocs/admin/const.php | 10 +- htdocs/admin/debugbar.php | 4 +- htdocs/admin/defaultvalues.php | 6 +- htdocs/admin/delais.php | 2 +- htdocs/admin/dict.php | 24 +- htdocs/admin/dolistore/ajax/image.php | 4 +- htdocs/admin/emailcollector_card.php | 10 +- htdocs/admin/emailcollector_list.php | 14 +- htdocs/admin/events.php | 4 +- htdocs/admin/expensereport.php | 6 +- htdocs/admin/expensereport_rules.php | 6 +- htdocs/admin/external_rss.php | 18 +- htdocs/admin/facture.php | 2 +- htdocs/admin/hrm.php | 2 +- htdocs/admin/ihm.php | 10 +- htdocs/admin/ldap.php | 4 +- htdocs/admin/limits.php | 4 +- htdocs/admin/mailing.php | 4 +- htdocs/admin/mails.php | 16 +- htdocs/admin/mails_senderprofile_list.php | 34 +-- htdocs/admin/mails_templates.php | 20 +- htdocs/admin/menus/edit.php | 18 +- htdocs/admin/menus/index.php | 14 +- htdocs/admin/modulehelp.php | 2 +- htdocs/admin/modules.php | 8 +- htdocs/admin/multicurrency.php | 4 +- htdocs/admin/payment.php | 2 +- htdocs/admin/paymentbybanktransfer.php | 6 +- htdocs/admin/pdf.php | 2 +- htdocs/admin/pdf_other.php | 8 +- htdocs/admin/perms.php | 4 +- htdocs/admin/prelevement.php | 6 +- htdocs/admin/receiptprinter.php | 8 +- htdocs/admin/supplier_payment.php | 2 +- htdocs/admin/taxes.php | 4 +- htdocs/admin/ticket.php | 8 +- htdocs/admin/ticket_public.php | 2 +- htdocs/admin/tools/dolibarr_export.php | 4 +- htdocs/admin/tools/export.php | 8 +- htdocs/admin/tools/export_files.php | 4 +- htdocs/admin/tools/listevents.php | 14 +- htdocs/admin/tools/listsessions.php | 4 +- htdocs/admin/translation.php | 14 +- htdocs/admin/website.php | 6 +- htdocs/admin/website_options.php | 4 +- htdocs/asset/accountancy_codes.php | 2 +- htdocs/asset/agenda.php | 6 +- htdocs/asset/card.php | 22 +- .../class/assetdepreciationoptions.class.php | 6 +- htdocs/asset/depreciation.php | 2 +- htdocs/asset/depreciation_options.php | 2 +- htdocs/asset/disposal.php | 2 +- htdocs/asset/document.php | 6 +- htdocs/asset/list.php | 14 +- htdocs/asset/model/accountancy_codes.php | 2 +- htdocs/asset/model/agenda.php | 6 +- htdocs/asset/model/card.php | 2 +- htdocs/asset/model/depreciation_options.php | 2 +- htdocs/asset/model/list.php | 14 +- htdocs/asset/model/note.php | 2 +- htdocs/asset/note.php | 2 +- .../tpl/depreciation_options_edit.tpl.php | 2 +- htdocs/barcode/printsheet.php | 18 +- htdocs/blockedlog/admin/blockedlog.php | 2 +- htdocs/blockedlog/admin/blockedlog_list.php | 36 +-- htdocs/blockedlog/ajax/block-add.php | 2 +- htdocs/blockedlog/ajax/block-info.php | 2 +- htdocs/bom/ajax/ajax.php | 2 +- htdocs/bom/bom_agenda.php | 8 +- htdocs/bom/bom_card.php | 22 +- htdocs/bom/bom_document.php | 6 +- htdocs/bom/bom_list.php | 20 +- htdocs/bom/bom_net_needs.php | 4 +- htdocs/bom/bom_note.php | 2 +- htdocs/bom/tpl/objectline_create.tpl.php | 4 +- htdocs/bom/tpl/objectline_edit.tpl.php | 4 +- htdocs/bookcal/availabilities_agenda.php | 6 +- htdocs/bookcal/availabilities_card.php | 12 +- htdocs/bookcal/availabilities_contact.php | 10 +- htdocs/bookcal/availabilities_document.php | 6 +- htdocs/bookcal/availabilities_list.php | 22 +- htdocs/bookcal/availabilities_note.php | 2 +- htdocs/bookcal/bookcalindex.php | 2 +- htdocs/bookcal/booking_list.php | 4 +- htdocs/bookcal/calendar_agenda.php | 6 +- htdocs/bookcal/calendar_card.php | 12 +- htdocs/bookcal/calendar_contact.php | 10 +- htdocs/bookcal/calendar_document.php | 6 +- htdocs/bookcal/calendar_list.php | 22 +- htdocs/bookcal/calendar_note.php | 2 +- htdocs/bookmarks/card.php | 16 +- htdocs/bookmarks/list.php | 10 +- htdocs/categories/card.php | 10 +- htdocs/categories/edit.php | 10 +- htdocs/categories/index.php | 4 +- htdocs/categories/info.php | 2 +- htdocs/categories/photos.php | 2 +- htdocs/categories/traduction.php | 2 +- htdocs/categories/viewcat.php | 12 +- htdocs/collab/index.php | 2 +- htdocs/comm/action/card.php | 120 ++++----- htdocs/comm/action/document.php | 8 +- htdocs/comm/action/index.php | 40 +-- htdocs/comm/action/info.php | 2 +- htdocs/comm/action/list.php | 78 +++--- htdocs/comm/action/pertype.php | 32 +-- htdocs/comm/action/peruser.php | 36 +-- htdocs/comm/action/rapport/index.php | 8 +- htdocs/comm/card.php | 16 +- htdocs/comm/contact.php | 6 +- htdocs/comm/index.php | 4 +- htdocs/comm/mailing/advtargetemailing.php | 28 +-- htdocs/comm/mailing/card.php | 2 +- htdocs/comm/mailing/cibles.php | 14 +- htdocs/comm/mailing/info.php | 2 +- htdocs/comm/mailing/list.php | 8 +- htdocs/comm/mailing/note.php | 2 +- htdocs/comm/multiprix.php | 6 +- htdocs/comm/propal/agenda.php | 6 +- htdocs/comm/propal/card.php | 114 ++++----- htdocs/comm/propal/contact.php | 8 +- htdocs/comm/propal/document.php | 6 +- htdocs/comm/propal/index.php | 2 +- htdocs/comm/propal/list.php | 78 +++--- htdocs/comm/propal/note.php | 2 +- htdocs/comm/propal/stats/index.php | 6 +- htdocs/comm/prospect/index.php | 2 +- htdocs/comm/recap-client.php | 2 +- htdocs/comm/remise.php | 12 +- htdocs/comm/remx.php | 6 +- htdocs/commande/agenda.php | 6 +- htdocs/commande/card.php | 76 +++--- htdocs/commande/contact.php | 8 +- htdocs/commande/customer.php | 4 +- htdocs/commande/document.php | 6 +- htdocs/commande/index.php | 2 +- htdocs/commande/list.php | 60 ++--- htdocs/commande/list_det.php | 52 ++-- htdocs/commande/note.php | 4 +- htdocs/commande/stats/index.php | 4 +- htdocs/compta/accounting-files.php | 36 +-- htdocs/compta/ajaxpayment.php | 2 +- .../bank/account_statement_document.php | 6 +- htdocs/compta/bank/bankentries_list.php | 60 ++--- htdocs/compta/bank/card.php | 44 ++-- htdocs/compta/bank/document.php | 6 +- htdocs/compta/bank/graph.php | 10 +- htdocs/compta/bank/info.php | 4 +- htdocs/compta/bank/line.php | 18 +- htdocs/compta/bank/list.php | 6 +- htdocs/compta/bank/releve.php | 8 +- htdocs/compta/bank/transfer.php | 16 +- htdocs/compta/bank/treso.php | 4 +- .../compta/bank/various_payment/document.php | 8 +- htdocs/compta/bank/various_payment/info.php | 4 +- htdocs/compta/bank/various_payment/list.php | 30 +-- .../compta/cashcontrol/cashcontrol_card.php | 24 +- .../compta/cashcontrol/cashcontrol_list.php | 18 +- htdocs/compta/cashcontrol/report.php | 2 +- htdocs/compta/charges/index.php | 8 +- htdocs/compta/clients.php | 4 +- htdocs/compta/deplacement/card.php | 32 +-- htdocs/compta/deplacement/document.php | 6 +- htdocs/compta/deplacement/index.php | 8 +- htdocs/compta/deplacement/info.php | 2 +- htdocs/compta/deplacement/list.php | 8 +- htdocs/compta/deplacement/stats/index.php | 6 +- htdocs/compta/facture/agenda-rec.php | 6 +- htdocs/compta/facture/agenda.php | 6 +- htdocs/compta/facture/card-rec.php | 52 ++-- htdocs/compta/facture/card.php | 238 +++++++++--------- htdocs/compta/facture/class/facture.class.php | 6 +- htdocs/compta/facture/contact.php | 10 +- htdocs/compta/facture/document.php | 8 +- htdocs/compta/facture/index.php | 2 +- .../compta/facture/invoicetemplate_list.php | 40 +-- htdocs/compta/facture/list.php | 26 +- htdocs/compta/facture/note.php | 4 +- htdocs/compta/facture/prelevement.php | 18 +- htdocs/compta/facture/stats/index.php | 6 +- htdocs/compta/index.php | 2 +- htdocs/compta/localtax/card.php | 10 +- htdocs/compta/localtax/clients.php | 8 +- htdocs/compta/localtax/index.php | 16 +- htdocs/compta/localtax/list.php | 6 +- htdocs/compta/localtax/quadri_detail.php | 16 +- htdocs/compta/paiement.php | 8 +- htdocs/compta/paiement/card.php | 8 +- htdocs/compta/paiement/cheque/card.php | 38 +-- htdocs/compta/paiement/cheque/list.php | 18 +- htdocs/compta/paiement/info.php | 2 +- htdocs/compta/paiement/list.php | 26 +- htdocs/compta/paiement/rapport.php | 6 +- htdocs/compta/paiement/tovalidate.php | 4 +- htdocs/compta/paiement_charge.php | 8 +- htdocs/compta/paiement_vat.php | 16 +- htdocs/compta/payment_sc/card.php | 2 +- htdocs/compta/payment_vat/card.php | 2 +- htdocs/compta/paymentbybanktransfer/index.php | 2 +- htdocs/compta/prelevement/card.php | 16 +- htdocs/compta/prelevement/create.php | 12 +- htdocs/compta/prelevement/demandes.php | 8 +- htdocs/compta/prelevement/factures.php | 10 +- htdocs/compta/prelevement/fiche-rejet.php | 6 +- htdocs/compta/prelevement/fiche-stat.php | 6 +- htdocs/compta/prelevement/index.php | 2 +- htdocs/compta/prelevement/line.php | 18 +- htdocs/compta/prelevement/list.php | 10 +- htdocs/compta/prelevement/orders_list.php | 8 +- htdocs/compta/prelevement/rejets.php | 6 +- htdocs/compta/prelevement/stats.php | 2 +- htdocs/compta/recap-compta.php | 6 +- htdocs/compta/resultat/clientfourn.php | 24 +- htdocs/compta/resultat/index.php | 20 +- htdocs/compta/resultat/result.php | 24 +- htdocs/compta/sociales/card.php | 30 +-- htdocs/compta/sociales/document.php | 6 +- htdocs/compta/sociales/info.php | 4 +- htdocs/compta/sociales/list.php | 42 ++-- htdocs/compta/sociales/note.php | 4 +- htdocs/compta/sociales/payments.php | 8 +- htdocs/compta/stats/byratecountry.php | 10 +- htdocs/compta/stats/cabyprodserv.php | 10 +- htdocs/compta/stats/cabyuser.php | 18 +- htdocs/compta/stats/casoc.php | 22 +- htdocs/compta/stats/index.php | 22 +- htdocs/compta/stats/supplier_turnover.php | 20 +- .../stats/supplier_turnover_by_prodserv.php | 10 +- .../stats/supplier_turnover_by_thirdparty.php | 10 +- htdocs/compta/tva/card.php | 26 +- htdocs/compta/tva/document.php | 6 +- htdocs/compta/tva/index.php | 8 +- htdocs/compta/tva/info.php | 4 +- htdocs/compta/tva/initdatesforvat.inc.php | 10 +- htdocs/compta/tva/list.php | 48 ++-- htdocs/compta/tva/payments.php | 6 +- htdocs/contact/agenda.php | 8 +- .../actions_contactcard_common.class.php | 2 +- htdocs/contact/card.php | 36 +-- htdocs/contact/consumption.php | 10 +- htdocs/contact/document.php | 6 +- htdocs/contact/info.php | 2 +- htdocs/contact/ldap.php | 2 +- htdocs/contact/list.php | 36 +-- htdocs/contact/note.php | 2 +- htdocs/contact/perso.php | 2 +- htdocs/contact/project.php | 2 +- htdocs/contact/vcard.php | 2 +- htdocs/contrat/agenda.php | 6 +- htdocs/contrat/card.php | 52 ++-- htdocs/contrat/contact.php | 8 +- htdocs/contrat/document.php | 6 +- htdocs/contrat/index.php | 4 +- htdocs/contrat/list.php | 64 ++--- htdocs/contrat/messaging.php | 8 +- htdocs/contrat/note.php | 4 +- htdocs/contrat/services_list.php | 28 +-- htdocs/contrat/ticket.php | 4 +- htdocs/core/actions_addupdatedelete.inc.php | 20 +- htdocs/core/actions_builddoc.inc.php | 4 +- htdocs/core/actions_dellink.inc.php | 4 +- htdocs/core/actions_extrafields.inc.php | 4 +- htdocs/core/actions_linkedfiles.inc.php | 12 +- htdocs/core/actions_massactions.inc.php | 8 +- htdocs/core/actions_setmoduleoptions.inc.php | 4 +- htdocs/core/actions_setnotes.inc.php | 6 +- htdocs/core/ajax/ajaxdirpreview.php | 6 +- htdocs/core/ajax/ajaxdirtree.php | 2 +- htdocs/core/ajax/ajaxinvoiceline.php | 2 +- htdocs/core/ajax/ajaxstatusprospect.php | 4 +- htdocs/core/ajax/ajaxtooltip.php | 2 +- htdocs/core/ajax/bankconciliate.php | 16 +- htdocs/core/ajax/box.php | 6 +- htdocs/core/ajax/check_notifications.php | 2 +- htdocs/core/ajax/constantonoff.php | 2 +- htdocs/core/ajax/contacts.php | 4 +- htdocs/core/ajax/extraparams.php | 2 +- htdocs/core/ajax/fileupload.php | 2 +- htdocs/core/ajax/objectonoff.php | 4 +- htdocs/core/ajax/selectobject.php | 2 +- htdocs/core/ajax/vatrates.php | 4 +- htdocs/core/bookmarks_page.php | 6 +- .../boxes/box_graph_invoices_permonth.php | 2 +- .../core/boxes/box_graph_invoices_peryear.php | 2 +- .../box_graph_invoices_supplier_permonth.php | 2 +- .../core/boxes/box_graph_orders_permonth.php | 2 +- .../box_graph_orders_supplier_permonth.php | 2 +- .../boxes/box_graph_product_distribution.php | 2 +- .../boxes/box_graph_propales_permonth.php | 2 +- htdocs/core/class/commonobject.class.php | 8 +- htdocs/core/class/extrafields.class.php | 32 +-- htdocs/core/class/html.formmail.class.php | 2 +- htdocs/core/class/html.formsetup.class.php | 4 +- htdocs/core/class/html.formticket.class.php | 10 +- htdocs/core/datepicker.php | 2 +- htdocs/core/get_info.php | 2 +- htdocs/core/get_menudiv.php | 6 +- htdocs/core/lib/company.lib.php | 22 +- htdocs/core/lib/files.lib.php | 2 +- htdocs/core/lib/security2.lib.php | 16 +- htdocs/core/login/functions_googleoauth.php | 2 +- htdocs/core/login/functions_openid.php | 2 +- htdocs/core/menus/standard/auguria.lib.php | 2 +- htdocs/core/menus/standard/auguria_menu.php | 2 +- htdocs/core/menus/standard/eldy.lib.php | 4 +- htdocs/core/menus/standard/eldy_menu.php | 2 +- .../mailings/eventorganization.modules.php | 4 +- .../core/modules/mailings/fraise.modules.php | 12 +- .../modules/mailings/partnership.modules.php | 8 +- .../modules/mailings/thirdparties.modules.php | 12 +- .../thirdparties_services_expired.modules.php | 2 +- .../movement/doc/pdf_standard.modules.php | 14 +- .../modules/oauth/google_oauthcallback.php | 2 +- htdocs/core/multicompany_page.php | 2 +- htdocs/core/photos_resize.php | 6 +- htdocs/core/search_page.php | 8 +- htdocs/core/tpl/admin_extrafields_add.tpl.php | 6 +- htdocs/core/tpl/card_presend.tpl.php | 2 +- htdocs/core/tpl/commonfields_add.tpl.php | 6 +- htdocs/core/tpl/commonfields_edit.tpl.php | 4 +- htdocs/core/tpl/contacts.tpl.php | 2 +- .../tpl/document_actions_post_headers.tpl.php | 4 +- htdocs/core/tpl/extrafields_view.tpl.php | 4 +- htdocs/core/tpl/massactions_pre.tpl.php | 4 +- htdocs/core/tpl/objectline_create.tpl.php | 4 +- htdocs/core/tpl/objectline_edit.tpl.php | 6 +- htdocs/core/tpl/resource_view.tpl.php | 4 +- htdocs/cron/card.php | 20 +- htdocs/cron/info.php | 2 +- htdocs/cron/list.php | 10 +- htdocs/datapolicy/admin/setup.php | 4 +- htdocs/dav/fileserver.php | 4 +- htdocs/delivery/card.php | 8 +- htdocs/document.php | 2 +- htdocs/don/card.php | 20 +- htdocs/don/document.php | 8 +- htdocs/don/info.php | 4 +- htdocs/don/list.php | 6 +- htdocs/don/note.php | 4 +- htdocs/don/paiement/list.php | 22 +- htdocs/don/payment/card.php | 2 +- htdocs/don/payment/payment.php | 8 +- htdocs/don/stats/index.php | 4 +- htdocs/ecm/dir_add_card.php | 8 +- htdocs/ecm/dir_card.php | 6 +- htdocs/ecm/file_card.php | 6 +- htdocs/ecm/file_note.php | 10 +- htdocs/ecm/index.php | 10 +- htdocs/ecm/index_auto.php | 8 +- htdocs/ecm/index_medias.php | 12 +- htdocs/ecm/search.php | 8 +- .../conferenceorbooth_card.php | 14 +- .../conferenceorbooth_contact.php | 12 +- .../conferenceorbooth_document.php | 8 +- .../conferenceorbooth_list.php | 24 +- .../conferenceorboothattendee_card.php | 16 +- .../conferenceorboothattendee_list.php | 26 +- .../conferenceorboothattendee_note.php | 2 +- .../core/actions_massactions_mail.inc.php | 2 +- htdocs/expedition/ajax/searchfrombarcode.php | 10 +- htdocs/expedition/card.php | 116 ++++----- htdocs/expedition/contact.php | 8 +- htdocs/expedition/dispatch.php | 22 +- htdocs/expedition/document.php | 6 +- htdocs/expedition/index.php | 2 +- htdocs/expedition/list.php | 32 +-- htdocs/expedition/note.php | 2 +- htdocs/expedition/shipment.php | 16 +- htdocs/expedition/stats/index.php | 4 +- htdocs/expedition/stats/month.php | 2 +- htdocs/expensereport/ajax/ajaxik.php | 8 +- htdocs/expensereport/card.php | 62 ++--- htdocs/expensereport/document.php | 6 +- htdocs/expensereport/index.php | 8 +- htdocs/expensereport/info.php | 2 +- htdocs/expensereport/list.php | 36 +-- htdocs/expensereport/note.php | 4 +- htdocs/expensereport/payment/card.php | 2 +- htdocs/expensereport/payment/list.php | 20 +- htdocs/expensereport/payment/payment.php | 8 +- htdocs/expensereport/stats/index.php | 8 +- htdocs/exports/export.php | 8 +- htdocs/externalsite/frames.php | 2 +- htdocs/fichinter/agenda.php | 6 +- htdocs/fichinter/card-rec.php | 18 +- htdocs/fichinter/card.php | 68 ++--- htdocs/fichinter/contact.php | 8 +- htdocs/fichinter/document.php | 6 +- htdocs/fichinter/index.php | 2 +- htdocs/fichinter/list.php | 12 +- htdocs/fichinter/note.php | 2 +- htdocs/fichinter/stats/index.php | 6 +- htdocs/fourn/ajax/getSupplierPrices.php | 2 +- htdocs/fourn/card.php | 8 +- .../fourn/class/fournisseur.facture.class.php | 6 +- htdocs/fourn/commande/card.php | 68 ++--- htdocs/fourn/commande/contact.php | 6 +- htdocs/fourn/commande/dispatch.php | 30 +-- htdocs/fourn/commande/document.php | 6 +- htdocs/fourn/commande/info.php | 6 +- htdocs/fourn/commande/list.php | 78 +++--- htdocs/fourn/commande/note.php | 2 +- htdocs/fourn/contact.php | 6 +- htdocs/fourn/facture/card-rec.php | 80 +++--- htdocs/fourn/facture/card.php | 162 ++++++------ htdocs/fourn/facture/contact.php | 6 +- htdocs/fourn/facture/document.php | 6 +- htdocs/fourn/facture/index.php | 2 +- htdocs/fourn/facture/info.php | 2 +- htdocs/fourn/facture/list-rec.php | 40 +-- htdocs/fourn/facture/list.php | 42 ++-- htdocs/fourn/facture/note.php | 2 +- htdocs/fourn/facture/paiement.php | 8 +- htdocs/fourn/facture/rapport.php | 6 +- htdocs/fourn/index.php | 2 +- htdocs/fourn/paiement/card.php | 4 +- htdocs/fourn/paiement/document.php | 6 +- htdocs/fourn/paiement/info.php | 2 +- htdocs/fourn/paiement/list.php | 22 +- htdocs/fourn/product/list.php | 6 +- htdocs/fourn/recap-fourn.php | 2 +- htdocs/ftp/index.php | 4 +- htdocs/holiday/card.php | 22 +- htdocs/holiday/card_group.php | 18 +- htdocs/holiday/define_holiday.php | 8 +- htdocs/holiday/document.php | 6 +- htdocs/holiday/info.php | 2 +- htdocs/holiday/list.php | 36 +-- htdocs/holiday/month_report.php | 14 +- htdocs/holiday/view_log.php | 16 +- htdocs/hrm/admin/admin_establishment.php | 2 +- htdocs/hrm/establishment/card.php | 12 +- htdocs/hrm/establishment/info.php | 6 +- htdocs/hrm/evaluation_agenda.php | 6 +- htdocs/hrm/evaluation_card.php | 12 +- htdocs/hrm/evaluation_contact.php | 10 +- htdocs/hrm/evaluation_document.php | 6 +- htdocs/hrm/evaluation_list.php | 20 +- htdocs/hrm/evaluation_note.php | 2 +- htdocs/hrm/index.php | 2 +- htdocs/hrm/job_agenda.php | 6 +- htdocs/hrm/job_card.php | 12 +- htdocs/hrm/job_document.php | 6 +- htdocs/hrm/job_list.php | 20 +- htdocs/hrm/job_note.php | 2 +- htdocs/hrm/position.php | 20 +- htdocs/hrm/position_agenda.php | 6 +- htdocs/hrm/position_card.php | 10 +- htdocs/hrm/position_document.php | 6 +- htdocs/hrm/position_list.php | 20 +- htdocs/hrm/position_note.php | 2 +- htdocs/hrm/skill_agenda.php | 6 +- htdocs/hrm/skill_card.php | 18 +- htdocs/hrm/skill_document.php | 6 +- htdocs/hrm/skill_list.php | 20 +- htdocs/hrm/skill_note.php | 2 +- htdocs/hrm/skill_tab.php | 4 +- htdocs/imports/import.php | 6 +- htdocs/index.php | 4 +- .../containers/wrapper.php | 4 +- .../containers/wrapper.php | 4 +- .../containers/wrapper.php | 4 +- .../containers/wrapper.php | 4 +- .../containers/wrapper.php | 4 +- .../containers/wrapper.php | 4 +- htdocs/install/step1.php | 2 +- htdocs/intracommreport/card.php | 2 +- htdocs/intracommreport/list.php | 10 +- .../knowledgemanagementindex.php | 2 +- .../knowledgerecord_agenda.php | 8 +- .../knowledgerecord_card.php | 8 +- .../knowledgerecord_contact.php | 10 +- .../knowledgerecord_document.php | 6 +- .../knowledgerecord_list.php | 22 +- .../knowledgerecord_note.php | 2 +- htdocs/loan/calcmens.php | 4 +- htdocs/loan/card.php | 22 +- htdocs/loan/document.php | 6 +- htdocs/loan/info.php | 4 +- htdocs/loan/list.php | 12 +- htdocs/loan/note.php | 2 +- htdocs/loan/payment/card.php | 2 +- htdocs/loan/payment/payment.php | 15 +- htdocs/loan/schedule.php | 6 +- htdocs/main.inc.php | 64 ++--- htdocs/margin/agentMargins.php | 18 +- htdocs/margin/checkMargins.php | 12 +- htdocs/margin/customerMargins.php | 26 +- htdocs/margin/productMargins.php | 26 +- htdocs/margin/tabs/productMargins.php | 6 +- htdocs/margin/tabs/thirdpartyMargins.php | 6 +- htdocs/master.inc.php | 4 +- htdocs/modulebuilder/index.php | 40 +-- htdocs/mrp/ajax/interface.php | 4 +- htdocs/mrp/mo_agenda.php | 6 +- htdocs/mrp/mo_card.php | 18 +- htdocs/mrp/mo_document.php | 6 +- htdocs/mrp/mo_list.php | 14 +- htdocs/mrp/mo_movements.php | 20 +- htdocs/mrp/mo_note.php | 2 +- htdocs/mrp/mo_production.php | 22 +- htdocs/multicurrency/multicurrency_rate.php | 14 +- htdocs/opensurvey/card.php | 2 +- htdocs/opensurvey/list.php | 8 +- htdocs/partnership/admin/setup.php | 2 +- htdocs/partnership/partnership_agenda.php | 8 +- htdocs/partnership/partnership_card.php | 14 +- htdocs/partnership/partnership_contact.php | 8 +- htdocs/partnership/partnership_document.php | 6 +- htdocs/partnership/partnership_list.php | 24 +- htdocs/partnership/partnership_note.php | 2 +- htdocs/paybox/admin/paybox.php | 2 +- htdocs/paypal/admin/paypal.php | 4 +- htdocs/product/admin/dynamic_prices.php | 12 +- htdocs/product/agenda.php | 6 +- htdocs/product/ajax/product_lot.php | 2 +- htdocs/product/ajax/products.php | 26 +- htdocs/product/card.php | 72 +++--- htdocs/product/composition/card.php | 8 +- htdocs/product/document.php | 6 +- htdocs/product/dynamic_price/editor.php | 4 +- htdocs/product/fournisseurs.php | 10 +- htdocs/product/index.php | 2 +- .../inventory/ajax/searchfrombarcode.php | 10 +- htdocs/product/inventory/card.php | 4 +- htdocs/product/inventory/inventory.php | 16 +- htdocs/product/inventory/list.php | 22 +- htdocs/product/list.php | 28 +-- htdocs/product/note.php | 2 +- htdocs/product/popuprop.php | 6 +- htdocs/product/price.php | 42 ++-- htdocs/product/reassort.php | 14 +- htdocs/product/reassortlot.php | 28 +-- htdocs/product/stats/bom.php | 6 +- htdocs/product/stats/card.php | 16 +- htdocs/product/stats/commande.php | 10 +- htdocs/product/stats/commande_fournisseur.php | 10 +- htdocs/product/stats/contrat.php | 6 +- htdocs/product/stats/facture.php | 6 +- htdocs/product/stats/facture_fournisseur.php | 10 +- htdocs/product/stats/facturerec.php | 10 +- htdocs/product/stats/mo.php | 10 +- htdocs/product/stats/propal.php | 10 +- htdocs/product/stats/supplier_proposal.php | 10 +- htdocs/product/stock/card.php | 16 +- htdocs/product/stock/fiche-valo.php | 2 +- htdocs/product/stock/info.php | 2 +- htdocs/product/stock/list.php | 16 +- htdocs/product/stock/massstockmove.php | 10 +- htdocs/product/stock/movement_card.php | 50 ++-- htdocs/product/stock/movement_list.php | 68 ++--- htdocs/product/stock/product.php | 48 ++-- htdocs/product/stock/productlot_card.php | 26 +- htdocs/product/stock/productlot_document.php | 6 +- htdocs/product/stock/productlot_list.php | 20 +- htdocs/product/stock/productlot_note.php | 2 +- htdocs/product/stock/replenish.php | 22 +- htdocs/product/stock/replenishorders.php | 18 +- .../stock/stats/commande_fournisseur.php | 12 +- htdocs/product/stock/stats/expedition.php | 12 +- htdocs/product/stock/stats/mo.php | 10 +- htdocs/product/stock/stats/reception.php | 12 +- htdocs/product/stock/stockatdate.php | 30 +-- .../stocktransfer/stocktransfer_agenda.php | 6 +- .../stocktransfer/stocktransfer_card.php | 20 +- .../stocktransfer/stocktransfer_contact.php | 6 +- .../stocktransfer/stocktransfer_document.php | 6 +- .../stocktransfer/stocktransfer_list.php | 22 +- .../stocktransfer/stocktransfer_note.php | 2 +- .../product/stock/tpl/stockcorrection.tpl.php | 6 +- .../product/stock/tpl/stocktransfer.tpl.php | 6 +- htdocs/product/stock/valo.php | 2 +- htdocs/product/traduction.php | 4 +- htdocs/projet/activity/index.php | 2 +- htdocs/projet/activity/perday.php | 26 +- htdocs/projet/activity/permonth.php | 26 +- htdocs/projet/activity/perweek.php | 26 +- htdocs/projet/admin/website.php | 4 +- htdocs/projet/agenda.php | 10 +- htdocs/projet/ajax/projects.php | 6 +- htdocs/projet/card.php | 30 +-- htdocs/projet/comment.php | 6 +- htdocs/projet/contact.php | 14 +- htdocs/projet/document.php | 6 +- htdocs/projet/element.php | 4 +- htdocs/projet/index.php | 4 +- htdocs/projet/list.php | 94 +++---- htdocs/projet/messaging.php | 10 +- htdocs/projet/note.php | 2 +- htdocs/projet/stats/index.php | 4 +- htdocs/projet/tasks.php | 46 ++-- htdocs/projet/tasks/comment.php | 10 +- htdocs/projet/tasks/contact.php | 12 +- htdocs/projet/tasks/document.php | 8 +- htdocs/projet/tasks/list.php | 42 ++-- htdocs/projet/tasks/note.php | 4 +- htdocs/projet/tasks/stats/index.php | 4 +- htdocs/projet/tasks/task.php | 12 +- htdocs/projet/tasks/time.php | 162 ++++++------ htdocs/public/agenda/agendaexport.php | 26 +- htdocs/public/bookcal/bookcalAjax.php | 4 +- htdocs/public/bookcal/index.php | 22 +- htdocs/public/company/new.php | 2 +- htdocs/public/demo/index.php | 10 +- .../public/eventorganization/attendee_new.php | 4 +- .../eventorganization/subscriptionok.php | 2 +- htdocs/public/members/new.php | 6 +- htdocs/public/members/public_card.php | 2 +- htdocs/public/members/public_list.php | 4 +- htdocs/public/opensurvey/index.php | 6 +- htdocs/public/opensurvey/studs.php | 2 +- htdocs/public/partnership/new.php | 8 +- htdocs/public/payment/newpayment.php | 32 +-- htdocs/public/payment/paymentok.php | 2 +- htdocs/public/project/index.php | 4 +- htdocs/public/project/new.php | 2 +- htdocs/public/project/suggestbooth.php | 8 +- htdocs/public/project/suggestconference.php | 8 +- htdocs/public/project/viewandvote.php | 2 +- htdocs/public/recruitment/index.php | 6 +- htdocs/public/ticket/ajax/ajax.php | 2 +- htdocs/public/ticket/create_ticket.php | 6 +- htdocs/public/ticket/list.php | 6 +- htdocs/public/users/view.php | 2 +- htdocs/public/website/javascript.js.php | 2 +- htdocs/public/website/styles.css.php | 2 +- htdocs/reception/card.php | 114 ++++----- htdocs/reception/contact.php | 8 +- htdocs/reception/dispatch.php | 26 +- htdocs/reception/document.php | 6 +- htdocs/reception/list.php | 44 ++-- htdocs/reception/note.php | 2 +- htdocs/reception/stats/index.php | 4 +- htdocs/reception/stats/month.php | 8 +- htdocs/recruitment/index.php | 2 +- .../recruitmentcandidature_agenda.php | 8 +- .../recruitmentcandidature_card.php | 14 +- .../recruitmentcandidature_document.php | 6 +- .../recruitmentcandidature_list.php | 16 +- .../recruitmentcandidature_note.php | 2 +- .../recruitmentjobposition_agenda.php | 6 +- .../recruitmentjobposition_applications.php | 6 +- .../recruitmentjobposition_card.php | 12 +- .../recruitmentjobposition_document.php | 6 +- .../recruitmentjobposition_list.php | 14 +- .../recruitmentjobposition_note.php | 2 +- htdocs/resource/agenda.php | 6 +- htdocs/resource/contact.php | 8 +- htdocs/resource/document.php | 6 +- htdocs/resource/element_resource.php | 14 +- htdocs/resource/list.php | 14 +- htdocs/resource/note.php | 2 +- htdocs/salaries/ajax/ajaxsalaries.php | 4 +- htdocs/salaries/card.php | 48 ++-- htdocs/salaries/document.php | 8 +- htdocs/salaries/info.php | 6 +- htdocs/salaries/list.php | 30 +-- htdocs/salaries/paiement_salary.php | 14 +- htdocs/salaries/payment_salary/card.php | 4 +- htdocs/salaries/payments.php | 40 +-- htdocs/salaries/stats/index.php | 8 +- htdocs/salaries/virement_request.php | 8 +- htdocs/societe/admin/societe.php | 20 +- htdocs/societe/agenda.php | 6 +- htdocs/societe/ajax/ajaxcompanies.php | 6 +- htdocs/societe/ajax/company.php | 4 +- htdocs/societe/card.php | 114 ++++----- htdocs/societe/consumption.php | 10 +- htdocs/societe/contact.php | 2 +- htdocs/societe/document.php | 6 +- htdocs/societe/index.php | 6 +- htdocs/societe/list.php | 52 ++-- htdocs/societe/messaging.php | 6 +- htdocs/societe/note.php | 2 +- htdocs/societe/notify/card.php | 10 +- htdocs/societe/paymentmodes.php | 34 +-- htdocs/societe/price.php | 24 +- htdocs/societe/project.php | 4 +- htdocs/societe/societecontact.php | 12 +- htdocs/societe/website.php | 10 +- htdocs/stripe/admin/stripe.php | 8 +- htdocs/stripe/ajax/ajax.php | 4 +- htdocs/stripe/charge.php | 6 +- htdocs/stripe/payout.php | 6 +- htdocs/stripe/transaction.php | 6 +- htdocs/supplier_proposal/card.php | 48 ++-- htdocs/supplier_proposal/contact.php | 6 +- htdocs/supplier_proposal/document.php | 6 +- htdocs/supplier_proposal/index.php | 2 +- htdocs/supplier_proposal/info.php | 4 +- htdocs/supplier_proposal/list.php | 44 ++-- htdocs/supplier_proposal/note.php | 2 +- htdocs/takepos/admin/orderprinters.php | 2 +- htdocs/takepos/admin/printqr.php | 2 +- htdocs/takepos/admin/terminal.php | 4 +- htdocs/takepos/ajax/ajax.php | 12 +- htdocs/takepos/floors.php | 4 +- htdocs/takepos/freezone.php | 2 +- htdocs/takepos/genimg/index.php | 6 +- htdocs/takepos/index.php | 2 +- htdocs/takepos/invoice.php | 2 +- htdocs/takepos/pay.php | 2 +- htdocs/takepos/phone.php | 8 +- htdocs/takepos/printbox.php | 2 +- htdocs/takepos/receipt.php | 6 +- htdocs/takepos/reduction.php | 2 +- htdocs/takepos/send.php | 2 +- htdocs/takepos/split.php | 4 +- htdocs/theme/eldy/info-box.inc.php | 2 +- htdocs/theme/eldy/style.css.php | 2 +- htdocs/theme/md/info-box.inc.php | 4 +- htdocs/theme/md/style.css.php | 2 +- htdocs/ticket/agenda.php | 14 +- htdocs/ticket/card.php | 58 ++--- htdocs/ticket/class/ticket.class.php | 2 +- htdocs/ticket/contact.php | 16 +- htdocs/ticket/document.php | 12 +- htdocs/ticket/index.php | 8 +- htdocs/ticket/list.php | 44 ++-- htdocs/ticket/messaging.php | 14 +- htdocs/ticket/stats/index.php | 6 +- htdocs/user/agenda.php | 6 +- htdocs/user/agenda_extsites.php | 2 +- htdocs/user/bank.php | 12 +- htdocs/user/card.php | 48 ++-- htdocs/user/clicktodial.php | 2 +- htdocs/user/document.php | 6 +- htdocs/user/group/card.php | 6 +- htdocs/user/group/ldap.php | 2 +- htdocs/user/group/list.php | 14 +- htdocs/user/group/perms.php | 8 +- htdocs/user/hierarchy.php | 4 +- htdocs/user/home.php | 4 +- htdocs/user/ldap.php | 2 +- htdocs/user/list.php | 18 +- htdocs/user/messaging.php | 4 +- htdocs/user/note.php | 2 +- htdocs/user/notify/card.php | 10 +- htdocs/user/param_ihm.php | 4 +- htdocs/user/passwordforgotten.php | 6 +- htdocs/user/perms.php | 8 +- htdocs/user/vcard.php | 2 +- htdocs/user/virtualcard.php | 2 +- htdocs/variants/ajax/getCombinations.php | 2 +- htdocs/variants/ajax/get_attribute_values.php | 2 +- htdocs/variants/card.php | 6 +- htdocs/variants/combinations.php | 10 +- htdocs/variants/list.php | 20 +- htdocs/viewimage.php | 2 +- htdocs/webhook/target_card.php | 12 +- htdocs/webhook/target_list.php | 14 +- .../class/html.formcardwebportal.class.php | 6 +- .../class/html.formlistwebportal.class.php | 12 +- .../controllers/document.controller.class.php | 4 +- htdocs/website/index.php | 56 ++--- htdocs/website/samples/wrapper.php | 4 +- htdocs/website/websiteaccount_card.php | 2 +- htdocs/workstation/workstation_agenda.php | 6 +- htdocs/workstation/workstation_card.php | 2 +- htdocs/workstation/workstation_document.php | 6 +- htdocs/workstation/workstation_list.php | 22 +- htdocs/workstation/workstation_note.php | 2 +- 827 files changed, 5130 insertions(+), 5136 deletions(-) diff --git a/dev/tools/codespell/codespell-lines-ignore.txt b/dev/tools/codespell/codespell-lines-ignore.txt index d0ebf648c39..5ddee3b9244 100644 --- a/dev/tools/codespell/codespell-lines-ignore.txt +++ b/dev/tools/codespell/codespell-lines-ignore.txt @@ -28,7 +28,7 @@ $tmpprojtime = $element->getSumOfAmount($idofelementuser ? $elementuser : '', $dates, $datee); // $element is a task. $elementuser may be empty $typea = ($data[$j]->typea == 'birth') ? $picb : $pice; //var_dump("$key, $tablename, $datefieldname, $dates, $datee"); - GETPOST("mouvement", 'int'), + GETPOSTINT("mouvement"), dol_syslog("msgid=".$overview[0]->message_id." date=".dol_print_date($overview[0]->udate, 'dayrfc', 'gmt')." from=".$overview[0]->from." to=".$overview[0]->to." subject=".$overview[0]->subject); if ((empty($dates) && empty($datee)) || (intval($dates) <= $element->datestart && intval($datee) >= $element->dateend)) { jQuery("#mouvement option").removeAttr("selected").change(); @@ -59,20 +59,19 @@ $tmp = array('id_users'=>$obj->id_users, 'nom'=>$obj->name, 'reponses'=>$obj->reponses); $tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0, true); // Disable hook for the moment //si les reponses ne concerne pas la colonne effacée, on concatenate - GETPOST("mouvement", "int"), GETPOST("mouvement", 'alpha'), - GETPOST("mouvement", 'int'), + GETPOSTINT("mouvement"), foreach ($TWeek as $weekIndex => $weekNb) { if (count($arrayfields) > 0 && !empty($arrayfields['t.datee']['checked'])) { if (jQuery("#mouvement").val() == \'0\') jQuery("#unitprice").removeAttr("disabled"); print ''.$langs->trans("TransferStock").''; print ''.dol_print_date($link->datea, "dayhour", "tzuser").''; $action = 'transfert'; - $date_com = dol_mktime(GETPOST('rehour', 'int'), GETPOST('remin', 'int'), GETPOST('resec', 'int'), GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); + $date_com = dol_mktime(GETPOSTINT('rehour'), GETPOSTINT('remin'), GETPOSTINT('resec'), GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); $date_next_execution = (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1); $date_next_execution = dol_mktime($rehour, $remin, 0, $remonth, $reday, $reyear); - $datee = dol_get_last_day(GETPOST('yeartoexport', 'int'), GETPOST('monthtoexport', 'int') ? GETPOST('monthtoexport', 'int') : 12); - $datesubscription = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", "int"), GETPOST("reyear", "int")); + $datee = dol_get_last_day(GETPOSTINT('yeartoexport'), GETPOSTINT('monthtoexport') ? GETPOSTINT('monthtoexport') : 12); + $datesubscription = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); $ensemblereponses = $obj->reponses; $object->datee = $datee; $object->periode = $dateperiod; @@ -114,20 +113,17 @@ $cle_rib = strtolower(checkES($rib, $CCC)); $date_com = dol_mktime(GETPOST('rehour'), GETPOST('remin'), GETPOST('resec'), GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear")); $date_next_execution = isset($date_next_execution) ? $date_next_execution : (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1); - $datefrom = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); - $datesubscription = dol_mktime(0, 0, 0, GETPOST("remonth", "int"), GETPOST("reday", "int"), GETPOST("reyear", "int")); + $datefrom = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); + $datesubscription = dol_mktime(0, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); $datetouse = ($this->date_end > 0) ? $this->date_end : ((isset($this->datee) && $this->datee > 0) ? $this->datee : 0); $elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee, !empty($project_field) ? $project_field : 'fk_projet'); $ensemblereponses = $obj->reponses; $head[$h][1] = $langs->trans("Referers"); $head[$tab][1] = $langs->trans("Referers"); $out .= "".$langs->trans("Referer").": ".(isset($_SERVER["HTTP_REFERER"]) ? dol_htmlentities($_SERVER["HTTP_REFERER"], ENT_COMPAT) : '')."
\n"; - $reday = GETPOST('reday', 'int'); $reday = GETPOSTINT('reday'); $sql = "SELECT p.rowid as id, p.entity, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_modification, p.budget_amount"; - $sql = "SELECT p.rowid as id, p.entity, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_update, p.budget_amount"; $sql = 'SELECT p.rowid as id, p.entity, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_modification, p.budget_amount'; - $sql = 'SELECT p.rowid as id, p.entity, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_update, p.budget_amount'; $sql .= " (cs.periode IS NOT NULL AND cs.periode between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; $sql .= " OR (cs.periode IS NULL AND cs.date_ech between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; $sql .= " VALUES (".$conf->entity.", '".$this->db->idate($this->datea)."'"; @@ -187,11 +183,10 @@ $datee = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); $datee = dol_stringtotime($dateerfc); $datepaid = dol_mktime(12, 0, 0, GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear")); - $datepaid = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int')); - $datepaye = dol_mktime(12, 0, 0, GETPOST("remonth", "int"), GETPOST("reday", "int"), GETPOST("reyear", "int")); - $datepaye = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int')); - $datepaye = dol_mktime(GETPOST("rehour", 'int'), GETPOST("remin", 'int'), GETPOST("resec", 'int'), GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int')); - $datepaye = dol_mktime(GETPOST("rehour", 'int'), GETPOST("remin", 'int'), GETPOST("resec", 'int'), GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int'), 'tzuserrel'); + $datepaid = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); + $datepaye = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); + $datepaye = dol_mktime(GETPOSTINT("rehour"), GETPOSTINT("remin"), GETPOSTINT("resec"), GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); + $datepaye = dol_mktime(GETPOSTINT("rehour"), GETPOSTINT("remin"), GETPOSTINT("resec"), GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear"), 'tzuserrel'); $ensemblereponses = $obj->reponses; $head[$h][1] = $langs->trans('Referers'); $morewherefilterarray[] = " t.datee <= '".$db->idate($search_date_end_end)."'"; @@ -238,8 +233,8 @@ foreach ($TWeek as $week_number) { if (!empty($arrayfields['t.datee']['checked'])) { if ($action == "transfert") { - if (GETPOST("reyear", "int") && GETPOST("remonth", "int") && GETPOST("reday", "int")) { if (GETPOST('reday')) { + if (GETPOSTINT("reyear") && GETPOSTINT("remonth") && GETPOSTINT("reday")) { print $form->selectDate($datee, 'datee', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to")); print ''; print ''; @@ -977,7 +977,7 @@ function fieldListAccountingCategories($fieldlist, $obj = null, $tabname = '', $ $fieldname = 'country'; if ($context == 'add') { $fieldname = 'country_id'; - $preselectcountrycode = GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : $mysoc->country_code; + $preselectcountrycode = GETPOSTISSET('country_id') ? GETPOSTINT('country_id') : $mysoc->country_code; print $form->select_country($preselectcountrycode, $fieldname, '', 28, 'maxwidth150 maxwidthonsmartphone'); } else { $preselectcountrycode = (empty($obj->country_code) ? (empty($obj->country) ? $mysoc->country_code : $obj->country) : $obj->country_code); diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 3eace908373..65a447811cc 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -143,13 +143,13 @@ if ($action == 'update') { } $constname = 'ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT'; - $constvalue = GETPOST($constname, 'int'); + $constvalue = GETPOSTINT($constname); if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { $error++; } $constname = 'ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT'; - $constvalue = GETPOST($constname, 'int'); + $constvalue = GETPOSTINT($constname); if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { $error++; } @@ -163,7 +163,7 @@ if ($action == 'update') { } if ($action == 'setACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT') { - $setDisableAuxiliaryAccountOnCustomerDeposit = GETPOST('value', 'int'); + $setDisableAuxiliaryAccountOnCustomerDeposit = GETPOSTINT('value'); $res = dolibarr_set_const($db, "ACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT", $setDisableAuxiliaryAccountOnCustomerDeposit, 'yesno', 0, '', $conf->entity); if (!($res > 0)) { $error++; @@ -177,7 +177,7 @@ if ($action == 'setACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT') { } if ($action == 'setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT') { - $setDisableAuxiliaryAccountOnSupplierDeposit = GETPOST('value', 'int'); + $setDisableAuxiliaryAccountOnSupplierDeposit = GETPOSTINT('value'); $res = dolibarr_set_const($db, "ACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT", $setDisableAuxiliaryAccountOnSupplierDeposit, 'yesno', 0, '', $conf->entity); if (!($res > 0)) { $error++; diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 902b184a48c..8a0d6764590 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -84,7 +84,7 @@ $model_option = array( if ($action == 'update') { $error = 0; - $modelcsv = GETPOST('ACCOUNTING_EXPORT_MODELCSV', 'int'); + $modelcsv = GETPOSTINT('ACCOUNTING_EXPORT_MODELCSV'); if (!empty($modelcsv)) { if (!dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) { diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index cb142948096..8f2aff9a587 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -29,10 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php'; $action = GETPOST('action', 'aZ09'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 477fac08eee..e6408d33ab6 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php'; $langs->loadLangs(array("admin", "compta")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); @@ -70,8 +70,8 @@ foreach ($tmpstatus2label as $key => $val) { $status2label[$key] = $langs->trans($val); } -$date_start = dol_mktime(0, 0, 0, GETPOST('fiscalyearmonth', 'int'), GETPOST('fiscalyearday', 'int'), GETPOST('fiscalyearyear', 'int')); -$date_end = dol_mktime(0, 0, 0, GETPOST('fiscalyearendmonth', 'int'), GETPOST('fiscalyearendday', 'int'), GETPOST('fiscalyearendyear', 'int')); +$date_start = dol_mktime(0, 0, 0, GETPOSTINT('fiscalyearmonth'), GETPOSTINT('fiscalyearday'), GETPOSTINT('fiscalyearyear')); +$date_end = dol_mktime(0, 0, 0, GETPOSTINT('fiscalyearendmonth'), GETPOSTINT('fiscalyearendday'), GETPOSTINT('fiscalyearendyear')); $permissiontoadd = $user->hasRight('accounting', 'fiscalyear', 'write'); diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php index 39754c0345d..f1ad54d9bb9 100644 --- a/htdocs/accountancy/admin/fiscalyear_info.php +++ b/htdocs/accountancy/admin/fiscalyear_info.php @@ -38,7 +38,7 @@ if (!$user->hasRight('accounting', 'fiscalyear', 'write')) { accessforbidden(); } -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); // View diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index ea93f6751fa..748b55ed733 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -45,7 +45,7 @@ if (!$user->hasRight('accounting', 'chartofaccount')) { $action = GETPOST('action', 'aZ09'); -$nbletter = GETPOST('ACCOUNTING_LETTERING_NBLETTERS', 'int'); +$nbletter = GETPOSTINT('ACCOUNTING_LETTERING_NBLETTERS'); // Parameters ACCOUNTING_* and others $list = array( @@ -70,7 +70,7 @@ $error = 0; if (in_array($action, array('setBANK_DISABLE_DIRECT_INPUT', 'setACCOUNTANCY_COMBO_FOR_AUX', 'setACCOUNTING_MANAGE_ZERO'))) { $constname = preg_replace('/^set/', '', $action); - $constvalue = GETPOST('value', 'int'); + $constvalue = GETPOSTINT('value'); $res = dolibarr_set_const($db, $constname, $constvalue, 'yesno', 0, '', $conf->entity); if (!($res > 0)) { $error++; @@ -102,7 +102,7 @@ if ($action == 'update') { $constvalue = GETPOST($constname, 'alpha'); if ($constname == 'ACCOUNTING_DATE_START_BINDING') { - $constvalue = dol_mktime(0, 0, 0, GETPOST($constname.'month', 'int'), GETPOST($constname.'day', 'int'), GETPOST($constname.'year', 'int')); + $constvalue = dol_mktime(0, 0, 0, GETPOSTINT($constname.'month'), GETPOSTINT($constname.'day'), GETPOSTINT($constname.'year')); } if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { @@ -128,7 +128,7 @@ if ($action == 'update') { } if ($action == 'setmanagezero') { - $setmanagezero = GETPOST('value', 'int'); + $setmanagezero = GETPOSTINT('value'); $res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity); if (!($res > 0)) { $error++; @@ -142,7 +142,7 @@ if ($action == 'setmanagezero') { } if ($action == 'setdisabledirectinput') { - $setdisabledirectinput = GETPOST('value', 'int'); + $setdisabledirectinput = GETPOSTINT('value'); $res = dolibarr_set_const($db, "BANK_DISABLE_DIRECT_INPUT", $setdisabledirectinput, 'yesno', 0, '', $conf->entity); if (!($res > 0)) { $error++; @@ -156,7 +156,7 @@ if ($action == 'setdisabledirectinput') { } if ($action == 'setenabledraftexport') { - $setenabledraftexport = GETPOST('value', 'int'); + $setenabledraftexport = GETPOSTINT('value'); $res = dolibarr_set_const($db, "ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL", $setenabledraftexport, 'yesno', 0, '', $conf->entity); if (!($res > 0)) { $error++; @@ -170,7 +170,7 @@ if ($action == 'setenabledraftexport') { } if ($action == 'setenablesubsidiarylist') { - $setenablesubsidiarylist = GETPOST('value', 'int'); + $setenablesubsidiarylist = GETPOSTINT('value'); $res = dolibarr_set_const($db, "ACCOUNTANCY_COMBO_FOR_AUX", $setenablesubsidiarylist, 'yesno', 0, '', $conf->entity); if (!($res > 0)) { $error++; @@ -184,7 +184,7 @@ if ($action == 'setenablesubsidiarylist') { } if ($action == 'setdisablebindingonsales') { - $setdisablebindingonsales = GETPOST('value', 'int'); + $setdisablebindingonsales = GETPOSTINT('value'); $res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_SALES", $setdisablebindingonsales, 'yesno', 0, '', $conf->entity); if (!($res > 0)) { $error++; @@ -198,7 +198,7 @@ if ($action == 'setdisablebindingonsales') { } if ($action == 'setdisablebindingonpurchases') { - $setdisablebindingonpurchases = GETPOST('value', 'int'); + $setdisablebindingonpurchases = GETPOSTINT('value'); $res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_PURCHASES", $setdisablebindingonpurchases, 'yesno', 0, '', $conf->entity); if (!($res > 0)) { $error++; @@ -212,7 +212,7 @@ if ($action == 'setdisablebindingonpurchases') { } if ($action == 'setdisablebindingonexpensereports') { - $setdisablebindingonexpensereports = GETPOST('value', 'int'); + $setdisablebindingonexpensereports = GETPOSTINT('value'); $res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS", $setdisablebindingonexpensereports, 'yesno', 0, '', $conf->entity); if (!($res > 0)) { $error++; @@ -226,7 +226,7 @@ if ($action == 'setdisablebindingonexpensereports') { } if ($action == 'setenablelettering') { - $setenablelettering = GETPOST('value', 'int'); + $setenablelettering = GETPOSTINT('value'); $res = dolibarr_set_const($db, "ACCOUNTING_ENABLE_LETTERING", $setenablelettering, 'yesno', 0, '', $conf->entity); if (!($res > 0)) { $error++; @@ -240,7 +240,7 @@ if ($action == 'setenablelettering') { } if ($action == 'setenableautolettering') { - $setenableautolettering = GETPOST('value', 'int'); + $setenableautolettering = GETPOSTINT('value'); $res = dolibarr_set_const($db, "ACCOUNTING_ENABLE_AUTOLETTERING", $setenableautolettering, 'yesno', 0, '', $conf->entity); if (!($res > 0)) { $error++; @@ -254,7 +254,7 @@ if ($action == 'setenableautolettering') { } if ($action == 'setenablevatreversecharge') { - $setenablevatreversecharge = GETPOST('value', 'int'); + $setenablevatreversecharge = GETPOSTINT('value'); $res = dolibarr_set_const($db, "ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE", $setenablevatreversecharge, 'yesno', 0, '', $conf->entity); if (!($res > 0)) { $error++; diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index 6f001eec6e5..1df04810801 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -56,12 +56,12 @@ $actl[0] = img_picto($langs->trans("Disabled"), 'switch_off', 'class="size15x"') $actl[1] = img_picto($langs->trans("Activated"), 'switch_on', 'class="size15x"'); $listoffset = GETPOST('listoffset', 'alpha'); -$listlimit = GETPOST('listlimit', 'int') > 0 ? GETPOST('listlimit', 'int') : 1000; +$listlimit = GETPOSTINT('listlimit') > 0 ? GETPOSTINT('listlimit') : 1000; $active = 1; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -77,7 +77,7 @@ if (empty($sortorder)) { $error = 0; -$search_country_id = GETPOST('search_country_id', 'int'); +$search_country_id = GETPOSTINT('search_country_id'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('admin')); diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 66b120cf1d5..aa4c4a3eb00 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -57,13 +57,13 @@ $optioncss = GETPOST('optioncss', 'alpha'); $codeventil_buy = GETPOST('codeventil_buy', 'array'); $codeventil_sell = GETPOST('codeventil_sell', 'array'); $chk_prod = GETPOST('chk_prod', 'array'); -$default_account = GETPOST('default_account', 'int'); +$default_account = GETPOSTINT('default_account'); $account_number_buy = GETPOST('account_number_buy'); $account_number_sell = GETPOST('account_number_sell'); $changeaccount = GETPOST('changeaccount', 'array'); $changeaccount_buy = GETPOST('changeaccount_buy', 'array'); $changeaccount_sell = GETPOST('changeaccount_sell', 'array'); -$searchCategoryProductOperator = (GETPOST('search_category_product_operator', 'int') ? GETPOST('search_category_product_operator', 'int') : 0); +$searchCategoryProductOperator = (GETPOSTINT('search_category_product_operator') ? GETPOSTINT('search_category_product_operator') : 0); $searchCategoryProductList = GETPOST('search_category_product_list', 'array'); $search_ref = GETPOST('search_ref', 'alpha'); $search_label = GETPOST('search_label', 'alpha'); @@ -84,10 +84,10 @@ if (empty($accounting_product_mode)) { $accounting_product_mode = 'ACCOUNTANCY_SELL'; } -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : getDolGlobalInt('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : getDolGlobalInt('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/accountancy/admin/subaccount.php b/htdocs/accountancy/admin/subaccount.php index fb9a61e36d0..b048663e405 100644 --- a/htdocs/accountancy/admin/subaccount.php +++ b/htdocs/accountancy/admin/subaccount.php @@ -35,8 +35,8 @@ $langs->loadLangs(array("accountancy", "admin", "bills", "compta", "errors", "hr $mesg = ''; $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); -$id = GETPOST('id', 'int'); -$rowid = GETPOST('rowid', 'int'); +$id = GETPOSTINT('id'); +$rowid = GETPOSTINT('rowid'); $massaction = GETPOST('massaction', 'aZ09'); $optioncss = GETPOST('optioncss', 'alpha'); $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) @@ -44,7 +44,7 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'ac $search_subaccount = GETPOST('search_subaccount', 'alpha'); $search_label = GETPOST('search_label', 'alpha'); -$search_type = GETPOST('search_type', 'int'); +$search_type = GETPOSTINT('search_type'); // Security check if ($user->socid > 0) { @@ -55,10 +55,10 @@ if (!$user->hasRight('accounting', 'chartofaccount')) { } // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index dfbe2a06cff..b04e3f644e2 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -50,8 +50,8 @@ if ($type == 'sub') { } $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : $context_default; $show_subgroup = GETPOST('show_subgroup', 'alpha'); -$search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int')); -$search_date_end = dol_mktime(23, 59, 59, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int')); +$search_date_start = dol_mktime(0, 0, 0, GETPOSTINT('date_startmonth'), GETPOSTINT('date_startday'), GETPOSTINT('date_startyear')); +$search_date_end = dol_mktime(23, 59, 59, GETPOSTINT('date_endmonth'), GETPOSTINT('date_endday'), GETPOSTINT('date_endyear')); $search_ledger_code = GETPOST('search_ledger_code', 'array'); $search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha'); if ($search_accountancy_code_start == - 1) { @@ -64,10 +64,10 @@ if ($search_accountancy_code_end == - 1) { $search_not_reconciled = GETPOST('search_not_reconciled', 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action @@ -161,15 +161,15 @@ if (empty($reshook)) { if (!empty($search_date_start)) { $filter['t.doc_date>='] = $search_date_start; - $param .= '&date_startmonth=' . GETPOST('date_startmonth', 'int') . '&date_startday=' . GETPOST('date_startday', 'int') . '&date_startyear=' . GETPOST('date_startyear', 'int'); + $param .= '&date_startmonth=' . GETPOSTINT('date_startmonth') . '&date_startday=' . GETPOSTINT('date_startday') . '&date_startyear=' . GETPOSTINT('date_startyear'); } if (!empty($search_date_end)) { $filter['t.doc_date<='] = $search_date_end; - $param .= '&date_endmonth=' . GETPOST('date_endmonth', 'int') . '&date_endday=' . GETPOST('date_endday', 'int') . '&date_endyear=' . GETPOST('date_endyear', 'int'); + $param .= '&date_endmonth=' . GETPOSTINT('date_endmonth') . '&date_endday=' . GETPOSTINT('date_endday') . '&date_endyear=' . GETPOSTINT('date_endyear'); } if (!empty($search_doc_date)) { $filter['t.doc_date'] = $search_doc_date; - $param .= '&doc_datemonth=' . GETPOST('doc_datemonth', 'int') . '&doc_dateday=' . GETPOST('doc_dateday', 'int') . '&doc_dateyear=' . GETPOST('doc_dateyear', 'int'); + $param .= '&doc_datemonth=' . GETPOSTINT('doc_datemonth') . '&doc_dateday=' . GETPOSTINT('doc_dateday') . '&doc_dateyear=' . GETPOSTINT('doc_dateyear'); } if (!empty($search_accountancy_code_start)) { if ($type == 'sub') { @@ -587,20 +587,20 @@ if ($action != 'export_csv') { if ($line->subledger_account) { $urlzoom = DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?type=sub&search_accountancy_code_start=' . urlencode($line->subledger_account) . '&search_accountancy_code_end=' . urlencode($line->subledger_account); if (GETPOSTISSET('date_startmonth')) { - $urlzoom .= '&search_date_startmonth=' . GETPOST('date_startmonth', 'int') . '&search_date_startday=' . GETPOST('date_startday', 'int') . '&search_date_startyear=' . GETPOST('date_startyear', 'int'); + $urlzoom .= '&search_date_startmonth=' . GETPOSTINT('date_startmonth') . '&search_date_startday=' . GETPOSTINT('date_startday') . '&search_date_startyear=' . GETPOSTINT('date_startyear'); } if (GETPOSTISSET('date_endmonth')) { - $urlzoom .= '&search_date_endmonth=' . GETPOST('date_endmonth', 'int') . '&search_date_endday=' . GETPOST('date_endday', 'int') . '&search_date_endyear=' . GETPOST('date_endyear', 'int'); + $urlzoom .= '&search_date_endmonth=' . GETPOSTINT('date_endmonth') . '&search_date_endday=' . GETPOSTINT('date_endday') . '&search_date_endyear=' . GETPOSTINT('date_endyear'); } } } else { if ($line->numero_compte) { $urlzoom = DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start=' . urlencode($line->numero_compte) . '&search_accountancy_code_end=' . urlencode($line->numero_compte); if (GETPOSTISSET('date_startmonth')) { - $urlzoom .= '&search_date_startmonth=' . GETPOST('date_startmonth', 'int') . '&search_date_startday=' . GETPOST('date_startday', 'int') . '&search_date_startyear=' . GETPOST('date_startyear', 'int'); + $urlzoom .= '&search_date_startmonth=' . GETPOSTINT('date_startmonth') . '&search_date_startday=' . GETPOSTINT('date_startday') . '&search_date_startyear=' . GETPOSTINT('date_startyear'); } if (GETPOSTISSET('date_endmonth')) { - $urlzoom .= '&search_date_endmonth=' . GETPOST('date_endmonth', 'int') . '&search_date_endday=' . GETPOST('date_endday', 'int') . '&search_date_endyear=' . GETPOST('date_endyear', 'int'); + $urlzoom .= '&search_date_endmonth=' . GETPOSTINT('date_endmonth') . '&search_date_endday=' . GETPOSTINT('date_endday') . '&search_date_endyear=' . GETPOSTINT('date_endyear'); } } } diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 4fa8ff92697..444cb44d104 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -250,7 +250,7 @@ if ($action == "confirm_update") { $object->label_compte = ''; $object->debit = 0; $object->credit = 0; - $object->doc_date = $date_start = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int')); + $object->doc_date = $date_start = dol_mktime(0, 0, 0, GETPOSTINT('doc_datemonth'), GETPOSTINT('doc_dateday'), GETPOSTINT('doc_dateyear')); $object->doc_type = GETPOST('doc_type', 'alpha'); $object->piece_num = GETPOSTINT('next_num_mvt'); $object->doc_ref = GETPOST('doc_ref', 'alpha'); @@ -276,7 +276,7 @@ if ($action == "confirm_update") { } if ($action == 'setdate') { - $datedoc = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int')); + $datedoc = dol_mktime(0, 0, 0, GETPOSTINT('doc_datemonth'), GETPOSTINT('doc_dateday'), GETPOSTINT('doc_dateyear')); $result = $object->updateByMvt($piece_num, 'doc_date', $db->idate($datedoc), $mode); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); diff --git a/htdocs/accountancy/bookkeeping/export.php b/htdocs/accountancy/bookkeeping/export.php index f6d4f4bfd30..b2d205f74eb 100644 --- a/htdocs/accountancy/bookkeeping/export.php +++ b/htdocs/accountancy/bookkeeping/export.php @@ -43,55 +43,55 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; // Load translation files required by the page $langs->loadLangs(array("accountancy", "compta")); -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'bookkeepinglist'; -$search_mvt_num = GETPOST('search_mvt_num', 'int'); +$search_mvt_num = GETPOSTINT('search_mvt_num'); $search_doc_type = GETPOST("search_doc_type", 'alpha'); $search_doc_ref = GETPOST("search_doc_ref", 'alpha'); -$search_date_startyear = GETPOST('search_date_startyear', 'int'); -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); -$search_date_startday = GETPOST('search_date_startday', 'int'); -$search_date_endyear = GETPOST('search_date_endyear', 'int'); -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); -$search_date_endday = GETPOST('search_date_endday', 'int'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endday = GETPOSTINT('search_date_endday'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); -$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int')); -$search_date_creation_startyear = GETPOST('search_date_creation_startyear', 'int'); -$search_date_creation_startmonth = GETPOST('search_date_creation_startmonth', 'int'); -$search_date_creation_startday = GETPOST('search_date_creation_startday', 'int'); -$search_date_creation_endyear = GETPOST('search_date_creation_endyear', 'int'); -$search_date_creation_endmonth = GETPOST('search_date_creation_endmonth', 'int'); -$search_date_creation_endday = GETPOST('search_date_creation_endday', 'int'); +$search_doc_date = dol_mktime(0, 0, 0, GETPOSTINT('doc_datemonth'), GETPOSTINT('doc_dateday'), GETPOSTINT('doc_dateyear')); +$search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); +$search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); +$search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); +$search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); +$search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); +$search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); $search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); $search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); -$search_date_modification_startyear = GETPOST('search_date_modification_startyear', 'int'); -$search_date_modification_startmonth = GETPOST('search_date_modification_startmonth', 'int'); -$search_date_modification_startday = GETPOST('search_date_modification_startday', 'int'); -$search_date_modification_endyear = GETPOST('search_date_modification_endyear', 'int'); -$search_date_modification_endmonth = GETPOST('search_date_modification_endmonth', 'int'); -$search_date_modification_endday = GETPOST('search_date_modification_endday', 'int'); +$search_date_modification_startyear = GETPOSTINT('search_date_modification_startyear'); +$search_date_modification_startmonth = GETPOSTINT('search_date_modification_startmonth'); +$search_date_modification_startday = GETPOSTINT('search_date_modification_startday'); +$search_date_modification_endyear = GETPOSTINT('search_date_modification_endyear'); +$search_date_modification_endmonth = GETPOSTINT('search_date_modification_endmonth'); +$search_date_modification_endday = GETPOSTINT('search_date_modification_endday'); $search_date_modification_start = dol_mktime(0, 0, 0, $search_date_modification_startmonth, $search_date_modification_startday, $search_date_modification_startyear); $search_date_modification_end = dol_mktime(23, 59, 59, $search_date_modification_endmonth, $search_date_modification_endday, $search_date_modification_endyear); -$search_date_export_startyear = GETPOST('search_date_export_startyear', 'int'); -$search_date_export_startmonth = GETPOST('search_date_export_startmonth', 'int'); -$search_date_export_startday = GETPOST('search_date_export_startday', 'int'); -$search_date_export_endyear = GETPOST('search_date_export_endyear', 'int'); -$search_date_export_endmonth = GETPOST('search_date_export_endmonth', 'int'); -$search_date_export_endday = GETPOST('search_date_export_endday', 'int'); +$search_date_export_startyear = GETPOSTINT('search_date_export_startyear'); +$search_date_export_startmonth = GETPOSTINT('search_date_export_startmonth'); +$search_date_export_startday = GETPOSTINT('search_date_export_startday'); +$search_date_export_endyear = GETPOSTINT('search_date_export_endyear'); +$search_date_export_endmonth = GETPOSTINT('search_date_export_endmonth'); +$search_date_export_endday = GETPOSTINT('search_date_export_endday'); $search_date_export_start = dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear); $search_date_export_end = dol_mktime(23, 59, 59, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear); -$search_date_validation_startyear = GETPOST('search_date_validation_startyear', 'int'); -$search_date_validation_startmonth = GETPOST('search_date_validation_startmonth', 'int'); -$search_date_validation_startday = GETPOST('search_date_validation_startday', 'int'); -$search_date_validation_endyear = GETPOST('search_date_validation_endyear', 'int'); -$search_date_validation_endmonth = GETPOST('search_date_validation_endmonth', 'int'); -$search_date_validation_endday = GETPOST('search_date_validation_endday', 'int'); +$search_date_validation_startyear = GETPOSTINT('search_date_validation_startyear'); +$search_date_validation_startmonth = GETPOSTINT('search_date_validation_startmonth'); +$search_date_validation_startday = GETPOSTINT('search_date_validation_startday'); +$search_date_validation_endyear = GETPOSTINT('search_date_validation_endyear'); +$search_date_validation_endmonth = GETPOSTINT('search_date_validation_endmonth'); +$search_date_validation_endday = GETPOSTINT('search_date_validation_endday'); $search_date_validation_start = dol_mktime(0, 0, 0, $search_date_validation_startmonth, $search_date_validation_startday, $search_date_validation_startyear); $search_date_validation_end = dol_mktime(23, 59, 59, $search_date_validation_endmonth, $search_date_validation_endday, $search_date_validation_endyear); $search_import_key = GETPOST("search_import_key", 'alpha'); @@ -104,7 +104,7 @@ if (GETPOST("button_export_file_x") || GETPOST("button_export_file.x") || GETPOS $action = 'export_file'; } -$search_account_category = GETPOST('search_account_category', 'int'); +$search_account_category = GETPOSTINT('search_account_category'); $search_accountancy_code = GETPOST("search_accountancy_code", 'alpha'); $search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha'); @@ -134,11 +134,11 @@ $search_lettering_code = GETPOST('search_lettering_code', 'alpha'); $search_not_reconciled = GETPOST('search_not_reconciled', 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); $optioncss = GETPOST('optioncss', 'alpha'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0) { $page = 0; } @@ -159,7 +159,7 @@ $hookmanager->initHooks(array('bookkeepingexport')); $formaccounting = new FormAccounting($db); $form = new Form($db); -if (!in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && !GETPOSTISSET('begin') && !GETPOSTISSET('formfilteraction') && GETPOST('page', 'int') == '' && !GETPOST('noreset', 'int') && $user->hasRight('accounting', 'mouvements', 'export')) { +if (!in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && !GETPOSTISSET('begin') && !GETPOSTISSET('formfilteraction') && GETPOSTINT('page') == '' && !GETPOSTINT('noreset') && $user->hasRight('accounting', 'mouvements', 'export')) { if (empty($search_date_start) && empty($search_date_end) && !GETPOSTISSET('restore_lastsearch_values') && !GETPOST('search_accountancy_code_start')) { $query = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear "; $query .= " where date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."' limit 1"; @@ -459,7 +459,7 @@ if (empty($reshook)) { } if ($action == 'setreexport') { - $setreexport = GETPOST('value', 'int'); + $setreexport = GETPOSTINT('value'); if (!dolibarr_set_const($db, "ACCOUNTING_REEXPORT", $setreexport, 'yesno', 0, '', $conf->entity)) { $error++; } @@ -614,7 +614,7 @@ if ($action == 'export_fileconfirm' && $user->hasRight('accounting', 'mouvements $error++; setEventMessages($object->error, $object->errors, 'errors'); } else { - $formatexport = GETPOST('formatexport', 'int'); + $formatexport = GETPOSTINT('formatexport'); $notexportlettering = GETPOST('notexportlettering', 'alpha'); diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 990d6e288c0..2c62409c4ae 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/lettering.class.php'; $langs->loadLangs(array("accountancy", "compta")); // Get Parameters -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); // action+display Parameters $action = GETPOST('action', 'aZ09'); @@ -53,53 +53,53 @@ $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'bookkeepinglist'; // Search Parameters -$search_mvt_num = GETPOST('search_mvt_num', 'int'); +$search_mvt_num = GETPOSTINT('search_mvt_num'); $search_doc_type = GETPOST("search_doc_type", 'alpha'); $search_doc_ref = GETPOST("search_doc_ref", 'alpha'); -$search_date_startyear = GETPOST('search_date_startyear', 'int'); -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); -$search_date_startday = GETPOST('search_date_startday', 'int'); -$search_date_endyear = GETPOST('search_date_endyear', 'int'); -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); -$search_date_endday = GETPOST('search_date_endday', 'int'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endday = GETPOSTINT('search_date_endday'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); -$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int')); -$search_date_creation_startyear = GETPOST('search_date_creation_startyear', 'int'); -$search_date_creation_startmonth = GETPOST('search_date_creation_startmonth', 'int'); -$search_date_creation_startday = GETPOST('search_date_creation_startday', 'int'); -$search_date_creation_endyear = GETPOST('search_date_creation_endyear', 'int'); -$search_date_creation_endmonth = GETPOST('search_date_creation_endmonth', 'int'); -$search_date_creation_endday = GETPOST('search_date_creation_endday', 'int'); +$search_doc_date = dol_mktime(0, 0, 0, GETPOSTINT('doc_datemonth'), GETPOSTINT('doc_dateday'), GETPOSTINT('doc_dateyear')); +$search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); +$search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); +$search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); +$search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); +$search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); +$search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); $search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); $search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); -$search_date_modification_startyear = GETPOST('search_date_modification_startyear', 'int'); -$search_date_modification_startmonth = GETPOST('search_date_modification_startmonth', 'int'); -$search_date_modification_startday = GETPOST('search_date_modification_startday', 'int'); -$search_date_modification_endyear = GETPOST('search_date_modification_endyear', 'int'); -$search_date_modification_endmonth = GETPOST('search_date_modification_endmonth', 'int'); -$search_date_modification_endday = GETPOST('search_date_modification_endday', 'int'); +$search_date_modification_startyear = GETPOSTINT('search_date_modification_startyear'); +$search_date_modification_startmonth = GETPOSTINT('search_date_modification_startmonth'); +$search_date_modification_startday = GETPOSTINT('search_date_modification_startday'); +$search_date_modification_endyear = GETPOSTINT('search_date_modification_endyear'); +$search_date_modification_endmonth = GETPOSTINT('search_date_modification_endmonth'); +$search_date_modification_endday = GETPOSTINT('search_date_modification_endday'); $search_date_modification_start = dol_mktime(0, 0, 0, $search_date_modification_startmonth, $search_date_modification_startday, $search_date_modification_startyear); $search_date_modification_end = dol_mktime(23, 59, 59, $search_date_modification_endmonth, $search_date_modification_endday, $search_date_modification_endyear); -$search_date_export_startyear = GETPOST('search_date_export_startyear', 'int'); -$search_date_export_startmonth = GETPOST('search_date_export_startmonth', 'int'); -$search_date_export_startday = GETPOST('search_date_export_startday', 'int'); -$search_date_export_endyear = GETPOST('search_date_export_endyear', 'int'); -$search_date_export_endmonth = GETPOST('search_date_export_endmonth', 'int'); -$search_date_export_endday = GETPOST('search_date_export_endday', 'int'); +$search_date_export_startyear = GETPOSTINT('search_date_export_startyear'); +$search_date_export_startmonth = GETPOSTINT('search_date_export_startmonth'); +$search_date_export_startday = GETPOSTINT('search_date_export_startday'); +$search_date_export_endyear = GETPOSTINT('search_date_export_endyear'); +$search_date_export_endmonth = GETPOSTINT('search_date_export_endmonth'); +$search_date_export_endday = GETPOSTINT('search_date_export_endday'); $search_date_export_start = dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear); $search_date_export_end = dol_mktime(23, 59, 59, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear); -$search_date_validation_startyear = GETPOST('search_date_validation_startyear', 'int'); -$search_date_validation_startmonth = GETPOST('search_date_validation_startmonth', 'int'); -$search_date_validation_startday = GETPOST('search_date_validation_startday', 'int'); -$search_date_validation_endyear = GETPOST('search_date_validation_endyear', 'int'); -$search_date_validation_endmonth = GETPOST('search_date_validation_endmonth', 'int'); -$search_date_validation_endday = GETPOST('search_date_validation_endday', 'int'); +$search_date_validation_startyear = GETPOSTINT('search_date_validation_startyear'); +$search_date_validation_startmonth = GETPOSTINT('search_date_validation_startmonth'); +$search_date_validation_startday = GETPOSTINT('search_date_validation_startday'); +$search_date_validation_endyear = GETPOSTINT('search_date_validation_endyear'); +$search_date_validation_endmonth = GETPOSTINT('search_date_validation_endmonth'); +$search_date_validation_endday = GETPOSTINT('search_date_validation_endday'); $search_date_validation_start = dol_mktime(0, 0, 0, $search_date_validation_startmonth, $search_date_validation_startday, $search_date_validation_startyear); $search_date_validation_end = dol_mktime(23, 59, 59, $search_date_validation_endmonth, $search_date_validation_endday, $search_date_validation_endyear); $search_import_key = GETPOST("search_import_key", 'alpha'); -$search_account_category = GETPOST('search_account_category', 'int'); +$search_account_category = GETPOSTINT('search_account_category'); $search_accountancy_code = GETPOST("search_accountancy_code", 'alpha'); $search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha'); @@ -129,11 +129,11 @@ $search_lettering_code = GETPOST('search_lettering_code', 'alpha'); $search_not_reconciled = GETPOST('search_not_reconciled', 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); $optioncss = GETPOST('optioncss', 'alpha'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0) { $page = 0; } @@ -154,7 +154,7 @@ $hookmanager->initHooks(array('bookkeepinglist')); $formaccounting = new FormAccounting($db); $form = new Form($db); -if (!in_array($action, array('delmouv', 'delmouvconfirm')) && !GETPOSTISSET('begin') && !GETPOSTISSET('formfilteraction') && GETPOST('page', 'int') == '' && !GETPOST('noreset', 'int') && $user->hasRight('accounting', 'mouvements', 'export')) { +if (!in_array($action, array('delmouv', 'delmouvconfirm')) && !GETPOSTISSET('begin') && !GETPOSTISSET('formfilteraction') && GETPOSTINT('page') == '' && !GETPOSTINT('noreset') && $user->hasRight('accounting', 'mouvements', 'export')) { if (empty($search_date_start) && empty($search_date_end) && !GETPOSTISSET('restore_lastsearch_values') && !GETPOST('search_accountancy_code_start')) { $query = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear "; $query .= " where date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."' limit 1"; @@ -738,7 +738,7 @@ if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->hasRight('accountin if ($user->hasRight('accounting', 'mouvements', 'supprimer')) { $arrayofmassactions['predeletebookkeepingwriting'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('preunletteringauto', 'preunletteringmanual', 'predeletebookkeepingwriting'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('preunletteringauto', 'preunletteringmanual', 'predeletebookkeepingwriting'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction($massaction, $arrayofmassactions); diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index ed423ba1fdb..24856b36ae3 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -41,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $langs->loadLangs(array("accountancy", "compta")); $action = GETPOST('action', 'aZ09'); -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); $massaction = GETPOST('massaction', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); @@ -52,34 +52,34 @@ if ($type == 'sub') { $context_default = 'bookkeepingbyaccountlist'; } $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : $context_default; -$search_date_startyear = GETPOST('search_date_startyear', 'int'); -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); -$search_date_startday = GETPOST('search_date_startday', 'int'); -$search_date_endyear = GETPOST('search_date_endyear', 'int'); -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); -$search_date_endday = GETPOST('search_date_endday', 'int'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endday = GETPOSTINT('search_date_endday'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); -$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int')); -$search_date_export_startyear = GETPOST('search_date_export_startyear', 'int'); -$search_date_export_startmonth = GETPOST('search_date_export_startmonth', 'int'); -$search_date_export_startday = GETPOST('search_date_export_startday', 'int'); -$search_date_export_endyear = GETPOST('search_date_export_endyear', 'int'); -$search_date_export_endmonth = GETPOST('search_date_export_endmonth', 'int'); -$search_date_export_endday = GETPOST('search_date_export_endday', 'int'); +$search_doc_date = dol_mktime(0, 0, 0, GETPOSTINT('doc_datemonth'), GETPOSTINT('doc_dateday'), GETPOSTINT('doc_dateyear')); +$search_date_export_startyear = GETPOSTINT('search_date_export_startyear'); +$search_date_export_startmonth = GETPOSTINT('search_date_export_startmonth'); +$search_date_export_startday = GETPOSTINT('search_date_export_startday'); +$search_date_export_endyear = GETPOSTINT('search_date_export_endyear'); +$search_date_export_endmonth = GETPOSTINT('search_date_export_endmonth'); +$search_date_export_endday = GETPOSTINT('search_date_export_endday'); $search_date_export_start = dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear); $search_date_export_end = dol_mktime(23, 59, 59, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear); -$search_date_validation_startyear = GETPOST('search_date_validation_startyear', 'int'); -$search_date_validation_startmonth = GETPOST('search_date_validation_startmonth', 'int'); -$search_date_validation_startday = GETPOST('search_date_validation_startday', 'int'); -$search_date_validation_endyear = GETPOST('search_date_validation_endyear', 'int'); -$search_date_validation_endmonth = GETPOST('search_date_validation_endmonth', 'int'); -$search_date_validation_endday = GETPOST('search_date_validation_endday', 'int'); +$search_date_validation_startyear = GETPOSTINT('search_date_validation_startyear'); +$search_date_validation_startmonth = GETPOSTINT('search_date_validation_startmonth'); +$search_date_validation_startday = GETPOSTINT('search_date_validation_startday'); +$search_date_validation_endyear = GETPOSTINT('search_date_validation_endyear'); +$search_date_validation_endmonth = GETPOSTINT('search_date_validation_endmonth'); +$search_date_validation_endday = GETPOSTINT('search_date_validation_endday'); $search_date_validation_start = dol_mktime(0, 0, 0, $search_date_validation_startmonth, $search_date_validation_startday, $search_date_validation_startyear); $search_date_validation_end = dol_mktime(23, 59, 59, $search_date_validation_endmonth, $search_date_validation_endday, $search_date_validation_endyear); $search_import_key = GETPOST("search_import_key", 'alpha'); -$search_account_category = GETPOST('search_account_category', 'int'); +$search_account_category = GETPOSTINT('search_account_category'); $search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha'); if ($search_accountancy_code_start == - 1) { @@ -91,7 +91,7 @@ if ($search_accountancy_code_end == - 1) { } $search_doc_ref = GETPOST('search_doc_ref', 'alpha'); $search_label_operation = GETPOST('search_label_operation', 'alpha'); -$search_mvt_num = GETPOST('search_mvt_num', 'int'); +$search_mvt_num = GETPOSTINT('search_mvt_num'); $search_direction = GETPOST('search_direction', 'alpha'); $search_ledger_code = GETPOST('search_ledger_code', 'array'); $search_debit = GETPOST('search_debit', 'alpha'); @@ -104,11 +104,11 @@ if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_ } // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); $optioncss = GETPOST('optioncss', 'alpha'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0) { $page = 0; } @@ -282,7 +282,7 @@ if (empty($reshook)) { } if (!empty($search_doc_date)) { $filter['t.doc_date'] = $search_doc_date; - $param .= '&doc_datemonth='.GETPOST('doc_datemonth', 'int').'&doc_dateday='.GETPOST('doc_dateday', 'int').'&doc_dateyear='.GETPOST('doc_dateyear', 'int'); + $param .= '&doc_datemonth='.GETPOSTINT('doc_datemonth').'&doc_dateday='.GETPOSTINT('doc_dateday').'&doc_dateyear='.GETPOSTINT('doc_dateyear'); } if ($search_account_category != '-1' && !empty($search_account_category)) { require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancycategory.class.php'; @@ -650,7 +650,7 @@ if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->hasRight('accountin if ($user->hasRight('accounting', 'mouvements', 'supprimer')) { $arrayofmassactions['predeletebookkeepingwriting'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('preunletteringauto', 'preunletteringmanual', 'predeletebookkeepingwriting'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('preunletteringauto', 'preunletteringmanual', 'predeletebookkeepingwriting'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction($massaction, $arrayofmassactions); diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index 772d1672542..1226ae9d167 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -34,9 +34,9 @@ $langs->loadLangs(array("compta", "bills", "other", "accountancy")); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'aZ09'); -$fiscal_period_id = GETPOST('fiscal_period_id', 'int'); -$validatemonth = GETPOST('validatemonth', 'int'); -$validateyear = GETPOST('validateyear', 'int'); +$fiscal_period_id = GETPOSTINT('fiscal_period_id'); +$validatemonth = GETPOSTINT('validatemonth'); +$validateyear = GETPOSTINT('validateyear'); // Security check if (!isModEnabled('accounting')) { @@ -104,8 +104,8 @@ if ($reshook < 0) { if (empty($reshook)) { if (isset($current_fiscal_period) && $user->hasRight('accounting', 'fiscalyear', 'write')) { if ($action == 'confirm_step_1' && $confirm == "yes") { - $date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int')); - $date_end = dol_mktime(23, 59, 59, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int')); + $date_start = dol_mktime(0, 0, 0, GETPOSTINT('date_startmonth'), GETPOSTINT('date_startday'), GETPOSTINT('date_startyear')); + $date_end = dol_mktime(23, 59, 59, GETPOSTINT('date_endmonth'), GETPOSTINT('date_endday'), GETPOSTINT('date_endyear')); $result = $object->validateMovementForFiscalPeriod($date_start, $date_end); if ($result > 0) { @@ -119,7 +119,7 @@ if (empty($reshook)) { $action = ''; } } elseif ($action == 'confirm_step_2' && $confirm == "yes") { - $new_fiscal_period_id = GETPOST('new_fiscal_period_id', 'int'); + $new_fiscal_period_id = GETPOSTINT('new_fiscal_period_id'); $separate_auxiliary_account = GETPOST('separate_auxiliary_account', 'aZ09'); $generate_bookkeeping_records = GETPOST('generate_bookkeeping_records', 'aZ09'); @@ -133,10 +133,10 @@ if (empty($reshook)) { exit; } } elseif ($action == 'confirm_step_3' && $confirm == "yes") { - $inventory_journal_id = GETPOST('inventory_journal_id', 'int'); - $new_fiscal_period_id = GETPOST('new_fiscal_period_id', 'int'); - $date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int')); - $date_end = dol_mktime(23, 59, 59, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int')); + $inventory_journal_id = GETPOSTINT('inventory_journal_id'); + $new_fiscal_period_id = GETPOSTINT('new_fiscal_period_id'); + $date_start = dol_mktime(0, 0, 0, GETPOSTINT('date_startmonth'), GETPOSTINT('date_startday'), GETPOSTINT('date_startyear')); + $date_end = dol_mktime(23, 59, 59, GETPOSTINT('date_endmonth'), GETPOSTINT('date_endday'), GETPOSTINT('date_endyear')); $result = $object->insertAccountingReversal($current_fiscal_period['id'], $inventory_journal_id, $new_fiscal_period_id, $date_start, $date_end); if ($result < 0) { diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 3102b023015..b2731d981c5 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -34,8 +34,8 @@ $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); -$codeventil = GETPOST('codeventil', 'int'); -$id = GETPOST('id', 'int'); +$codeventil = GETPOSTINT('codeventil'); +$id = GETPOSTINT('id'); // Security check if (!isModEnabled('accounting')) { diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 018f222daf8..391cac7daf4 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -37,8 +37,8 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; // Load translation files required by the page $langs->loadLangs(array("compta", "bills", "other", "accountancy")); -$validatemonth = GETPOST('validatemonth', 'int'); -$validateyear = GETPOST('validateyear', 'int'); +$validatemonth = GETPOSTINT('validatemonth'); +$validateyear = GETPOSTINT('validateyear'); // Security check if (!isModEnabled('accounting')) { @@ -54,8 +54,8 @@ if (!$user->hasRight('accounting', 'bind', 'write')) { $accountingAccount = new AccountingAccount($db); $month_start = getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); -if (GETPOST("year", 'int')) { - $year_start = GETPOST("year", 'int'); +if (GETPOSTINT("year")) { + $year_start = GETPOSTINT("year"); } else { $year_start = dol_print_date(dol_now(), '%Y'); if (dol_print_date(dol_now(), '%m') < $month_start) { diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 2a08eb3986c..5c9457d818f 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -45,7 +45,7 @@ $account_parent = GETPOST('account_parent'); $changeaccount = GETPOST('changeaccount'); // Search Getpost $search_societe = GETPOST('search_societe', 'alpha'); -$search_lineid = GETPOST('search_lineid', 'int'); +$search_lineid = GETPOSTINT('search_lineid'); $search_ref = GETPOST('search_ref', 'alpha'); $search_invoice = GETPOST('search_invoice', 'alpha'); $search_label = GETPOST('search_label', 'alpha'); @@ -53,22 +53,22 @@ $search_desc = GETPOST('search_desc', 'alpha'); $search_amount = GETPOST('search_amount', 'alpha'); $search_account = GETPOST('search_account', 'alpha'); $search_vat = GETPOST('search_vat', 'alpha'); -$search_date_startday = GETPOST('search_date_startday', 'int'); -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); -$search_date_startyear = GETPOST('search_date_startyear', 'int'); -$search_date_endday = GETPOST('search_date_endday', 'int'); -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); -$search_date_endyear = GETPOST('search_date_endyear', 'int'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_endday = GETPOSTINT('search_date_endday'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); $search_country = GETPOST('search_country', 'alpha'); $search_tvaintra = GETPOST('search_tvaintra', 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0) { $page = 0; } @@ -131,7 +131,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' if (is_array($changeaccount) && count($changeaccount) > 0 && $user->hasRight('accounting', 'bind', 'write')) { $error = 0; - if (!(GETPOST('account_parent', 'int') >= 0)) { + if (!(GETPOSTINT('account_parent') >= 0)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Account")), null, 'errors'); } @@ -140,7 +140,7 @@ if (is_array($changeaccount) && count($changeaccount) > 0 && $user->hasRight('ac $db->begin(); $sql1 = "UPDATE ".MAIN_DB_PREFIX."facturedet"; - $sql1 .= " SET fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0'); + $sql1 .= " SET fk_code_ventilation=".(GETPOSTINT('account_parent') > 0 ? GETPOSTINT('account_parent') : '0'); $sql1 .= ' WHERE rowid IN ('.$db->sanitize(implode(',', $changeaccount)).')'; dol_syslog('accountancy/customer/lines.php::changeaccount sql= '.$sql1); diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index b34f29eef8f..d51b43eccd9 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -48,14 +48,14 @@ $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'accountancycustomerlist'; // To manage different context of search $optioncss = GETPOST('optioncss', 'alpha'); -$default_account = GETPOST('default_account', 'int'); +$default_account = GETPOSTINT('default_account'); // Select Box $mesCasesCochees = GETPOST('toselect', 'array'); // Search Getpost $search_societe = GETPOST('search_societe', 'alpha'); -$search_lineid = GETPOST('search_lineid', 'int'); +$search_lineid = GETPOSTINT('search_lineid'); $search_ref = GETPOST('search_ref', 'alpha'); $search_invoice = GETPOST('search_invoice', 'alpha'); $search_label = GETPOST('search_label', 'alpha'); @@ -63,12 +63,12 @@ $search_desc = GETPOST('search_desc', 'alpha'); $search_amount = GETPOST('search_amount', 'alpha'); $search_account = GETPOST('search_account', 'alpha'); $search_vat = GETPOST('search_vat', 'alpha'); -$search_date_startday = GETPOST('search_date_startday', 'int'); -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); -$search_date_startyear = GETPOST('search_date_startyear', 'int'); -$search_date_endday = GETPOST('search_date_endday', 'int'); -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); -$search_date_endyear = GETPOST('search_date_endyear', 'int'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_endday = GETPOSTINT('search_date_endday'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); $search_country = GETPOST('search_country', 'alpha'); @@ -80,10 +80,10 @@ if (empty($search_date_start) && getDolGlobalString('ACCOUNTING_DATE_START_BINDI } // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0) { $page = 0; } diff --git a/htdocs/accountancy/expensereport/card.php b/htdocs/accountancy/expensereport/card.php index 6d2bd442bf8..056dbb3d74e 100644 --- a/htdocs/accountancy/expensereport/card.php +++ b/htdocs/accountancy/expensereport/card.php @@ -38,8 +38,8 @@ $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); -$codeventil = GETPOST('codeventil', 'int'); -$id = GETPOST('id', 'int'); +$codeventil = GETPOSTINT('codeventil'); +$id = GETPOSTINT('id'); // Security check if (!isModEnabled('accounting')) { diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php index 703417bb1f5..00f52f0dd49 100644 --- a/htdocs/accountancy/expensereport/index.php +++ b/htdocs/accountancy/expensereport/index.php @@ -33,12 +33,12 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; // Load translation files required by the page $langs->loadLangs(array("compta", "bills", "other", "accountancy")); -$validatemonth = GETPOST('validatemonth', 'int'); -$validateyear = GETPOST('validateyear', 'int'); +$validatemonth = GETPOSTINT('validatemonth'); +$validateyear = GETPOSTINT('validateyear'); $month_start = getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); -if (GETPOST("year", 'int')) { - $year_start = GETPOST("year", 'int'); +if (GETPOSTINT("year")) { + $year_start = GETPOSTINT("year"); } else { $year_start = dol_print_date(dol_now(), '%Y'); if (dol_print_date(dol_now(), '%m') < $month_start) { diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index 8d170a557b1..4fbc0642bc9 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -39,7 +39,7 @@ $langs->loadLangs(array("compta", "bills", "other", "accountancy", "trips", "pro $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') -$account_parent = GETPOST('account_parent', 'int'); +$account_parent = GETPOSTINT('account_parent'); $changeaccount = GETPOST('changeaccount'); // Search Getpost $search_login = GETPOST('search_login', 'alpha'); @@ -49,20 +49,20 @@ $search_desc = GETPOST('search_desc', 'alpha'); $search_amount = GETPOST('search_amount', 'alpha'); $search_account = GETPOST('search_account', 'alpha'); $search_vat = GETPOST('search_vat', 'alpha'); -$search_date_startday = GETPOST('search_date_startday', 'int'); -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); -$search_date_startyear = GETPOST('search_date_startyear', 'int'); -$search_date_endday = GETPOST('search_date_endday', 'int'); -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); -$search_date_endyear = GETPOST('search_date_endyear', 'int'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_endday = GETPOSTINT('search_date_endday'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0) { $page = 0; } @@ -121,7 +121,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' if (is_array($changeaccount) && count($changeaccount) > 0 && $user->hasRight('accounting', 'bind', 'write')) { $error = 0; - if (!(GETPOST('account_parent', 'int') >= 0)) { + if (!(GETPOSTINT('account_parent') >= 0)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Account")), null, 'errors'); } @@ -130,7 +130,7 @@ if (is_array($changeaccount) && count($changeaccount) > 0 && $user->hasRight('ac $db->begin(); $sql1 = "UPDATE ".MAIN_DB_PREFIX."expensereport_det as erd"; - $sql1 .= " SET erd.fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0'); + $sql1 .= " SET erd.fk_code_ventilation=".(GETPOSTINT('account_parent') > 0 ? GETPOSTINT('account_parent') : '0'); $sql1 .= ' WHERE erd.rowid IN ('.$db->sanitize(implode(',', $changeaccount)).')'; dol_syslog('accountancy/expensereport/lines.php::changeaccount sql= '.$sql1); diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index c688098058f..d70729d4521 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -58,12 +58,12 @@ $search_desc = GETPOST('search_desc', 'alpha'); $search_amount = GETPOST('search_amount', 'alpha'); $search_account = GETPOST('search_account', 'alpha'); $search_vat = GETPOST('search_vat', 'alpha'); -$search_date_startday = GETPOST('search_date_startday', 'int'); -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); -$search_date_startyear = GETPOST('search_date_startyear', 'int'); -$search_date_endday = GETPOST('search_date_endday', 'int'); -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); -$search_date_endyear = GETPOST('search_date_endyear', 'int'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_endday = GETPOSTINT('search_date_endday'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); @@ -73,10 +73,10 @@ if (empty($search_date_start) && getDolGlobalString('ACCOUNTING_DATE_START_BINDI } // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0) { $page = 0; } diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 09236110b0e..db569da428c 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -57,8 +57,8 @@ $pcgver = getDolGlobalInt('CHARTOFACCOUNTS'); if (GETPOST('addbox')) { // Add box (when submit is done from a form when ajax disabled) require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; - $zone = GETPOST('areacode', 'int'); - $userid = GETPOST('userid', 'int'); + $zone = GETPOSTINT('areacode'); + $userid = GETPOSTINT('userid'); $boxorder = GETPOST('boxorder', 'aZ09'); $boxorder .= GETPOST('boxcombo', 'aZ09'); diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 993fce3899f..c091abb5b48 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -66,14 +66,14 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; $langs->loadLangs(array("companies", "other", "compta", "banks", "bills", "donations", "loan", "accountancy", "trips", "salaries", "hrm", "members")); // Multi journal -$id_journal = GETPOST('id_journal', 'int'); +$id_journal = GETPOSTINT('id_journal'); -$date_startmonth = GETPOST('date_startmonth', 'int'); -$date_startday = GETPOST('date_startday', 'int'); -$date_startyear = GETPOST('date_startyear', 'int'); -$date_endmonth = GETPOST('date_endmonth', 'int'); -$date_endday = GETPOST('date_endday', 'int'); -$date_endyear = GETPOST('date_endyear', 'int'); +$date_startmonth = GETPOSTINT('date_startmonth'); +$date_startday = GETPOSTINT('date_startday'); +$date_startyear = GETPOSTINT('date_startyear'); +$date_endmonth = GETPOSTINT('date_endmonth'); +$date_endday = GETPOSTINT('date_endday'); +$date_endyear = GETPOSTINT('date_endyear'); $in_bookkeeping = GETPOST('in_bookkeeping', 'aZ09'); if ($in_bookkeeping == '') { $in_bookkeeping = 'notyet'; diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index de47b55ab83..881070ad6fd 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -41,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; // Load translation files required by the page $langs->loadLangs(array("commercial", "compta", "bills", "other", "accountancy", "trips", "errors")); -$id_journal = GETPOST('id_journal', 'int'); +$id_journal = GETPOSTINT('id_journal'); $action = GETPOST('action', 'aZ09'); $date_startmonth = GETPOST('date_startmonth'); diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index d92f99e771b..227c2f0f280 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; // Load translation files required by the page $langs->loadLangs(array("commercial", "compta", "bills", "other", "accountancy", "errors")); -$id_journal = GETPOST('id_journal', 'int'); +$id_journal = GETPOSTINT('id_journal'); $action = GETPOST('action', 'aZ09'); $date_startmonth = GETPOST('date_startmonth'); diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 3267f5ae397..6e0640df092 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -45,7 +45,7 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; // Load translation files required by the page $langs->loadLangs(array("commercial", "compta", "bills", "other", "accountancy", "errors")); -$id_journal = GETPOST('id_journal', 'int'); +$id_journal = GETPOSTINT('id_journal'); $action = GETPOST('action', 'aZ09'); $date_startmonth = GETPOST('date_startmonth'); diff --git a/htdocs/accountancy/journal/variousjournal.php b/htdocs/accountancy/journal/variousjournal.php index 62bd97df17f..4882b722053 100644 --- a/htdocs/accountancy/journal/variousjournal.php +++ b/htdocs/accountancy/journal/variousjournal.php @@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; // Load translation files required by the page $langs->loadLangs(array("banks", "accountancy", "compta", "other", "errors")); -$id_journal = GETPOST('id_journal', 'int'); +$id_journal = GETPOSTINT('id_journal'); $action = GETPOST('action', 'aZ09'); $date_startmonth = GETPOST('date_startmonth'); diff --git a/htdocs/accountancy/supplier/card.php b/htdocs/accountancy/supplier/card.php index 99bfe67fce5..d384d7c944a 100644 --- a/htdocs/accountancy/supplier/card.php +++ b/htdocs/accountancy/supplier/card.php @@ -38,8 +38,8 @@ $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); -$codeventil = GETPOST('codeventil', 'int'); -$id = GETPOST('id', 'int'); +$codeventil = GETPOSTINT('codeventil'); +$id = GETPOSTINT('id'); // Security check if (!isModEnabled('accounting')) { diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index a74a9a04f54..ace576b4232 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -35,8 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; // Load translation files required by the page $langs->loadLangs(array("compta", "bills", "other", "accountancy")); -$validatemonth = GETPOST('validatemonth', 'int'); -$validateyear = GETPOST('validateyear', 'int'); +$validatemonth = GETPOSTINT('validatemonth'); +$validateyear = GETPOSTINT('validateyear'); // Security check if (!isModEnabled('accounting')) { @@ -52,8 +52,8 @@ if (!$user->hasRight('accounting', 'bind', 'write')) { $accountingAccount = new AccountingAccount($db); $month_start = getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); -if (GETPOST("year", 'int')) { - $year_start = GETPOST("year", 'int'); +if (GETPOSTINT("year")) { + $year_start = GETPOSTINT("year"); } else { $year_start = dol_print_date(dol_now(), '%Y'); if (dol_print_date(dol_now(), '%m') < $month_start) { diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 576e4874a8d..3571a5e2df5 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -46,7 +46,7 @@ $account_parent = GETPOST('account_parent'); $changeaccount = GETPOST('changeaccount'); // Search Getpost $search_societe = GETPOST('search_societe', 'alpha'); -$search_lineid = GETPOST('search_lineid', 'int'); +$search_lineid = GETPOSTINT('search_lineid'); $search_ref = GETPOST('search_ref', 'alpha'); $search_invoice = GETPOST('search_invoice', 'alpha'); //$search_ref_supplier = GETPOST('search_ref_supplier', 'alpha'); @@ -55,22 +55,22 @@ $search_desc = GETPOST('search_desc', 'alpha'); $search_amount = GETPOST('search_amount', 'alpha'); $search_account = GETPOST('search_account', 'alpha'); $search_vat = GETPOST('search_vat', 'alpha'); -$search_date_startday = GETPOST('search_date_startday', 'int'); -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); -$search_date_startyear = GETPOST('search_date_startyear', 'int'); -$search_date_endday = GETPOST('search_date_endday', 'int'); -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); -$search_date_endyear = GETPOST('search_date_endyear', 'int'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_endday = GETPOSTINT('search_date_endday'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); $search_country = GETPOST('search_country', 'alpha'); $search_tvaintra = GETPOST('search_tvaintra', 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0) { $page = 0; } @@ -136,7 +136,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' if (is_array($changeaccount) && count($changeaccount) > 0 && $user->hasRight('accounting', 'bind', 'write')) { $error = 0; - if (!(GETPOST('account_parent', 'int') >= 0)) { + if (!(GETPOSTINT('account_parent') >= 0)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Account")), null, 'errors'); } @@ -145,7 +145,7 @@ if (is_array($changeaccount) && count($changeaccount) > 0 && $user->hasRight('ac $db->begin(); $sql1 = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det"; - $sql1 .= " SET fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0'); + $sql1 .= " SET fk_code_ventilation=".(GETPOSTINT('account_parent') > 0 ? GETPOSTINT('account_parent') : '0'); $sql1 .= ' WHERE rowid IN ('.$db->sanitize(implode(',', $changeaccount)).')'; dol_syslog('accountancy/supplier/lines.php::changeaccount sql= '.$sql1); diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index de9c72a56b5..a97bfb1d531 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -49,14 +49,14 @@ $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'accountancysupplierlist'; // To manage different context of search $optioncss = GETPOST('optioncss', 'alpha'); -$default_account = GETPOST('default_account', 'int'); +$default_account = GETPOSTINT('default_account'); // Select Box $mesCasesCochees = GETPOST('toselect', 'array'); // Search Getpost $search_societe = GETPOST('search_societe', 'alpha'); -$search_lineid = GETPOST('search_lineid', 'int'); +$search_lineid = GETPOSTINT('search_lineid'); $search_ref = GETPOST('search_ref', 'alpha'); $search_ref_supplier = GETPOST('search_ref_supplier', 'alpha'); $search_invoice = GETPOST('search_invoice', 'alpha'); @@ -65,22 +65,22 @@ $search_desc = GETPOST('search_desc', 'alpha'); $search_amount = GETPOST('search_amount', 'alpha'); $search_account = GETPOST('search_account', 'alpha'); $search_vat = GETPOST('search_vat', 'alpha'); -$search_date_startday = GETPOST('search_date_startday', 'int'); -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); -$search_date_startyear = GETPOST('search_date_startyear', 'int'); -$search_date_endday = GETPOST('search_date_endday', 'int'); -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); -$search_date_endyear = GETPOST('search_date_endyear', 'int'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_endday = GETPOSTINT('search_date_endday'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); $search_country = GETPOST('search_country', 'alpha'); $search_tvaintra = GETPOST('search_tvaintra', 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0) { $page = 0; } diff --git a/htdocs/adherents/admin/member_emails.php b/htdocs/adherents/admin/member_emails.php index cc7b60f6233..c2907004341 100644 --- a/htdocs/adherents/admin/member_emails.php +++ b/htdocs/adherents/admin/member_emails.php @@ -105,7 +105,7 @@ if ($action == 'updateall') { // Action to update or add a constant if ($action == 'update' || $action == 'add') { - $constlineid = GETPOST('rowid', 'int'); + $constlineid = GETPOSTINT('rowid'); $constname = GETPOST('constname', 'alpha'); $constvalue = (GETPOSTISSET('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname, 'alphanohtml') : GETPOST('constvalue')); diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php index 8ac296f9449..f922f1abb7f 100644 --- a/htdocs/adherents/admin/website.php +++ b/htdocs/adherents/admin/website.php @@ -63,7 +63,7 @@ if ($action == 'update') { $showtable = GETPOST('MEMBER_SHOW_TABLE'); $showvoteallowed = GETPOST('MEMBER_SHOW_VOTE_ALLOWED'); $payonline = GETPOST('MEMBER_NEWFORM_PAYONLINE'); - $forcetype = GETPOST('MEMBER_NEWFORM_FORCETYPE', 'int'); + $forcetype = GETPOSTINT('MEMBER_NEWFORM_FORCETYPE'); $forcemorphy = GETPOST('MEMBER_NEWFORM_FORCEMORPHY', 'aZ09'); $res = dolibarr_set_const($db, "MEMBER_ENABLE_PUBLIC", $public, 'chaine', 0, '', $conf->entity); diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index ef217d65871..742905600af 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -38,13 +38,13 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $langs->loadLangs(array('companies', 'members')); // Get Parameters -$id = GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('rowid', 'int'); +$id = GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('rowid'); // Pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index 66e53b58109..d18ba0c335d 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -251,16 +251,16 @@ abstract class ActionsAdherentCardCommon $this->object->old_name = GETPOST("old_name"); $this->object->old_firstname = GETPOST("old_firstname"); - $this->object->fk_soc = GETPOST("fk_soc", 'int'); - $this->object->socid = GETPOST("fk_soc", 'int'); + $this->object->fk_soc = GETPOSTINT("fk_soc"); + $this->object->socid = GETPOSTINT("fk_soc"); $this->object->lastname = GETPOST("lastname"); $this->object->firstname = GETPOST("firstname"); $this->object->civility_id = GETPOST("civility_id"); $this->object->address = GETPOST("address"); $this->object->zip = GETPOST("zipcode"); $this->object->town = GETPOST("town"); - $this->object->country_id = GETPOST("country_id", 'int') ? GETPOST("country_id", 'int') : $mysoc->country_id; - $this->object->state_id = GETPOST("state_id", 'int'); + $this->object->country_id = GETPOSTINT("country_id") ? GETPOSTINT("country_id") : $mysoc->country_id; + $this->object->state_id = GETPOSTINT("state_id"); $this->object->phone_perso = GETPOST("phone_perso"); $this->object->phone_mobile = GETPOST("phone_mobile"); $this->object->email = GETPOST("email", 'alphawithlgt'); diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 7f41b76e564..8b96f6c3844 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -56,11 +56,11 @@ $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); -$rowid = GETPOST('rowid', 'int'); -$id = GETPOST('id') ? GETPOST('id', 'int') : $rowid; -$typeid = GETPOST('typeid', 'int'); -$userid = GETPOST('userid', 'int'); -$socid = GETPOST('socid', 'int'); +$rowid = GETPOSTINT('rowid'); +$id = GETPOST('id') ? GETPOSTINT('id') : $rowid; +$typeid = GETPOSTINT('typeid'); +$userid = GETPOSTINT('userid'); +$socid = GETPOSTINT('socid'); $ref = GETPOST('ref', 'alpha'); if (isModEnabled('mailmanspip')) { @@ -256,8 +256,8 @@ if (empty($reshook)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $birthdate = ''; - if (GETPOST("birthday", 'int') && GETPOST("birthmonth", 'int') && GETPOST("birthyear", 'int')) { - $birthdate = dol_mktime(12, 0, 0, GETPOST("birthmonth", 'int'), GETPOST("birthday", 'int'), GETPOST("birthyear", 'int')); + if (GETPOSTINT("birthday") && GETPOSTINT("birthmonth") && GETPOSTINT("birthyear")) { + $birthdate = dol_mktime(12, 0, 0, GETPOSTINT("birthmonth"), GETPOSTINT("birthday"), GETPOSTINT("birthyear")); } $lastname = GETPOST("lastname", 'alphanohtml'); $firstname = GETPOST("firstname", 'alphanohtml'); @@ -441,14 +441,14 @@ if (empty($reshook)) { } $birthdate = ''; if (GETPOSTISSET("birthday") && GETPOST("birthday") && GETPOSTISSET("birthmonth") && GETPOST("birthmonth") && GETPOSTISSET("birthyear") && GETPOST("birthyear")) { - $birthdate = dol_mktime(12, 0, 0, GETPOST("birthmonth", 'int'), GETPOST("birthday", 'int'), GETPOST("birthyear", 'int')); + $birthdate = dol_mktime(12, 0, 0, GETPOSTINT("birthmonth"), GETPOSTINT("birthday"), GETPOSTINT("birthyear")); } $datesubscription = ''; if (GETPOSTISSET("reday") && GETPOSTISSET("remonth") && GETPOSTISSET("reyear")) { - $datesubscription = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", "int"), GETPOST("reyear", "int")); + $datesubscription = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); } - $typeid = GETPOST("typeid", 'int'); + $typeid = GETPOSTINT("typeid"); $civility_id = GETPOST("civility_id", 'alphanohtml'); $lastname = GETPOST("lastname", 'alphanohtml'); $firstname = GETPOST("firstname", 'alphanohtml'); @@ -457,8 +457,8 @@ if (empty($reshook)) { $address = GETPOST("address", 'alphanohtml'); $zip = GETPOST("zipcode", 'alphanohtml'); $town = GETPOST("town", 'alphanohtml'); - $state_id = GETPOST("state_id", 'int'); - $country_id = GETPOST("country_id", 'int'); + $state_id = GETPOSTINT("state_id"); + $country_id = GETPOSTINT("country_id"); $phone = GETPOST("phone", 'alpha'); $phone_perso = GETPOST("phone_perso", 'alpha'); @@ -471,8 +471,8 @@ if (empty($reshook)) { $morphy = GETPOST("morphy", 'alphanohtml'); $public = GETPOST("public", 'alphanohtml'); - $userid = GETPOST("userid", 'int'); - $socid = GETPOST("socid", 'int'); + $userid = GETPOSTINT("userid"); + $socid = GETPOSTINT("socid"); $default_lang = GETPOST('default_lang', 'alpha'); $object->civility_id = $civility_id; @@ -926,10 +926,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Create mode if ($action == 'create') { $object->canvas = $canvas; - $object->state_id = GETPOST('state_id', 'int'); + $object->state_id = GETPOSTINT('state_id'); // We set country_id, country_code and country for the selected country - $object->country_id = GETPOST('country_id', 'int') ? GETPOST('country_id', 'int') : $mysoc->country_id; + $object->country_id = GETPOSTINT('country_id') ? GETPOSTINT('country_id') : $mysoc->country_id; if ($object->country_id) { $tmparray = getCountry($object->country_id, 'all'); $object->country_code = $tmparray['code']; @@ -1012,7 +1012,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $listetype = $adht->liste_array(1); print img_picto('', $adht->picto, 'class="pictofixedwidth"'); if (count($listetype)) { - print $form->selectarray("typeid", $listetype, (GETPOST('typeid', 'int') ? GETPOST('typeid', 'int') : $typeid), (count($listetype) > 1 ? 1 : 0), 0, 0, '', 0, 0, 0, '', '', 1); + print $form->selectarray("typeid", $listetype, (GETPOSTINT('typeid') ? GETPOSTINT('typeid') : $typeid), (count($listetype) > 1 ? 1 : 0), 0, 0, '', 0, 0, 0, '', '', 1); } else { print ''.$langs->trans("NoTypeDefinedGoToSetup").''; } @@ -1030,7 +1030,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Civility print ''.$langs->trans("UserTitle").''; - print $formcompany->select_civility(GETPOST('civility_id', 'int') ? GETPOST('civility_id', 'int') : $object->civility_id, 'civility_id', 'maxwidth150', 1).''; + print $formcompany->select_civility(GETPOSTINT('civility_id') ? GETPOSTINT('civility_id') : $object->civility_id, 'civility_id', 'maxwidth150', 1).''; print ''; // Lastname @@ -1087,7 +1087,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''.$langs->trans('State').''; if ($soc->country_id) { print img_picto('', 'state', 'class="pictofixedwidth"'); - print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : $soc->state_id, $soc->country_code); + print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOSTINT('state_id') : $soc->state_id, $soc->country_code); } else { print $countrynotdefined; } @@ -1167,7 +1167,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $adht->fetch($object->typeid); // We set country_id, and country_code, country of the chosen country - $country = GETPOST('country', 'int'); + $country = GETPOSTINT('country'); if (!empty($country) || $object->country_id) { $sql = "SELECT rowid, code, label from ".MAIN_DB_PREFIX."c_country where rowid = ".(!empty($country) ? $country : $object->country_id); $resql = $db->query($sql); @@ -1240,7 +1240,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Type print ''.$langs->trans("Type").''; if ($user->hasRight('adherent', 'creer')) { - print $form->selectarray("typeid", $adht->liste_array(), (GETPOSTISSET("typeid") ? GETPOST("typeid", 'int') : $object->typeid), 0, 0, 0, '', 0, 0, 0, '', '', 1); + print $form->selectarray("typeid", $adht->liste_array(), (GETPOSTISSET("typeid") ? GETPOSTINT("typeid") : $object->typeid), 0, 0, 0, '', 0, 0, 0, '', '', 1); } else { print $adht->getNomUrl(1); print ''; diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 1f02258fae9..ac692433247 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -38,16 +38,16 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; $langs->loadLangs(array("companies", "members", "other")); -$id = GETPOSTISSET('id') ? GETPOST('id', 'int') : GETPOST('rowid', 'int'); +$id = GETPOSTISSET('id') ? GETPOSTINT('id') : GETPOSTINT('rowid'); $ref = GETPOST('ref', 'alphanohtml'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Get parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 3b78f0305dc..baa8560b9c6 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -53,11 +53,11 @@ $result = restrictedArea($user, 'adherent'); * Actions */ -$userid = GETPOST('userid', 'int'); +$userid = GETPOSTINT('userid'); if (GETPOST('addbox')) { // Add box (when submit is done from a form when ajax disabled) require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; - $zone = GETPOST('areacode', 'int'); + $zone = GETPOSTINT('areacode'); $boxorder = GETPOST('boxorder', 'aZ09'); $boxorder .= GETPOST('boxcombo', 'aZ09'); $result = InfoBox::saveboxorder($db, $zone, $boxorder, $userid); diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php index 47fb5c00a64..edfa8adbb2f 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; // Load translation files required by the page $langs->loadLangs(array("companies", "members", "ldap", "admin")); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alphanohtml'); $action = GETPOST('action', 'aZ09'); diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index d2297697632..37aba189a17 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -43,7 +43,7 @@ $langs->loadLangs(array("members", "companies", "categories")); // Get parameters $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); -$show_files = GETPOST('show_files', 'int'); +$show_files = GETPOSTINT('show_files'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $toselect = GETPOST('toselect', 'array'); @@ -71,19 +71,19 @@ $search_phone_perso = GETPOST("search_phone_perso", 'alpha'); $search_phone_mobile = GETPOST("search_phone_mobile", 'alpha'); $search_type = GETPOST("search_type", 'alpha'); $search_email = GETPOST("search_email", 'alpha'); -$search_categ = GETPOST("search_categ", 'int'); +$search_categ = GETPOSTINT("search_categ"); $search_morphy = GETPOST("search_morphy", 'alpha'); $search_import_key = trim(GETPOST("search_import_key", 'alpha')); -$catid = GETPOST("catid", 'int'); -$socid = GETPOST('socid', 'int'); +$catid = GETPOSTINT("catid"); +$socid = GETPOSTINT('socid'); $search_filter = GETPOST("search_filter", 'alpha'); $search_status = GETPOST("search_status", 'intcomma'); // status -$search_datec_start = dol_mktime(0, 0, 0, GETPOST('search_datec_start_month', 'int'), GETPOST('search_datec_start_day', 'int'), GETPOST('search_datec_start_year', 'int')); -$search_datec_end = dol_mktime(23, 59, 59, GETPOST('search_datec_end_month', 'int'), GETPOST('search_datec_end_day', 'int'), GETPOST('search_datec_end_year', 'int')); -$search_datem_start = dol_mktime(0, 0, 0, GETPOST('search_datem_start_month', 'int'), GETPOST('search_datem_start_day', 'int'), GETPOST('search_datem_start_year', 'int')); -$search_datem_end = dol_mktime(23, 59, 59, GETPOST('search_datem_end_month', 'int'), GETPOST('search_datem_end_day', 'int'), GETPOST('search_datem_end_year', 'int')); +$search_datec_start = dol_mktime(0, 0, 0, GETPOSTINT('search_datec_start_month'), GETPOSTINT('search_datec_start_day'), GETPOSTINT('search_datec_start_year')); +$search_datec_end = dol_mktime(23, 59, 59, GETPOSTINT('search_datec_end_month'), GETPOSTINT('search_datec_end_day'), GETPOSTINT('search_datec_end_year')); +$search_datem_start = dol_mktime(0, 0, 0, GETPOSTINT('search_datem_start_month'), GETPOSTINT('search_datem_start_day'), GETPOSTINT('search_datem_start_year')); +$search_datem_end = dol_mktime(23, 59, 59, GETPOSTINT('search_datem_end_month'), GETPOSTINT('search_datem_end_day'), GETPOSTINT('search_datem_end_year')); $filter = GETPOST("filter", 'alpha'); if ($filter) { @@ -102,10 +102,10 @@ if ($search_status < -2) { } // Pagination parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -741,7 +741,7 @@ if ($user->hasRight('adherent', 'creer') && $user->hasRight('user', 'user', 'cre if ($user->hasRight('adherent', 'creer')) { $arrayofmassactions['createsubscription'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("CreateSubscription"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index 1adbdb2db03..180eee496b2 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -37,7 +37,7 @@ $langs->loadLangs(array("companies", "members", "bills")); // Get parameters $action = GETPOST('action', 'aZ09'); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alphanohtml'); diff --git a/htdocs/adherents/partnership.php b/htdocs/adherents/partnership.php index 2ec81fdbea9..9edc0603ce2 100644 --- a/htdocs/adherents/partnership.php +++ b/htdocs/adherents/partnership.php @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/partnership/lib/partnership.lib.php'; $langs->loadLangs(array("companies","members","partnership", "other")); // Get parameters -$id = GETPOST('rowid', 'int') ? GETPOST('rowid', 'int') : GETPOST('id', 'int'); +$id = GETPOSTINT('rowid') ? GETPOSTINT('rowid') : GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); @@ -116,8 +116,8 @@ if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } -$date_start = dol_mktime(0, 0, 0, GETPOST('date_partnership_startmonth', 'int'), GETPOST('date_partnership_startday', 'int'), GETPOST('date_partnership_startyear', 'int')); -$date_end = dol_mktime(0, 0, 0, GETPOST('date_partnership_endmonth', 'int'), GETPOST('date_partnership_endday', 'int'), GETPOST('date_partnership_endyear', 'int')); +$date_start = dol_mktime(0, 0, 0, GETPOSTINT('date_partnership_startmonth'), GETPOSTINT('date_partnership_startday'), GETPOSTINT('date_partnership_startyear')); +$date_end = dol_mktime(0, 0, 0, GETPOSTINT('date_partnership_endmonth'), GETPOSTINT('date_partnership_endday'), GETPOSTINT('date_partnership_endyear')); if (empty($reshook)) { $error = 0; diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index 13dce1b030e..b6c2ea3a676 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -33,10 +33,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); -$userid = GETPOST('userid', 'int'); if ($userid < 0) { +$userid = GETPOSTINT('userid'); if ($userid < 0) { $userid = 0; } -$socid = GETPOST('socid', 'int'); if ($socid < 0) { +$socid = GETPOSTINT('socid'); if ($socid < 0) { $socid = 0; } diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 3d479cd23c6..3efc9a74ef0 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -47,17 +47,17 @@ $confirm = GETPOST('confirm', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ09'); $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') -$id = GETPOST('rowid', 'int') ? GETPOST('rowid', 'int') : GETPOST('id', 'int'); +$id = GETPOSTINT('rowid') ? GETPOSTINT('rowid') : GETPOSTINT('id'); $rowid = $id; $ref = GETPOST('ref', 'alphanohtml'); -$typeid = GETPOST('typeid', 'int'); +$typeid = GETPOSTINT('typeid'); $cancel = GETPOST('cancel'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -86,9 +86,9 @@ $errmsg = ''; $hookmanager->initHooks(array('subscription')); // PDF -$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0)); -$hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0)); -$hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0)); +$hidedetails = (GETPOSTINT('hidedetails') ? GETPOSTINT('hidedetails') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0)); +$hidedesc = (GETPOSTINT('hidedesc') ? GETPOSTINT('hidedesc') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0)); +$hideref = (GETPOSTINT('hideref') ? GETPOSTINT('hideref') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0)); $datefrom = 0; $dateto = 0; @@ -153,15 +153,15 @@ if (empty($reshook) && $action == 'confirm_create_thirdparty' && $confirm == 'ye if (empty($reshook) && $action == 'setuserid' && ($user->hasRight('user', 'self', 'creer') || $user->hasRight('user', 'user', 'creer'))) { $error = 0; if (!$user->hasRight('user', 'user', 'creer')) { // If can edit only itself user, we can link to itself only - if (GETPOST("userid", 'int') != $user->id && GETPOST("userid", 'int') != $object->user_id) { + if (GETPOSTINT("userid") != $user->id && GETPOSTINT("userid") != $object->user_id) { $error++; setEventMessages($langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly"), null, 'errors'); } } if (!$error) { - if (GETPOST("userid", 'int') != $object->user_id) { // If link differs from currently in database - $result = $object->setUserId(GETPOST("userid", 'int')); + if (GETPOSTINT("userid") != $object->user_id) { // If link differs from currently in database + $result = $object->setUserId(GETPOSTINT("userid")); if ($result < 0) { dol_print_error(null, $object->error); } @@ -173,9 +173,9 @@ if (empty($reshook) && $action == 'setuserid' && ($user->hasRight('user', 'self' if (empty($reshook) && $action == 'setsocid') { $error = 0; if (!$error) { - if (GETPOST('socid', 'int') != $object->fk_soc) { // If link differs from currently in database + if (GETPOSTINT('socid') != $object->fk_soc) { // If link differs from currently in database $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent"; - $sql .= " WHERE fk_soc = '".GETPOST('socid', 'int')."'"; + $sql .= " WHERE fk_soc = '".GETPOSTINT('socid')."'"; $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); @@ -183,14 +183,14 @@ if (empty($reshook) && $action == 'setsocid') { $othermember = new Adherent($db); $othermember->fetch($obj->rowid); $thirdparty = new Societe($db); - $thirdparty->fetch(GETPOST('socid', 'int')); + $thirdparty->fetch(GETPOSTINT('socid')); $error++; setEventMessages($langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty", $othermember->getFullName($langs), $othermember->login, $thirdparty->name), null, 'errors'); } } if (!$error) { - $result = $object->setThirdPartyId(GETPOST('socid', 'int')); + $result = $object->setThirdPartyId(GETPOSTINT('socid')); if ($result < 0) { dol_print_error(null, $object->error); } @@ -214,20 +214,20 @@ if ($user->hasRight('adherent', 'cotisation', 'creer') && $action == 'subscripti $defaultdelay = !empty($adht->duration_value) ? $adht->duration_value : 1; $defaultdelayunit = !empty($adht->duration_unit) ? $adht->duration_unit : 'y'; $paymentdate = ''; // Do not use 0 here, default value is '' that means not filled where 0 means 1970-01-01 - if (GETPOST("reyear", "int") && GETPOST("remonth", "int") && GETPOST("reday", "int")) { - $datesubscription = dol_mktime(0, 0, 0, GETPOST("remonth", "int"), GETPOST("reday", "int"), GETPOST("reyear", "int")); + if (GETPOSTINT("reyear") && GETPOSTINT("remonth") && GETPOSTINT("reday")) { + $datesubscription = dol_mktime(0, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); } - if (GETPOST("endyear", 'int') && GETPOST("endmonth", 'int') && GETPOST("endday", 'int')) { - $datesubend = dol_mktime(0, 0, 0, GETPOST("endmonth", 'int'), GETPOST("endday", 'int'), GETPOST("endyear", 'int')); + if (GETPOSTINT("endyear") && GETPOSTINT("endmonth") && GETPOSTINT("endday")) { + $datesubend = dol_mktime(0, 0, 0, GETPOSTINT("endmonth"), GETPOSTINT("endday"), GETPOSTINT("endyear")); } - if (GETPOST("paymentyear", 'int') && GETPOST("paymentmonth", 'int') && GETPOST("paymentday", 'int')) { - $paymentdate = dol_mktime(0, 0, 0, GETPOST("paymentmonth", 'int'), GETPOST("paymentday", 'int'), GETPOST("paymentyear", 'int')); + if (GETPOSTINT("paymentyear") && GETPOSTINT("paymentmonth") && GETPOSTINT("paymentday")) { + $paymentdate = dol_mktime(0, 0, 0, GETPOSTINT("paymentmonth"), GETPOSTINT("paymentday"), GETPOSTINT("paymentyear")); } $amount = price2num(GETPOST("subscription", 'alpha')); // Amount of subscription $label = GETPOST("label"); // Payment information - $accountid = GETPOST("accountid", 'int'); + $accountid = GETPOSTINT("accountid"); $operation = GETPOST("operation", "alphanohtml"); // Payment mode $num_chq = GETPOST("num_chq", "alphanohtml"); $emetteur_nom = GETPOST("chqemetteur"); @@ -287,14 +287,14 @@ if ($user->hasRight('adherent', 'cotisation', 'creer') && $action == 'subscripti $error++; $action = 'addsubscription'; } - if (GETPOST("paymentsave") != 'invoiceonly' && !(GETPOST("accountid", 'int') > 0)) { + if (GETPOST("paymentsave") != 'invoiceonly' && !(GETPOSTINT("accountid") > 0)) { $errmsg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("FinancialAccount")); setEventMessages($errmsg, null, 'errors'); $error++; $action = 'addsubscription'; } } else { - if (GETPOST("accountid", 'int')) { + if (GETPOSTINT("accountid")) { $errmsg = $langs->trans("ErrorDoNotProvideAccountsIfNullAmount"); setEventMessages($errmsg, null, 'errors'); $error++; @@ -980,7 +980,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h $currentmonth = dol_print_date($now, "%m"); print ''.$langs->trans("DateSubscription").''; if (GETPOST('reday')) { - $datefrom = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); + $datefrom = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); } if (!$datefrom) { $datefrom = $object->datevalid; @@ -1001,7 +1001,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h // Date end subscription if (GETPOST('endday')) { - $dateto = dol_mktime(0, 0, 0, GETPOST('endmonth', 'int'), GETPOST('endday', 'int'), GETPOST('endyear', 'int')); + $dateto = dol_mktime(0, 0, 0, GETPOSTINT('endmonth'), GETPOSTINT('endday'), GETPOSTINT('endyear')); } if (!$dateto) { if (getDolGlobalInt('MEMBER_SUBSCRIPTION_SUGGEST_END_OF_MONTH')) { diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 1cd7376ea75..b78303d6633 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -41,7 +41,7 @@ $object = new Subscription($db); $errmsg = ''; $action = GETPOST("action", 'alpha'); -$rowid = GETPOST("rowid", "int") ? GETPOST("rowid", "int") : GETPOST("id", "int"); +$rowid = GETPOSTINT("rowid") ? GETPOSTINT("rowid") : GETPOSTINT("id"); $typeid = GETPOSTINT("typeid"); $cancel = GETPOST('cancel', 'alpha'); $confirm = GETPOST('confirm'); @@ -86,8 +86,8 @@ if ($user->hasRight('adherent', 'cotisation', 'creer') && $action == 'update' && $errmsg = ''; - $newdatestart = dol_mktime(GETPOST('datesubhour', 'int'), GETPOST('datesubmin', 'int'), 0, GETPOST('datesubmonth', 'int'), GETPOST('datesubday', 'int'), GETPOST('datesubyear', 'int')); - $newdateend = dol_mktime(GETPOST('datesubendhour', 'int'), GETPOST('datesubendmin', 'int'), 0, GETPOST('datesubendmonth', 'int'), GETPOST('datesubendday', 'int'), GETPOST('datesubendyear', 'int')); + $newdatestart = dol_mktime(GETPOSTINT('datesubhour'), GETPOSTINT('datesubmin'), 0, GETPOSTINT('datesubmonth'), GETPOSTINT('datesubday'), GETPOSTINT('datesubyear')); + $newdateend = dol_mktime(GETPOSTINT('datesubendhour'), GETPOSTINT('datesubendmin'), 0, GETPOSTINT('datesubendmonth'), GETPOSTINT('datesubendday'), GETPOSTINT('datesubendyear')); if ($object->fk_bank > 0) { $accountline = new AccountLine($db); diff --git a/htdocs/adherents/subscription/info.php b/htdocs/adherents/subscription/info.php index 14afbafca50..6bdf0fd6f5d 100644 --- a/htdocs/adherents/subscription/info.php +++ b/htdocs/adherents/subscription/info.php @@ -36,7 +36,7 @@ if (!$user->hasRight('adherent', 'lire')) { accessforbidden(); } -$rowid = GETPOST("rowid", 'int'); +$rowid = GETPOSTINT("rowid"); diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index f411810242d..ddd2728d169 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -34,7 +34,7 @@ $langs->loadLangs(array("members", "companies", "banks")); $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list @@ -50,17 +50,17 @@ $search_lastname = GETPOST('search_lastname', 'alpha'); $search_firstname = GETPOST('search_firstname', 'alpha'); $search_login = GETPOST('search_login', 'alpha'); $search_note = GETPOST('search_note', 'alpha'); -$search_account = GETPOST('search_account', 'int'); +$search_account = GETPOSTINT('search_account'); $search_amount = GETPOST('search_amount', 'alpha'); $search_all = ''; $date_select = GETPOST("date_select", 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -345,7 +345,7 @@ $arrayofmassactions = array( if (!empty($permissiontodelete)) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 4a1ee4b36a6..a56598e360a 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -41,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; // Load translation files required by the page $langs->load("members"); -$rowid = GETPOST('rowid', 'int'); +$rowid = GETPOSTINT('rowid'); $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); @@ -61,10 +61,10 @@ $status = GETPOST('status', 'alpha'); $optioncss = GETPOST('optioncss', 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -81,12 +81,12 @@ if (!$sortfield) { $label = GETPOST("label", "alpha"); $morphy = GETPOST("morphy", "alpha"); -$status = GETPOST("status", "int"); -$subscription = GETPOST("subscription", "int"); +$status = GETPOSTINT("status"); +$subscription = GETPOSTINT("subscription"); $amount = GETPOST('amount', 'alpha'); -$duration_value = GETPOST('duration_value', 'int'); +$duration_value = GETPOSTINT('duration_value'); $duration_unit = GETPOST('duration_unit', 'alpha'); -$vote = GETPOST("vote", "int"); +$vote = GETPOSTINT("vote"); $comment = GETPOST("comment", 'restricthtml'); $mail_valid = GETPOST("mail_valid", 'restricthtml'); $caneditamount = GETPOSTINT("caneditamount"); diff --git a/htdocs/adherents/type_ldap.php b/htdocs/adherents/type_ldap.php index bd202e5a21a..88301150f13 100644 --- a/htdocs/adherents/type_ldap.php +++ b/htdocs/adherents/type_ldap.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "members", "ldap")); -$id = GETPOST('rowid', 'int'); +$id = GETPOSTINT('rowid'); $action = GETPOST('action', 'aZ09'); // Security check diff --git a/htdocs/adherents/type_translation.php b/htdocs/adherents/type_translation.php index 55ee3bbd697..4dd37b89e24 100644 --- a/htdocs/adherents/type_translation.php +++ b/htdocs/adherents/type_translation.php @@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; // Load translation files required by the page $langs->loadLangs(array('members', 'languages')); -$id = GETPOST('rowid', 'int') ? GETPOST('rowid', 'int') : GETPOST('id', 'int'); +$id = GETPOSTINT('rowid') ? GETPOSTINT('rowid') : GETPOSTINT('id'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $ref = GETPOST('ref', 'alphanohtml'); @@ -279,7 +279,7 @@ if ($action == 'create' && $user->hasRight('adherent', 'configurer')) { print '
'; print ''; print ''; - print ''; + print ''; print dol_get_fiche_head(); diff --git a/htdocs/adherents/vcard.php b/htdocs/adherents/vcard.php index cb8bd1603bb..cd39e578045 100644 --- a/htdocs/adherents/vcard.php +++ b/htdocs/adherents/vcard.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/vcard.class.php'; -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alphanohtml'); $object = new Adherent($db); diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index 4190c55a8e1..f225f899ee8 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -58,9 +58,9 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha')) dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ADDRESS", GETPOST("address", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_TOWN", GETPOST("town", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ZIP", GETPOST("zipcode", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_STATE", GETPOST("state_id", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_STATE", GETPOSTINT("state_id"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_REGION", GETPOST("region_code", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_COUNTRY", GETPOST('country_id', 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_COUNTRY", GETPOSTINT('country_id'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_PHONE", GETPOST("phone", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_FAX", GETPOST("fax", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_MAIL", GETPOST("mail", 'alphanohtml'), 'chaine', 0, '', $conf->entity); @@ -138,7 +138,7 @@ print ''; print img_picto('', 'globe-americas', 'class="pictofixedwidth"'); -print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : (getDolGlobalString('MAIN_INFO_ACCOUNTANT_COUNTRY') ? $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY : '')), 'country_id'); +print $form->select_country((GETPOSTISSET('country_id') ? GETPOSTINT('country_id') : (getDolGlobalString('MAIN_INFO_ACCOUNTANT_COUNTRY') ? $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY : '')), 'country_id'); if ($user->admin) { print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); } @@ -147,7 +147,7 @@ print ''."\n"; // State print ''; print img_picto('', 'state', 'class="pictofixedwidth"'); -print $formcompany->select_state((GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : (getDolGlobalString('MAIN_INFO_ACCOUNTANT_STATE') ? $conf->global->MAIN_INFO_ACCOUNTANT_STATE : '')), (GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : (getDolGlobalString('MAIN_INFO_ACCOUNTANT_COUNTRY') ? $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY : '')), 'state_id'); +print $formcompany->select_state((GETPOSTISSET('state_id') ? GETPOSTINT('state_id') : (getDolGlobalString('MAIN_INFO_ACCOUNTANT_STATE') ? $conf->global->MAIN_INFO_ACCOUNTANT_STATE : '')), (GETPOSTISSET('country_id') ? GETPOSTINT('country_id') : (getDolGlobalString('MAIN_INFO_ACCOUNTANT_COUNTRY') ? $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY : '')), 'state_id'); print ''."\n"; // Telephone diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index 0dca3ecbf1c..8ac54b3299e 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -154,7 +154,7 @@ if (preg_match('/set_(.*)/', $action, $reg)) { // Save nb of agenda if (!$error) { - $res = dolibarr_set_const($db, 'AGENDA_EXT_NB', trim(GETPOST('AGENDA_EXT_NB', 'int')), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'AGENDA_EXT_NB', trim(GETPOSTINT('AGENDA_EXT_NB')), 'chaine', 0, '', $conf->entity); if (!($res > 0)) { $error++; } diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php index 3700ecf631f..5ac6e892611 100644 --- a/htdocs/admin/agenda_xcal.php +++ b/htdocs/admin/agenda_xcal.php @@ -48,10 +48,10 @@ if (GETPOSTISSET('MAIN_AGENDA_XCAL_EXPORTKEY')) { $MAIN_AGENDA_XCAL_EXPORTKEY = trim(GETPOST('MAIN_AGENDA_XCAL_EXPORTKEY', 'alpha')); } if (GETPOSTISSET('MAIN_AGENDA_EXPORT_PAST_DELAY')) { - $MAIN_AGENDA_EXPORT_PAST_DELAY = intval(GETPOST('MAIN_AGENDA_EXPORT_PAST_DELAY', 'int')); + $MAIN_AGENDA_EXPORT_PAST_DELAY = intval(GETPOSTINT('MAIN_AGENDA_EXPORT_PAST_DELAY')); } if (GETPOSTISSET('MAIN_AGENDA_EXPORT_CACHE')) { - $MAIN_AGENDA_EXPORT_CACHE = intval(GETPOST('MAIN_AGENDA_EXPORT_CACHE', 'int')); + $MAIN_AGENDA_EXPORT_CACHE = intval(GETPOSTINT('MAIN_AGENDA_EXPORT_CACHE')); } if (GETPOSTISSET('AGENDA_EXPORT_FIX_TZ')) { $AGENDA_EXPORT_FIX_TZ = trim(GETPOST('AGENDA_EXPORT_FIX_TZ', 'alpha')); diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index be817438610..49f2dc3380c 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -70,7 +70,7 @@ if ($action == 'setbarcodethirdpartyon') { if ($action == 'setcoder') { $coder = GETPOST('coder', 'alpha'); - $code_id = GETPOST('code_id', 'int'); + $code_id = GETPOSTINT('code_id'); $sqlp = "UPDATE ".MAIN_DB_PREFIX."c_barcode_type"; $sqlp .= " SET coder = '".$db->escape($coder)."'"; $sqlp .= " WHERE rowid = ".((int) $code_id); diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 189fb532e1f..99d56c35658 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -36,7 +36,7 @@ if (!$user->admin) { accessforbidden(); } -$rowid = GETPOST('rowid', 'int'); +$rowid = GETPOSTINT('rowid'); $action = GETPOST('action', 'aZ09'); @@ -50,7 +50,7 @@ $boxes = array(); */ if ($action == 'addconst') { - dolibarr_set_const($db, "MAIN_BOXES_MAXLINES", GETPOST("MAIN_BOXES_MAXLINES", 'int'), '', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_BOXES_MAXLINES", GETPOSTINT("MAIN_BOXES_MAXLINES"), '', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_ACTIVATE_FILECACHE", GETPOST("MAIN_ACTIVATE_FILECACHE", 'alpha'), 'chaine', 0, '', $conf->entity); } @@ -165,10 +165,10 @@ if ($action == 'switch') { $db->begin(); $objfrom = new ModeleBoxes($db); - $objfrom->fetch(GETPOST("switchfrom", 'int')); + $objfrom->fetch(GETPOSTINT("switchfrom")); $objto = new ModeleBoxes($db); - $objto->fetch(GETPOST('switchto', 'int')); + $objto->fetch(GETPOSTINT('switchto')); $resultupdatefrom = 0; $resultupdateto = 0; diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 9eb4626c3bc..f07961486c6 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -92,7 +92,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha')) activateModulesRequiredByCountry($mysoc->country_code); } - $tmparray = getState(GETPOST('state_id', 'int'), 'all', $db, $langs, 0); + $tmparray = getState(GETPOSTINT('state_id'), 'all', $db, $langs, 0); if (!empty($tmparray['id'])) { $mysoc->state_id = $tmparray['id']; $mysoc->state_code = $tmparray['code']; @@ -218,7 +218,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha')) dolibarr_set_const($db, "MAIN_INFO_TVAINTRA", GETPOST("tva", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_OBJECT", GETPOST("socialobject", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "SOCIETE_FISCAL_MONTH_START", GETPOST("SOCIETE_FISCAL_MONTH_START", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "SOCIETE_FISCAL_MONTH_START", GETPOSTINT("SOCIETE_FISCAL_MONTH_START"), 'chaine', 0, '', $conf->entity); // Sale tax options $usevat = GETPOST("optiontva", 'aZ09'); diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index f290df752bc..792fe0b30cf 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -32,19 +32,19 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; // Load translation files required by the page $langs->load("admin"); -$rowid = GETPOST('rowid', 'int'); -$entity = GETPOST('entity', 'int'); +$rowid = GETPOSTINT('rowid'); +$entity = GETPOSTINT('entity'); $action = GETPOST('action', 'aZ09'); -$debug = GETPOST('debug', 'int'); +$debug = GETPOSTINT('debug'); $consts = GETPOST('const', 'array'); $constname = GETPOST('constname', 'alphanohtml'); $constvalue = GETPOST('constvalue', 'restricthtml'); // We should be able to send everything here $constnote = GETPOST('constnote', 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action diff --git a/htdocs/admin/debugbar.php b/htdocs/admin/debugbar.php index 0994918d462..d06fb6502a2 100644 --- a/htdocs/admin/debugbar.php +++ b/htdocs/admin/debugbar.php @@ -49,8 +49,8 @@ $action = GETPOST('action', 'aZ09'); if ($action == 'set') { $db->begin(); - $result1 = dolibarr_set_const($db, "DEBUGBAR_LOGS_LINES_NUMBER", GETPOST('DEBUGBAR_LOGS_LINES_NUMBER', 'int'), 'chaine', 0, '', 0); - $result2 = dolibarr_set_const($db, "DEBUGBAR_USE_LOG_FILE", GETPOST('DEBUGBAR_USE_LOG_FILE', 'int'), 'chaine', 0, '', 0); + $result1 = dolibarr_set_const($db, "DEBUGBAR_LOGS_LINES_NUMBER", GETPOSTINT('DEBUGBAR_LOGS_LINES_NUMBER'), 'chaine', 0, '', 0); + $result2 = dolibarr_set_const($db, "DEBUGBAR_USE_LOG_FILE", GETPOSTINT('DEBUGBAR_USE_LOG_FILE'), 'chaine', 0, '', 0); if ($result1 < 0 || $result2 < 0) { $error++; } diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php index 5c92e5acd14..0792ad97007 100644 --- a/htdocs/admin/defaultvalues.php +++ b/htdocs/admin/defaultvalues.php @@ -46,10 +46,10 @@ $optioncss = GETPOST('optionscss', 'alphanohtml'); $mode = GETPOST('mode', 'aZ09') ? GETPOST('mode', 'aZ09') : 'createform'; // 'createform', 'filters', 'sortorder', 'focus' -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -366,7 +366,7 @@ if (!is_array($result) && $result < 0) { // Page print ''; - if ($action != 'edit' || GETPOST('rowid', 'int') != $defaultvalue->id) { + if ($action != 'edit' || GETPOSTINT('rowid') != $defaultvalue->id) { print $defaultvalue->page; } else { print ''; diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index ef1d477a624..0a7a3ea4e7a 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -188,7 +188,7 @@ if ($action == 'update') { // Update values for ($i = 0; $i < 4; $i++) { if (GETPOSTISSET('MAIN_METEO'.$plus.'_LEVEL'.$i)) { - dolibarr_set_const($db, 'MAIN_METEO'.$plus.'_LEVEL'.$i, GETPOST('MAIN_METEO'.$plus.'_LEVEL'.$i, 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, 'MAIN_METEO'.$plus.'_LEVEL'.$i, GETPOSTINT('MAIN_METEO'.$plus.'_LEVEL'.$i), 'chaine', 0, '', $conf->entity); } } diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 28fdb10609b..2afd06435b8 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -49,9 +49,9 @@ $langs->loadLangs(array("errors", "admin", "main", "companies", "resource", "hol $action = GETPOST('action', 'alpha') ? GETPOST('action', 'alpha') : 'view'; $confirm = GETPOST('confirm', 'alpha'); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $rowid = GETPOST('rowid', 'alpha'); -$entity = GETPOST('entity', 'int'); +$entity = GETPOSTINT('entity'); $code = GETPOST('code', 'alpha'); $acts = array(); $actl = array(); @@ -65,7 +65,7 @@ $listoffset = GETPOST('listoffset'); $listlimit = GETPOST('listlimit') > 0 ? GETPOST('listlimit') : 1000; // To avoid too long dictionaries $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -74,7 +74,7 @@ $offset = $listlimit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -$search_country_id = GETPOST('search_country_id', 'int'); +$search_country_id = GETPOSTINT('search_country_id'); $search_code = GETPOST('search_code', 'alpha'); $search_active = GETPOST('search_active', 'alpha'); @@ -931,13 +931,13 @@ if (empty($reshook)) { } if ($keycode == 'sortorder') { // For column name 'sortorder', we use the field name 'position' - $sql .= (int) GETPOST('position', 'int'); + $sql .= GETPOSTINT('position'); } elseif (GETPOST($keycode) == '' && !($keycode == 'code' && $id == 10)) { $sql .= "null"; // For vat, we want/accept code = '' } elseif ($keycode == 'content') { $sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'"; } elseif (in_array($keycode, array('joinfile', 'private', 'pos', 'position', 'scale', 'use_default'))) { - $sql .= (int) GETPOST($keycode, 'int'); + $sql .= GETPOSTINT($keycode); } else { $sql .= "'".$db->escape(GETPOST($keycode, 'alphanohtml'))."'"; } @@ -952,8 +952,8 @@ if (empty($reshook)) { setEventMessages($langs->transnoentities("RecordCreatedSuccessfully"), null, 'mesgs'); // Clean $_POST array, we keep only id of dictionary - if ($id == 10 && GETPOST('country', 'int') > 0) { - $search_country_id = GETPOST('country', 'int'); + if ($id == 10 && GETPOSTINT('country') > 0) { + $search_country_id = GETPOSTINT('country'); } $_POST = array('id'=>$id); } else { @@ -1000,13 +1000,13 @@ if (empty($reshook)) { } $sql .= $field."="; if ($listfieldvalue[$i] == 'sortorder') { // For column name 'sortorder', we use the field name 'position' - $sql .= (int) GETPOST('position', 'int'); + $sql .= GETPOSTINT('position'); } elseif (GETPOST($keycode) == '' && !($keycode == 'code' && $id == 10)) { $sql .= "null"; // For vat, we want/accept code = '' } elseif ($keycode == 'content') { $sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'"; } elseif (in_array($keycode, array('joinfile', 'private', 'pos', 'position', 'scale', 'use_default'))) { - $sql .= (int) GETPOST($keycode, 'int'); + $sql .= GETPOSTINT($keycode); } else { $sql .= "'".$db->escape(GETPOST($keycode, 'alphanohtml'))."'"; } @@ -2305,10 +2305,10 @@ if ($id > 0) { $showfield = 0; } elseif ($value == 'unicode') { $valuetoshow = $langs->getCurrencySymbol($obj->code, 1); - } elseif ($value == 'label' && $tabname[GETPOST("id", 'int')] == 'c_units') { + } elseif ($value == 'label' && $tabname[GETPOSTINT("id")] == 'c_units') { $langs->load("products"); $valuetoshow = $langs->trans($obj->$value); - } elseif ($value == 'short_label' && $tabname[GETPOST("id", 'int')] == 'c_units') { + } elseif ($value == 'short_label' && $tabname[GETPOSTINT("id")] == 'c_units') { $langs->load("products"); $valuetoshow = $langs->trans($obj->$value); } elseif (($value == 'unit') && ($tabname[$id] == 'c_paper_format')) { diff --git a/htdocs/admin/dolistore/ajax/image.php b/htdocs/admin/dolistore/ajax/image.php index 9ff92554e09..e5896a4eec1 100644 --- a/htdocs/admin/dolistore/ajax/image.php +++ b/htdocs/admin/dolistore/ajax/image.php @@ -40,8 +40,8 @@ top_httphead('image'); $dolistore = new Dolistore(); -$id_product = GETPOST('id_product', 'int'); -$id_image = GETPOST('id_image', 'int'); +$id_product = GETPOSTINT('id_product'); +$id_image = GETPOSTINT('id_image'); // quality : image resize with this in the URL : "cart_default", "home_default", "large_default", "medium_default", "small_default", "thickbox_default" $quality = GETPOST('quality', 'alpha'); diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index b061eabdfe2..844f897547f 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -53,7 +53,7 @@ if (!isModEnabled('emailcollector')) { $langs->loadLangs(array("admin", "mails", "other")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); @@ -61,7 +61,7 @@ $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'emailcollectorcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); -$operationid = GETPOST('operationid', 'int'); +$operationid = GETPOSTINT('operationid'); // Initialize technical objects $object = new EmailCollector($db); @@ -154,7 +154,7 @@ if (GETPOST('addfilter', 'alpha')) { if ($action == 'deletefilter') { $emailcollectorfilter = new EmailCollectorFilter($db); - $emailcollectorfilter->fetch(GETPOST('filterid', 'int')); + $emailcollectorfilter->fetch(GETPOSTINT('filterid')); if ($emailcollectorfilter->id > 0) { $result = $emailcollectorfilter->delete($user); if ($result > 0) { @@ -198,7 +198,7 @@ if (GETPOST('addoperation', 'alpha')) { if ($action == 'updateoperation') { $emailcollectoroperation = new EmailCollectorAction($db); - $emailcollectoroperation->fetch(GETPOST('rowidoperation2', 'int')); + $emailcollectoroperation->fetch(GETPOSTINT('rowidoperation2')); $emailcollectoroperation->actionparam = GETPOST('operationparam2', 'alphawithlgt'); @@ -221,7 +221,7 @@ if ($action == 'updateoperation') { } if ($action == 'deleteoperation') { $emailcollectoroperation = new EmailCollectorAction($db); - $emailcollectoroperation->fetch(GETPOST('operationid', 'int')); + $emailcollectoroperation->fetch(GETPOSTINT('operationid')); if ($emailcollectoroperation->id > 0) { $result = $emailcollectoroperation->delete($user); if ($result > 0) { diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index 833e822c288..e431b1f19dc 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -38,7 +38,7 @@ $langs->loadLangs(array("admin", "other")); $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list @@ -47,13 +47,13 @@ $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $mode = GETPOST('mode', 'aZ'); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $page = 0; @@ -99,8 +99,8 @@ foreach ($object->fields as $key => $val) { $search[$key] = GETPOST('search_'.$key, 'alpha'); } if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { - $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); - $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOSTINT('search_'.$key.'_dtstartmonth'), GETPOSTINT('search_'.$key.'_dtstartday'), GETPOSTINT('search_'.$key.'_dtstartyear')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOSTINT('search_'.$key.'_dtendmonth'), GETPOSTINT('search_'.$key.'_dtendday'), GETPOSTINT('search_'.$key.'_dtendyear')); } } @@ -365,7 +365,7 @@ $arrayofmassactions = array( if ($permissiontodelete) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/admin/events.php b/htdocs/admin/events.php index afdeca4b7b2..6b321316f47 100644 --- a/htdocs/admin/events.php +++ b/htdocs/admin/events.php @@ -41,10 +41,10 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'au $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index a1360b92966..16f4e1acc36 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -152,13 +152,13 @@ if ($action == 'updateMask') { $res3 = 0; if (isModEnabled('project') && GETPOSTISSET('EXPENSEREPORT_PROJECT_IS_REQUIRED')) { // Option may not be provided - $res3 = dolibarr_set_const($db, 'EXPENSEREPORT_PROJECT_IS_REQUIRED', GETPOST('EXPENSEREPORT_PROJECT_IS_REQUIRED', 'int'), 'chaine', 0, '', $conf->entity); + $res3 = dolibarr_set_const($db, 'EXPENSEREPORT_PROJECT_IS_REQUIRED', GETPOSTINT('EXPENSEREPORT_PROJECT_IS_REQUIRED'), 'chaine', 0, '', $conf->entity); } - $dates = GETPOST('EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH', 'int'); + $dates = GETPOSTINT('EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH'); $res4 = dolibarr_set_const($db, 'EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH', intval($dates), 'chaine', 0, '', $conf->entity); - $amounts = GETPOST('EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY', 'int'); + $amounts = GETPOSTINT('EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY'); $res5 = dolibarr_set_const($db, 'EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY', intval($amounts), 'chaine', 0, '', $conf->entity); if (!($res1 > 0) || !($res2 > 0) || !($res3 >= 0) || !($res4 >0) || !($res5 >0)) { diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php index 639fcf50077..b3f22626264 100644 --- a/htdocs/admin/expensereport_rules.php +++ b/htdocs/admin/expensereport_rules.php @@ -60,11 +60,11 @@ if (empty($reshook)) { $error = false; $action = GETPOST('action', 'aZ09'); - $id = GETPOST('id', 'int'); + $id = GETPOSTINT('id'); $apply_to = GETPOST('apply_to'); - $fk_user = GETPOST('fk_user', 'int'); - $fk_usergroup = GETPOST('fk_usergroup', 'int'); + $fk_user = GETPOSTINT('fk_user'); + $fk_usergroup = GETPOSTINT('fk_usergroup'); $restrictive = GETPOSTINT('restrictive'); $fk_c_type_fees = GETPOSTINT('fk_c_type_fees'); $code_expense_rules_type = GETPOST('code_expense_rules_type'); diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index b9c200b3b50..4d1b5cc3bed 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -68,8 +68,8 @@ if ($result) { } if ($action == 'add' || GETPOST("modify")) { - $external_rss_title = "external_rss_title_".GETPOST("norss", 'int'); - $external_rss_urlrss = "external_rss_urlrss_".GETPOST("norss", 'int'); + $external_rss_title = "external_rss_title_".GETPOSTINT("norss"); + $external_rss_urlrss = "external_rss_urlrss_".GETPOSTINT("norss"); if (GETPOST($external_rss_urlrss, 'alpha')) { $boxlabel = '(ExternalRSSInformations)'; @@ -93,7 +93,7 @@ if ($action == 'add' || GETPOST("modify")) { } else { // Ajoute boite box_external_rss dans definition des boites $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes_def (file, note)"; - $sql .= " VALUES ('box_external_rss.php','".$db->escape(GETPOST("norss", 'int').' ('.GETPOST($external_rss_title, 'alpha')).")')"; + $sql .= " VALUES ('box_external_rss.php','".$db->escape(GETPOSTINT("norss").' ('.GETPOSTINT($external_rss_title)).")')"; if (!$db->query($sql)) { dol_print_error($db); $error++; @@ -101,9 +101,9 @@ if ($action == 'add' || GETPOST("modify")) { //print $sql;exit; } - $result1 = dolibarr_set_const($db, "EXTERNAL_RSS_TITLE_".GETPOST("norss", 'int'), GETPOST($external_rss_title, 'alpha'), 'chaine', 0, '', $conf->entity); + $result1 = dolibarr_set_const($db, "EXTERNAL_RSS_TITLE_".GETPOSTINT("norss"), GETPOSTINT($external_rss_title), 'chaine', 0, '', $conf->entity); if ($result1) { - $consttosave = "EXTERNAL_RSS_URLRSS_".GETPOST("norss", 'int'); + $consttosave = "EXTERNAL_RSS_URLRSS_".GETPOSTINT("norss"); $urltosave = GETPOST($external_rss_urlrss, 'alpha'); $result2 = dolibarr_set_const($db, $consttosave, $urltosave, 'chaine', 0, '', $conf->entity); //var_dump($result2);exit; @@ -121,12 +121,12 @@ if ($action == 'add' || GETPOST("modify")) { } if (GETPOST("delete")) { - if (GETPOST("norss", 'int')) { + if (GETPOSTINT("norss")) { $db->begin(); // Supprime boite box_external_rss de definition des boites $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."boxes_def"; - $sql .= " WHERE file = 'box_external_rss.php' AND note LIKE '".$db->escape(GETPOST("norss", 'int'))." %'"; + $sql .= " WHERE file = 'box_external_rss.php' AND note LIKE '".$db->escape(GETPOSTINT("norss"))." %'"; $resql = $db->query($sql); if ($resql) { @@ -161,9 +161,9 @@ if (GETPOST("delete")) { } - $result1 = dolibarr_del_const($db, "EXTERNAL_RSS_TITLE_".GETPOST("norss", 'int'), $conf->entity); + $result1 = dolibarr_del_const($db, "EXTERNAL_RSS_TITLE_".GETPOSTINT("norss"), $conf->entity); if ($result1) { - $result2 = dolibarr_del_const($db, "EXTERNAL_RSS_URLRSS_".GETPOST("norss", 'int'), $conf->entity); + $result2 = dolibarr_del_const($db, "EXTERNAL_RSS_URLRSS_".GETPOSTINT("norss"), $conf->entity); } if ($result1 && $result2) { diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 30525d92a68..a28e5d57482 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -230,7 +230,7 @@ if ($action == 'updateMask') { } } } elseif ($action == 'set_INVOICE_CHECK_POSTERIOR_DATE') { - $check_posterior_date = GETPOST('INVOICE_CHECK_POSTERIOR_DATE', 'int'); + $check_posterior_date = GETPOSTINT('INVOICE_CHECK_POSTERIOR_DATE'); $res = dolibarr_set_const($db, 'INVOICE_CHECK_POSTERIOR_DATE', $check_posterior_date, 'chaine', 0, '', $conf->entity); if (!($res > 0)) { $error++; diff --git a/htdocs/admin/hrm.php b/htdocs/admin/hrm.php index ae0c57284df..e0c92c8f663 100644 --- a/htdocs/admin/hrm.php +++ b/htdocs/admin/hrm.php @@ -73,7 +73,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; if ($action == 'update') { - $max_rank = GETPOST('HRM_MAXRANK', 'int'); + $max_rank = GETPOSTINT('HRM_MAXRANK'); // We complete skill possible level notation if necessary if (!empty($max_rank)) { diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 2e13c2d5c7a..1d27c5b2dbd 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -248,17 +248,17 @@ if ($action == 'update') { dolibarr_set_const($db, "MAIN_LANG_DEFAULT", GETPOST("MAIN_LANG_DEFAULT", 'aZ09'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("MAIN_SIZE_LISTE_LIMIT", 'int'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOSTINT("MAIN_SIZE_LISTE_LIMIT"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOSTINT("main_size_shortliste_limit"), 'chaine', 0, '', $conf->entity); if (GETPOSTISSET("MAIN_CHECKBOX_LEFT_COLUMN")) { - dolibarr_set_const($db, "MAIN_CHECKBOX_LEFT_COLUMN", GETPOST("MAIN_CHECKBOX_LEFT_COLUMN", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_CHECKBOX_LEFT_COLUMN", GETPOSTINT("MAIN_CHECKBOX_LEFT_COLUMN"), 'chaine', 0, '', $conf->entity); } //dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", GETPOST("MAIN_DISABLE_JAVASCRIPT", 'aZ09'), 'chaine', 0, '', $conf->entity); //dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", GETPOST("MAIN_BUTTON_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity); //dolibarr_set_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED", GETPOST("MAIN_MENU_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_START_WEEK", GETPOST("MAIN_START_WEEK", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_START_WEEK", GETPOSTINT("MAIN_START_WEEK"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", GETPOST("MAIN_DEFAULT_WORKING_DAYS", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", GETPOST("MAIN_DEFAULT_WORKING_HOURS", 'alphanohtml'), 'chaine', 0, '', $conf->entity); @@ -318,7 +318,7 @@ if ($action == 'update') { dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity); } - header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup&mode=".$mode.(GETPOSTISSET('page_y') ? '&page_y='.GETPOST('page_y', 'int') : '')); + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup&mode=".$mode.(GETPOSTISSET('page_y') ? '&page_y='.GETPOSTINT('page_y') : '')); exit; } diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index cc1fd97fe62..dcf59d40d8b 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -65,7 +65,7 @@ if (empty($reshook)) { if (!dolibarr_set_const($db, 'LDAP_SERVER_TYPE', GETPOST("type", 'aZ09'), 'chaine', 0, '', $conf->entity)) { $error++; } - if (!dolibarr_set_const($db, 'LDAP_USERACCOUNTCONTROL', GETPOST("userAccountControl", 'int'), 'chaine', 0, '', $conf->entity)) { + if (!dolibarr_set_const($db, 'LDAP_USERACCOUNTCONTROL', GETPOSTINT("userAccountControl"), 'chaine', 0, '', $conf->entity)) { $error++; } if (!dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION', GETPOST("LDAP_SERVER_PROTOCOLVERSION", 'aZ09'), 'chaine', 0, '', $conf->entity)) { @@ -77,7 +77,7 @@ if (empty($reshook)) { if (!dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE', GETPOST("slave", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) { $error++; } - if (!dolibarr_set_const($db, 'LDAP_SERVER_PORT', GETPOST("port", 'int'), 'chaine', 0, '', $conf->entity)) { + if (!dolibarr_set_const($db, 'LDAP_SERVER_PORT', GETPOSTINT("port"), 'chaine', 0, '', $conf->entity)) { $error++; } if (!dolibarr_set_const($db, 'LDAP_SERVER_DN', GETPOST("dn", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) { diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 41699a84709..a4911e94e52 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -45,8 +45,8 @@ $mainmaxdecimalstot = 'MAIN_MAX_DECIMALS_TOT'.(!empty($currencycode) ? '_'.$curr $mainmaxdecimalsshown = 'MAIN_MAX_DECIMALS_SHOWN'.(!empty($currencycode) ? '_'.$currencycode : ''); $mainroundingruletot = 'MAIN_ROUNDING_RULE_TOT'.(!empty($currencycode) ? '_'.$currencycode : ''); -$valmainmaxdecimalsunit = GETPOST($mainmaxdecimalsunit, 'int'); -$valmainmaxdecimalstot = GETPOST($mainmaxdecimalstot, 'int'); +$valmainmaxdecimalsunit = GETPOSTINT($mainmaxdecimalsunit); +$valmainmaxdecimalstot = GETPOSTINT($mainmaxdecimalstot); $valmainmaxdecimalsshown = GETPOST($mainmaxdecimalsshown, 'alpha'); // Can be 'x.y' but also 'x...' $valmainroundingruletot = price2num(GETPOST($mainroundingruletot, 'alphanohtml'), '', 2); diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php index 417e90f9ef4..93a47a30e5e 100644 --- a/htdocs/admin/mailing.php +++ b/htdocs/admin/mailing.php @@ -51,7 +51,7 @@ if ($action == 'setvalue') { $mailerror = GETPOST('MAILING_EMAIL_ERRORSTO', 'alpha'); $checkread = GETPOST('value', 'alpha'); $checkread_key = GETPOST('MAILING_EMAIL_UNSUBSCRIBE_KEY', 'alpha'); - $contactbulkdefault = GETPOST('MAILING_CONTACT_DEFAULT_BULK_STATUS', 'int'); + $contactbulkdefault = GETPOSTINT('MAILING_CONTACT_DEFAULT_BULK_STATUS'); if (GETPOST('MAILING_DELAY', 'alpha') != '') { $mailingdelay = price2num(GETPOST('MAILING_DELAY', 'alpha'), 3); // Not less than 1 millisecond. } else { @@ -98,7 +98,7 @@ if ($action == 'setvalue') { } } if ($action == 'setonsearchandlistgooncustomerorsuppliercard') { - $setonsearchandlistgooncustomerorsuppliercard = GETPOST('value', 'int'); + $setonsearchandlistgooncustomerorsuppliercard = GETPOSTINT('value'); $res = dolibarr_set_const($db, "SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD", $setonsearchandlistgooncustomerorsuppliercard, 'yesno', 0, '', $conf->entity); if (!($res > 0)) { $error++; diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index cdda45c2a90..e224b75a986 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -86,13 +86,13 @@ if ($action == 'update' && !$cancel) { } if (!$error) { - dolibarr_set_const($db, "MAIN_DISABLE_ALL_MAILS", GETPOST("MAIN_DISABLE_ALL_MAILS", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_DISABLE_ALL_MAILS", GETPOSTINT("MAIN_DISABLE_ALL_MAILS"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_FORCE_SENDTO", GETPOST("MAIN_MAIL_FORCE_SENDTO", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_MAIL_ENABLED_USER_DEST_SELECT", GETPOST("MAIN_MAIL_ENABLED_USER_DEST_SELECT", 'int'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, 'MAIN_MAIL_NO_WITH_TO_SELECTED', GETPOST('MAIN_MAIL_NO_WITH_TO_SELECTED', 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_ENABLED_USER_DEST_SELECT", GETPOSTINT("MAIN_MAIL_ENABLED_USER_DEST_SELECT"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, 'MAIN_MAIL_NO_WITH_TO_SELECTED', GETPOSTINT('MAIN_MAIL_NO_WITH_TO_SELECTED'), 'chaine', 0, '', $conf->entity); // Send mode parameters dolibarr_set_const($db, "MAIN_MAIL_SENDMODE", GETPOST("MAIN_MAIL_SENDMODE", 'aZ09'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT", GETPOST("MAIN_MAIL_SMTP_PORT", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT", GETPOSTINT("MAIN_MAIL_SMTP_PORT"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER", GETPOST("MAIN_MAIL_SMTP_SERVER", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID", GETPOST("MAIN_MAIL_SMTPS_ID", 'alphanohtml'), 'chaine', 0, '', $conf->entity); if (GETPOSTISSET("MAIN_MAIL_SMTPS_PW")) { @@ -104,11 +104,11 @@ if ($action == 'update' && !$cancel) { if (GETPOSTISSET("MAIN_MAIL_SMTPS_OAUTH_SERVICE")) { dolibarr_set_const($db, "MAIN_MAIL_SMTPS_OAUTH_SERVICE", GETPOST("MAIN_MAIL_SMTPS_OAUTH_SERVICE", 'alphanohtml'), 'chaine', 0, '', $conf->entity); } - dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS", GETPOST("MAIN_MAIL_EMAIL_TLS", 'int'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS", GETPOST("MAIN_MAIL_EMAIL_STARTTLS", 'int'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED", GETPOST("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS", GETPOSTINT("MAIN_MAIL_EMAIL_TLS"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS", GETPOSTINT("MAIN_MAIL_EMAIL_STARTTLS"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED", GETPOSTINT("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED"), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_ENABLED", GETPOST("MAIN_MAIL_EMAIL_DKIM_ENABLED", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_ENABLED", GETPOSTINT("MAIN_MAIL_EMAIL_DKIM_ENABLED"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_DOMAIN", GETPOST("MAIN_MAIL_EMAIL_DKIM_DOMAIN", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_SELECTOR", GETPOST("MAIN_MAIL_EMAIL_DKIM_SELECTOR", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY", GETPOST("MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY", 'alphanohtml'), 'chaine', 0, '', $conf->entity); diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index d0a452061de..1d718819e79 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -35,7 +35,7 @@ $langs->loadLangs(array("errors", "admin", "mails", "languages")); $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list @@ -44,14 +44,14 @@ $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $rowid = GETPOST('rowid', 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -88,8 +88,8 @@ foreach ($object->fields as $key => $val) { $search[$key] = GETPOST('search_'.$key, 'alpha'); } if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { - $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); - $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOSTINT('search_'.$key.'_dtstartmonth'), GETPOSTINT('search_'.$key.'_dtstartday'), GETPOSTINT('search_'.$key.'_dtstartyear')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOSTINT('search_'.$key.'_dtendmonth'), GETPOSTINT('search_'.$key.'_dtendday'), GETPOSTINT('search_'.$key.'_dtendyear')); } } @@ -203,7 +203,7 @@ if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; if ($action == 'delete') { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."c_email_senderprofile WHERE rowid = ".GETPOST('id', 'int'); + $sql = "DELETE FROM ".MAIN_DB_PREFIX."c_email_senderprofile WHERE rowid = ".GETPOSTINT('id'); $resql = $db->query($sql); if ($resql) { setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); @@ -268,7 +268,7 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; if ($object->ismultientitymanaged == 1) { - $sql .= " WHERE t.entity IN (".getEntity($object->element, (GETPOST('search_current_entity', 'int') ? 0 : 1)).")"; + $sql .= " WHERE t.entity IN (".getEntity($object->element, (GETPOSTINT('search_current_entity') ? 0 : 1)).")"; } else { $sql .= " WHERE 1 = 1"; } @@ -397,9 +397,9 @@ foreach ($search as $key => $val) { } } } elseif (preg_match('/(_dtstart|_dtend)$/', $key) && !empty($val)) { - $param .= '&search_'.$key.'month='.((int) GETPOST('search_'.$key.'month', 'int')); - $param .= '&search_'.$key.'day='.((int) GETPOST('search_'.$key.'day', 'int')); - $param .= '&search_'.$key.'year='.((int) GETPOST('search_'.$key.'year', 'int')); + $param .= '&search_'.$key.'month='.(GETPOSTINT('search_'.$key.'month')); + $param .= '&search_'.$key.'day='.(GETPOSTINT('search_'.$key.'day')); + $param .= '&search_'.$key.'year='.(GETPOSTINT('search_'.$key.'year')); } elseif ($search[$key] != '') { $param .= '&search_'.$key.'='.urlencode($search[$key]); } @@ -453,11 +453,11 @@ if ($action != 'create') { print ''; print ''.$langs->trans("User").''; print img_picto('', 'user', 'class="pictofixedwidth"'); - print $form->select_dolusers((GETPOSTISSET('private') ? GETPOST('private', 'int') : $object->private), 'private', 1, null, 0, ($user->admin ? '' : $user->id)); + print $form->select_dolusers((GETPOSTISSET('private') ? GETPOSTINT('private') : $object->private), 'private', 1, null, 0, ($user->admin ? '' : $user->id)); print ''; - print ''.$langs->trans("Position").''; + print ''.$langs->trans("Position").''; print ''.$langs->trans("Status").''; - print $form->selectarray('active', $object->fields['active']['arrayofkeyval'], (GETPOSTISSET('active') ? GETPOST('active', 'int') : $object->active), 0, 0, 0, '', 1); + print $form->selectarray('active', $object->fields['active']['arrayofkeyval'], (GETPOSTISSET('active') ? GETPOSTINT('active') : $object->active), 0, 0, 0, '', 1); print ''; print ''; @@ -485,11 +485,11 @@ if ($action != 'create') { print ''; print ''.$langs->trans("User").''; print img_picto('', 'user', 'class="pictofixedwidth"'); - print $form->select_dolusers((GETPOSTISSET('private') ? GETPOST('private', 'int') : -1), 'private', 1, null, 0, ($user->admin ? '' : $user->id)); + print $form->select_dolusers((GETPOSTISSET('private') ? GETPOSTINT('private') : -1), 'private', 1, null, 0, ($user->admin ? '' : $user->id)); print ''; - print ''.$langs->trans("Position").''; + print ''.$langs->trans("Position").''; print ''.$langs->trans("Status").''; - print $form->selectarray('active', $object->fields['active']['arrayofkeyval'], GETPOST('active', 'int'), 0); + print $form->selectarray('active', $object->fields['active']['arrayofkeyval'], GETPOSTINT('active'), 0); print ''; print ''; diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index 13545002911..cc9b100d393 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -62,7 +62,7 @@ $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $mode = GETPOST('mode', 'aZ09'); $optioncss = GETPOST('optioncss', 'alpha'); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $rowid = GETPOST('rowid', 'alpha'); $search_label = GETPOST('search_label', 'alphanohtml'); // Must allow value like 'Abc Def' or '(MyTemplateName)' $search_type_template = GETPOST('search_type_template', 'alpha'); @@ -81,10 +81,10 @@ $actl[1] = img_picto($langs->trans("Activated"), 'switch_on', 'class="size15x"') $listoffset = GETPOST('listoffset', 'alpha'); $listlimit = GETPOST('listlimit', 'alpha') > 0 ? GETPOST('listlimit', 'alpha') : 1000; -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -401,12 +401,12 @@ if (empty($reshook)) { if (!$user->admin) { // A non admin user can only edit its own template $sql .= " ".((int) $user->id); } else { - $sql .= " ".((int) GETPOST($keycode, 'int')); + $sql .= " ".(GETPOSTINT($keycode)); } } elseif ($keycode == 'content') { $sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'"; } elseif (in_array($keycode, array('joinfiles', 'defaultfortype', 'private', 'position', 'entity'))) { - $sql .= (int) GETPOST($keycode, 'int'); + $sql .= GETPOSTINT($keycode); } else { $sql .= "'".$db->escape(GETPOST($keycode, 'alphanohtml'))."'"; } @@ -454,7 +454,7 @@ if (empty($reshook)) { } // Rename some POST variables into a generic name - if ($field == 'fk_user' && !(GETPOST('fk_user', 'int') > 0)) { + if ($field == 'fk_user' && !(GETPOSTINT('fk_user') > 0)) { $_POST['fk_user'] = ''; } if ($field == 'topic') { @@ -483,12 +483,12 @@ if (empty($reshook)) { if (!$user->admin) { // A non admin user can only edit its own template $sql .= " ".((int) $user->id); } else { - $sql .= " ".((int) GETPOST($keycode, 'int')); + $sql .= " ".(GETPOSTINT($keycode)); } } elseif ($keycode == 'content') { $sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'"; } elseif (in_array($keycode, array('joinfiles', 'defaultfortype', 'private', 'position'))) { - $sql .= (int) GETPOST($keycode, 'int'); + $sql .= GETPOSTINT($keycode); } else { $sql .= "'".$db->escape(GETPOST($keycode, 'alphanohtml'))."'"; } @@ -693,8 +693,8 @@ if ($action == 'create') { $obj->label = GETPOST('label'); $obj->lang = GETPOST('lang'); $obj->type_template = GETPOST('type_template'); - $obj->fk_user = GETPOST('fk_user', 'int'); - $obj->private = GETPOST('private', 'int'); + $obj->fk_user = GETPOSTINT('fk_user'); + $obj->private = GETPOSTINT('private'); $obj->position = GETPOST('position'); $obj->topic = GETPOST('topic'); $obj->joinfiles = GETPOST('joinfiles'); diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index 3b680f93a7b..f2969e5ed69 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -133,7 +133,7 @@ if ($action == 'add') { $menu->prefix = (string) GETPOST('picto', 'restricthtmlallowclass'); $menu->url = (string) GETPOST('url', 'alphanohtml'); $menu->langs = (string) GETPOST('langs', 'alphanohtml'); - $menu->position = (int) GETPOST('position', 'int'); + $menu->position = GETPOSTINT('position'); $menu->enabled = (string) GETPOST('enabled', 'alphanohtml'); $menu->perms = (string) GETPOST('perms', 'alphanohtml'); $menu->target = (string) GETPOST('target', 'alphanohtml'); @@ -187,14 +187,14 @@ if ($action == 'update') { if (!$error) { $menu = new Menubase($db); - $result = $menu->fetch(GETPOST('menuId', 'int')); + $result = $menu->fetch(GETPOSTINT('menuId')); if ($result > 0) { $menu->title = (string) GETPOST('titre', 'alphanohtml'); $menu->prefix = (string) GETPOST('picto', 'restricthtmlallowclass'); $menu->leftmenu = (string) GETPOST('leftmenu', 'aZ09'); $menu->url = (string) GETPOST('url', 'alphanohtml'); $menu->langs = (string) GETPOST('langs', 'alphanohtml'); - $menu->position = (int) GETPOST('position', 'int'); + $menu->position = GETPOSTINT('position'); $menu->enabled = (string) GETPOST('enabled', 'alphanohtml'); $menu->perms = (string) GETPOST('perms', 'alphanohtml'); $menu->target = (string) GETPOST('target', 'alphanohtml'); @@ -274,7 +274,7 @@ if ($action == 'create') { print load_fiche_titre($langs->trans("NewMenu"), '', 'title_setup'); - print ''; + print ''; print ''; print dol_get_fiche_head(); @@ -283,16 +283,16 @@ if ($action == 'create') { print ''; // Id - $parent_rowid = GETPOST('menuId', 'int'); + $parent_rowid = GETPOSTINT('menuId'); $parent_mainmenu = ''; $parent_leftmenu = ''; $parent_langs = ''; $parent_level = ''; - if (GETPOST('menuId', 'int')) { + if (GETPOSTINT('menuId')) { $sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs"; $sql .= " FROM ".MAIN_DB_PREFIX."menu as m"; - $sql .= " WHERE m.rowid = ".((int) GETPOST('menuId', 'int')); + $sql .= " WHERE m.rowid = ".(GETPOSTINT('menuId')); $res = $db->query($sql); if ($res) { while ($menu = $db->fetch_array($res)) { @@ -408,7 +408,7 @@ if ($action == 'create') { print ''; print ''; print ''; - print ''; + print ''; print dol_get_fiche_head(); @@ -416,7 +416,7 @@ if ($action == 'create') { print '
'; $menu = new Menubase($db); - $result = $menu->fetch(GETPOST('menuId', 'int')); + $result = $menu->fetch(GETPOSTINT('menuId')); //var_dump($menu); // Id diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index d18f205f4de..c6099a88c6c 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -75,7 +75,7 @@ if ($action == 'up') { // Get current position $sql = "SELECT m.rowid, m.position, m.type, m.fk_menu"; $sql .= " FROM ".MAIN_DB_PREFIX."menu as m"; - $sql .= " WHERE m.rowid = ".GETPOST("menuId", "int"); + $sql .= " WHERE m.rowid = ".GETPOSTINT("menuId"); dol_syslog("admin/menus/index.php ".$sql); $result = $db->query($sql); $num = $db->num_rows($result); @@ -92,7 +92,7 @@ if ($action == 'up') { // Menu before $sql = "SELECT m.rowid, m.position"; $sql .= " FROM ".MAIN_DB_PREFIX."menu as m"; - $sql .= " WHERE (m.position < ".($current['order'])." OR (m.position = ".($current['order'])." AND rowid < ".GETPOST("menuId", "int")."))"; + $sql .= " WHERE (m.position < ".($current['order'])." OR (m.position = ".($current['order'])." AND rowid < ".GETPOSTINT("menuId")."))"; $sql .= " AND m.menu_handler='".$db->escape($menu_handler_to_search)."'"; $sql .= " AND m.entity = ".$conf->entity; $sql .= " AND m.type = '".$db->escape($current['type'])."'"; @@ -126,7 +126,7 @@ if ($action == 'up') { // Get current position $sql = "SELECT m.rowid, m.position, m.type, m.fk_menu"; $sql .= " FROM ".MAIN_DB_PREFIX."menu as m"; - $sql .= " WHERE m.rowid = ".GETPOST("menuId", "int"); + $sql .= " WHERE m.rowid = ".GETPOSTINT("menuId"); dol_syslog("admin/menus/index.php ".$sql); $result = $db->query($sql); $num = $db->num_rows($result); @@ -143,7 +143,7 @@ if ($action == 'up') { // Menu after $sql = "SELECT m.rowid, m.position"; $sql .= " FROM ".MAIN_DB_PREFIX."menu as m"; - $sql .= " WHERE (m.position > ".($current['order'])." OR (m.position = ".($current['order'])." AND rowid > ".GETPOST("menuId", "int")."))"; + $sql .= " WHERE (m.position > ".($current['order'])." OR (m.position = ".($current['order'])." AND rowid > ".GETPOSTINT("menuId")."))"; $sql .= " AND m.menu_handler='".$db->escape($menu_handler_to_search)."'"; $sql .= " AND m.entity = ".$conf->entity; $sql .= " AND m.type = '".$db->escape($current['type'])."'"; @@ -174,7 +174,7 @@ if ($action == 'up') { $db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."menu"; - $sql .= " WHERE rowid = ".GETPOST('menuId', 'int'); + $sql .= " WHERE rowid = ".GETPOSTINT('menuId'); $resql = $db->query($sql); if ($resql) { $db->commit(); @@ -231,11 +231,11 @@ print "
\n"; if ($action == 'delete') { $sql = "SELECT m.titre as title"; $sql .= " FROM ".MAIN_DB_PREFIX."menu as m"; - $sql .= " WHERE m.rowid = ".GETPOST('menuId', 'int'); + $sql .= " WHERE m.rowid = ".GETPOSTINT('menuId'); $result = $db->query($sql); $obj = $db->fetch_object($result); - print $form->formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".GETPOST('menuId', 'int'), $langs->trans("DeleteMenu"), $langs->trans("ConfirmDeleteMenu", $obj->title), "confirm_delete"); + print $form->formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".GETPOSTINT('menuId'), $langs->trans("DeleteMenu"), $langs->trans("ConfirmDeleteMenu", $obj->title), "confirm_delete"); } $newcardbutton = ''; diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index 8ef166d933c..dd91a52a04d 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -41,7 +41,7 @@ $langs->loadLangs(array('errors', 'admin', 'modulebuilder', 'exports')); $mode = GETPOST('mode', 'alpha'); $action = GETPOST('action', 'aZ09'); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); if (empty($mode)) { $mode = 'desc'; } diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 62c612ab24a..d24c833cb85 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -56,7 +56,7 @@ if (GETPOSTISSET('mode')) { $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); -$page_y = GETPOST('page_y', 'int'); +$page_y = GETPOSTINT('page_y'); $search_keyword = GETPOST('search_keyword', 'alpha'); $search_status = GETPOST('search_status', 'alpha'); $search_nature = GETPOST('search_nature', 'alpha'); @@ -66,9 +66,9 @@ $search_version = GETPOST('search_version', 'alpha'); // For dolistore search $options = array(); $options['per_page'] = 20; -$options['categorie'] = ((int) (GETPOST('categorie', 'int') ? GETPOST('categorie', 'int') : 0)); -$options['start'] = ((int) (GETPOST('start', 'int') ? GETPOST('start', 'int') : 0)); -$options['end'] = ((int) (GETPOST('end', 'int') ? GETPOST('end', 'int') : 0)); +$options['categorie'] = ((int) (GETPOSTINT('categorie') ? GETPOSTINT('categorie') : 0)); +$options['start'] = ((int) (GETPOSTINT('start') ? GETPOSTINT('start') : 0)); +$options['end'] = ((int) (GETPOSTINT('end') ? GETPOSTINT('end') : 0)); $options['search'] = GETPOST('search_keyword', 'alpha'); $dolistore = new Dolistore(false); diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 08822da9a59..6121350b972 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -100,7 +100,7 @@ if ($action == 'add_currency') { $error = 0; if (GETPOST('updatecurrency', 'alpha')) { - $fk_multicurrency = GETPOST('fk_multicurrency', 'int'); + $fk_multicurrency = GETPOSTINT('fk_multicurrency'); $rate = price2num(GETPOST('rate', 'alpha')); $currency = new MultiCurrency($db); @@ -117,7 +117,7 @@ if ($action == 'add_currency') { } } } elseif (GETPOST('deletecurrency', 'alpha')) { - $fk_multicurrency = GETPOST('fk_multicurrency', 'int'); + $fk_multicurrency = GETPOSTINT('fk_multicurrency'); $currency = new MultiCurrency($db); if ($currency->fetch($fk_multicurrency) > 0) { diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index 5fd744ca88b..55dc6212a60 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -79,7 +79,7 @@ if ($action == 'setparams') { $error++; } - $res = dolibarr_set_const($db, "PAYMENTS_REPORT_GROUP_BY_MOD", GETPOST('PAYMENTS_REPORT_GROUP_BY_MOD', 'int'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "PAYMENTS_REPORT_GROUP_BY_MOD", GETPOSTINT('PAYMENTS_REPORT_GROUP_BY_MOD'), 'chaine', 0, '', $conf->entity); if (!($res > 0)) { $error++; } diff --git a/htdocs/admin/paymentbybanktransfer.php b/htdocs/admin/paymentbybanktransfer.php index e5fe6cc018c..43e2f1473d2 100644 --- a/htdocs/admin/paymentbybanktransfer.php +++ b/htdocs/admin/paymentbybanktransfer.php @@ -50,7 +50,7 @@ $type = 'paymentorder'; if ($action == "set") { $db->begin(); - $id = GETPOST('PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT', 'int'); + $id = GETPOSTINT('PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT'); $account = new Account($db); if ($account->fetch($id) > 0) { $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT", $id, 'chaine', 0, '', $conf->entity); @@ -115,7 +115,7 @@ if ($action == "set") { if ($action == "addnotif") { $bon = new BonPrelevement($db); - $bon->addNotification($db, GETPOST('user', 'int'), $action); + $bon->addNotification($db, GETPOSTINT('user'), $action); header("Location: ".$_SERVER["PHP_SELF"]); exit; @@ -123,7 +123,7 @@ if ($action == "addnotif") { if ($action == "deletenotif") { $bon = new BonPrelevement($db); - $bon->deleteNotificationById(GETPOST('notif', 'int')); + $bon->deleteNotificationById(GETPOSTINT('notif')); header("Location: ".$_SERVER["PHP_SELF"]); exit; diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index e9af7bdc816..a792c664a6c 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -137,7 +137,7 @@ if ($action == 'update') { } if (GETPOSTISSET('MAIN_DOCUMENTS_LOGO_HEIGHT')) { - dolibarr_set_const($db, "MAIN_DOCUMENTS_LOGO_HEIGHT", GETPOST("MAIN_DOCUMENTS_LOGO_HEIGHT", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_DOCUMENTS_LOGO_HEIGHT", GETPOSTINT("MAIN_DOCUMENTS_LOGO_HEIGHT"), 'chaine', 0, '', $conf->entity); } if (GETPOSTISSET('MAIN_INVERT_SENDER_RECIPIENT')) { dolibarr_set_const($db, "MAIN_INVERT_SENDER_RECIPIENT", GETPOST("MAIN_INVERT_SENDER_RECIPIENT"), 'chaine', 0, '', $conf->entity); diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index 2c76236310c..31becefc379 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -75,10 +75,10 @@ if ($action == 'update') { dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN", GETPOST("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN"), 'chaine', 0, '', $conf->entity); } if (GETPOSTISSET('MAIN_DOCUMENTS_WITH_PICTURE_WIDTH')) { - dolibarr_set_const($db, "MAIN_DOCUMENTS_WITH_PICTURE_WIDTH", GETPOST("MAIN_DOCUMENTS_WITH_PICTURE_WIDTH", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_DOCUMENTS_WITH_PICTURE_WIDTH", GETPOSTINT("MAIN_DOCUMENTS_WITH_PICTURE_WIDTH"), 'chaine', 0, '', $conf->entity); } if (GETPOSTISSET('INVOICE_ADD_ZATCA_QR_CODE')) { - dolibarr_set_const($db, "INVOICE_ADD_ZATCA_QR_CODE", GETPOST("INVOICE_ADD_ZATCA_QR_CODE", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "INVOICE_ADD_ZATCA_QR_CODE", GETPOSTINT("INVOICE_ADD_ZATCA_QR_CODE"), 'chaine', 0, '', $conf->entity); if (GETPOSTINT('INVOICE_ADD_ZATCA_QR_CODE') == 1) { dolibarr_del_const($db, "INVOICE_ADD_SWISS_QR_CODE", $conf->entity); } @@ -90,10 +90,10 @@ if ($action == 'update') { } } if (GETPOSTISSET('INVOICE_CATEGORY_OF_OPERATION')) { - dolibarr_set_const($db, "INVOICE_CATEGORY_OF_OPERATION", GETPOST("INVOICE_CATEGORY_OF_OPERATION", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "INVOICE_CATEGORY_OF_OPERATION", GETPOSTINT("INVOICE_CATEGORY_OF_OPERATION"), 'chaine', 0, '', $conf->entity); } if (GETPOSTISSET('INVOICE_SHOW_SHIPPING_ADDRESS')) { - dolibarr_set_const($db, "INVOICE_SHOW_SHIPPING_ADDRESS", GETPOST("INVOICE_SHOW_SHIPPING_ADDRESS", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "INVOICE_SHOW_SHIPPING_ADDRESS", GETPOSTINT("INVOICE_SHOW_SHIPPING_ADDRESS"), 'chaine', 0, '', $conf->entity); dolibarr_del_const($db, "INVOICE_SHOW_SHIPPING_ADDRESS", $conf->entity); } diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index e7c4bd3fbb4..b74904f0a9f 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -47,14 +47,14 @@ $entity = $conf->entity; if ($action == 'add') { $sql = "UPDATE ".MAIN_DB_PREFIX."rights_def SET bydefault=1"; - $sql .= " WHERE id = ".GETPOST("pid", 'int'); + $sql .= " WHERE id = ".GETPOSTINT("pid"); $sql .= " AND entity = ".$conf->entity; $db->query($sql); } if ($action == 'remove') { $sql = "UPDATE ".MAIN_DB_PREFIX."rights_def SET bydefault=0"; - $sql .= " WHERE id = ".GETPOST('pid', 'int'); + $sql .= " WHERE id = ".GETPOSTINT('pid'); $sql .= " AND entity = ".$conf->entity; $db->query($sql); } diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 8e25b9295b9..f1add49e837 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -52,7 +52,7 @@ $error = 0; if ($action == "set") { $db->begin(); - $id = GETPOST('PRELEVEMENT_ID_BANKACCOUNT', 'int'); + $id = GETPOSTINT('PRELEVEMENT_ID_BANKACCOUNT'); $account = new Account($db); if ($account->fetch($id) > 0) { $res = dolibarr_set_const($db, "PRELEVEMENT_ID_BANKACCOUNT", $id, 'chaine', 0, '', $conf->entity); @@ -118,7 +118,7 @@ if ($action == "set") { if ($action == "addnotif") { $bon = new BonPrelevement($db); - $bon->addNotification($db, GETPOST('user', 'int'), $action); + $bon->addNotification($db, GETPOSTINT('user'), $action); header("Location: ".$_SERVER["PHP_SELF"]); exit; @@ -126,7 +126,7 @@ if ($action == "addnotif") { if ($action == "deletenotif") { $bon = new BonPrelevement($db); - $bon->deleteNotificationById(GETPOST('notif', 'int')); + $bon->deleteNotificationById(GETPOSTINT('notif')); header("Location: ".$_SERVER["PHP_SELF"]); exit; diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php index 2c7f58be336..6b7c5f686ed 100644 --- a/htdocs/admin/receiptprinter.php +++ b/htdocs/admin/receiptprinter.php @@ -44,12 +44,12 @@ $action = GETPOST('action', 'aZ09'); $mode = GETPOST('mode', 'alpha'); $printername = GETPOST('printername', 'alpha'); -$printerid = GETPOST('printerid', 'int'); +$printerid = GETPOSTINT('printerid'); $parameter = GETPOST('parameter', 'alpha'); $template = GETPOST('template', 'alphanohtml'); $templatename = GETPOST('templatename', 'alpha'); -$templateid = GETPOST('templateid', 'int'); +$templateid = GETPOSTINT('templateid'); $printer = new dolReceiptPrinter($db); @@ -89,7 +89,7 @@ if ($action == 'addprinter' && $user->admin) { if (!$error) { $db->begin(); - $result = $printer->addPrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter); + $result = $printer->addPrinter($printername, GETPOSTINT('printertypeid'), GETPOSTINT('printerprofileid'), $parameter); if ($result > 0) { $error++; } @@ -139,7 +139,7 @@ if ($action == 'updateprinter' && $user->admin) { if (!$error) { $db->begin(); - $result = $printer->updatePrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter, $printerid); + $result = $printer->updatePrinter($printername, GETPOSTINT('printertypeid'), GETPOSTINT('printerprofileid'), $parameter, $printerid); if ($result > 0) { $error++; } diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index c1e01049a65..c8ac3fa4423 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -131,7 +131,7 @@ if ($action == 'updateMask') { dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } } elseif ($action == 'setparams') { - $res = dolibarr_set_const($db, "PAYMENTS_FOURN_REPORT_GROUP_BY_MOD", GETPOST('PAYMENTS_FOURN_REPORT_GROUP_BY_MOD', 'int'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "PAYMENTS_FOURN_REPORT_GROUP_BY_MOD", GETPOSTINT('PAYMENTS_FOURN_REPORT_GROUP_BY_MOD'), 'chaine', 0, '', $conf->entity); if (!($res > 0)) { $error++; } diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index f917784870e..fc745fb998c 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -71,7 +71,7 @@ if ($action == 'update') { $error = 0; // Tax mode - $tax_mode = GETPOST('tax_mode', 'int'); + $tax_mode = GETPOSTINT('tax_mode'); $db->begin(); @@ -122,7 +122,7 @@ if ($action == 'update') { dolibarr_set_const($db, "MAIN_INFO_VAT_RETURN", GETPOST("MAIN_INFO_VAT_RETURN", 'alpha'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_INFO_TVA_DAY_DEADLINE_SUBMISSION", GETPOST("deadline_day_vat", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_TVA_DAY_DEADLINE_SUBMISSION", GETPOSTINT("deadline_day_vat"), 'chaine', 0, '', $conf->entity); if (!$error) { $db->commit(); diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index 6ca24301575..19405ddbf4b 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -86,7 +86,7 @@ if ($action == 'updateMask') { } } elseif (preg_match('/set_(.*)/', $action, $reg)) { $code = $reg[1]; - $value = GETPOSTISSET($code) ? GETPOST($code, 'int') : 1; + $value = GETPOSTISSET($code) ? GETPOSTINT($code) : 1; if ($code == 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS' && getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { $param_notification_also_main_addressemail = GETPOST('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha'); $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity); @@ -152,20 +152,20 @@ if ($action == 'updateMask') { } if (GETPOSTISSET('product_category_id')) { - $param_ticket_product_category = GETPOST('product_category_id', 'int'); + $param_ticket_product_category = GETPOSTINT('product_category_id'); $res = dolibarr_set_const($db, 'TICKET_PRODUCT_CATEGORY', $param_ticket_product_category, 'chaine', 0, '', $conf->entity); if (!($res > 0)) { $error++; } } - $param_delay_first_response = GETPOST('delay_first_response', 'int'); + $param_delay_first_response = GETPOSTINT('delay_first_response'); $res = dolibarr_set_const($db, 'TICKET_DELAY_BEFORE_FIRST_RESPONSE', $param_delay_first_response, 'chaine', 0, '', $conf->entity); if (!($res > 0)) { $error++; } - $param_delay_between_responses = GETPOST('delay_between_responses', 'int'); + $param_delay_between_responses = GETPOSTINT('delay_between_responses'); $res = dolibarr_set_const($db, 'TICKET_DELAY_SINCE_LAST_RESPONSE', $param_delay_between_responses, 'chaine', 0, '', $conf->entity); if (!($res > 0)) { $error++; diff --git a/htdocs/admin/ticket_public.php b/htdocs/admin/ticket_public.php index e58b0599b76..942ff6662c0 100644 --- a/htdocs/admin/ticket_public.php +++ b/htdocs/admin/ticket_public.php @@ -163,7 +163,7 @@ if ($action == 'setTICKET_ENABLE_PUBLIC_INTERFACE') { } } elseif (preg_match('/set_(.*)/', $action, $reg)) { $code = $reg[1]; - $value = GETPOSTISSET($code) ? GETPOST($code, 'int') : 1; + $value = GETPOSTISSET($code) ? GETPOSTINT($code) : 1; if ($code == 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS' && getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { $param_notification_also_main_addressemail = GETPOST('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha'); $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity); diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 48781cd43e2..a3ffe8a8c53 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -34,7 +34,7 @@ $action = GETPOST('action', 'aZ09'); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (!$sortorder) { $sortorder = "DESC"; } @@ -44,7 +44,7 @@ if (!$sortfield) { if (empty($page) || $page == -1) { $page = 0; } -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $offset = $limit * $page; if (!$user->admin) { diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index e01aa09e96b..a708e51adfa 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -38,10 +38,10 @@ $export_type = GETPOST('export_type', 'alpha'); $file = dol_sanitizeFileName(GETPOST('filename_template', 'alpha')); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action @@ -68,7 +68,7 @@ $utils = new Utils($db); if ($file && !$what) { //print DOL_URL_ROOT.'/dolibarr_export.php'; - header("Location: ".DOL_URL_ROOT.'/admin/tools/dolibarr_export.php?msg='.urlencode($langs->trans("ErrorFieldRequired", $langs->transnoentities("ExportMethod"))).(GETPOST('page_y', 'int') ? '&page_y='.GETPOST('page_y', 'int') : '')); + header("Location: ".DOL_URL_ROOT.'/admin/tools/dolibarr_export.php?msg='.urlencode($langs->trans("ErrorFieldRequired", $langs->transnoentities("ExportMethod"))).(GETPOSTINT('page_y') ? '&page_y='.GETPOSTINT('page_y') : '')); exit; } @@ -222,5 +222,5 @@ top_httphead(); $db->close(); // Redirect to backup page -header("Location: dolibarr_export.php".(GETPOST('page_y', 'int') ? '?page_y='.GETPOST('page_y', 'int') : '')); +header("Location: dolibarr_export.php".(GETPOSTINT('page_y') ? '?page_y='.GETPOSTINT('page_y') : '')); exit(); diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php index 1907e451b53..551a90c7b67 100644 --- a/htdocs/admin/tools/export_files.php +++ b/htdocs/admin/tools/export_files.php @@ -47,7 +47,7 @@ $file = preg_replace('/(\.zip|\.tar|\.tgz|\.gz|\.tar\.gz|\.bz2|\.zst)$/i', '', $ $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (!$sortorder) { $sortorder = "DESC"; } @@ -59,7 +59,7 @@ if ($page < 0) { } elseif (empty($page)) { $page = 0; } -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $offset = $limit * $page; if (!$user->admin) { diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index 669d1fefac6..54fa535d5fc 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -47,10 +47,10 @@ if ($user->socid > 0) { $langs->loadLangs(array("companies", "admin", "users", "other","withdrawals")); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -64,7 +64,7 @@ if (!$sortorder) { $sortorder = "DESC"; } -$search_rowid = GETPOST("search_rowid", "int"); +$search_rowid = GETPOSTINT("search_rowid"); $search_code = GETPOST("search_code", "alpha"); $search_ip = GETPOST("search_ip", "alpha"); $search_user = GETPOST("search_user", "alpha"); @@ -76,13 +76,13 @@ $optioncss = GETPOST("optioncss", "aZ"); // Option for the css output (always '' $now = dol_now(); $nowarray = dol_getdate($now); -if (GETPOST("date_startmonth", 'int') > 0) { - $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth", 'int'), GETPOST("date_startday", 'int'), GETPOST("date_startyear", 'int'), 'tzuserrel'); +if (GETPOSTINT("date_startmonth") > 0) { + $date_start = dol_mktime(0, 0, 0, GETPOSTINT("date_startmonth"), GETPOSTINT("date_startday"), GETPOSTINT("date_startyear"), 'tzuserrel'); } else { $date_start = ''; } -if (GETPOST("date_endmonth", 'int') > 0) { - $date_end = dol_get_last_hour(dol_mktime(23, 59, 59, GETPOST("date_endmonth", 'int'), GETPOST("date_endday", 'int'), GETPOST("date_endyear", 'int'), 'tzuserrel'), 'tzuserrel'); +if (GETPOSTINT("date_endmonth") > 0) { + $date_end = dol_get_last_hour(dol_mktime(23, 59, 59, GETPOSTINT("date_endmonth"), GETPOSTINT("date_endday"), GETPOSTINT("date_endyear"), 'tzuserrel'), 'tzuserrel'); } else { $date_end = ''; } diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index 1254bdeedc7..4a1861be87b 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -47,10 +47,10 @@ if ($user->socid > 0) { $socid = $user->socid; } -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index e23297cc251..04b8cee7488 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -35,7 +35,7 @@ if (!$user->admin) { accessforbidden(); } -$id = GETPOST('rowid', 'int'); +$id = GETPOSTINT('rowid'); $action = GETPOST('action', 'aZ09'); $optioncss = GETPOST('optionscss', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ09'); @@ -51,10 +51,10 @@ if ($mode == 'searchkey') { } -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -120,7 +120,7 @@ if ($action == 'update') { if (!$error) { $db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."overwrite_trans set transkey = '".$db->escape($transkey)."', transvalue = '".$db->escape($transvalue)."' WHERE rowid = ".((int) GETPOST('rowid', 'int')); + $sql = "UPDATE ".MAIN_DB_PREFIX."overwrite_trans set transkey = '".$db->escape($transkey)."', transvalue = '".$db->escape($transvalue)."' WHERE rowid = ".(GETPOSTINT('rowid')); $result = $db->query($sql); if ($result) { $db->commit(); @@ -397,7 +397,7 @@ if ($mode == 'overwrite') { print ''."\n"; print ''; print ''; $coldisplay++; - print ''; $coldisplay++; diff --git a/htdocs/bookcal/availabilities_agenda.php b/htdocs/bookcal/availabilities_agenda.php index 484360aae04..20fdeceede1 100644 --- a/htdocs/bookcal/availabilities_agenda.php +++ b/htdocs/bookcal/availabilities_agenda.php @@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/bookcal/lib/bookcal_availabilities.lib.php'; $langs->loadLangs(array("agenda", "other")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); @@ -54,10 +54,10 @@ if (GETPOST('actioncode', 'array')) { $search_rowid = GETPOST('search_rowid'); $search_agenda_label = GETPOST('search_agenda_label'); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/bookcal/availabilities_card.php b/htdocs/bookcal/availabilities_card.php index ae32bbe7b33..8845a16723b 100644 --- a/htdocs/bookcal/availabilities_card.php +++ b/htdocs/bookcal/availabilities_card.php @@ -34,9 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/bookcal/lib/bookcal_availabilities.lib.php'; $langs->loadLangs(array("agenda", "other")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); -$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOSTINT('lineid'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); @@ -148,10 +148,10 @@ if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; if ($action == 'set_thirdparty' && $permissiontoadd) { - $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, $triggermodname); + $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', '', 'date', '', $user, $triggermodname); } if ($action == 'classin' && $permissiontoadd) { - $object->setProject(GETPOST('projectid', 'int')); + $object->setProject(GETPOSTINT('projectid')); } // Actions to send emails @@ -411,7 +411,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Show object lines $result = $object->getLinesArray(); - print ' + print ' @@ -429,7 +429,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } if (!empty($object->lines)) { - $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); + $object->printObjectLines($action, $mysoc, null, GETPOSTINT('lineid'), 1); } // Form to add new line diff --git a/htdocs/bookcal/availabilities_contact.php b/htdocs/bookcal/availabilities_contact.php index 07278fd60c7..cfd91d3b2f6 100644 --- a/htdocs/bookcal/availabilities_contact.php +++ b/htdocs/bookcal/availabilities_contact.php @@ -32,10 +32,10 @@ require_once DOL_DOCUMENT_ROOT.'/bookcal/lib/bookcal_availabilities.lib.php'; // Load translation files required by the page $langs->loadLangs(array("agenda", "companies", "other", "mails")); -$id = (GETPOST('id') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility +$id = (GETPOST('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); -$lineid = GETPOST('lineid', 'int'); -$socid = GETPOST('socid', 'int'); +$lineid = GETPOSTINT('lineid'); +$socid = GETPOSTINT('socid'); $action = GETPOST('action', 'aZ09'); // Initialize technical objects @@ -78,7 +78,7 @@ if (!$permissiontoread) { */ if ($action == 'addcontact' && $permission) { - $contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); + $contactid = (GETPOST('userid') ? GETPOSTINT('userid') : GETPOSTINT('contactid')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); @@ -95,7 +95,7 @@ if ($action == 'addcontact' && $permission) { } } elseif ($action == 'swapstatut' && $permission) { // Toggle the status of a contact - $result = $object->swapContactStatus(GETPOST('ligne', 'int')); + $result = $object->swapContactStatus(GETPOSTINT('ligne')); } elseif ($action == 'deletecontact' && $permission) { // Deletes a contact $result = $object->delete_contact($lineid); diff --git a/htdocs/bookcal/availabilities_document.php b/htdocs/bookcal/availabilities_document.php index 723df675ef5..cbd0d169216 100644 --- a/htdocs/bookcal/availabilities_document.php +++ b/htdocs/bookcal/availabilities_document.php @@ -37,14 +37,14 @@ $langs->loadLangs(array("agenda", "companies", "other", "mails")); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm'); -$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); +$id = (GETPOSTINT('socid') ? GETPOSTINT('socid') : GETPOSTINT('id')); $ref = GETPOST('ref', 'alpha'); // Get parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/bookcal/availabilities_list.php b/htdocs/bookcal/availabilities_list.php index ca40cc6bc95..a98a6beb8bb 100644 --- a/htdocs/bookcal/availabilities_list.php +++ b/htdocs/bookcal/availabilities_list.php @@ -37,12 +37,12 @@ require_once __DIR__.'/class/availabilities.class.php'; // Load translation files required by the page $langs->loadLangs(array("agenda", "other")); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list @@ -52,10 +52,10 @@ $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always ' $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -93,8 +93,8 @@ foreach ($object->fields as $key => $val) { $search[$key] = GETPOST('search_'.$key, 'alpha'); } if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { - $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); - $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOSTINT('search_'.$key.'_dtstartmonth'), GETPOSTINT('search_'.$key.'_dtstartday'), GETPOSTINT('search_'.$key.'_dtstartyear')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOSTINT('search_'.$key.'_dtendmonth'), GETPOSTINT('search_'.$key.'_dtendday'), GETPOSTINT('search_'.$key.'_dtendyear')); } } @@ -259,7 +259,7 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; if ($object->ismultientitymanaged == 1) { - $sql .= " WHERE t.entity IN (".getEntity($object->element, (GETPOST('search_current_entity', 'int') ? 0 : 1)).")"; + $sql .= " WHERE t.entity IN (".getEntity($object->element, (GETPOSTINT('search_current_entity') ? 0 : 1)).")"; } else { $sql .= " WHERE 1 = 1"; } @@ -416,9 +416,9 @@ foreach ($search as $key => $val) { } } } elseif (preg_match('/(_dtstart|_dtend)$/', $key) && !empty($val)) { - $param .= '&search_'.$key.'month='.((int) GETPOST('search_'.$key.'month', 'int')); - $param .= '&search_'.$key.'day='.((int) GETPOST('search_'.$key.'day', 'int')); - $param .= '&search_'.$key.'year='.((int) GETPOST('search_'.$key.'year', 'int')); + $param .= '&search_'.$key.'month='.(GETPOSTINT('search_'.$key.'month')); + $param .= '&search_'.$key.'day='.(GETPOSTINT('search_'.$key.'day')); + $param .= '&search_'.$key.'year='.(GETPOSTINT('search_'.$key.'year')); } elseif ($search[$key] != '') { $param .= '&search_'.$key.'='.urlencode($search[$key]); } @@ -440,7 +440,7 @@ $arrayofmassactions = array( if (!empty($permissiontodelete)) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/bookcal/availabilities_note.php b/htdocs/bookcal/availabilities_note.php index 5b8b4dee169..3f7bf24edee 100644 --- a/htdocs/bookcal/availabilities_note.php +++ b/htdocs/bookcal/availabilities_note.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/bookcal/lib/bookcal_availabilities.lib.php'; $langs->loadLangs(array("agenda", "companies")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); diff --git a/htdocs/bookcal/bookcalindex.php b/htdocs/bookcal/bookcalindex.php index cbffda374fd..018a6914676 100644 --- a/htdocs/bookcal/bookcalindex.php +++ b/htdocs/bookcal/bookcalindex.php @@ -38,7 +38,7 @@ $action = GETPOST('action', 'aZ09'); // if (! $user->hasRight('bookcal', 'myobject', 'read')) { // accessforbidden(); // } -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if (isset($user->socid) && $user->socid > 0) { $action = ''; $socid = $user->socid; diff --git a/htdocs/bookcal/booking_list.php b/htdocs/bookcal/booking_list.php index 32d048a2b44..2503e170947 100644 --- a/htdocs/bookcal/booking_list.php +++ b/htdocs/bookcal/booking_list.php @@ -42,9 +42,9 @@ require_once __DIR__.'/class/calendar.class.php'; // Load translation files required by the page $langs->loadLangs(array("bookcal@bookcal", "other")); -$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility +$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); $action = GETPOST('action', 'aZ09'); $type = GETPOST('type', 'aZ09'); diff --git a/htdocs/bookcal/calendar_agenda.php b/htdocs/bookcal/calendar_agenda.php index deb1f993471..b7b2d319649 100644 --- a/htdocs/bookcal/calendar_agenda.php +++ b/htdocs/bookcal/calendar_agenda.php @@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/bookcal/lib/bookcal_calendar.lib.php'; $langs->loadLangs(array("bookcal@bookcal", "other")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); @@ -53,10 +53,10 @@ if (GETPOST('actioncode', 'array')) { $search_rowid = GETPOST('search_rowid'); $search_agenda_label = GETPOST('search_agenda_label'); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/bookcal/calendar_card.php b/htdocs/bookcal/calendar_card.php index 45efc029195..6d8038b8d4a 100644 --- a/htdocs/bookcal/calendar_card.php +++ b/htdocs/bookcal/calendar_card.php @@ -84,9 +84,9 @@ dol_include_once('/bookcal/lib/bookcal_calendar.lib.php'); $langs->loadLangs(array("bookcal@bookcal", "other")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); -$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOSTINT('lineid'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); @@ -204,10 +204,10 @@ if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; if ($action == 'set_thirdparty' && $permissiontoadd) { - $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, $triggermodname); + $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', '', 'date', '', $user, $triggermodname); } if ($action == 'classin' && $permissiontoadd) { - $object->setProject(GETPOST('projectid', 'int')); + $object->setProject(GETPOSTINT('projectid')); } // Actions to send emails @@ -445,7 +445,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Show object lines $result = $object->getLinesArray(); - print ' + print ' @@ -463,7 +463,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } if (!empty($object->lines)) { - $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); + $object->printObjectLines($action, $mysoc, null, GETPOSTINT('lineid'), 1); } // Form to add new line diff --git a/htdocs/bookcal/calendar_contact.php b/htdocs/bookcal/calendar_contact.php index 8247fa2ca74..71821a0a8c3 100644 --- a/htdocs/bookcal/calendar_contact.php +++ b/htdocs/bookcal/calendar_contact.php @@ -62,10 +62,10 @@ dol_include_once('/bookcal/lib/bookcal_calendar.lib.php'); // Load translation files required by the page $langs->loadLangs(array("bookcal@bookcal", "companies", "other", "mails")); -$id = (GETPOST('id') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility +$id = (GETPOST('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); -$lineid = GETPOST('lineid', 'int'); -$socid = GETPOST('socid', 'int'); +$lineid = GETPOSTINT('lineid'); +$socid = GETPOSTINT('socid'); $action = GETPOST('action', 'aZ09'); // Initialize technical objects @@ -108,7 +108,7 @@ if (!$permissiontoread) { */ if ($action == 'addcontact' && $permission) { - $contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); + $contactid = (GETPOST('userid') ? GETPOSTINT('userid') : GETPOSTINT('contactid')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); @@ -125,7 +125,7 @@ if ($action == 'addcontact' && $permission) { } } elseif ($action == 'swapstatut' && $permission) { // Toggle the status of a contact - $result = $object->swapContactStatus(GETPOST('ligne', 'int')); + $result = $object->swapContactStatus(GETPOSTINT('ligne')); } elseif ($action == 'deletecontact' && $permission) { // Deletes a contact $result = $object->delete_contact($lineid); diff --git a/htdocs/bookcal/calendar_document.php b/htdocs/bookcal/calendar_document.php index 96b8b5b4d83..4a71e5d6457 100644 --- a/htdocs/bookcal/calendar_document.php +++ b/htdocs/bookcal/calendar_document.php @@ -86,14 +86,14 @@ $langs->loadLangs(array("bookcal@bookcal", "companies", "other", "mails")); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm'); -$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); +$id = (GETPOSTINT('socid') ? GETPOSTINT('socid') : GETPOSTINT('id')); $ref = GETPOST('ref', 'alpha'); // Get parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/bookcal/calendar_list.php b/htdocs/bookcal/calendar_list.php index 9230edb9285..e8fc92b546d 100644 --- a/htdocs/bookcal/calendar_list.php +++ b/htdocs/bookcal/calendar_list.php @@ -36,7 +36,7 @@ $langs->loadLangs(array("bookcal@bookcal", "other")); $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list @@ -45,14 +45,14 @@ $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -90,8 +90,8 @@ foreach ($object->fields as $key => $val) { $search[$key] = GETPOST('search_'.$key, 'alpha'); } if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { - $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); - $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOSTINT('search_'.$key.'_dtstartmonth'), GETPOSTINT('search_'.$key.'_dtstartday'), GETPOSTINT('search_'.$key.'_dtstartyear')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOSTINT('search_'.$key.'_dtendmonth'), GETPOSTINT('search_'.$key.'_dtendday'), GETPOSTINT('search_'.$key.'_dtendyear')); } } @@ -256,7 +256,7 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; if ($object->ismultientitymanaged == 1) { - $sql .= " WHERE t.entity IN (".getEntity($object->element, (GETPOST('search_current_entity', 'int') ? 0 : 1)).")"; + $sql .= " WHERE t.entity IN (".getEntity($object->element, (GETPOSTINT('search_current_entity') ? 0 : 1)).")"; } else { $sql .= " WHERE 1 = 1"; } @@ -398,9 +398,9 @@ foreach ($search as $key => $val) { } } } elseif (preg_match('/(_dtstart|_dtend)$/', $key) && !empty($val)) { - $param .= '&search_'.$key.'month='.((int) GETPOST('search_'.$key.'month', 'int')); - $param .= '&search_'.$key.'day='.((int) GETPOST('search_'.$key.'day', 'int')); - $param .= '&search_'.$key.'year='.((int) GETPOST('search_'.$key.'year', 'int')); + $param .= '&search_'.$key.'month='.(GETPOSTINT('search_'.$key.'month')); + $param .= '&search_'.$key.'day='.(GETPOSTINT('search_'.$key.'day')); + $param .= '&search_'.$key.'year='.(GETPOSTINT('search_'.$key.'year')); } elseif ($search[$key] != '') { $param .= '&search_'.$key.'='.urlencode($search[$key]); } @@ -422,7 +422,7 @@ $arrayofmassactions = array( if (!empty($permissiontodelete)) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/bookcal/calendar_note.php b/htdocs/bookcal/calendar_note.php index 31f47504264..5f13b1129e6 100644 --- a/htdocs/bookcal/calendar_note.php +++ b/htdocs/bookcal/calendar_note.php @@ -80,7 +80,7 @@ dol_include_once('/bookcal/lib/bookcal_calendar.lib.php'); $langs->loadLangs(array("bookcal@bookcal", "companies")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index d9d887ab4d4..3e474c85762 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -34,12 +34,12 @@ $langs->loadLangs(array('bookmarks', 'other')); // Get Parameters -$id = GETPOST("id", 'int'); +$id = GETPOSTINT("id"); $action = GETPOST("action", "alpha"); $title = (string) GETPOST("title", "alpha"); $url = (string) GETPOST("url", "alpha"); $urlsource = GETPOST("urlsource", "alpha"); -$target = GETPOST("target", "int"); +$target = GETPOSTINT("target"); $userid = GETPOSTINT("userid"); $position = GETPOSTINT("position"); $backtopage = GETPOST('backtopage', 'alpha'); @@ -82,7 +82,7 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') { } if ($action == 'update') { - $object->fetch(GETPOST("id", 'int')); + $object->fetch(GETPOSTINT("id")); } // Check if null because user not admin can't set an user and send empty value here. if (!empty($userid)) { @@ -183,18 +183,18 @@ if ($action == 'create') { if ($url && !preg_match('/^http/i', $url)) { $defaulttarget = 0; } - print $form->selectarray('target', $liste, GETPOSTISSET('target') ? GETPOST('target', 'int') : $defaulttarget, 0, 0, 0, '', 0, 0, 0, '', 'maxwidth300'); + print $form->selectarray('target', $liste, GETPOSTISSET('target') ? GETPOSTINT('target') : $defaulttarget, 0, 0, 0, '', 0, 0, 0, '', 'maxwidth300'); print ''; // Visibility / Owner print ''; // Position print ''; print '
'.$obj->lang.''; - if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int')) { + if ($action == 'edit' && $obj->rowid == GETPOSTINT('rowid')) { print ''; } else { print $obj->transkey; @@ -411,7 +411,7 @@ if ($mode == 'overwrite') { print ''; print ''; */ - if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int')) { + if ($action == 'edit' && $obj->rowid == GETPOSTINT('rowid')) { print ''; } else { //print $obj->transkey.' '.$langsenfileonly->tab_translate[$obj->transkey]; @@ -426,7 +426,7 @@ if ($mode == 'overwrite') { print ''; - if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int')) { + if ($action == 'edit' && $obj->rowid == GETPOSTINT('rowid')) { print ''; print ''; print '   '; diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php index ade787ae727..3bceb532a83 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -49,10 +49,10 @@ $actl[0] = img_picto($langs->trans("Disabled"), 'switch_off', 'class="size15x"') $actl[1] = img_picto($langs->trans("Activated"), 'switch_on', 'class="size15x"'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -238,7 +238,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { $db->begin(); $website = new Website($db); - $rowid = GETPOST('rowid', 'int'); + $rowid = GETPOSTINT('rowid'); $website->fetch($rowid); // Modify entry diff --git a/htdocs/admin/website_options.php b/htdocs/admin/website_options.php index 215ac230493..680cd961729 100644 --- a/htdocs/admin/website_options.php +++ b/htdocs/admin/website_options.php @@ -40,10 +40,10 @@ $confirm = GETPOST('confirm', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/asset/accountancy_codes.php b/htdocs/asset/accountancy_codes.php index 4641f61a021..f68e835a1ff 100644 --- a/htdocs/asset/accountancy_codes.php +++ b/htdocs/asset/accountancy_codes.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT . '/asset/class/assetdepreciationoptions.class.ph $langs->loadLangs(array("assets", "companies")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); diff --git a/htdocs/asset/agenda.php b/htdocs/asset/agenda.php index 181c9c209ef..7520dda55fc 100644 --- a/htdocs/asset/agenda.php +++ b/htdocs/asset/agenda.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $langs->loadLangs(array("assets", "other")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); @@ -51,10 +51,10 @@ if (GETPOST('actioncode', 'array')) { $search_rowid = GETPOST('search_rowid'); $search_agenda_label = GETPOST('search_agenda_label'); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index 95459707381..434ee1f3318 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; $langs->loadLangs(array("assets", "other")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); @@ -123,10 +123,10 @@ if (empty($reshook)) { // Action dispose object if ($action == 'confirm_disposal' && $confirm == 'yes' && $permissiontoadd) { - $object->disposal_date = dol_mktime(12, 0, 0, GETPOST('disposal_datemonth', 'int'), GETPOST('disposal_dateday', 'int'), GETPOST('disposal_dateyear', 'int')); // for date without hour, we use gmt - $object->disposal_amount_ht = GETPOST('disposal_amount', 'int'); - $object->fk_disposal_type = GETPOST('fk_disposal_type', 'int'); - $disposal_invoice_id = GETPOST('disposal_invoice_id', 'int'); + $object->disposal_date = dol_mktime(12, 0, 0, GETPOSTINT('disposal_datemonth'), GETPOSTINT('disposal_dateday'), GETPOSTINT('disposal_dateyear')); // for date without hour, we use gmt + $object->disposal_amount_ht = GETPOSTINT('disposal_amount'); + $object->fk_disposal_type = GETPOSTINT('fk_disposal_type'); + $disposal_invoice_id = GETPOSTINT('disposal_invoice_id'); $object->disposal_depreciated = ((GETPOST('disposal_depreciated') == '1' || GETPOST('disposal_depreciated') == 'on') ? 1 : 0); $object->disposal_subject_to_vat = ((GETPOST('disposal_subject_to_vat') == '1' || GETPOST('disposal_subject_to_vat') == 'on') ? 1 : 0); @@ -136,7 +136,7 @@ if (empty($reshook)) { } $action = ''; } elseif ($action == "add") { - $object->supplier_invoice_id = GETPOST('supplier_invoice_id', 'int'); + $object->supplier_invoice_id = GETPOSTINT('supplier_invoice_id'); } // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen @@ -189,7 +189,7 @@ if ($action == 'create') { } if (GETPOSTISSET('supplier_invoice_id')) { $object->fields['supplier_invoice_id'] = array('type' => 'integer:FactureFournisseur:fourn/class/fournisseur.facture.class.php:1:entity IN (__SHARED_ENTITIES__)', 'label' => 'SupplierInvoice', 'enabled' => '1', 'noteditable' => '1', 'position' => 280, 'notnull' => 0, 'visible' => 1, 'index' => 1, 'validate' => '1',); - print ''; + print ''; } print dol_get_fiche_head(array(), ''); @@ -266,10 +266,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Disposal $langs->load('bills'); - $disposal_date = dol_mktime(12, 0, 0, GETPOST('disposal_datemonth', 'int'), GETPOST('disposal_dateday', 'int'), GETPOST('disposal_dateyear', 'int')); // for date without hour, we use gmt - $disposal_amount = GETPOST('disposal_amount', 'int'); - $fk_disposal_type = GETPOST('fk_disposal_type', 'int'); - $disposal_invoice_id = GETPOST('disposal_invoice_id', 'int'); + $disposal_date = dol_mktime(12, 0, 0, GETPOSTINT('disposal_datemonth'), GETPOSTINT('disposal_dateday'), GETPOSTINT('disposal_dateyear')); // for date without hour, we use gmt + $disposal_amount = GETPOSTINT('disposal_amount'); + $fk_disposal_type = GETPOSTINT('fk_disposal_type'); + $disposal_invoice_id = GETPOSTINT('disposal_invoice_id'); $disposal_depreciated = GETPOSTISSET('disposal_depreciated') ? GETPOST('disposal_depreciated') : 1; $disposal_depreciated = !empty($disposal_depreciated) ? 1 : 0; $disposal_subject_to_vat = GETPOSTISSET('disposal_subject_to_vat') ? GETPOST('disposal_subject_to_vat') : 1; diff --git a/htdocs/asset/class/assetdepreciationoptions.class.php b/htdocs/asset/class/assetdepreciationoptions.class.php index 15b7f24c216..99497d1b23a 100644 --- a/htdocs/asset/class/assetdepreciationoptions.class.php +++ b/htdocs/asset/class/assetdepreciationoptions.class.php @@ -236,11 +236,11 @@ class AssetDepreciationOptions extends CommonObject if (in_array($field_info['type'], array('text', 'html'))) { $value = GETPOST($html_name, 'restricthtml'); } elseif ($field_info['type'] == 'date') { - $value = dol_mktime(12, 0, 0, GETPOST($html_name . 'month', 'int'), GETPOST($html_name . 'day', 'int'), GETPOST($html_name . 'year', 'int')); // for date without hour, we use gmt + $value = dol_mktime(12, 0, 0, GETPOSTINT($html_name . 'month'), GETPOSTINT($html_name . 'day'), GETPOSTINT($html_name . 'year')); // for date without hour, we use gmt } elseif ($field_info['type'] == 'datetime') { - $value = dol_mktime(GETPOST($html_name . 'hour', 'int'), GETPOST($html_name . 'min', 'int'), GETPOST($html_name . 'sec', 'int'), GETPOST($html_name . 'month', 'int'), GETPOST($html_name . 'day', 'int'), GETPOST($html_name . 'year', 'int'), 'tzuserrel'); + $value = dol_mktime(GETPOSTINT($html_name . 'hour'), GETPOSTINT($html_name . 'min'), GETPOSTINT($html_name . 'sec'), GETPOSTINT($html_name . 'month'), GETPOSTINT($html_name . 'day'), GETPOSTINT($html_name . 'year'), 'tzuserrel'); } elseif ($field_info['type'] == 'duration') { - $value = 60 * 60 * GETPOST($html_name . 'hour', 'int') + 60 * GETPOST($html_name . 'min', 'int'); + $value = 60 * 60 * GETPOSTINT($html_name . 'hour') + 60 * GETPOSTINT($html_name . 'min'); } elseif (preg_match('/^(integer|price|real|double)/', $field_info['type'])) { $value = price2num(GETPOST($html_name, 'alphanohtml')); // To fix decimal separator according to lang setup } elseif ($field_info['type'] == 'boolean') { diff --git a/htdocs/asset/depreciation.php b/htdocs/asset/depreciation.php index 6c8659aad9c..f20ccdbe7e7 100644 --- a/htdocs/asset/depreciation.php +++ b/htdocs/asset/depreciation.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT . '/asset/class/assetdepreciationoptions.class.ph $langs->loadLangs(array("assets", "companies")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); diff --git a/htdocs/asset/depreciation_options.php b/htdocs/asset/depreciation_options.php index 0b771b216d5..6202e4f2b6f 100644 --- a/htdocs/asset/depreciation_options.php +++ b/htdocs/asset/depreciation_options.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT . '/asset/class/assetdepreciationoptions.class.ph $langs->loadLangs(array("assets", "companies")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); diff --git a/htdocs/asset/disposal.php b/htdocs/asset/disposal.php index 98f07003db1..6ef7433061d 100644 --- a/htdocs/asset/disposal.php +++ b/htdocs/asset/disposal.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; $langs->loadLangs(array("assets", "companies")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); diff --git a/htdocs/asset/document.php b/htdocs/asset/document.php index 460b30d1a90..69112f6e619 100644 --- a/htdocs/asset/document.php +++ b/htdocs/asset/document.php @@ -37,14 +37,14 @@ $langs->loadLangs(array('assets', 'companies', 'other', 'mails')); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); // Get parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php index a2f421410ea..427307532e2 100644 --- a/htdocs/asset/list.php +++ b/htdocs/asset/list.php @@ -36,7 +36,7 @@ $langs->loadLangs(array("assets", "other")); // Get parameters $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list @@ -44,13 +44,13 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'as $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $mode = GETPOST('mode', 'alpha'); // mode view (kanban or common) -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action @@ -87,8 +87,8 @@ foreach ($object->fields as $key => $val) { $search[$key] = GETPOST('search_'.$key, 'alpha'); } if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { - $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); - $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOSTINT('search_'.$key.'_dtstartmonth'), GETPOSTINT('search_'.$key.'_dtstartday'), GETPOSTINT('search_'.$key.'_dtstartyear')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOSTINT('search_'.$key.'_dtendmonth'), GETPOSTINT('search_'.$key.'_dtendday'), GETPOSTINT('search_'.$key.'_dtendyear')); } } @@ -396,7 +396,7 @@ $arrayofmassactions = array( if ($permissiontodelete) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/asset/model/accountancy_codes.php b/htdocs/asset/model/accountancy_codes.php index 292c69defa7..61db2261bb1 100644 --- a/htdocs/asset/model/accountancy_codes.php +++ b/htdocs/asset/model/accountancy_codes.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT . '/asset/class/assetaccountancycodes.class.php'; $langs->loadLangs(array("assets", "companies")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); diff --git a/htdocs/asset/model/agenda.php b/htdocs/asset/model/agenda.php index e0b62ecec79..04739e21408 100644 --- a/htdocs/asset/model/agenda.php +++ b/htdocs/asset/model/agenda.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; $langs->loadLangs(array("assets", "other")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); @@ -51,10 +51,10 @@ if (GETPOST('actioncode', 'array')) { //$search_rowid = GETPOST('search_rowid'); //$search_agenda_label = GETPOST('search_agenda_label'); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/asset/model/card.php b/htdocs/asset/model/card.php index 3ab71c675c4..31544663a62 100644 --- a/htdocs/asset/model/card.php +++ b/htdocs/asset/model/card.php @@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT . '/asset/class/assetaccountancycodes.class.php'; $langs->loadLangs(array("assets", "other")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); diff --git a/htdocs/asset/model/depreciation_options.php b/htdocs/asset/model/depreciation_options.php index 0000f2bf723..5beeb1a7a33 100644 --- a/htdocs/asset/model/depreciation_options.php +++ b/htdocs/asset/model/depreciation_options.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT . '/asset/class/assetdepreciationoptions.class.ph $langs->loadLangs(array("assets", "companies")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); diff --git a/htdocs/asset/model/list.php b/htdocs/asset/model/list.php index 00db6f0417c..51033b5c2b1 100644 --- a/htdocs/asset/model/list.php +++ b/htdocs/asset/model/list.php @@ -34,7 +34,7 @@ $langs->loadLangs(array("assets", "other")); $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list @@ -42,13 +42,13 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'as $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action @@ -87,8 +87,8 @@ foreach ($object->fields as $key => $val) { $search[$key] = GETPOST('search_'.$key, 'alpha'); } if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { - $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); - $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOSTINT('search_'.$key.'_dtstartmonth'), GETPOSTINT('search_'.$key.'_dtstartday'), GETPOSTINT('search_'.$key.'_dtstartyear')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOSTINT('search_'.$key.'_dtendmonth'), GETPOSTINT('search_'.$key.'_dtendday'), GETPOSTINT('search_'.$key.'_dtendyear')); } } @@ -399,7 +399,7 @@ $arrayofmassactions = array( if ($permissiontodelete) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/asset/model/note.php b/htdocs/asset/model/note.php index 0476b6f4a57..e704b6ae390 100644 --- a/htdocs/asset/model/note.php +++ b/htdocs/asset/model/note.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT . '/asset/class/assetmodel.class.php'; $langs->loadLangs(array("assets", "companies")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php index d2a89f96f0f..a87f252acc9 100644 --- a/htdocs/asset/note.php +++ b/htdocs/asset/note.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; $langs->loadLangs(array("assets", "companies")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); diff --git a/htdocs/asset/tpl/depreciation_options_edit.tpl.php b/htdocs/asset/tpl/depreciation_options_edit.tpl.php index 649a00e0797..8031d3576f1 100644 --- a/htdocs/asset/tpl/depreciation_options_edit.tpl.php +++ b/htdocs/asset/tpl/depreciation_options_edit.tpl.php @@ -124,7 +124,7 @@ if (empty($reshook)) { print img_picto('', $field_info['picto'], '', false, 0, 0, '', 'pictofixedwidth'); } if (in_array($field_info['type'], array('int', 'integer'))) { - $value = GETPOSTISSET($html_name) ? GETPOST($html_name, 'int') : $assetdepreciationoptions->$field_key; + $value = GETPOSTISSET($html_name) ? GETPOSTINT($html_name) : $assetdepreciationoptions->$field_key; } elseif ($field_info['type'] == 'double') { $value = GETPOSTISSET($html_name) ? price2num(GETPOST($html_name, 'alphanohtml')) : $assetdepreciationoptions->$field_key; } elseif (preg_match('/^(text|html)/', $field_info['type'])) { diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index 132c368114c..9f39d925bb6 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -45,10 +45,10 @@ $year = dol_print_date($now, '%Y'); $month = dol_print_date($now, '%m'); $day = dol_print_date($now, '%d'); $forbarcode = GETPOST('forbarcode', 'alphanohtml'); -$fk_barcode_type = GETPOST('fk_barcode_type', 'int'); +$fk_barcode_type = GETPOSTINT('fk_barcode_type'); $mode = GETPOST('mode', 'aZ09'); $modellabel = GETPOST("modellabel", 'aZ09'); // Doc template to use -$numberofsticker = GETPOST('numberofsticker', 'int'); +$numberofsticker = GETPOSTINT('numberofsticker'); $mesg = ''; @@ -86,8 +86,8 @@ if ($reshook < 0) { if (empty($reshook)) { if (GETPOST('submitproduct') && GETPOST('submitproduct')) { $action = ''; // We reset because we don't want to build doc - if (GETPOST('productid', 'int') > 0) { - $result = $producttmp->fetch(GETPOST('productid', 'int')); + if (GETPOSTINT('productid') > 0) { + $result = $producttmp->fetch(GETPOSTINT('productid')); if ($result < 0) { setEventMessage($producttmp->error, 'errors'); } @@ -105,8 +105,8 @@ if (empty($reshook)) { } if (GETPOST('submitthirdparty') && GETPOST('submitthirdparty')) { $action = ''; // We reset because we don't want to build doc - if (GETPOST('socid', 'int') > 0) { - $thirdpartytmp->fetch(GETPOST('socid', 'int')); + if (GETPOSTINT('socid') > 0) { + $thirdpartytmp->fetch(GETPOSTINT('socid')); $forbarcode = $thirdpartytmp->barcode; $fk_barcode_type = $thirdpartytmp->barcode_type_code; @@ -334,7 +334,7 @@ print '
'; print '
'; print $langs->trans("NumberOfStickers").'   '; print '
'; -print ''; +print ''; print '
'; print ''; @@ -410,7 +410,7 @@ if ($user->hasRight('produit', 'lire') || $user->hasRight('service', 'lire')) { print ''; print '
'; print '
'; - $form->select_produits(GETPOST('productid', 'int'), 'productid', '', '', 0, -1, 2, '', 0, array(), 0, '1', 0, 'minwidth400imp', 1); + $form->select_produits(GETPOSTINT('productid'), 'productid', '', '', 0, -1, 2, '', 0, array(), 0, '1', 0, 'minwidth400imp', 1); print '   '; print '
'; } @@ -419,7 +419,7 @@ if ($user->hasRight('societe', 'lire')) { print ''; print '
'; print '
'; - print $form->select_company(GETPOST('socid', 'int'), 'socid', '', 'SelectThirdParty', 0, 0, array(), 0, 'minwidth300'); + print $form->select_company(GETPOSTINT('socid'), 'socid', '', 'SelectThirdParty', 0, 0, array(), 0, 'minwidth300'); print '   '; print '
'; } diff --git a/htdocs/blockedlog/admin/blockedlog.php b/htdocs/blockedlog/admin/blockedlog.php index bb8cd151bbd..8978814dcb5 100644 --- a/htdocs/blockedlog/admin/blockedlog.php +++ b/htdocs/blockedlog/admin/blockedlog.php @@ -40,7 +40,7 @@ if (!$user->admin || empty($conf->blockedlog->enabled)) { // Get Parameters $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); -$withtab = GETPOST('withtab', 'int'); +$withtab = GETPOSTINT('withtab'); /* diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 8a39531b7e0..6b4fbec24e3 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -46,17 +46,17 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'bl $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') -$search_showonlyerrors = GETPOST('search_showonlyerrors', 'int'); +$search_showonlyerrors = GETPOSTINT('search_showonlyerrors'); if ($search_showonlyerrors < 0) { $search_showonlyerrors = 0; } -$search_startyear = GETPOST('search_startyear', 'int'); -$search_startmonth = GETPOST('search_startmonth', 'int'); -$search_startday = GETPOST('search_startday', 'int'); -$search_endyear = GETPOST('search_endyear', 'int'); -$search_endmonth = GETPOST('search_endmonth', 'int'); -$search_endday = GETPOST('search_endday', 'int'); +$search_startyear = GETPOSTINT('search_startyear'); +$search_startmonth = GETPOSTINT('search_startmonth'); +$search_startday = GETPOSTINT('search_startday'); +$search_endyear = GETPOSTINT('search_endyear'); +$search_endmonth = GETPOSTINT('search_endmonth'); +$search_endday = GETPOSTINT('search_endday'); $search_id = GETPOST('search_id', 'alpha'); $search_fk_user = GETPOST('search_fk_user', 'intcomma'); $search_start = -1; @@ -80,10 +80,10 @@ if (($search_start == -1 || empty($search_start)) && !GETPOSTISSET('search_start } // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -159,9 +159,9 @@ if ($action === 'downloadblockchain') { $sql = "SELECT rowid,date_creation,tms,user_fullname,action,amounts,element,fk_object,date_object,ref_object,signature,fk_user,object_data"; $sql .= " FROM ".MAIN_DB_PREFIX."blockedlog"; $sql .= " WHERE entity = ".$conf->entity; - if (GETPOST('monthtoexport', 'int') > 0 || GETPOST('yeartoexport', 'int') > 0) { - $dates = dol_get_first_day(GETPOST('yeartoexport', 'int'), GETPOST('monthtoexport', 'int') ? GETPOST('monthtoexport', 'int') : 1); - $datee = dol_get_last_day(GETPOST('yeartoexport', 'int'), GETPOST('monthtoexport', 'int') ? GETPOST('monthtoexport', 'int') : 12); + if (GETPOSTINT('monthtoexport') > 0 || GETPOSTINT('yeartoexport') > 0) { + $dates = dol_get_first_day(GETPOSTINT('yeartoexport'), GETPOSTINT('monthtoexport') ? GETPOSTINT('monthtoexport') : 1); + $datee = dol_get_last_day(GETPOSTINT('yeartoexport'), GETPOSTINT('monthtoexport') ? GETPOSTINT('monthtoexport') : 12); $sql .= " AND date_creation BETWEEN '".$db->idate($dates)."' AND '".$db->idate($datee)."'"; } $sql .= " ORDER BY rowid ASC"; // Required so we get the first one @@ -189,9 +189,9 @@ if ($action === 'downloadblockchain') { $sql = "SELECT rowid, date_creation, tms, user_fullname, action, amounts, element, fk_object, date_object, ref_object, signature, fk_user, object_data, object_version"; $sql .= " FROM ".MAIN_DB_PREFIX."blockedlog"; $sql .= " WHERE entity = ".((int) $conf->entity); - if (GETPOST('monthtoexport', 'int') > 0 || GETPOST('yeartoexport', 'int') > 0) { - $dates = dol_get_first_day(GETPOST('yeartoexport', 'int'), GETPOST('monthtoexport', 'int') ? GETPOST('monthtoexport', 'int') : 1); - $datee = dol_get_last_day(GETPOST('yeartoexport', 'int'), GETPOST('monthtoexport', 'int') ? GETPOST('monthtoexport', 'int') : 12); + if (GETPOSTINT('monthtoexport') > 0 || GETPOSTINT('yeartoexport') > 0) { + $dates = dol_get_first_day(GETPOSTINT('yeartoexport'), GETPOSTINT('monthtoexport') ? GETPOSTINT('monthtoexport') : 1); + $datee = dol_get_last_day(GETPOSTINT('yeartoexport'), GETPOSTINT('monthtoexport') ? GETPOSTINT('monthtoexport') : 12); $sql .= " AND date_creation BETWEEN '".$db->idate($dates)."' AND '".$db->idate($datee)."'"; } $sql .= " ORDER BY rowid ASC"; // Required so later we can use the parameter $previoushash of checkSignature() @@ -200,7 +200,7 @@ if ($action === 'downloadblockchain') { if ($res) { header('Content-Type: application/octet-stream'); header("Content-Transfer-Encoding: Binary"); - header("Content-disposition: attachment; filename=\"unalterable-log-archive-".$dolibarr_main_db_name."-".(GETPOST('yeartoexport', 'int') > 0 ? GETPOST('yeartoexport', 'int').(GETPOST('monthtoexport', 'int') > 0 ? sprintf("%02d", GETPOST('monthtoexport', 'int')) : '').'-' : '').$previoushash.".csv\""); + header("Content-disposition: attachment; filename=\"unalterable-log-archive-".$dolibarr_main_db_name."-".(GETPOSTINT('yeartoexport') > 0 ? GETPOSTINT('yeartoexport').(GETPOSTINT('monthtoexport') > 0 ? sprintf("%02d", GETPOSTINT('monthtoexport')) : '').'-' : '').$previoushash.".csv\""); print $langs->transnoentities('Id') .';'.$langs->transnoentities('Date') @@ -379,7 +379,7 @@ print ''; print '
'; print $langs->trans("RestrictYearToExport").': '; -$smonth = GETPOST('monthtoexport', 'int'); +$smonth = GETPOSTINT('monthtoexport'); // Month $retstring = ''; $retstring .= '"; print $retstring; -print ''; +print ''; print ''; print ''; if (getDolGlobalString('BLOCKEDLOG_USE_REMOTE_AUTHORITY')) { diff --git a/htdocs/blockedlog/ajax/block-add.php b/htdocs/blockedlog/ajax/block-add.php index e2009a01da1..cebd9151b5b 100644 --- a/htdocs/blockedlog/ajax/block-add.php +++ b/htdocs/blockedlog/ajax/block-add.php @@ -38,7 +38,7 @@ if (!defined('NOREQUIREHTML')) { $res = require '../../main.inc.php'; -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $element = GETPOST('element', 'alpha'); $action = GETPOST('action', 'aZ09'); diff --git a/htdocs/blockedlog/ajax/block-info.php b/htdocs/blockedlog/ajax/block-info.php index 8660ebbbc82..66d146cc533 100644 --- a/htdocs/blockedlog/ajax/block-info.php +++ b/htdocs/blockedlog/ajax/block-info.php @@ -41,7 +41,7 @@ if (!defined('NOREQUIREHTML')) { require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $block = new BlockedLog($db); if ((!$user->admin && !$user->hasRight('blockedlog', 'read')) || empty($conf->blockedlog->enabled)) { diff --git a/htdocs/bom/ajax/ajax.php b/htdocs/bom/ajax/ajax.php index eddb8a40dc5..943230cbed7 100644 --- a/htdocs/bom/ajax/ajax.php +++ b/htdocs/bom/ajax/ajax.php @@ -46,7 +46,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php'; $action = GETPOST('action', 'aZ09'); -$idproduct = GETPOST('idproduct', 'int'); +$idproduct = GETPOSTINT('idproduct'); /* diff --git a/htdocs/bom/bom_agenda.php b/htdocs/bom/bom_agenda.php index d4fb24d6daa..82d832319c1 100644 --- a/htdocs/bom/bom_agenda.php +++ b/htdocs/bom/bom_agenda.php @@ -35,8 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php'; $langs->loadLangs(array('mrp', 'other')); // Get parameters -$id = GETPOST('id', 'int'); -$socid = GETPOST('socid', 'int'); +$id = GETPOSTINT('id'); +$socid = GETPOSTINT('socid'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); @@ -56,10 +56,10 @@ $search_rowid = GETPOST('search_rowid'); $search_agenda_label = GETPOST('search_agenda_label'); // Load variables for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 9abba40be0c..c4db4c61421 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -36,8 +36,8 @@ require_once DOL_DOCUMENT_ROOT.'/mrp/lib/mrp.lib.php'; $langs->loadLangs(array('mrp', 'other')); // Get parameters -$id = GETPOST('id', 'int'); -$lineid = GETPOST('lineid', 'int'); +$id = GETPOSTINT('id'); +$lineid = GETPOSTINT('lineid'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); @@ -47,9 +47,9 @@ $backtopage = GETPOST('backtopage', 'alpha'); // PDF -$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0)); -$hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0)); -$hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0)); +$hidedetails = (GETPOSTINT('hidedetails') ? GETPOSTINT('hidedetails') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0)); +$hidedesc = (GETPOSTINT('hidedesc') ? GETPOSTINT('hidedesc') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0)); +$hideref = (GETPOSTINT('hideref') ? GETPOSTINT('hideref') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0)); // Initialize technical objects $object = new BOM($db); @@ -155,7 +155,7 @@ if (empty($reshook)) { $predef = ''; // Set if we used free entry or predefined product - $bom_child_id = (int) GETPOST('bom_id', 'int'); + $bom_child_id = GETPOSTINT('bom_id'); if ($bom_child_id > 0) { $bom_child = new BOM($db); $res = $bom_child->fetch($bom_child_id); @@ -163,12 +163,12 @@ if (empty($reshook)) { $idprod = $bom_child->fk_product; } } else { - $idprod = (!empty(GETPOST('idprodservice', 'int')) ? GETPOST('idprodservice', 'int') : (int) GETPOST('idprod', 'int')); + $idprod = (!empty(GETPOSTINT('idprodservice')) ? GETPOSTINT('idprodservice') : GETPOSTINT('idprod')); } $qty = price2num(GETPOST('qty', 'alpha'), 'MS'); $qty_frozen = price2num(GETPOST('qty_frozen', 'alpha'), 'MS'); - $disable_stock_change = GETPOST('disable_stock_change', 'int'); + $disable_stock_change = GETPOSTINT('disable_stock_change'); $efficiency = price2num(GETPOST('efficiency', 'alpha')); $fk_unit = GETPOST('fk_unit', 'alphanohtml'); @@ -247,7 +247,7 @@ if (empty($reshook)) { // Set if we used free entry or predefined product $qty = price2num(GETPOST('qty', 'alpha'), 'MS'); $qty_frozen = price2num(GETPOST('qty_frozen', 'alpha'), 'MS'); - $disable_stock_change = GETPOST('disable_stock_change', 'int'); + $disable_stock_change = GETPOSTINT('disable_stock_change'); $efficiency = price2num(GETPOST('efficiency', 'alpha')); $fk_unit = GETPOST('fk_unit', 'alphanohtml'); @@ -608,7 +608,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } if (!empty($object->lines)) { - $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, '/bom/tpl'); + $object->printObjectLines($action, $mysoc, null, GETPOSTINT('lineid'), 1, '/bom/tpl'); } // Form to add new line @@ -660,7 +660,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } if (!empty($object->lines)) { - $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, '/bom/tpl'); + $object->printObjectLines($action, $mysoc, null, GETPOSTINT('lineid'), 1, '/bom/tpl'); } // Form to add new line diff --git a/htdocs/bom/bom_document.php b/htdocs/bom/bom_document.php index df5a9044bf5..67ef5c7e1c7 100644 --- a/htdocs/bom/bom_document.php +++ b/htdocs/bom/bom_document.php @@ -37,7 +37,7 @@ $langs->loadLangs(array("mrp", "companies", "other", "mails")); // Get parameters $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); -$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); +$id = (GETPOSTINT('socid') ? GETPOSTINT('socid') : GETPOSTINT('id')); $ref = GETPOST('ref', 'alpha'); // Security check - Protection if external user @@ -46,10 +46,10 @@ $ref = GETPOST('ref', 'alpha'); // $result = restrictedArea($user, 'bom', $id); // Load variables for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php index a4d3be63e5f..cd6aaf1eaee 100644 --- a/htdocs/bom/bom_list.php +++ b/htdocs/bom/bom_list.php @@ -33,10 +33,10 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $langs->loadLangs(array('mrp', 'other')); // Get Parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list @@ -47,7 +47,7 @@ $mode = GETPOST('mode', 'aZ'); // mode view (kanban or common) // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT('page'); @@ -89,8 +89,8 @@ foreach ($object->fields as $key => $val) { $search[$key] = GETPOST('search_'.$key, 'alpha'); } if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { - $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); - $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOSTINT('search_'.$key.'_dtstartmonth'), GETPOSTINT('search_'.$key.'_dtstartday'), GETPOSTINT('search_'.$key.'_dtstartyear')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOSTINT('search_'.$key.'_dtendmonth'), GETPOSTINT('search_'.$key.'_dtendday'), GETPOSTINT('search_'.$key.'_dtendyear')); } } @@ -322,7 +322,7 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; if ($object->ismultientitymanaged == 1) { - $sql .= " WHERE t.entity IN (".getEntity($object->element, (GETPOST('search_current_entity', 'int') ? 0 : 1)).")"; + $sql .= " WHERE t.entity IN (".getEntity($object->element, (GETPOSTINT('search_current_entity') ? 0 : 1)).")"; } else { $sql .= " WHERE 1 = 1"; } @@ -457,9 +457,9 @@ foreach ($search as $key => $val) { } } } elseif (preg_match('/(_dtstart|_dtend)$/', $key) && !empty($val)) { - $param .= '&search_'.$key.'month='.((int) GETPOST('search_'.$key.'month', 'int')); - $param .= '&search_'.$key.'day='.((int) GETPOST('search_'.$key.'day', 'int')); - $param .= '&search_'.$key.'year='.((int) GETPOST('search_'.$key.'year', 'int')); + $param .= '&search_'.$key.'month='.(GETPOSTINT('search_'.$key.'month')); + $param .= '&search_'.$key.'day='.(GETPOSTINT('search_'.$key.'day')); + $param .= '&search_'.$key.'year='.(GETPOSTINT('search_'.$key.'year')); } elseif ($search[$key] != '') { $param .= '&search_'.$key.'='.urlencode($search[$key]); } @@ -480,7 +480,7 @@ $arrayofmassactions = array( if (!empty($permissiontodelete)) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/bom/bom_net_needs.php b/htdocs/bom/bom_net_needs.php index 52b472428b6..00383849710 100644 --- a/htdocs/bom/bom_net_needs.php +++ b/htdocs/bom/bom_net_needs.php @@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php'; $langs->loadLangs(array("mrp", "other", "stocks")); // Get parameters -$id = GETPOST('id', 'int'); -$lineid = GETPOST('lineid', 'int'); +$id = GETPOSTINT('id'); +$lineid = GETPOSTINT('lineid'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); diff --git a/htdocs/bom/bom_note.php b/htdocs/bom/bom_note.php index aba22ade7ca..5237fc30066 100644 --- a/htdocs/bom/bom_note.php +++ b/htdocs/bom/bom_note.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php'; $langs->loadLangs(array("mrp", "companies")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); diff --git a/htdocs/bom/tpl/objectline_create.tpl.php b/htdocs/bom/tpl/objectline_create.tpl.php index 3791531ed5a..cf927bc763c 100644 --- a/htdocs/bom/tpl/objectline_create.tpl.php +++ b/htdocs/bom/tpl/objectline_create.tpl.php @@ -120,9 +120,9 @@ if (isModEnabled("product") || isModEnabled("service")) { $statustoshow = -1; if (getDolGlobalString('ENTREPOT_EXTRA_STATUS')) { // hide products in closed warehouse, but show products for internal transfer - print $form->select_produits(GETPOST('idprod', 'int'), (($filtertype == 1) ? 'idprodservice' : 'idprod'), $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array'), 1); + print $form->select_produits(GETPOSTINT('idprod'), (($filtertype == 1) ? 'idprodservice' : 'idprod'), $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOSTINT('combinations'), 1); } else { - print $form->select_produits(GETPOST('idprod', 'int'), (($filtertype == 1) ? 'idprodservice' : 'idprod'), $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOST('combinations', 'array'), 1); + print $form->select_produits(GETPOSTINT('idprod'), (($filtertype == 1) ? 'idprodservice' : 'idprod'), $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOSTINT('combinations'), 1); } $urltocreateproduct = DOL_URL_ROOT.'/product/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id); print ''; diff --git a/htdocs/bom/tpl/objectline_edit.tpl.php b/htdocs/bom/tpl/objectline_edit.tpl.php index 6f4ad4e5a85..5535f3dbf5a 100644 --- a/htdocs/bom/tpl/objectline_edit.tpl.php +++ b/htdocs/bom/tpl/objectline_edit.tpl.php @@ -138,11 +138,11 @@ if ($filtertype != 1) { } $coldisplay++; - print '
qty_frozen ? ' checked="checked"' : '')) . '>'; + print 'qty_frozen ? ' checked="checked"' : '')) . '>'; print 'disable_stock_change ? ' checked="checked"' : '')) . '">'; + print 'disable_stock_change ? ' checked="checked"' : '')) . '">'; print ' '.$langs->trans("ChooseIfANewWindowMustBeOpenedOnClickOnBookmark").'
'.$langs->trans("Visibility").''; print img_picto('', 'user', 'class="pictofixedwidth"'); - print $form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : $user->id, 'userid', 0, '', 0, ($user->admin ? '' : array($user->id)), '', 0, 0, 0, '', ($user->admin) ? 1 : 0, '', 'maxwidth300 widthcentpercentminusx'); + print $form->select_dolusers(GETPOSTISSET('userid') ? GETPOSTINT('userid') : $user->id, 'userid', 0, '', 0, ($user->admin ? '' : array($user->id)), '', 0, 0, 0, '', ($user->admin) ? 1 : 0, '', 'maxwidth300 widthcentpercentminusx'); print '
'.$langs->trans("Position").''; - print 'position).'">'; + print 'position).'">'; print '
'; @@ -284,7 +284,7 @@ if ($id > 0 && !preg_match('/^add/i', $action)) { print ''.$langs->trans("Visibility").''; if ($action == 'edit' && $user->admin) { print img_picto('', 'user', 'class="pictofixedwidth"'); - print $form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : ($object->fk_user ? $object->fk_user : ''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300 widthcentpercentminusx'); + print $form->select_dolusers(GETPOSTISSET('userid') ? GETPOSTINT('userid') : ($object->fk_user ? $object->fk_user : ''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300 widthcentpercentminusx'); } else { if ($object->fk_user > 0) { $fuser = new User($db); @@ -299,7 +299,7 @@ if ($id > 0 && !preg_match('/^add/i', $action)) { // Position print ''.$langs->trans("Position").''; if ($action == 'edit') { - print 'position).'">'; + print 'position).'">'; } else { print $object->position; } diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index b22c1d294b4..50212e04137 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -31,7 +31,7 @@ $langs->loadLangs(array('bookmarks', 'admin')); // Get Parameters $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); -$show_files = GETPOST('show_files', 'int'); +$show_files = GETPOSTINT('show_files'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $toselect = GETPOST('toselect', 'array'); @@ -40,14 +40,14 @@ $backtopage = GETPOST('backtopage', 'alpha'); $optioncss = GETPOST('optioncss', 'alpha'); $mode = GETPOST('mode', 'aZ'); -$id = GETPOST("id", 'int'); +$id = GETPOSTINT("id"); $search_title = GETPOST('search_title', 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -247,7 +247,7 @@ $arrayofmassactions = array( if (!empty($permissiontodelete)) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index 9d66e35f9f1..06510e44aa7 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $langs->load("categories"); // Security check -$socid = (int) GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if (!$user->hasRight('categorie', 'lire')) { accessforbidden(); } @@ -45,7 +45,7 @@ if (!$user->hasRight('categorie', 'lire')) { $action = GETPOST('action', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $origin = GETPOST('origin', 'alpha'); -$catorigin = (int) GETPOST('catorigin', 'int'); +$catorigin = GETPOSTINT('catorigin'); $type = GETPOST('type', 'aZ09'); $urlfrom = GETPOST('urlfrom', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -53,9 +53,9 @@ $backtopage = GETPOST('backtopage', 'alpha'); $label = (string) GETPOST('label', 'alphanohtml'); $description = (string) GETPOST('description', 'restricthtml'); $color = preg_replace('/[^0-9a-f#]/i', '', (string) GETPOST('color', 'alphanohtml')); -$position = (int) GETPOST('position', 'int'); -$visible = (int) GETPOST('visible', 'int'); -$parent = (int) GETPOST('parent', 'int'); +$position = GETPOSTINT('position'); +$visible = GETPOSTINT('visible'); +$parent = GETPOSTINT('parent'); if ($origin) { if ($type == Categorie::TYPE_PRODUCT) { diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index 16965accb55..a3fe18a25c1 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -34,20 +34,20 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page $langs->load("categories"); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alphanohtml'); $action = (GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'edit'); $confirm = GETPOST('confirm'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); -$socid = (int) GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); $label = (string) GETPOST('label', 'alphanohtml'); $description = (string) GETPOST('description', 'restricthtml'); $color = preg_replace('/[^0-9a-f#]/i', '', (string) GETPOST('color', 'alphanohtml')); -$position = (int) GETPOST('position', 'int'); -$visible = (int) GETPOST('visible', 'int'); -$parent = (int) GETPOST('parent', 'int'); +$position = GETPOSTINT('position'); +$visible = GETPOSTINT('visible'); +$parent = GETPOSTINT('parent'); if ($id == "") { dol_print_error(null, 'Missing parameter id'); diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index eb322bbeb3f..d3eeb6b8e16 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -36,10 +36,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Load translation files required by the page $langs->load("categories"); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $type = (GETPOST('type', 'aZ09') ? GETPOST('type', 'aZ09') : Categorie::TYPE_PRODUCT); $catname = GETPOST('catname', 'alpha'); -$nosearch = GETPOST('nosearch', 'int'); +$nosearch = GETPOSTINT('nosearch'); $categstatic = new Categorie($db); if (is_numeric($type)) { diff --git a/htdocs/categories/info.php b/htdocs/categories/info.php index aceabfdaffb..59dedc1312e 100644 --- a/htdocs/categories/info.php +++ b/htdocs/categories/info.php @@ -37,7 +37,7 @@ if (!$user->hasRight('categorie', 'lire')) { $langs->loadLangs(array('categories', 'sendings')); $socid = 0; -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $label = GETPOST('label', 'alpha'); // Security check diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index 4757aab5fdd..bd40d078fa1 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php'; $langs->loadlangs(array('categories', 'bills')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $label = GETPOST('label', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm'); diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index 9293c62219b..1665c80150d 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page $langs->loadLangs(array('categories', 'languages')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $label = GETPOST('label', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index a7a13ff64d1..ddfe5fc9946 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -37,14 +37,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page $langs->loadLangs(array("categories", "compta")); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $label = GETPOST('label', 'alpha'); -$removeelem = GETPOST('removeelem', 'int'); -$elemid = GETPOST('elemid', 'int'); +$removeelem = GETPOSTINT('removeelem'); +$elemid = GETPOSTINT('elemid'); $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list @@ -54,10 +54,10 @@ $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action diff --git a/htdocs/collab/index.php b/htdocs/collab/index.php index 746cc019a8b..bee5d778dc7 100644 --- a/htdocs/collab/index.php +++ b/htdocs/collab/index.php @@ -41,7 +41,7 @@ $conf->dol_hide_leftmenu = 1; // Force hide of left menu. $error = 0; $website = GETPOST('website', 'alpha'); $page = GETPOST('page', 'alpha'); -$pageid = GETPOST('pageid', 'int'); +$pageid = GETPOSTINT('pageid'); $action = GETPOST('action', 'aZ09'); if (GETPOST('delete')) { diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index cc5c5c1c8dd..bcad30ffa91 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -58,15 +58,15 @@ $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); $socpeopleassigned = GETPOST('socpeopleassigned', 'array'); $origin = GETPOST('origin', 'alpha'); -$originid = GETPOST('originid', 'int'); +$originid = GETPOSTINT('originid'); $confirm = GETPOST('confirm', 'alpha'); $fulldayevent = GETPOST('fullday', 'alpha'); -$aphour = GETPOST('aphour', 'int'); -$apmin = GETPOST('apmin', 'int'); -$p2hour = GETPOST('p2hour', 'int'); -$p2min = GETPOST('p2min', 'int'); +$aphour = GETPOSTINT('aphour'); +$apmin = GETPOSTINT('apmin'); +$p2hour = GETPOSTINT('p2hour'); +$p2min = GETPOSTINT('p2min'); $addreminder = GETPOST('addreminder', 'alpha'); $offsetvalue = GETPOSTINT('offsetvalue'); @@ -82,12 +82,12 @@ if ($complete == 'na' || $complete == -2) { if ($fulldayevent) { $tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT'); // For "full day" events, we must store date in GMT (It must be viewed as same moment everywhere) - $datep = dol_mktime('00', '00', 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), $tzforfullday ? $tzforfullday : 'tzuserrel'); - $datef = dol_mktime('23', '59', '59', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), $tzforfullday ? $tzforfullday : 'tzuserrel'); + $datep = dol_mktime('00', '00', 0, GETPOSTINT("apmonth"), GETPOSTINT("apday"), GETPOSTINT("apyear"), $tzforfullday ? $tzforfullday : 'tzuserrel'); + $datef = dol_mktime('23', '59', '59', GETPOSTINT("p2month"), GETPOSTINT("p2day"), GETPOSTINT("p2year"), $tzforfullday ? $tzforfullday : 'tzuserrel'); //print $db->idate($datep); exit; } else { - $datep = dol_mktime($aphour, $apmin, 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), 'tzuserrel'); - $datef = dol_mktime($p2hour, $p2min, '59', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), 'tzuserrel'); + $datep = dol_mktime($aphour, $apmin, 0, GETPOSTINT("apmonth"), GETPOSTINT("apday"), GETPOSTINT("apyear"), 'tzuserrel'); + $datef = dol_mktime($p2hour, $p2min, '59', GETPOSTINT("p2month"), GETPOSTINT("p2day"), GETPOSTINT("p2year"), 'tzuserrel'); } $reg = array(); if (GETPOST('datep')) { @@ -99,8 +99,8 @@ if (GETPOST('datep')) { } // Security check -$socid = GETPOST('socid', 'int'); -$id = GETPOST('id', 'int'); +$socid = GETPOSTINT('socid'); +$id = GETPOSTINT('id'); if ($user->socid && ($socid != $user->socid)) { accessforbidden(); } @@ -269,7 +269,7 @@ if (empty($reshook) && (GETPOST('addassignedtoresource') || GETPOST('updateassig if (empty($reshook) && $action == 'classin' && ($user->hasRight('agenda', 'allactions', 'create') || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->hasRight('agenda', 'myactions', 'create')))) { //$object->fetch($id); - $object->setProject(GETPOST('projectid', 'int')); + $object->setProject(GETPOSTINT('projectid')); } // Action clone object @@ -283,7 +283,7 @@ if (empty($reshook) && $action == 'confirm_clone' && $confirm == 'yes') { reset($object->socpeopleassigned); $object->contact_id = key($object->socpeopleassigned); } - $result = $object->createFromClone($user, GETPOST('socid', 'int')); + $result = $object->createFromClone($user, GETPOSTINT('socid')); if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); exit(); @@ -316,17 +316,17 @@ if (empty($reshook) && $action == 'add') { exit; } - $percentage = in_array(GETPOST('status'), array(-1, 100)) ? GETPOST('status') : (in_array($complete, array(-1, 100)) ? $complete : GETPOST("percentage", 'int')); // If status is -1 or 100, percentage is not defined and we must use status + $percentage = in_array(GETPOST('status'), array(-1, 100)) ? GETPOST('status') : (in_array($complete, array(-1, 100)) ? $complete : GETPOSTINT("percentage")); // If status is -1 or 100, percentage is not defined and we must use status // Clean parameters if ($fulldayevent) { $tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT'); // For "full day" events, we must store date in GMT (It must be viewed as same moment everywhere) - $datep = dol_mktime('00', '00', '00', GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), $tzforfullday ? $tzforfullday : 'tzuserrel'); - $datef = dol_mktime('23', '59', '59', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), $tzforfullday ? $tzforfullday : 'tzuserrel'); + $datep = dol_mktime('00', '00', '00', GETPOSTINT("apmonth"), GETPOSTINT("apday"), GETPOSTINT("apyear"), $tzforfullday ? $tzforfullday : 'tzuserrel'); + $datef = dol_mktime('23', '59', '59', GETPOSTINT("p2month"), GETPOSTINT("p2day"), GETPOSTINT("p2year"), $tzforfullday ? $tzforfullday : 'tzuserrel'); } else { - $datep = dol_mktime(GETPOST("aphour", 'int'), GETPOST("apmin", 'int'), GETPOST("apsec", 'int'), GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), 'tzuserrel'); - $datef = dol_mktime(GETPOST("p2hour", 'int'), GETPOST("p2min", 'int'), GETPOST("apsec", 'int'), GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), 'tzuserrel'); + $datep = dol_mktime(GETPOSTINT("aphour"), GETPOSTINT("apmin"), GETPOSTINT("apsec"), GETPOSTINT("apmonth"), GETPOSTINT("apday"), GETPOSTINT("apyear"), 'tzuserrel'); + $datef = dol_mktime(GETPOSTINT("p2hour"), GETPOSTINT("p2min"), GETPOSTINT("apsec"), GETPOSTINT("p2month"), GETPOSTINT("p2day"), GETPOSTINT("p2year"), 'tzuserrel'); } // Check parameters @@ -356,7 +356,7 @@ if (empty($reshook) && $action == 'add') { if (!$error) { // Initialisation object actioncomm - $object->priority = GETPOSTISSET("priority") ? GETPOST("priority", "int") : 0; + $object->priority = GETPOSTISSET("priority") ? GETPOSTINT("priority") : 0; $object->fulldayevent = ($fulldayevent ? 1 : 0); $object->location = GETPOST("location", 'alphanohtml'); $object->label = GETPOST('label', 'alphanohtml'); @@ -386,7 +386,7 @@ if (empty($reshook) && $action == 'add') { } } } - $object->fk_project = GETPOSTISSET("projectid") ? GETPOST("projectid", 'int') : 0; + $object->fk_project = GETPOSTISSET("projectid") ? GETPOSTINT("projectid") : 0; $taskid = GETPOSTINT('taskid'); if (!empty($taskid)) { @@ -437,7 +437,7 @@ if (empty($reshook) && $action == 'add') { $object->contact = $contact; } - if (GETPOST('socid', 'int') > 0) { + if (GETPOSTINT('socid') > 0) { $object->socid = GETPOSTINT('socid'); $object->fetch_thirdparty(); @@ -511,7 +511,7 @@ if (empty($reshook) && $action == 'add') { if ($userepeatevent && !empty($selectedrecurrulefreq) && $selectedrecurrulefreq != 'no') { $eventisrecurring = 1; $object->recurid = dol_print_date(dol_now('gmt'), 'dayhourlog', 'gmt'); - $object->recurdateend = dol_mktime(0, 0, 0, GETPOST('limitmonth', 'int'), GETPOST('limitday', 'int'), GETPOST('limityear', 'int')); + $object->recurdateend = dol_mktime(0, 0, 0, GETPOSTINT('limitmonth'), GETPOSTINT('limitday'), GETPOSTINT('limityear')); } else { unset($object->recurid); unset($object->recurrule); @@ -609,22 +609,22 @@ if (empty($reshook) && $action == 'add') { if ($eventisrecurring) { // We set first date of recurrence and offsets if ($selectedrecurrulefreq == 'WEEKLY' && !empty($selectedrecurrulebyday)) { - $firstdatearray = dol_get_first_day_week(GETPOST("apday", 'int'), GETPOST("apmonth", 'int'), GETPOST("apyear", 'int')); - $datep = dol_mktime($fulldayevent ? '00' : GETPOST("aphour", 'int'), $fulldayevent ? '00' : GETPOST("apmin", 'int'), $fulldayevent ? '00' : GETPOST("apsec", 'int'), $firstdatearray['month'], $firstdatearray['first_day'], $firstdatearray['year'], $tzforfullday ? $tzforfullday : 'tzuserrel'); + $firstdatearray = dol_get_first_day_week(GETPOSTINT("apday"), GETPOSTINT("apmonth"), GETPOSTINT("apyear")); + $datep = dol_mktime($fulldayevent ? '00' : GETPOSTINT("aphour"), $fulldayevent ? '00' : GETPOSTINT("apmin"), $fulldayevent ? '00' : GETPOSTINT("apsec"), $firstdatearray['month'], $firstdatearray['first_day'], $firstdatearray['year'], $tzforfullday ? $tzforfullday : 'tzuserrel'); $datep = dol_time_plus_duree($datep, $selectedrecurrulebyday + 6, 'd');//We begin the week after $dayoffset = 7; $monthoffset = 0; } elseif ($selectedrecurrulefreq == 'MONTHLY' && !empty($selectedrecurrulebymonthday)) { $firstday = $selectedrecurrulebymonthday; - $firstmonth = GETPOST("apday") > $selectedrecurrulebymonthday ? GETPOST("apmonth", 'int') + 1 : GETPOST("apmonth", 'int');//We begin the week after - $datep = dol_mktime($fulldayevent ? '00' : GETPOST("aphour", 'int'), $fulldayevent ? '00' : GETPOST("apmin", 'int'), $fulldayevent ? '00' : GETPOST("apsec", 'int'), $firstmonth, $firstday, GETPOST("apyear", 'int'), $tzforfullday ? $tzforfullday : 'tzuserrel'); + $firstmonth = GETPOST("apday") > $selectedrecurrulebymonthday ? GETPOSTINT("apmonth") + 1 : GETPOSTINT("apmonth");//We begin the week after + $datep = dol_mktime($fulldayevent ? '00' : GETPOSTINT("aphour"), $fulldayevent ? '00' : GETPOSTINT("apmin"), $fulldayevent ? '00' : GETPOSTINT("apsec"), $firstmonth, $firstday, GETPOSTINT("apyear"), $tzforfullday ? $tzforfullday : 'tzuserrel'); $dayoffset = 0; $monthoffset = 1; } else { $error++; } // End date - $repeateventlimitdate = dol_mktime(23, 59, 59, GETPOSTISSET("limitmonth") ? GETPOST("limitmonth", 'int') : 1, GETPOSTISSET("limitday") ? GETPOST("limitday", 'int') : 1, GETPOSTISSET("limityear") && GETPOST("limityear", 'int') < 2100 ? GETPOST("limityear", 'int') : 2100, $tzforfullday ? $tzforfullday : 'tzuserrel'); + $repeateventlimitdate = dol_mktime(23, 59, 59, GETPOSTISSET("limitmonth") ? GETPOSTINT("limitmonth") : 1, GETPOSTISSET("limitday") ? GETPOSTINT("limitday") : 1, GETPOSTISSET("limityear") && GETPOSTINT("limityear") < 2100 ? GETPOSTINT("limityear") : 2100, $tzforfullday ? $tzforfullday : 'tzuserrel'); // Set date of end of event $deltatime = num_between_day($object->datep, $datep); $datef = dol_time_plus_duree($datef, $deltatime, 'd'); @@ -743,11 +743,11 @@ if (empty($reshook) && $action == 'add') { if (empty($reshook) && $action == 'update') { if (empty($cancel)) { $fulldayevent = GETPOST('fullday'); - $aphour = GETPOST('aphour', 'int'); - $apmin = GETPOST('apmin', 'int'); - $p2hour = GETPOST('p2hour', 'int'); - $p2min = GETPOST('p2min', 'int'); - $percentage = in_array(GETPOST('status'), array(-1, 100)) ? GETPOST('status') : (in_array($complete, array(-1, 100)) ? $complete : GETPOST("percentage", 'int')); // If status is -1 or 100, percentage is not defined and we must use status + $aphour = GETPOSTINT('aphour'); + $apmin = GETPOSTINT('apmin'); + $p2hour = GETPOSTINT('p2hour'); + $p2min = GETPOSTINT('p2min'); + $percentage = in_array(GETPOST('status'), array(-1, 100)) ? GETPOST('status') : (in_array($complete, array(-1, 100)) ? $complete : GETPOSTINT("percentage")); // If status is -1 or 100, percentage is not defined and we must use status // Clean parameters if ($aphour == -1) { @@ -772,11 +772,11 @@ if (empty($reshook) && $action == 'update') { if ($fulldayevent) { $tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT'); // For "full day" events, we must store date in GMT (It must be viewed as same moment everywhere) - $datep = dol_mktime($fulldayevent ? '00' : GETPOST("aphour", 'int'), $fulldayevent ? '00' : GETPOST("apmin", 'int'), $fulldayevent ? '00' : GETPOST("apsec", 'int'), GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), $tzforfullday ? $tzforfullday : 'tzuserrel'); - $datef = dol_mktime($fulldayevent ? '23' : GETPOST("p2hour", 'int'), $fulldayevent ? '59' : GETPOST("p2min", 'int'), $fulldayevent ? '59' : GETPOST("apsec", 'int'), GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), $tzforfullday ? $tzforfullday : 'tzuserrel'); + $datep = dol_mktime($fulldayevent ? '00' : GETPOSTINT("aphour"), $fulldayevent ? '00' : GETPOSTINT("apmin"), $fulldayevent ? '00' : GETPOSTINT("apsec"), GETPOSTINT("apmonth"), GETPOSTINT("apday"), GETPOSTINT("apyear"), $tzforfullday ? $tzforfullday : 'tzuserrel'); + $datef = dol_mktime($fulldayevent ? '23' : GETPOSTINT("p2hour"), $fulldayevent ? '59' : GETPOSTINT("p2min"), $fulldayevent ? '59' : GETPOSTINT("apsec"), GETPOSTINT("p2month"), GETPOSTINT("p2day"), GETPOSTINT("p2year"), $tzforfullday ? $tzforfullday : 'tzuserrel'); } else { - $datep = dol_mktime($fulldayevent ? '00' : GETPOST("aphour", 'int'), $fulldayevent ? '00' : GETPOST("apmin", 'int'), $fulldayevent ? '00' : GETPOST("apsec", 'int'), GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), 'tzuserrel'); - $datef = dol_mktime($fulldayevent ? '23' : GETPOST("p2hour", 'int'), $fulldayevent ? '59' : GETPOST("p2min", 'int'), $fulldayevent ? '59' : GETPOST("apsec", 'int'), GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), 'tzuserrel'); + $datep = dol_mktime($fulldayevent ? '00' : GETPOSTINT("aphour"), $fulldayevent ? '00' : GETPOSTINT("apmin"), $fulldayevent ? '00' : GETPOSTINT("apsec"), GETPOSTINT("apmonth"), GETPOSTINT("apday"), GETPOSTINT("apyear"), 'tzuserrel'); + $datef = dol_mktime($fulldayevent ? '23' : GETPOSTINT("p2hour"), $fulldayevent ? '59' : GETPOSTINT("p2min"), $fulldayevent ? '59' : GETPOSTINT("apsec"), GETPOSTINT("p2month"), GETPOSTINT("p2day"), GETPOSTINT("p2year"), 'tzuserrel'); } if ($object->elementtype == 'ticket') { // code should be TICKET_MSG, TICKET_MSG_PRIVATE, TICKET_MSG_SENTBYMAIL, TICKET_MSG_PRIVATE_SENTBYMAIL @@ -805,21 +805,21 @@ if (empty($reshook) && $action == 'update') { $object->datep = $datep; $object->datef = $datef; $object->percentage = $percentage; - $object->priority = GETPOST("priority", "int"); + $object->priority = GETPOSTINT("priority"); $object->fulldayevent = GETPOST("fullday") ? 1 : 0; $object->location = GETPOST('location', "alphanohtml"); - $object->socid = GETPOST("socid", "int"); + $object->socid = GETPOSTINT("socid"); $socpeopleassigned = GETPOST("socpeopleassigned", 'array'); $object->socpeopleassigned = array(); foreach ($socpeopleassigned as $cid) { $object->socpeopleassigned[$cid] = array('id' => $cid); } - $object->contact_id = GETPOST("contactid", 'int'); + $object->contact_id = GETPOSTINT("contactid"); if (empty($object->contact_id) && !empty($object->socpeopleassigned)) { reset($object->socpeopleassigned); $object->contact_id = key($object->socpeopleassigned); } - $object->fk_project = GETPOST("projectid", 'int'); + $object->fk_project = GETPOSTINT("projectid"); $object->note_private = trim(GETPOST("note", "restricthtml")); if (GETPOST("elementtype", 'alpha')) { @@ -830,7 +830,7 @@ if (empty($reshook) && $action == 'update') { $hasPermissionOnLinkedObject = 1; } if ($hasPermissionOnLinkedObject) { - $object->fk_element = GETPOST("fk_element", 'int'); + $object->fk_element = GETPOSTINT("fk_element"); $object->elementtype = GETPOST("elementtype", 'alpha'); } } @@ -876,7 +876,7 @@ if (empty($reshook) && $action == 'update') { if (getDolGlobalString('AGENDA_ENABLE_DONEBY')) { if (GETPOST("doneby")) { - $object->userdoneid = GETPOST("doneby", "int"); + $object->userdoneid = GETPOSTINT("doneby"); } } @@ -1448,7 +1448,7 @@ if ($action == 'create') { // Done by if (getDolGlobalString('AGENDA_ENABLE_DONEBY')) { print ''.$langs->trans("ActionDoneBy").''; - print $form->select_dolusers(GETPOSTISSET("doneby") ? GETPOST("doneby", 'int') : (!empty($object->userdoneid) && $percent == 100 ? $object->userdoneid : 0), 'doneby', 1); + print $form->select_dolusers(GETPOSTISSET("doneby") ? GETPOSTINT("doneby") : (!empty($object->userdoneid) && $percent == 100 ? $object->userdoneid : 0), 'doneby', 1); print ''; } @@ -1498,7 +1498,7 @@ if ($action == 'create') { if (GETPOSTISSET('status')) { $percent = GETPOST('status'); } elseif (GETPOSTISSET('percentage')) { - $percent = GETPOST('percentage', 'int'); + $percent = GETPOSTINT('percentage'); } else { if ($complete == '0' || GETPOST("afaire") == 1) { $percent = '0'; @@ -1520,11 +1520,11 @@ if ($action == 'create') { if (isModEnabled("societe")) { // Related company print ''.$langs->trans("ActionOnCompany").''; - if (GETPOST('socid', 'int') > 0) { + if (GETPOSTINT('socid') > 0) { $societe = new Societe($db); - $societe->fetch(GETPOST('socid', 'int')); + $societe->fetch(GETPOSTINT('socid')); print $societe->getNomUrl(1); - print ''; + print ''; } else { $events = array(); $events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php?showempty=1', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled')); @@ -1540,11 +1540,11 @@ if ($action == 'create') { // Related contact print ''.$langs->trans("ActionOnContact").''; $preselectedids = GETPOST('socpeopleassigned', 'array'); - if (GETPOST('contactid', 'int')) { - $preselectedids[GETPOST('contactid', 'int')] = GETPOST('contactid', 'int'); + if (GETPOSTINT('contactid')) { + $preselectedids[GETPOSTINT('contactid')] = GETPOSTINT('contactid'); } if ($origin=='contact') { - $preselectedids[GETPOST('originid', 'int')] = GETPOST('originid', 'int'); + $preselectedids[GETPOSTINT('originid')] = GETPOSTINT('originid'); } // select "all" or "none" contact by default if (getDolGlobalInt('MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT')) { @@ -1561,7 +1561,7 @@ if ($action == 'create') { if (isModEnabled('project')) { $langs->load("projects"); - $projectid = GETPOST('projectid', 'int'); + $projectid = GETPOSTINT('projectid'); print ''.$langs->trans("Project").''; print img_picto('', 'project', 'class="pictofixedwidth"'); @@ -1596,7 +1596,7 @@ if ($action == 'create') { $projectsListId = $projectid; } - $tid = GETPOSTISSET("projecttaskid") ? GETPOST("projecttaskid", 'int') : (GETPOSTISSET("taskid") ? GETPOST("taskid", 'int') : ''); + $tid = GETPOSTISSET("projecttaskid") ? GETPOSTINT("projecttaskid") : (GETPOSTISSET("taskid") ? GETPOSTINT("taskid") : ''); $formproject->selectTasks((!empty($societe->id) ? $societe->id : -1), $tid, 'taskid', 24, 0, '1', 1, 0, 0, 'maxwidth500 widthcentpercentminusxx', $projectsListId); print ''; @@ -1632,7 +1632,7 @@ if ($action == 'create') { // Priority if (getDolGlobalString('AGENDA_SUPPORT_PRIORITY_IN_EVENTS')) { print ''.$langs->trans("Priority").''; - print ''; + print ''; print ''; } @@ -1744,10 +1744,10 @@ if ($id > 0) { $result5 = $object->fetch_optionals(); if ($listUserAssignedUpdated || $donotclearsession) { - $percentage = in_array(GETPOST('status'), array(-1, 100)) ? GETPOST('status') : (in_array($complete, array(-1, 100)) ? $complete : GETPOST("percentage", 'int')); // If status is -1 or 100, percentage is not defined and we must use status + $percentage = in_array(GETPOST('status'), array(-1, 100)) ? GETPOST('status') : (in_array($complete, array(-1, 100)) ? $complete : GETPOSTINT("percentage")); // If status is -1 or 100, percentage is not defined and we must use status - $datep = dol_mktime($fulldayevent ? '00' : $aphour, $fulldayevent ? '00' : $apmin, 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), 'tzuserrel'); - $datef = dol_mktime($fulldayevent ? '23' : $p2hour, $fulldayevent ? '59' : $p2min, $fulldayevent ? '59' : '0', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), 'tzuserrel'); + $datep = dol_mktime($fulldayevent ? '00' : $aphour, $fulldayevent ? '00' : $apmin, 0, GETPOSTINT("apmonth"), GETPOSTINT("apday"), GETPOSTINT("apyear"), 'tzuserrel'); + $datef = dol_mktime($fulldayevent ? '23' : $p2hour, $fulldayevent ? '59' : $p2min, $fulldayevent ? '59' : '0', GETPOSTINT("p2month"), GETPOSTINT("p2day"), GETPOSTINT("p2year"), 'tzuserrel'); $object->type_id = dol_getIdFromCode($db, GETPOST("actioncode", 'aZ09'), 'c_actioncomm'); $object->label = GETPOST("label", "alphanohtml"); @@ -1757,13 +1757,13 @@ if ($id > 0) { $object->priority = GETPOST("priority", "alphanohtml"); $object->fulldayevent = GETPOST("fullday") ? 1 : 0; $object->location = GETPOST('location', "alphanohtml"); - $object->socid = GETPOST("socid", "int"); + $object->socid = GETPOSTINT("socid"); $socpeopleassigned = GETPOST("socpeopleassigned", 'array'); foreach ($socpeopleassigned as $tmpid) { $object->socpeopleassigned[$id] = array('id' => $tmpid); } - $object->contact_id = GETPOST("contactid", 'int'); - $object->fk_project = GETPOST("projectid", 'int'); + $object->contact_id = GETPOSTINT("contactid"); + $object->fk_project = GETPOSTINT("projectid"); $object->note_private = GETPOST("note", 'restricthtml'); } @@ -2022,7 +2022,7 @@ if ($id > 0) { // Status print ''.$langs->trans("Status").' / '.$langs->trans("Percentage").''; - $percent = GETPOSTISSET("percentage") ? GETPOST("percentage", "int") : $object->percentage; + $percent = GETPOSTISSET("percentage") ? GETPOSTINT("percentage") : $object->percentage; $formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200'); print ''; diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index a27f7bfef20..44107ddaaf1 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -42,12 +42,12 @@ if (isModEnabled('project')) { // Load translation files required by the page $langs->loadLangs(array('companies', 'commercial', 'other', 'bills')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } @@ -67,10 +67,10 @@ if ($id > 0) { $hookmanager->initHooks(array('actioncard', 'globalcard')); // Get parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 62b5600af50..338887acab2 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -51,13 +51,13 @@ if (!getDolGlobalString('AGENDA_EXT_NB')) { $MAXAGENDA = getDolGlobalString('AGENDA_EXT_NB'); $DELAYFORCACHE = 300; // 300 seconds -$disabledefaultvalues = GETPOST('disabledefaultvalues', 'int'); +$disabledefaultvalues = GETPOSTINT('disabledefaultvalues'); -$check_holiday = GETPOST('check_holiday', 'int'); +$check_holiday = GETPOSTINT('check_holiday'); $filter = GETPOST("search_filter", 'alpha', 3) ? GETPOST("search_filter", 'alpha', 3) : GETPOST("filter", 'alpha', 3); $filtert = GETPOST("search_filtert", "int", 3) ? GETPOST("search_filtert", "int", 3) : GETPOST("filtert", "int", 3); $usergroup = GETPOST("search_usergroup", "int", 3) ? GETPOST("search_usergroup", "int", 3) : GETPOST("usergroup", "int", 3); -$showbirthday = empty($conf->use_javascript_ajax) ? GETPOST("showbirthday", "int") : 1; +$showbirthday = empty($conf->use_javascript_ajax) ? GETPOSTINT("showbirthday") : 1; $search_categ_cus = GETPOST("search_categ_cus", "int", 3) ? GETPOST("search_categ_cus", "int", 3) : 0; // If not choice done on calendar owner (like on left menu link "Agenda"), we filter on user. @@ -69,11 +69,11 @@ $newparam = ''; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $offset = $limit * $page; if (!$sortorder) { $sortorder = "ASC"; @@ -83,7 +83,7 @@ if (!$sortfield) { } // Security check -$socid = GETPOST("search_socid", "int") ? GETPOST("search_socid", "int") : GETPOST("socid", "int"); +$socid = GETPOSTINT("search_socid") ? GETPOSTINT("search_socid") : GETPOSTINT("socid"); if ($user->socid) { $socid = $user->socid; } @@ -108,22 +108,22 @@ $mode = GETPOST('mode', 'aZ09'); if (empty($mode) && preg_match('/show_/', $action)) { $mode = $action; // For backward compatibility } -$resourceid = GETPOST("search_resourceid", "int"); -$year = GETPOST("year", "int") ? GETPOST("year", "int") : date("Y"); -$month = GETPOST("month", "int") ? GETPOST("month", "int") : date("m"); -$week = GETPOST("week", "int") ? GETPOST("week", "int") : date("W"); -$day = GETPOST("day", "int") ? GETPOST("day", "int") : date("d"); +$resourceid = GETPOSTINT("search_resourceid"); +$year = GETPOSTINT("year") ? GETPOSTINT("year") : date("Y"); +$month = GETPOSTINT("month") ? GETPOSTINT("month") : date("m"); +$week = GETPOSTINT("week") ? GETPOSTINT("week") : date("W"); +$day = GETPOSTINT("day") ? GETPOSTINT("day") : date("d"); $pid = GETPOST("search_projectid", "int", 3) ? GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3); $status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo', 'na' or -1 $type = GETPOSTISSET("search_type") ? GETPOST("search_type", 'aZ09') : GETPOST("type", 'aZ09'); -$maxprint = GETPOSTISSET("maxprint") ? GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW; +$maxprint = GETPOSTISSET("maxprint") ? GETPOSTINT("maxprint") : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW; $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') -$dateselect = dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int')); +$dateselect = dol_mktime(0, 0, 0, GETPOSTINT('dateselectmonth'), GETPOSTINT('dateselectday'), GETPOSTINT('dateselectyear')); if ($dateselect > 0) { - $day = GETPOST('dateselectday', 'int'); - $month = GETPOST('dateselectmonth', 'int'); - $year = GETPOST('dateselectyear', 'int'); + $day = GETPOSTINT('dateselectday'); + $month = GETPOSTINT('dateselectmonth'); + $year = GETPOSTINT('dateselectyear'); } // Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) @@ -148,16 +148,16 @@ if (empty($mode) && !GETPOSTISSET('mode')) { if ($mode == 'default') { // When action is default, we want a calendar view and not the list $mode = (($defaultview != 'show_list') ? $defaultview : 'show_month'); } -if (GETPOST('viewcal', 'int') && GETPOST('mode', 'alpha') != 'show_day' && GETPOST('mode', 'alpha') != 'show_week') { +if (GETPOSTINT('viewcal') && GETPOSTINT('mode') != 'show_day' && GETPOSTINT('mode') != 'show_week') { $mode = 'show_month'; $day = ''; } // View by month -if (GETPOST('viewweek', 'int') || GETPOST('mode', 'alpha') == 'show_week') { +if (GETPOSTINT('viewweek') || GETPOSTINT('mode') == 'show_week') { $mode = 'show_week'; $week = ($week ? $week : date("W")); $day = ($day ? $day : date("d")); } // View by week -if (GETPOST('viewday', 'int') || GETPOST('mode', 'alpha') == 'show_day') { +if (GETPOSTINT('viewday') || GETPOSTINT('mode') == 'show_day') { $mode = 'show_day'; $day = ($day ? $day : date("d")); } // View by day @@ -647,7 +647,7 @@ if (!empty($conf->use_javascript_ajax)) { // If javascript on foreach ($showextcals as $val) { $htmlname = md5($val['name']); // not used for security purpose, only to get a string with no special char - if (!empty($val['default']) || GETPOST('check_ext'.$htmlname, 'int')) { + if (!empty($val['default']) || GETPOSTINT('check_ext'.$htmlname)) { $default = "checked"; } else { $default = ''; diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php index 591fb5082d3..0b16f28193e 100644 --- a/htdocs/comm/action/info.php +++ b/htdocs/comm/action/info.php @@ -37,7 +37,7 @@ if (isModEnabled('project')) { // Load translation files required by the page $langs->load("commercial"); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('actioncard', 'globalcard')); diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 55cb92d71f3..30a690b38cc 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -50,19 +50,19 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'ac $optioncss = GETPOST('optioncss', 'alpha'); -$disabledefaultvalues = GETPOST('disabledefaultvalues', 'int'); +$disabledefaultvalues = GETPOSTINT('disabledefaultvalues'); $mode = GETPOST('mode', 'aZ09'); if (empty($mode) && preg_match('/show_/', $action)) { $mode = $action; // For backward compatibility } -$resourceid = GETPOST("search_resourceid", "int") ? GETPOST("search_resourceid", "int") : GETPOST("resourceid", "int"); +$resourceid = GETPOSTINT("search_resourceid") ? GETPOSTINT("search_resourceid") : GETPOSTINT("resourceid"); $pid = GETPOST("search_projectid", 'int', 3) ? GETPOST("search_projectid", 'int', 3) : GETPOST("projectid", 'int', 3); $search_status = (GETPOST("search_status", 'aZ09') != '') ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); $type = GETPOST('search_type', 'alphanohtml') ? GETPOST('search_type', 'alphanohtml') : GETPOST('type', 'alphanohtml'); -$year = GETPOST("year", 'int'); -$month = GETPOST("month", 'int'); -$day = GETPOST("day", 'int'); +$year = GETPOSTINT("year"); +$month = GETPOSTINT("month"); +$day = GETPOSTINT("day"); // Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) if (GETPOST('search_actioncode', 'array')) { @@ -80,11 +80,11 @@ $search_title = GETPOST('search_title', 'alpha'); $search_note = GETPOST('search_note', 'alpha'); // $dateselect is a day included inside the event range -$dateselect = dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int'), 'tzuserrel'); -$datestart_dtstart = dol_mktime(0, 0, 0, GETPOST('datestart_dtstartmonth', 'int'), GETPOST('datestart_dtstartday', 'int'), GETPOST('datestart_dtstartyear', 'int'), 'tzuserrel'); -$datestart_dtend = dol_mktime(23, 59, 59, GETPOST('datestart_dtendmonth', 'int'), GETPOST('datestart_dtendday', 'int'), GETPOST('datestart_dtendyear', 'int'), 'tzuserrel'); -$dateend_dtstart = dol_mktime(0, 0, 0, GETPOST('dateend_dtstartmonth', 'int'), GETPOST('dateend_dtstartday', 'int'), GETPOST('dateend_dtstartyear', 'int'), 'tzuserrel'); -$dateend_dtend = dol_mktime(23, 59, 59, GETPOST('dateend_dtendmonth', 'int'), GETPOST('dateend_dtendday', 'int'), GETPOST('dateend_dtendyear', 'int'), 'tzuserrel'); +$dateselect = dol_mktime(0, 0, 0, GETPOSTINT('dateselectmonth'), GETPOSTINT('dateselectday'), GETPOSTINT('dateselectyear'), 'tzuserrel'); +$datestart_dtstart = dol_mktime(0, 0, 0, GETPOSTINT('datestart_dtstartmonth'), GETPOSTINT('datestart_dtstartday'), GETPOSTINT('datestart_dtstartyear'), 'tzuserrel'); +$datestart_dtend = dol_mktime(23, 59, 59, GETPOSTINT('datestart_dtendmonth'), GETPOSTINT('datestart_dtendday'), GETPOSTINT('datestart_dtendyear'), 'tzuserrel'); +$dateend_dtstart = dol_mktime(0, 0, 0, GETPOSTINT('dateend_dtstartmonth'), GETPOSTINT('dateend_dtstartday'), GETPOSTINT('dateend_dtstartyear'), 'tzuserrel'); +$dateend_dtend = dol_mktime(23, 59, 59, GETPOSTINT('dateend_dtendmonth'), GETPOSTINT('dateend_dtendday'), GETPOSTINT('dateend_dtendyear'), 'tzuserrel'); if ($search_status == '' && !GETPOSTISSET('search_status')) { $search_status = ((!getDolGlobalString('AGENDA_DEFAULT_FILTER_STATUS') || $disabledefaultvalues) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS); } @@ -95,7 +95,7 @@ if (empty($mode) && !GETPOSTISSET('mode')) { $filter = GETPOST("search_filter", 'alpha', 3) ? GETPOST("search_filter", 'alpha', 3) : GETPOST("filter", 'alpha', 3); $filtert = GETPOST("search_filtert", "int", 3) ? GETPOST("search_filtert", "int", 3) : GETPOST("filtert", "int", 3); $usergroup = GETPOST("search_usergroup", "int", 3) ? GETPOST("search_usergroup", "int", 3) : GETPOST("usergroup", "int", 3); -$showbirthday = empty($conf->use_javascript_ajax) ? (GETPOST("search_showbirthday", "int") ? GETPOST("search_showbirthday", "int") : GETPOST("showbirthday", "int")) : 1; +$showbirthday = empty($conf->use_javascript_ajax) ? (GETPOSTINT("search_showbirthday") ? GETPOSTINT("search_showbirthday") : GETPOSTINT("showbirthday")) : 1; $search_categ_cus = GETPOST("search_categ_cus", "int", 3) ? GETPOST("search_categ_cus", "int", 3) : 0; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -114,10 +114,10 @@ if (empty($filtert) && !getDolGlobalString('AGENDA_ALL_CALENDARS')) { } // Pagination parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -137,7 +137,7 @@ if (!$sortfield) { } // Security check -$socid = GETPOST("search_socid", 'int') ? GETPOST("search_socid", 'int') : GETPOST("socid", 'int'); +$socid = GETPOSTINT("search_socid") ? GETPOSTINT("search_socid") : GETPOSTINT("socid"); if ($user->socid) { $socid = $user->socid; } @@ -350,41 +350,41 @@ if ($search_title != '') { if ($search_note != '') { $param .= '&search_note='.urlencode($search_note); } -if (GETPOST('datestart_dtstartday', 'int')) { - $param .= '&datestart_dtstartday='.GETPOST('datestart_dtstartday', 'int'); +if (GETPOSTINT('datestart_dtstartday')) { + $param .= '&datestart_dtstartday='.GETPOSTINT('datestart_dtstartday'); } -if (GETPOST('datestart_dtstartmonth', 'int')) { - $param .= '&datestart_dtstartmonth='.GETPOST('datestart_dtstartmonth', 'int'); +if (GETPOSTINT('datestart_dtstartmonth')) { + $param .= '&datestart_dtstartmonth='.GETPOSTINT('datestart_dtstartmonth'); } -if (GETPOST('datestart_dtstartyear', 'int')) { - $param .= '&datestart_dtstartyear='.GETPOST('datestart_dtstartyear', 'int'); +if (GETPOSTINT('datestart_dtstartyear')) { + $param .= '&datestart_dtstartyear='.GETPOSTINT('datestart_dtstartyear'); } -if (GETPOST('datestart_dtendday', 'int')) { - $param .= '&datestart_dtendday='.GETPOST('datestart_dtendday', 'int'); +if (GETPOSTINT('datestart_dtendday')) { + $param .= '&datestart_dtendday='.GETPOSTINT('datestart_dtendday'); } -if (GETPOST('datestart_dtendmonth', 'int')) { - $param .= '&datestart_dtendmonth='.GETPOST('datestart_dtendmonth', 'int'); +if (GETPOSTINT('datestart_dtendmonth')) { + $param .= '&datestart_dtendmonth='.GETPOSTINT('datestart_dtendmonth'); } -if (GETPOST('datestart_dtendyear', 'int')) { - $param .= '&datestart_dtendyear='.GETPOST('datestart_dtendyear', 'int'); +if (GETPOSTINT('datestart_dtendyear')) { + $param .= '&datestart_dtendyear='.GETPOSTINT('datestart_dtendyear'); } -if (GETPOST('dateend_dtstartday', 'int')) { - $param .= '&dateend_dtstartday='.GETPOST('dateend_dtstartday', 'int'); +if (GETPOSTINT('dateend_dtstartday')) { + $param .= '&dateend_dtstartday='.GETPOSTINT('dateend_dtstartday'); } -if (GETPOST('dateend_dtstartmonth', 'int')) { - $param .= '&dateend_dtstartmonth='.GETPOST('dateend_dtstartmonth', 'int'); +if (GETPOSTINT('dateend_dtstartmonth')) { + $param .= '&dateend_dtstartmonth='.GETPOSTINT('dateend_dtstartmonth'); } -if (GETPOST('dateend_dtstartyear', 'int')) { - $param .= '&dateend_dtstartyear='.GETPOST('dateend_dtstartyear', 'int'); +if (GETPOSTINT('dateend_dtstartyear')) { + $param .= '&dateend_dtstartyear='.GETPOSTINT('dateend_dtstartyear'); } -if (GETPOST('dateend_dtendday', 'int')) { - $param .= '&dateend_dtendday='.GETPOST('dateend_dtendday', 'int'); +if (GETPOSTINT('dateend_dtendday')) { + $param .= '&dateend_dtendday='.GETPOSTINT('dateend_dtendday'); } -if (GETPOST('dateend_dtendmonth', 'int')) { - $param .= '&dateend_dtendmonth='.GETPOST('dateend_dtendmonth', 'int'); +if (GETPOSTINT('dateend_dtendmonth')) { + $param .= '&dateend_dtendmonth='.GETPOSTINT('dateend_dtendmonth'); } -if (GETPOST('dateend_dtendyear', 'int')) { - $param .= '&dateend_dtendyear='.GETPOST('dateend_dtendyear', 'int'); +if (GETPOSTINT('dateend_dtendyear')) { + $param .= '&dateend_dtendyear='.GETPOSTINT('dateend_dtendyear'); } if ($optioncss != '') { $param .= '&optioncss='.urlencode($optioncss); @@ -410,7 +410,7 @@ if ($user->hasRight('agenda', 'allactions', 'delete')) { if (isModEnabled('category') && $user->hasRight('agenda', 'myactions', 'create')) { $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index f226da960c4..83ac43bc4e2 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -46,7 +46,7 @@ if (!isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) { $action = GETPOST('action', 'aZ09'); -$disabledefaultvalues = GETPOST('disabledefaultvalues', 'int'); +$disabledefaultvalues = GETPOSTINT('disabledefaultvalues'); $filter = GETPOST("search_filter", 'alpha', 3) ? GETPOST("search_filter", 'alpha', 3) : GETPOST("filter", 'alpha', 3); $filtert = GETPOST("search_filtert", "int", 3) ? GETPOST("search_filtert", "int", 3) : GETPOST("filtert", "int", 3); @@ -64,11 +64,11 @@ if (empty($filtert) && !getDolGlobalString('AGENDA_ALL_CALENDARS')) { // Sorting $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $offset = $limit * $page; if (!$sortorder) { $sortorder = "ASC"; @@ -79,7 +79,7 @@ if (!$sortfield) { // Security check -$socid = GETPOST("search_socid", "int") ? GETPOST("search_socid", "int") : GETPOST("socid", "int"); +$socid = GETPOSTINT("search_socid") ? GETPOSTINT("search_socid") : GETPOSTINT("socid"); if ($user->socid) { $socid = $user->socid; } @@ -100,15 +100,15 @@ if (!$user->hasRight('agenda', 'allactions', 'read') || $filter == 'mine') { // } $mode = 'show_pertype'; -$resourceid = GETPOST("search_resourceid", "int") ? GETPOST("search_resourceid", "int") : GETPOST("resourceid", "int"); -$year = GETPOST("year", "int") ? GETPOST("year", "int") : date("Y"); -$month = GETPOST("month", "int") ? GETPOST("month", "int") : date("m"); -$week = GETPOST("week", "int") ? GETPOST("week", "int") : date("W"); -$day = GETPOST("day", "int") ? GETPOST("day", "int") : date("d"); +$resourceid = GETPOSTINT("search_resourceid") ? GETPOSTINT("search_resourceid") : GETPOSTINT("resourceid"); +$year = GETPOSTINT("year") ? GETPOSTINT("year") : date("Y"); +$month = GETPOSTINT("month") ? GETPOSTINT("month") : date("m"); +$week = GETPOSTINT("week") ? GETPOSTINT("week") : date("W"); +$day = GETPOSTINT("day") ? GETPOSTINT("day") : date("d"); $pid = GETPOSTISSET("search_projectid") ? GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3); $status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); $type = GETPOSTISSET("search_type") ? GETPOST("search_type", 'alpha') : GETPOST("type", 'alpha'); -$maxprint = ((GETPOST("maxprint", 'int') != '') ? GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); +$maxprint = ((GETPOSTINT("maxprint") != '') ? GETPOSTINT("maxprint") : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') // Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) @@ -121,19 +121,19 @@ if (GETPOST('search_actioncode', 'array:aZ09')) { $actioncode = GETPOST("search_actioncode", "alpha", 3) ? GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode", "alpha") == '0' ? '0' : ((!getDolGlobalString('AGENDA_DEFAULT_FILTER_TYPE') || $disabledefaultvalues) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE)); } -$dateselect = dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int')); +$dateselect = dol_mktime(0, 0, 0, GETPOSTINT('dateselectmonth'), GETPOSTINT('dateselectday'), GETPOSTINT('dateselectyear')); if ($dateselect > 0) { - $day = GETPOST('dateselectday', 'int'); - $month = GETPOST('dateselectmonth', 'int'); - $year = GETPOST('dateselectyear', 'int'); + $day = GETPOSTINT('dateselectday'); + $month = GETPOSTINT('dateselectmonth'); + $year = GETPOSTINT('dateselectyear'); } // working hours $tmp = !getDolGlobalString('MAIN_DEFAULT_WORKING_HOURS') ? '9-18' : $conf->global->MAIN_DEFAULT_WORKING_HOURS; $tmp = str_replace(' ', '', $tmp); // FIX 7533 $tmparray = explode('-', $tmp); -$begin_h = GETPOST('begin_h', 'int') != '' ? GETPOST('begin_h', 'int') : ($tmparray[0] != '' ? $tmparray[0] : 9); -$end_h = GETPOST('end_h', 'int') ? GETPOST('end_h', 'int') : ($tmparray[1] != '' ? $tmparray[1] : 18); +$begin_h = GETPOSTINT('begin_h') != '' ? GETPOSTINT('begin_h') : ($tmparray[0] != '' ? $tmparray[0] : 9); +$end_h = GETPOSTINT('end_h') ? GETPOSTINT('end_h') : ($tmparray[1] != '' ? $tmparray[1] : 18); if ($begin_h < 0 || $begin_h > 23) { $begin_h = 9; } diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index a3ae68e6bd3..2201fe9d360 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -47,7 +47,7 @@ if (!isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) { $action = GETPOST('action', 'aZ09'); -$disabledefaultvalues = GETPOST('disabledefaultvalues', 'int'); +$disabledefaultvalues = GETPOSTINT('disabledefaultvalues'); $filter = GETPOST("search_filter", 'alpha', 3) ? GETPOST("search_filter", 'alpha', 3) : GETPOST("filter", 'alpha', 3); $filtert = GETPOST("search_filtert", "int", 3) ? GETPOST("search_filtert", "int", 3) : GETPOST("filtert", "int", 3); @@ -64,11 +64,11 @@ $showbirthday = 0; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $offset = $limit * $page; if (!$sortorder) { $sortorder = "ASC"; @@ -77,7 +77,7 @@ if (!$sortfield) { $sortfield = "a.datec"; } -$socid = GETPOST("search_socid", "int") ? GETPOST("search_socid", "int") : GETPOST("socid", "int"); +$socid = GETPOSTINT("search_socid") ? GETPOSTINT("search_socid") : GETPOSTINT("socid"); if ($user->socid) { $socid = $user->socid; } @@ -97,15 +97,15 @@ if (!$user->hasRight('agenda', 'allactions', 'read') || $filter == 'mine') { // } $mode = 'show_peruser'; -$resourceid = GETPOST("search_resourceid", "int") ? GETPOST("search_resourceid", "int") : GETPOST("resourceid", "int"); -$year = GETPOST("year", "int") ? GETPOST("year", "int") : date("Y"); -$month = GETPOST("month", "int") ? GETPOST("month", "int") : date("m"); -$week = GETPOST("week", "int") ? GETPOST("week", "int") : date("W"); -$day = GETPOST("day", "int") ? GETPOST("day", "int") : date("d"); +$resourceid = GETPOSTINT("search_resourceid") ? GETPOSTINT("search_resourceid") : GETPOSTINT("resourceid"); +$year = GETPOSTINT("year") ? GETPOSTINT("year") : date("Y"); +$month = GETPOSTINT("month") ? GETPOSTINT("month") : date("m"); +$week = GETPOSTINT("week") ? GETPOSTINT("week") : date("W"); +$day = GETPOSTINT("day") ? GETPOSTINT("day") : date("d"); $pid = GETPOSTISSET("search_projectid") ? GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3); $status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo', 'na' or -1 $type = GETPOSTISSET("search_type") ? GETPOST("search_type", 'alpha') : GETPOST("type", 'alpha'); -$maxprint = ((GETPOST("maxprint", 'int') != '') ? GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); +$maxprint = ((GETPOSTINT("maxprint") != '') ? GETPOSTINT("maxprint") : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $search_categ_cus = GETPOST("search_categ_cus", "int", 3) ? GETPOST("search_categ_cus", "int", 3) : 0; // Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) @@ -118,18 +118,18 @@ if (GETPOST('search_actioncode', 'array:aZ09')) { $actioncode = GETPOST("search_actioncode", "alpha", 3) ? GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode", "alpha") == '0' ? '0' : ((!getDolGlobalString('AGENDA_DEFAULT_FILTER_TYPE') || $disabledefaultvalues) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE)); } -$dateselect = dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int')); +$dateselect = dol_mktime(0, 0, 0, GETPOSTINT('dateselectmonth'), GETPOSTINT('dateselectday'), GETPOSTINT('dateselectyear')); if ($dateselect > 0) { - $day = GETPOST('dateselectday', 'int'); - $month = GETPOST('dateselectmonth', 'int'); - $year = GETPOST('dateselectyear', 'int'); + $day = GETPOSTINT('dateselectday'); + $month = GETPOSTINT('dateselectmonth'); + $year = GETPOSTINT('dateselectyear'); } $tmp = !getDolGlobalString('MAIN_DEFAULT_WORKING_HOURS') ? '9-18' : $conf->global->MAIN_DEFAULT_WORKING_HOURS; $tmp = str_replace(' ', '', $tmp); // FIX 7533 $tmparray = explode('-', $tmp); -$begin_h = GETPOST('begin_h', 'int') != '' ? GETPOST('begin_h', 'int') : ($tmparray[0] != '' ? $tmparray[0] : 9); -$end_h = GETPOST('end_h', 'int') ? GETPOST('end_h', 'int') : ($tmparray[1] != '' ? $tmparray[1] : 18); +$begin_h = GETPOSTINT('begin_h') != '' ? GETPOSTINT('begin_h') : ($tmparray[0] != '' ? $tmparray[0] : 9); +$end_h = GETPOSTINT('end_h') ? GETPOSTINT('end_h') : ($tmparray[1] != '' ? $tmparray[1] : 18); if ($begin_h < 0 || $begin_h > 23) { $begin_h = 9; } @@ -143,8 +143,8 @@ if ($end_h <= $begin_h) { $tmp = !getDolGlobalString('MAIN_DEFAULT_WORKING_DAYS') ? '1-5' : $conf->global->MAIN_DEFAULT_WORKING_DAYS; $tmp = str_replace(' ', '', $tmp); // FIX 7533 $tmparray = explode('-', $tmp); -$begin_d = GETPOST('begin_d', 'int') ? GETPOST('begin_d', 'int') : ($tmparray[0] != '' ? $tmparray[0] : 1); -$end_d = GETPOST('end_d', 'int') ? GETPOST('end_d', 'int') : ($tmparray[1] != '' ? $tmparray[1] : 5); +$begin_d = GETPOSTINT('begin_d') ? GETPOSTINT('begin_d') : ($tmparray[0] != '' ? $tmparray[0] : 1); +$end_d = GETPOSTINT('end_d') ? GETPOSTINT('end_d') : ($tmparray[1] != '' ? $tmparray[1] : 5); if ($begin_d < 1 || $begin_d > 7) { $begin_d = 1; } diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 5ef15ca226a..712c3ee0ccc 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -35,14 +35,14 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; $langs->loadLangs(array("agenda", "commercial")); $action = GETPOST('action', 'aZ09'); -$month = GETPOST('month', 'int'); -$year = GETPOST('year', 'int'); +$month = GETPOSTINT('month'); +$year = GETPOSTINT('year'); $optioncss = GETPOST('optioncss', 'alpha'); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index ac3c2b57bbb..72357539c84 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -91,12 +91,12 @@ if (isModEnabled('notification')) { $action = GETPOST('action', 'aZ09'); -$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); +$id = (GETPOSTINT('socid') ? GETPOSTINT('socid') : GETPOSTINT('id')); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -173,7 +173,7 @@ if (empty($reshook)) { // Payment terms of the settlement if ($action == 'setconditions' && $user->hasRight('societe', 'creer')) { $object->fetch($id); - $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'), GETPOST('cond_reglement_id_deposit_percent', 'alpha')); + $result = $object->setPaymentTerms(GETPOSTINT('cond_reglement_id'), GETPOSTINT('cond_reglement_id_deposit_percent')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -182,7 +182,7 @@ if (empty($reshook)) { // Payment mode if ($action == 'setmode' && $user->hasRight('societe', 'creer')) { $object->fetch($id); - $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); + $result = $object->setPaymentMethods(GETPOSTINT('mode_reglement_id')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -200,7 +200,7 @@ if (empty($reshook)) { // Bank account if ($action == 'setbankaccount' && $user->hasRight('societe', 'creer')) { $object->fetch($id); - $result = $object->setBankAccount(GETPOST('fk_account', 'int')); + $result = $object->setBankAccount(GETPOSTINT('fk_account')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -209,7 +209,7 @@ if (empty($reshook)) { // customer preferred shipping method if ($action == 'setshippingmethod' && $user->hasRight('societe', 'creer')) { $object->fetch($id); - $result = $object->setShippingMethod(GETPOST('shipping_method_id', 'int')); + $result = $object->setShippingMethod(GETPOSTINT('shipping_method_id')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -297,7 +297,7 @@ if (empty($reshook)) { // warehouse if ($action == 'setwarehouse' && $user->hasRight('societe', 'creer')) { - $result = $object->setWarehouse(GETPOST('fk_warehouse', 'int')); + $result = $object->setWarehouse(GETPOSTINT('fk_warehouse')); } } diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 255ab70afa7..ca78aa8f9c9 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -32,7 +32,7 @@ $langs->load("companies"); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (!$sortorder) { $sortorder = "ASC"; } @@ -42,7 +42,7 @@ if (!$sortfield) { if ($page < 0) { $page = 0; } -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $offset = $limit * $page; $type = GETPOST('type', 'alpha'); @@ -53,7 +53,7 @@ $contactname = GETPOST('contactname'); $begin = GETPOST('begin', 'alpha'); // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $action = ''; $socid = $user->socid; diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 843c0ceaf35..67823d4b12f 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -54,10 +54,10 @@ $hookmanager->initHooks(array('commercialindex')); $langs->loadLangs(array("boxes", "commercial", "contracts", "orders", "propal", "supplier_proposal")); $action = GETPOST('action', 'aZ09'); -$bid = GETPOST('bid', 'int'); +$bid = GETPOSTINT('bid'); // Securite access client -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if (isset($user->socid) && $user->socid > 0) { $action = ''; $socid = $user->socid; diff --git a/htdocs/comm/mailing/advtargetemailing.php b/htdocs/comm/mailing/advtargetemailing.php index 73fc1826706..4742d6b66e7 100644 --- a/htdocs/comm/mailing/advtargetemailing.php +++ b/htdocs/comm/mailing/advtargetemailing.php @@ -44,10 +44,10 @@ if (isModEnabled('categorie')) { } // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -62,12 +62,12 @@ if (!$sortfield) { } $id = GETPOSTINT('id'); -$rowid = GETPOST('rowid', 'int'); +$rowid = GETPOSTINT('rowid'); $action = GETPOST('action', 'aZ09'); $search_nom = GETPOST("search_nom"); $search_prenom = GETPOST("search_prenom"); $search_email = GETPOST("search_email"); -$template_id = GETPOST('template_id', 'int'); +$template_id = GETPOSTINT('template_id'); // Do we click on purge search criteria ? if (GETPOST('button_removefilter_x', 'alpha')) { @@ -134,14 +134,14 @@ if ($action == 'add') { $dtarr = array(); $dtarr = explode('_', $key); if (!array_key_exists('options_'.$dtarr[1].'_st_dt', $array_query)) { - $array_query['options_'.$dtarr[1].'_st_dt'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_st_dtmonth', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtday', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtyear', 'int')); + $array_query['options_'.$dtarr[1].'_st_dt'] = dol_mktime(0, 0, 0, GETPOSTINT('options_'.$dtarr[1].'_st_dtmonth'), GETPOSTINT('options_'.$dtarr[1].'_st_dtday'), GETPOSTINT('options_'.$dtarr[1].'_st_dtyear')); } } elseif (preg_match("/end_dt/", $key)) { // Special case for end date come with 3 inputs day, month, year $dtarr = array(); $dtarr = explode('_', $key); if (!array_key_exists('options_'.$dtarr[1].'_end_dt', $array_query)) { - $array_query['options_'.$dtarr[1].'_end_dt'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_end_dtmonth', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtday', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtyear', 'int')); + $array_query['options_'.$dtarr[1].'_end_dt'] = dol_mktime(0, 0, 0, GETPOSTINT('options_'.$dtarr[1].'_end_dtmonth'), GETPOSTINT('options_'.$dtarr[1].'_end_dtday'), GETPOSTINT('options_'.$dtarr[1].'_end_dtyear')); } } else { $array_query[$key] = GETPOST($key); @@ -154,14 +154,14 @@ if ($action == 'add') { $dtarr = array(); $dtarr = explode('_', $key); if (!array_key_exists('options_'.$dtarr[1].'_st_dt_cnct', $array_query)) { - $array_query['options_'.$dtarr[1].'_st_dt_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_st_dtmonth_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtday_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtyear_cnct', 'int')); + $array_query['options_'.$dtarr[1].'_st_dt_cnct'] = dol_mktime(0, 0, 0, GETPOSTINT('options_'.$dtarr[1].'_st_dtmonth_cnct'), GETPOSTINT('options_'.$dtarr[1].'_st_dtday_cnct'), GETPOSTINT('options_'.$dtarr[1].'_st_dtyear_cnct')); } } elseif (preg_match("/end_dt/", $key)) { // Special case for end date come with 3 inputs day, month, year $dtarr = array(); $dtarr = explode('_', $key); if (!array_key_exists('options_'.$dtarr[1].'_end_dt_cnct', $array_query)) { - $array_query['options_'.$dtarr[1].'_end_dt_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_end_dtmonth_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtday_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtyear_cnct', 'int')); + $array_query['options_'.$dtarr[1].'_end_dt_cnct'] = dol_mktime(0, 0, 0, GETPOSTINT('options_'.$dtarr[1].'_end_dtmonth_cnct'), GETPOSTINT('options_'.$dtarr[1].'_end_dtday_cnct'), GETPOSTINT('options_'.$dtarr[1].'_end_dtyear_cnct')); } } else { $array_query[$key] = GETPOST($key); @@ -185,7 +185,7 @@ if ($action == 'add') { if ($key == $date_key) { $dt = GETPOST($date_key); if (!empty($dt)) { - $array_query[$key] = dol_mktime(0, 0, 0, GETPOST($date_key.'month', 'int'), GETPOST($date_key.'day', 'int'), GETPOST($date_key.'year', 'int')); + $array_query[$key] = dol_mktime(0, 0, 0, GETPOSTINT($date_key.'month'), GETPOSTINT($date_key.'day'), GETPOSTINT($date_key.'year')); } else { $array_query[$key] = ''; } @@ -285,14 +285,14 @@ if ($action == 'savefilter' || $action == 'createfilter') { $dtarr = array(); $dtarr = explode('_', $key); if (!array_key_exists('options_'.$dtarr[1].'_st_dt', $array_query)) { - $array_query['options_'.$dtarr[1].'_st_dt'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_st_dtmonth', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtday', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtyear', 'int')); + $array_query['options_'.$dtarr[1].'_st_dt'] = dol_mktime(0, 0, 0, GETPOSTINT('options_'.$dtarr[1].'_st_dtmonth'), GETPOSTINT('options_'.$dtarr[1].'_st_dtday'), GETPOSTINT('options_'.$dtarr[1].'_st_dtyear')); } } elseif (preg_match("/end_dt/", $key)) { // Special case for end date come with 3 inputs day, month, year $dtarr = array(); $dtarr = explode('_', $key); if (!array_key_exists('options_'.$dtarr[1].'_end_dt', $array_query)) { - $array_query['options_'.$dtarr[1].'_end_dt'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_end_dtmonth', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtday', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtyear', 'int')); + $array_query['options_'.$dtarr[1].'_end_dt'] = dol_mktime(0, 0, 0, GETPOSTINT('options_'.$dtarr[1].'_end_dtmonth'), GETPOSTINT('options_'.$dtarr[1].'_end_dtday'), GETPOSTINT('options_'.$dtarr[1].'_end_dtyear')); // print $array_query['options_'.$dtarr[1].'_end_dt']; // 01/02/1013=1361228400 } @@ -306,14 +306,14 @@ if ($action == 'savefilter' || $action == 'createfilter') { $dtarr = array(); $dtarr = explode('_', $key); if (!array_key_exists('options_'.$dtarr[1].'_st_dt_cnct', $array_query)) { - $array_query['options_'.$dtarr[1].'_st_dt_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_st_dtmonth_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtday_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtyear_cnct', 'int')); + $array_query['options_'.$dtarr[1].'_st_dt_cnct'] = dol_mktime(0, 0, 0, GETPOSTINT('options_'.$dtarr[1].'_st_dtmonth_cnct'), GETPOSTINT('options_'.$dtarr[1].'_st_dtday_cnct'), GETPOSTINT('options_'.$dtarr[1].'_st_dtyear_cnct')); } } elseif (preg_match("/end_dt/", $key)) { // Special case for end date come with 3 inputs day, month, year $dtarr = array(); $dtarr = explode('_', $key); if (!array_key_exists('options_'.$dtarr[1].'_end_dt_cnct', $array_query)) { - $array_query['options_'.$dtarr[1].'_end_dt_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_end_dtmonth_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtday_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtyear_cnct', 'int')); + $array_query['options_'.$dtarr[1].'_end_dt_cnct'] = dol_mktime(0, 0, 0, GETPOSTINT('options_'.$dtarr[1].'_end_dtmonth_cnct'), GETPOSTINT('options_'.$dtarr[1].'_end_dtday_cnct'), GETPOSTINT('options_'.$dtarr[1].'_end_dtyear_cnct')); // print $array_query['cnct_options_'.$dtarr[1].'_end_dt']; // 01/02/1013=1361228400 } @@ -339,7 +339,7 @@ if ($action == 'savefilter' || $action == 'createfilter') { if ($key == $date_key) { $dt = GETPOST($date_key); if (!empty($dt)) { - $array_query[$key] = dol_mktime(0, 0, 0, GETPOST($date_key.'month', 'int'), GETPOST($date_key.'day', 'int'), GETPOST($date_key.'year', 'int')); + $array_query[$key] = dol_mktime(0, 0, 0, GETPOSTINT($date_key.'month'), GETPOSTINT($date_key.'day'), GETPOSTINT($date_key.'year')); } else { $array_query[$key] = ''; } diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 80eb874e179..639a655efb7 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -42,7 +42,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; // Load translation files required by the page $langs->loadLangs(array("mails", "admin")); -$id = (GETPOST('mailid', 'int') ? GETPOST('mailid', 'int') : GETPOST('id', 'int')); +$id = (GETPOSTINT('mailid') ? GETPOSTINT('mailid') : GETPOSTINT('id')); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 4dac837e45b..d0b95b32522 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -38,10 +38,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; $langs->loadLangs(array("mails", "admin")); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -55,14 +55,14 @@ if (!$sortorder) { $sortorder = "DESC,ASC"; } -$id = GETPOST('id', 'int'); -$rowid = GETPOST('rowid', 'int'); +$id = GETPOSTINT('id'); +$rowid = GETPOSTINT('rowid'); $action = GETPOST('action', 'aZ09'); $search_lastname = GETPOST("search_lastname", 'alphanohtml'); $search_firstname = GETPOST("search_firstname", 'alphanohtml'); $search_email = GETPOST("search_email", 'alphanohtml'); $search_other = GETPOST("search_other", 'alphanohtml'); -$search_dest_status = GETPOST('search_dest_status', 'int'); +$search_dest_status = GETPOSTINT('search_dest_status'); // Search modules dirs $modulesdir = dolGetModulesDirs('/mailings'); @@ -145,7 +145,7 @@ if ($action == 'add' && $user->hasRight('mailing', 'creer')) { // Add recipient } } -if (GETPOST('clearlist', 'int') && $user->hasRight('mailing', 'creer')) { +if (GETPOSTINT('clearlist') && $user->hasRight('mailing', 'creer')) { // Loading Class $obj = new MailingTargets($db); $obj->clear_target($id); @@ -155,7 +155,7 @@ if (GETPOST('clearlist', 'int') && $user->hasRight('mailing', 'creer')) { */ } -if (GETPOST('exportcsv', 'int') && $user->hasRight('mailing', 'lire')) { +if (GETPOSTINT('exportcsv') && $user->hasRight('mailing', 'lire')) { $completefilename = 'targets_emailing'.$object->id.'_'.dol_print_date(dol_now(), 'dayhourlog').'.csv'; header('Content-Type: text/csv'); header('Content-Disposition: attachment;filename='.$completefilename); diff --git a/htdocs/comm/mailing/info.php b/htdocs/comm/mailing/info.php index 12ca330896b..0bf7e9cb4ad 100644 --- a/htdocs/comm/mailing/info.php +++ b/htdocs/comm/mailing/info.php @@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/emailing.lib.php'; -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); // Load translation files required by the page $langs->load("mails"); diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index 0383ee5a5a1..082c75b6fe3 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -32,7 +32,7 @@ $langs->load('mails'); // Get Parameters $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list @@ -42,10 +42,10 @@ $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always ' $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -314,7 +314,7 @@ $arrayofmassactions = array( if (!empty($permissiontodelete)) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/comm/mailing/note.php b/htdocs/comm/mailing/note.php index 19e623d519b..6b7a5153bd7 100644 --- a/htdocs/comm/mailing/note.php +++ b/htdocs/comm/mailing/note.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/emailing.lib.php'; $langs->loadLangs(array("mails", "mailing", "companies")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index d2729885b96..c9a4dd839ed 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -34,15 +34,15 @@ $langs->loadLangs(array('orders', 'companies')); $action = GETPOST('action', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); -$id = GETPOST('id', 'int'); -$_socid = GETPOST("id", 'int'); +$id = GETPOSTINT('id'); +$_socid = GETPOSTINT("id"); // Security check if ($user->socid > 0) { $_socid = $user->socid; } // Security check -$socid = GETPOST("socid", 'int'); +$socid = GETPOSTINT("socid"); if ($user->socid > 0) { $action = ''; $id = $user->socid; diff --git a/htdocs/comm/propal/agenda.php b/htdocs/comm/propal/agenda.php index bcf710dac81..7a6f4d4d6e1 100644 --- a/htdocs/comm/propal/agenda.php +++ b/htdocs/comm/propal/agenda.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $langs->loadLangs(array("propal", "other")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); @@ -50,10 +50,10 @@ if (GETPOST('actioncode', 'array')) { $search_rowid = GETPOST('search_rowid'); $search_agenda_label = GETPOST('search_agenda_label'); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index f827bc3e6ae..d22278ad585 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -72,24 +72,24 @@ if (isModEnabled('margin')) { $error = 0; -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $origin = GETPOST('origin', 'alpha'); -$originid = GETPOST('originid', 'int'); +$originid = GETPOSTINT('originid'); $confirm = GETPOST('confirm', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page -$lineid = GETPOST('lineid', 'int'); -$contactid = GETPOST('contactid', 'int'); -$projectid = GETPOST('projectid', 'int'); -$rank = (GETPOST('rank', 'int') > 0) ? GETPOST('rank', 'int') : -1; +$lineid = GETPOSTINT('lineid'); +$contactid = GETPOSTINT('contactid'); +$projectid = GETPOSTINT('projectid'); +$rank = (GETPOSTINT('rank') > 0) ? GETPOSTINT('rank') : -1; // PDF -$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0)); -$hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0)); -$hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0)); +$hidedetails = (GETPOSTINT('hidedetails') ? GETPOSTINT('hidedetails') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0)); +$hidedesc = (GETPOSTINT('hidedesc') ? GETPOSTINT('hidedesc') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0)); +$hideref = (GETPOSTINT('hideref') ? GETPOSTINT('hideref') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0)); $object = new Propal($db); $extrafields = new ExtraFields($db); @@ -193,9 +193,9 @@ if (empty($reshook)) { 12, 0, 0, - GETPOST('date_deliverymonth', 'int'), - GETPOST('date_deliveryday', 'int'), - GETPOST('date_deliveryyear', 'int') + GETPOSTINT('date_deliverymonth'), + GETPOSTINT('date_deliveryday'), + GETPOSTINT('date_deliveryyear') ); $date_delivery_old = $object->delivery_date; if (!empty($date_delivery_old) && !empty($date_delivery)) { @@ -224,7 +224,7 @@ if (empty($reshook)) { } } - $result = $object->createFromClone($user, $socid, (GETPOSTISSET('entity') ? GETPOST('entity', 'int') : null), (GETPOST('update_prices', 'aZ') ? true : false), (GETPOST('update_desc', 'aZ') ? true : false)); + $result = $object->createFromClone($user, $socid, (GETPOSTISSET('entity') ? GETPOSTINT('entity') : null), (GETPOSTINT('update_prices') ? true : false), (GETPOSTINT('update_desc') ? true : false)); if ($result > 0) { $warningMsgLineList = array(); // check all product lines are to sell otherwise add a warning message for each product line is not to sell @@ -302,7 +302,7 @@ if (empty($reshook)) { exit(); } elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) { // Validation - $idwarehouse = GETPOST('idwarehouse', 'int'); + $idwarehouse = GETPOSTINT('idwarehouse'); $result = $object->valid($user); if ($result > 0 && getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE')) { $result = $object->closeProposal($user, $object::STATUS_SIGNED); @@ -338,7 +338,7 @@ if (empty($reshook)) { } } } elseif ($action == 'setdate' && $usercancreate) { - $datep = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); + $datep = dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); if (empty($datep)) { $error++; @@ -376,7 +376,7 @@ if (empty($reshook)) { } } } elseif ($action == 'setecheance' && $usercancreate) { - $result = $object->set_echeance($user, dol_mktime(12, 0, 0, GETPOST('echmonth', 'int'), GETPOST('echday', 'int'), GETPOST('echyear', 'int'))); + $result = $object->set_echeance($user, dol_mktime(12, 0, 0, GETPOSTINT('echmonth'), GETPOSTINT('echday'), GETPOSTINT('echyear'))); if ($result >= 0) { if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) { $outputlangs = $langs; @@ -403,7 +403,7 @@ if (empty($reshook)) { setEventMessages($object->error, $object->errors, 'errors'); } } elseif ($action == 'setdate_livraison' && $usercancreate) { - $result = $object->setDeliveryDate($user, dol_mktime(12, 0, 0, GETPOST('date_livraisonmonth', 'int'), GETPOST('date_livraisonday', 'int'), GETPOST('date_livraisonyear', 'int'))); + $result = $object->setDeliveryDate($user, dol_mktime(12, 0, 0, GETPOSTINT('date_livraisonmonth'), GETPOSTINT('date_livraisonday'), GETPOSTINT('date_livraisonyear'))); if ($result < 0) { dol_print_error($db, $object->error); } @@ -415,7 +415,7 @@ if (empty($reshook)) { } } elseif ($action == 'set_incoterms' && isModEnabled('incoterm') && $usercancreate) { // Set incoterm - $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); + $result = $object->setIncoterms(GETPOSTINT('incoterm_id'), GETPOSTINT('location_incoterms')); } elseif ($action == 'add' && $usercancreate) { // Create proposal $object->socid = $socid; @@ -423,7 +423,7 @@ if (empty($reshook)) { $datep = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $date_delivery = dol_mktime(12, 0, 0, GETPOST('date_livraisonmonth'), GETPOST('date_livraisonday'), GETPOST('date_livraisonyear')); - $duration = GETPOST('duree_validite', 'int'); + $duration = GETPOSTINT('duree_validite'); if (empty($datep)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DatePropal")), null, 'errors'); @@ -448,7 +448,7 @@ if (empty($reshook)) { // If we select proposal to clone during creation (when option PROPAL_CLONE_ON_CREATE_PAGE is on) if (GETPOST('createmode') == 'copy' && GETPOST('copie_propal')) { - if ($object->fetch(GETPOST('copie_propal', 'int')) > 0) { + if ($object->fetch(GETPOSTINT('copie_propal')) > 0) { $object->ref = GETPOST('ref'); $object->datep = $datep; $object->date = $datep; @@ -733,16 +733,16 @@ if (empty($reshook)) { } } elseif ($action == 'confirm_closeas' && $usercanclose && !GETPOST('cancel', 'alpha')) { // Close proposal - if (!(GETPOST('statut', 'int') > 0)) { + if (!(GETPOSTINT('statut') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors'); $action = 'closeas'; - } elseif (GETPOST('statut', 'int') == $object::STATUS_SIGNED || GETPOST('statut', 'int') == $object::STATUS_NOTSIGNED) { + } elseif (GETPOSTINT('statut') == $object::STATUS_SIGNED || GETPOSTINT('statut') == $object::STATUS_NOTSIGNED) { $locationTarget = ''; // prevent browser refresh from closing proposal several times if ($object->statut == $object::STATUS_VALIDATED || (getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE') && $object->statut == $object::STATUS_DRAFT)) { $db->begin(); - $result = $object->closeProposal($user, GETPOST('statut', 'int'), GETPOST('note_private', 'restricthtml')); + $result = $object->closeProposal($user, GETPOSTINT('statut'), GETPOSTINT('note_private')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; @@ -756,19 +756,19 @@ if (empty($reshook)) { $deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id); if ( - !$error && GETPOST('statut', 'int') == $object::STATUS_SIGNED && GETPOST('generate_deposit', 'alpha') == 'on' + !$error && GETPOSTINT('statut') == $object::STATUS_SIGNED && GETPOSTINT('generate_deposit') == 'on' && !empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && $user->hasRight('facture', 'creer') ) { require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; - $date = dol_mktime(0, 0, 0, GETPOST('datefmonth', 'int'), GETPOST('datefday', 'int'), GETPOST('datefyear', 'int')); + $date = dol_mktime(0, 0, 0, GETPOSTINT('datefmonth'), GETPOSTINT('datefday'), GETPOSTINT('datefyear')); $forceFields = array(); if (GETPOSTISSET('date_pointoftax')) { - $forceFields['date_pointoftax'] = dol_mktime(0, 0, 0, GETPOST('date_pointoftaxmonth', 'int'), GETPOST('date_pointoftaxday', 'int'), GETPOST('date_pointoftaxyear', 'int')); + $forceFields['date_pointoftax'] = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear')); } - $deposit = Facture::createDepositFromOrigin($object, $date, GETPOST('cond_reglement_id', 'int'), $user, 0, GETPOST('validate_generated_deposit', 'alpha') == 'on', $forceFields); + $deposit = Facture::createDepositFromOrigin($object, $date, GETPOSTINT('cond_reglement_id'), $user, 0, GETPOSTINT('validate_generated_deposit') == 'on', $forceFields); if ($deposit) { setEventMessage('DepositGenerated'); @@ -936,9 +936,9 @@ if (empty($reshook)) { $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } elseif ($action == "setabsolutediscount" && $usercancreate) { - if (GETPOST("remise_id", "int")) { + if (GETPOSTINT("remise_id")) { if ($object->id > 0) { - $result = $object->insert_discount(GETPOST("remise_id", "int")); + $result = $object->insert_discount(GETPOSTINT("remise_id")); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -1020,7 +1020,7 @@ if (empty($reshook)) { if ($prod_entry_mode == 'free') { $idprod = 0; } else { - $idprod = GETPOST('idprod', 'int'); + $idprod = GETPOSTINT('idprod'); if (getDolGlobalString('MAIN_DISABLE_FREE_LINES') && $idprod <= 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ProductOrService")), null, 'errors'); @@ -1159,7 +1159,7 @@ if (empty($reshook)) { // If price per quantity if ($prod->prices_by_qty[0]) { // yes, this product has some prices per quantity // Search the correct price into loaded array product_price_by_qty using id of array retrieved into POST['pqp']. - $pqp = GETPOST('pbq', 'int'); + $pqp = GETPOSTINT('pbq'); // Search price into product_price_by_qty from $prod->id foreach ($prod->prices_by_qty_list[0] as $priceforthequantityarray) { @@ -1180,7 +1180,7 @@ if (empty($reshook)) { // If price per quantity and customer if ($prod->prices_by_qty[$object->thirdparty->price_level]) { // yes, this product has some prices per quantity // Search the correct price into loaded array product_price_by_qty using id of array retrieved into POST['pqp']. - $pqp = GETPOST('pbq', 'int'); + $pqp = GETPOSTINT('pbq'); // Search price into product_price_by_qty from $prod->id foreach ($prod->prices_by_qty_list[$object->thirdparty->price_level] as $priceforthequantityarray) { @@ -1510,13 +1510,13 @@ if (empty($reshook)) { } // Define special_code for special lines - $special_code = GETPOST('special_code', 'int'); + $special_code = GETPOSTINT('special_code'); if (!GETPOST('qty')) { $special_code = 3; } // Check minimum price - $productid = GETPOST('productid', 'int'); + $productid = GETPOSTINT('productid'); if (!empty($productid)) { $product = new Product($db); $res = $product->fetch($productid); @@ -1566,7 +1566,7 @@ if (empty($reshook)) { if (!$user->hasRight('margins', 'creer')) { foreach ($object->lines as &$line) { - if ($line->id == GETPOST('lineid', 'int')) { + if ($line->id == GETPOSTINT('lineid')) { $fournprice = $line->fk_fournprice; $buyingprice = $line->pa_ht; break; @@ -1583,7 +1583,7 @@ if (empty($reshook)) { $price_base_type = 'TTC'; } - $result = $object->updateline(GETPOST('lineid', 'int'), $pu, $qty, $remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, $description, $price_base_type, $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $date_start, $date_end, $array_options, GETPOST("units"), $pu_ht_devise); + $result = $object->updateline(GETPOSTINT('lineid'), $pu, $qty, $remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, $description, $price_base_type, $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $date_start, $date_end, $array_options, GETPOST("units"), $pu_ht_devise); if ($result >= 0) { $db->commit(); @@ -1640,38 +1640,38 @@ if (empty($reshook)) { exit(); } elseif ($action == 'classin' && $usercancreate) { // Set project - $object->setProject(GETPOST('projectid', 'int')); + $object->setProject(GETPOSTINT('projectid')); } elseif ($action == 'setavailability' && $usercancreate) { // Delivery time - $result = $object->set_availability($user, GETPOST('availability_id', 'int')); + $result = $object->set_availability($user, GETPOSTINT('availability_id')); } elseif ($action == 'setdemandreason' && $usercancreate) { // Origin of the commercial proposal - $result = $object->set_demand_reason($user, GETPOST('demand_reason_id', 'int')); + $result = $object->set_demand_reason($user, GETPOSTINT('demand_reason_id')); } elseif ($action == 'setconditions' && $usercancreate) { // Terms of payment - $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'), GETPOST('cond_reglement_id_deposit_percent', 'alpha')); + $result = $object->setPaymentTerms(GETPOSTINT('cond_reglement_id'), GETPOSTINT('cond_reglement_id_deposit_percent')); //} elseif ($action == 'setremisepercent' && $usercancreate) { // $result = $object->set_remise_percent($user, price2num(GETPOST('remise_percent'), '', 2)); //} elseif ($action == 'setremiseabsolue' && $usercancreate) { // $result = $object->set_remise_absolue($user, price2num(GETPOST('remise_absolue'), 'MU', 2)); } elseif ($action == 'setmode' && $usercancreate) { // Payment choice - $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); + $result = $object->setPaymentMethods(GETPOSTINT('mode_reglement_id')); } elseif ($action == 'setmulticurrencycode' && $usercancreate) { // Multicurrency Code $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } elseif ($action == 'setmulticurrencyrate' && $usercancreate) { // Multicurrency rate - $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); + $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOSTINT('calculation_mode')); } elseif ($action == 'setbankaccount' && $usercancreate) { // bank account - $result = $object->setBankAccount(GETPOST('fk_account', 'int')); + $result = $object->setBankAccount(GETPOSTINT('fk_account')); } elseif ($action == 'setshippingmethod' && $usercancreate) { // shipping method - $result = $object->setShippingMethod(GETPOST('shipping_method_id', 'int')); + $result = $object->setShippingMethod(GETPOSTINT('shipping_method_id')); } elseif ($action == 'setwarehouse' && $usercancreate) { // warehouse - $result = $object->setWarehouse(GETPOST('warehouse_id', 'int')); + $result = $object->setWarehouse(GETPOSTINT('warehouse_id')); } elseif ($action == 'update_extras') { $object->oldcopy = dol_clone($object, 2); $attribute_name = GETPOST('attribute', 'restricthtml'); @@ -1715,7 +1715,7 @@ if (empty($reshook)) { } elseif ($action == 'swapstatut') { // Toggle the status of a contact if ($object->fetch($id) > 0) { - $result = $object->swapContactStatus(GETPOST('ligne', 'int')); + $result = $object->swapContactStatus(GETPOSTINT('ligne')); } else { dol_print_error($db); } @@ -1775,10 +1775,10 @@ if ($action == 'create') { $currency_code = $conf->currency; - $cond_reglement_id = GETPOST('cond_reglement_id', 'int'); + $cond_reglement_id = GETPOSTINT('cond_reglement_id'); $deposit_percent = GETPOST('cond_reglement_id_deposit_percent', 'alpha'); - $mode_reglement_id = GETPOST('mode_reglement_id', 'int'); - $fk_account = GETPOST('fk_account', 'int'); + $mode_reglement_id = GETPOSTINT('mode_reglement_id'); + $fk_account = GETPOSTINT('fk_account'); // Load objectsrc if (!empty($origin) && !empty($originid)) { @@ -1857,16 +1857,16 @@ if ($action == 'create') { // If form was posted (but error returned), we must reuse the value posted in priority (standard Dolibarr behaviour) if (!GETPOST('changecompany')) { if (GETPOSTISSET('cond_reglement_id')) { - $cond_reglement_id = GETPOST('cond_reglement_id', 'int'); + $cond_reglement_id = GETPOSTINT('cond_reglement_id'); } if (GETPOSTISSET('deposit_percent')) { $deposit_percent = price2num(GETPOST('deposit_percent', 'alpha')); } if (GETPOSTISSET('mode_reglement_id')) { - $mode_reglement_id = GETPOST('mode_reglement_id', 'int'); + $mode_reglement_id = GETPOSTINT('mode_reglement_id'); } if (GETPOSTISSET('cond_reglement_id')) { - $fk_account = GETPOST('fk_account', 'int'); + $fk_account = GETPOSTINT('fk_account'); } } @@ -2000,7 +2000,7 @@ if ($action == 'create') { // Source / Channel - What trigger creation print ''.$langs->trans('Source').''; print img_picto('', 'question', 'class="pictofixedwidth"'); - $form->selectInputReason((GETPOSTISSET('demand_reason_id') ? GETPOST('demand_reason_id', 'int') : ''), 'demand_reason_id', "SRC_PROP", 1, 'maxwidth200 widthcentpercentminusx'); + $form->selectInputReason((GETPOSTISSET('demand_reason_id') ? GETPOSTINT('demand_reason_id') : ''), 'demand_reason_id', "SRC_PROP", 1, 'maxwidth200 widthcentpercentminusx'); print ''; // Shipping Method @@ -2010,7 +2010,7 @@ if ($action == 'create') { } print ''.$langs->trans('SendingMethod').''; print img_picto('', 'dolly', 'class="pictofixedwidth"'); - $form->selectShippingMethod((GETPOSTISSET('shipping_method_id') ? GETPOST('shipping_method_id', 'int') : $shipping_method_id), 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx'); + $form->selectShippingMethod((GETPOSTISSET('shipping_method_id') ? GETPOSTINT('shipping_method_id') : $shipping_method_id), 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx'); print ''; } @@ -2030,7 +2030,7 @@ if ($action == 'create') { } print ''; print img_picto('', 'clock', 'class="pictofixedwidth"'); - $form->selectAvailabilityDelay((GETPOSTISSET('availability_id') ? GETPOST('availability_id', 'int') : ''), 'availability_id', '', 1, 'maxwidth200 widthcentpercentminusx'); + $form->selectAvailabilityDelay((GETPOSTISSET('availability_id') ? GETPOSTINT('availability_id') : ''), 'availability_id', '', 1, 'maxwidth200 widthcentpercentminusx'); print ''; // Delivery date (or manufacturing) @@ -2258,7 +2258,7 @@ if ($action == 'create') { $formquestion = array( // 'text' => $langs->trans("ConfirmClone"), // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), - array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', $filter, '', 0, 0, null, 0, 'maxwidth300')), + array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOSTINT('socid'), 'socid', $filter, '', 0, 0, null, 0, 'maxwidth300')), array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans('PuttingPricesUpToDate'), 'value' => 0), array('type' => 'checkbox', 'name' => 'update_desc', 'label' => $langs->trans('PuttingDescUpToDate'), 'value' => 0), ); diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 1da537b7d89..3e47a6921e3 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -37,9 +37,9 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; // Load translation files required by the page $langs->loadLangs(array('facture', 'propal', 'orders', 'sendings', 'companies')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); -$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOSTINT('lineid'); $action = GETPOST('action', 'aZ09'); $object = new Propal($db); @@ -87,7 +87,7 @@ if (empty($reshook)) { // Add new contact if ($action == 'addcontact' && $user->hasRight('propal', 'creer')) { if ($object->id > 0) { - $contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); + $contactid = (GETPOSTINT('userid') ? GETPOSTINT('userid') : GETPOSTINT('contactid')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } @@ -106,7 +106,7 @@ if (empty($reshook)) { } elseif ($action == 'swapstatut' && $user->hasRight('propal', 'creer')) { // Toggle the status of a contact if ($object->id > 0) { - $result = $object->swapContactStatus(GETPOST('ligne', 'int')); + $result = $object->swapContactStatus(GETPOSTINT('ligne')); } } elseif ($action == 'deletecontact' && $user->hasRight('propal', 'creer')) { // Delete contact diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index 00ec2367c8a..07ea2de457b 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -42,14 +42,14 @@ $langs->loadLangs(array('propal', 'compta', 'other', 'companies')); $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); // Get parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index ce58344c3d9..ebc5905dc2a 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -42,7 +42,7 @@ $now = dol_now(); $max = 5; // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if (isset($user->socid) && $user->socid > 0) { $action = ''; $socid = $user->socid; diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index b785152916b..7a1626674e5 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -63,11 +63,11 @@ if (isModEnabled("expedition")) { } // Get Parameters -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); -$show_files = GETPOST('show_files', 'int'); +$show_files = GETPOSTINT('show_files'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $toselect = GETPOST('toselect', 'array'); @@ -76,8 +76,8 @@ $mode = GETPOST('mode', 'alpha'); // Search Fields $search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); -$search_user = GETPOST('search_user', 'int'); -$search_sale = GETPOST('search_sale', 'int'); +$search_user = GETPOSTINT('search_user'); +$search_sale = GETPOSTINT('search_sale'); $search_ref = GETPOST('sf_ref') ? GETPOST('sf_ref', 'alpha') : GETPOST('search_ref', 'alpha'); $search_refcustomer = GETPOST('search_refcustomer', 'alpha'); $search_refproject = GETPOST('search_refproject', 'alpha'); @@ -94,48 +94,48 @@ $search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'a $search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', 'alpha'); $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha'); $search_login = GETPOST('search_login', 'alpha'); -$search_product_category = GETPOST('search_product_category', 'int'); +$search_product_category = GETPOSTINT('search_product_category'); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); $search_state = GETPOST("search_state"); -$search_country = GETPOST("search_country", 'int'); -$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int'); -$search_date_startday = GETPOST('search_date_startday', 'int'); -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); -$search_date_startyear = GETPOST('search_date_startyear', 'int'); -$search_date_endday = GETPOST('search_date_endday', 'int'); -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); -$search_date_endyear = GETPOST('search_date_endyear', 'int'); +$search_country = GETPOSTINT("search_country"); +$search_type_thirdparty = GETPOSTINT("search_type_thirdparty"); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_endday = GETPOSTINT('search_date_endday'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); -$search_date_end_startday = GETPOST('search_date_end_startday', 'int'); -$search_date_end_startmonth = GETPOST('search_date_end_startmonth', 'int'); -$search_date_end_startyear = GETPOST('search_date_end_startyear', 'int'); -$search_date_end_endday = GETPOST('search_date_end_endday', 'int'); -$search_date_end_endmonth = GETPOST('search_date_end_endmonth', 'int'); -$search_date_end_endyear = GETPOST('search_date_end_endyear', 'int'); +$search_date_end_startday = GETPOSTINT('search_date_end_startday'); +$search_date_end_startmonth = GETPOSTINT('search_date_end_startmonth'); +$search_date_end_startyear = GETPOSTINT('search_date_end_startyear'); +$search_date_end_endday = GETPOSTINT('search_date_end_endday'); +$search_date_end_endmonth = GETPOSTINT('search_date_end_endmonth'); +$search_date_end_endyear = GETPOSTINT('search_date_end_endyear'); $search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver $search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); -$search_date_delivery_startday = GETPOST('search_date_delivery_startday', 'int'); -$search_date_delivery_startmonth = GETPOST('search_date_delivery_startmonth', 'int'); -$search_date_delivery_startyear = GETPOST('search_date_delivery_startyear', 'int'); -$search_date_delivery_endday = GETPOST('search_date_delivery_endday', 'int'); -$search_date_delivery_endmonth = GETPOST('search_date_delivery_endmonth', 'int'); -$search_date_delivery_endyear = GETPOST('search_date_delivery_endyear', 'int'); +$search_date_delivery_startday = GETPOSTINT('search_date_delivery_startday'); +$search_date_delivery_startmonth = GETPOSTINT('search_date_delivery_startmonth'); +$search_date_delivery_startyear = GETPOSTINT('search_date_delivery_startyear'); +$search_date_delivery_endday = GETPOSTINT('search_date_delivery_endday'); +$search_date_delivery_endmonth = GETPOSTINT('search_date_delivery_endmonth'); +$search_date_delivery_endyear = GETPOSTINT('search_date_delivery_endyear'); $search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear); $search_date_delivery_end = dol_mktime(23, 59, 59, $search_date_delivery_endmonth, $search_date_delivery_endday, $search_date_delivery_endyear); -$search_availability = GETPOST('search_availability', 'int'); -$search_categ_cus = GETPOST("search_categ_cus", 'int'); -$search_fk_cond_reglement = GETPOST("search_fk_cond_reglement", 'int'); -$search_fk_shipping_method = GETPOST("search_fk_shipping_method", 'int'); -$search_fk_input_reason = GETPOST("search_fk_input_reason", 'int'); -$search_fk_mode_reglement = GETPOST("search_fk_mode_reglement", 'int'); -$search_date_signature_startday = GETPOST('search_date_signature_startday', 'int'); -$search_date_signature_startmonth = GETPOST('search_date_signature_startmonth', 'int'); -$search_date_signature_startyear = GETPOST('search_date_signature_startyear', 'int'); -$search_date_signature_endday = GETPOST('search_date_signature_endday', 'int'); -$search_date_signature_endmonth = GETPOST('search_date_signature_endmonth', 'int'); -$search_date_signature_endyear = GETPOST('search_date_signature_endyear', 'int'); +$search_availability = GETPOSTINT('search_availability'); +$search_categ_cus = GETPOSTINT("search_categ_cus"); +$search_fk_cond_reglement = GETPOSTINT("search_fk_cond_reglement"); +$search_fk_shipping_method = GETPOSTINT("search_fk_shipping_method"); +$search_fk_input_reason = GETPOSTINT("search_fk_input_reason"); +$search_fk_mode_reglement = GETPOSTINT("search_fk_mode_reglement"); +$search_date_signature_startday = GETPOSTINT('search_date_signature_startday'); +$search_date_signature_startmonth = GETPOSTINT('search_date_signature_startmonth'); +$search_date_signature_startyear = GETPOSTINT('search_date_signature_startyear'); +$search_date_signature_endday = GETPOSTINT('search_date_signature_endday'); +$search_date_signature_endmonth = GETPOSTINT('search_date_signature_endmonth'); +$search_date_signature_endyear = GETPOSTINT('search_date_signature_endyear'); $search_date_signature_start = dol_mktime(0, 0, 0, $search_date_signature_startmonth, $search_date_signature_startday, $search_date_signature_startyear); $search_date_signature_end = dol_mktime(23, 59, 59, $search_date_signature_endmonth, $search_date_signature_endday, $search_date_signature_endyear); $search_status = GETPOST('search_status', 'alpha'); @@ -144,10 +144,10 @@ $optioncss = GETPOST('optioncss', 'alpha'); $object_statut = GETPOST('search_statut', 'alpha'); // Pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index bc408a1c6de..e412b5d1077 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -37,7 +37,7 @@ if (isModEnabled('project')) { // Load translation files required by the page $langs->loadLangs(array('propal', 'compta', 'bills', 'companies')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 3603f89af2a..76809fc222f 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -44,8 +44,8 @@ $object_status = GETPOST('object_status', 'intcomma'); $typent_id = GETPOSTINT('typent_id'); $categ_id = GETPOSTINT('categ_id'); -$userid = GETPOST('userid', 'int'); -$socid = GETPOST('socid', 'int'); +$userid = GETPOSTINT('userid'); +$socid = GETPOSTINT('socid'); // Security check if ($user->socid > 0) { $action = ''; @@ -53,7 +53,7 @@ if ($user->socid > 0) { } $nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); -$year = GETPOST('year') > 0 ? GETPOST('year', 'int') : $nowyear; +$year = GETPOST('year') > 0 ? GETPOSTINT('year') : $nowyear; $startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS')))); $endyear = $year; diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index 551172f2674..122d0f88811 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -36,7 +36,7 @@ if ($user->socid > 0) { } // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $action = ''; $socid = $user->socid; diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php index b1f003f9e11..4881fce1920 100644 --- a/htdocs/comm/recap-client.php +++ b/htdocs/comm/recap-client.php @@ -34,7 +34,7 @@ if (isModEnabled('facture')) { } // Security check -$socid = GETPOST("socid", 'int'); +$socid = GETPOSTINT("socid"); if ($user->socid > 0) { $action = ''; $id = $user->socid; diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index f1c5f748e62..2a3ee4a4991 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -30,9 +30,9 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; // Load translation files required by the page $langs->loadLangs(array('companies', 'orders', 'bills')); -$id = GETPOST("id", 'int'); +$id = GETPOSTINT("id"); -$socid = GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('socid', 'int'); +$socid = GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('socid'); // Security check if ($user->socid > 0) { $socid = $user->socid; @@ -66,7 +66,7 @@ if ($action == 'setremise') { $object = new Societe($db); $object->fetch($id); - $discount_type = GETPOST('discount_type', 'int'); + $discount_type = GETPOSTINT('discount_type'); if (!empty($discount_type)) { $result = $object->set_remise_supplier(price2num(GETPOST("remise")), GETPOST("note", "alphanohtml"), $user); @@ -79,7 +79,7 @@ if ($action == 'setremise') { header("Location: ".$backtopage); exit; } else { - header("Location: remise.php?id=".GETPOST("id", 'int')); + header("Location: remise.php?id=".GETPOSTINT("id")); exit; } } else { @@ -175,10 +175,10 @@ if ($socid > 0) { // Discount type print ''.$langs->trans('DiscountType').''; if ($isCustomer) { - print ' '; + print ' '; } if ($isSupplier) { - print ' '; + print ' '; } print ''; } diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 068fdff9052..994e30fb9f1 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -38,13 +38,13 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; // Load translation files required by the page $langs->loadLangs(array('orders', 'bills', 'companies')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); // Security check -$socid = GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('socid', 'int'); +$socid = GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('socid'); if ($user->socid > 0) { $socid = $user->socid; } @@ -75,7 +75,7 @@ if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes' && $permi $amount_ttc_2 = price2num($amount_ttc_2); $error = 0; - $remid = (GETPOST("remid", 'int') ? GETPOST("remid", 'int') : 0); + $remid = (GETPOSTINT("remid") ? GETPOSTINT("remid") : 0); $discount = new DiscountAbsolute($db); $res = $discount->fetch($remid); if (!($res > 0)) { diff --git a/htdocs/commande/agenda.php b/htdocs/commande/agenda.php index 49fe399610b..3c0eea17f23 100644 --- a/htdocs/commande/agenda.php +++ b/htdocs/commande/agenda.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $langs->loadLangs(array("order", "other")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); @@ -50,10 +50,10 @@ if (GETPOST('actioncode', 'array')) { $search_rowid = GETPOST('search_rowid'); $search_agenda_label = GETPOST('search_agenda_label'); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 988879d2f7f..c2c6cfe44cf 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -78,25 +78,25 @@ if (isModEnabled('productbatch')) { } -$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('orderid', 'int')); +$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('orderid')); $ref = GETPOST('ref', 'alpha'); -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); -$lineid = GETPOST('lineid', 'int'); -$contactid = GETPOST('contactid', 'int'); -$projectid = GETPOST('projectid', 'int'); +$lineid = GETPOSTINT('lineid'); +$contactid = GETPOSTINT('contactid'); +$projectid = GETPOSTINT('projectid'); $origin = GETPOST('origin', 'alpha'); -$originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility -$rank = (GETPOST('rank', 'int') > 0) ? GETPOST('rank', 'int') : -1; +$originid = (GETPOSTINT('originid') ? GETPOSTINT('originid') : GETPOSTINT('origin_id')); // For backward compatibility +$rank = (GETPOSTINT('rank') > 0) ? GETPOSTINT('rank') : -1; // PDF -$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0)); -$hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0)); -$hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0)); +$hidedetails = (GETPOSTINT('hidedetails') ? GETPOSTINT('hidedetails') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0)); +$hidedesc = (GETPOSTINT('hidedesc') ? GETPOSTINT('hidedesc') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0)); +$hideref = (GETPOSTINT('hideref') ? GETPOSTINT('hideref') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0)); // Security check if (!empty($user->socid)) { @@ -139,7 +139,7 @@ $permissiontoadd = $usercancreate; // Used by the include of actions_addu $error = 0; -$date_delivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int')); +$date_delivery = dol_mktime(GETPOSTINT('liv_hour'), GETPOSTINT('liv_min'), 0, GETPOSTINT('liv_month'), GETPOSTINT('liv_day'), GETPOSTINT('liv_year')); /* @@ -278,11 +278,11 @@ if (empty($reshook)) { } } elseif ($action == 'classin' && $usercancreate) { // Link to a project - $object->setProject(GETPOST('projectid', 'int')); + $object->setProject(GETPOSTINT('projectid')); } elseif ($action == 'add' && $usercancreate) { // Add order $datecommande = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); - $date_delivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int')); + $date_delivery = dol_mktime(GETPOSTINT('liv_hour'), GETPOSTINT('liv_min'), 0, GETPOSTINT('liv_month'), GETPOSTINT('liv_day'), GETPOSTINT('liv_year')); if ($datecommande == '') { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Date')), null, 'errors'); @@ -305,7 +305,7 @@ if (empty($reshook)) { $object->date_commande = $datecommande; $object->note_private = GETPOST('note_private', 'restricthtml'); $object->note_public = GETPOST('note_public', 'restricthtml'); - $object->source = GETPOST('source_id', 'int'); + $object->source = GETPOSTINT('source_id'); $object->fk_project = GETPOSTINT('projectid'); $object->ref_client = GETPOST('ref_client', 'alpha'); $object->model_pdf = GETPOST('model'); @@ -520,8 +520,8 @@ if (empty($reshook)) { // Insert default contacts if defined if ($object_id > 0) { - if (GETPOST('contactid', 'int')) { - $result = $object->add_contact(GETPOST('contactid', 'int'), 'CUSTOMER', 'external'); + if (GETPOSTINT('contactid')) { + $result = $object->add_contact(GETPOSTINT('contactid'), 'CUSTOMER', 'external'); if ($result < 0) { setEventMessages($langs->trans("ErrorFailedToAddContact"), null, 'errors'); $error++; @@ -574,14 +574,14 @@ if (empty($reshook)) { } } } elseif ($action == 'setdate' && $usercancreate) { - $date = dol_mktime(0, 0, 0, GETPOST('order_month', 'int'), GETPOST('order_day', 'int'), GETPOST('order_year', 'int')); + $date = dol_mktime(0, 0, 0, GETPOSTINT('order_month'), GETPOSTINT('order_day'), GETPOSTINT('order_year')); $result = $object->set_date($user, $date); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } elseif ($action == 'setdate_livraison' && $usercancreate) { - $date_delivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int')); + $date_delivery = dol_mktime(GETPOSTINT('liv_hour'), GETPOSTINT('liv_min'), 0, GETPOSTINT('liv_month'), GETPOSTINT('liv_day'), GETPOSTINT('liv_year')); $object->fetch($id); $result = $object->setDeliveryDate($user, $date_delivery); @@ -589,7 +589,7 @@ if (empty($reshook)) { setEventMessages($object->error, $object->errors, 'errors'); } } elseif ($action == 'setmode' && $usercancreate) { - $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); + $result = $object->setPaymentMethods(GETPOSTINT('mode_reglement_id')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -598,7 +598,7 @@ if (empty($reshook)) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } elseif ($action == 'setmulticurrencyrate' && $usercancreate) { // Multicurrency rate - $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); + $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOSTINT('calculation_mode')); } elseif ($action == 'setavailability' && $usercancreate) { $result = $object->availability(GETPOST('availability_id')); if ($result < 0) { @@ -638,19 +638,19 @@ if (empty($reshook)) { } } elseif ($action == 'setbankaccount' && $usercancreate) { // bank account - $result = $object->setBankAccount(GETPOST('fk_account', 'int')); + $result = $object->setBankAccount(GETPOSTINT('fk_account')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } elseif ($action == 'setshippingmethod' && $usercancreate) { // shipping method - $result = $object->setShippingMethod(GETPOST('shipping_method_id', 'int')); + $result = $object->setShippingMethod(GETPOSTINT('shipping_method_id')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } elseif ($action == 'setwarehouse' && $usercancreate) { // warehouse - $result = $object->setWarehouse(GETPOST('warehouse_id', 'int')); + $result = $object->setWarehouse(GETPOSTINT('warehouse_id')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -708,7 +708,7 @@ if (empty($reshook)) { if ($prod_entry_mode == 'free') { $idprod = 0; } else { - $idprod = GETPOST('idprod', 'int'); + $idprod = GETPOSTINT('idprod'); if (getDolGlobalString('MAIN_DISABLE_FREE_LINES') && $idprod <= 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ProductOrService")), null, 'errors'); @@ -852,7 +852,7 @@ if (empty($reshook)) { // If price per quantity if ($prod->prices_by_qty[0]) { // yes, this product has some prices per quantity // Search the correct price into loaded array product_price_by_qty using id of array retrieved into POST['pqp']. - $pqp = GETPOST('pbq', 'int'); + $pqp = GETPOSTINT('pbq'); // Search price into product_price_by_qty from $prod->id foreach ($prod->prices_by_qty_list[0] as $priceforthequantityarray) { @@ -873,7 +873,7 @@ if (empty($reshook)) { // If price per quantity and customer if ($prod->prices_by_qty[$object->thirdparty->price_level]) { // yes, this product has some prices per quantity // Search the correct price into loaded array product_price_by_qty using id of array retrieved into POST['pqp']. - $pqp = GETPOST('pbq', 'int'); + $pqp = GETPOSTINT('pbq'); // Search price into product_price_by_qty from $prod->id foreach ($prod->prices_by_qty_list[$object->thirdparty->price_level] as $priceforthequantityarray) { if ($priceforthequantityarray['rowid'] != $pqp) { @@ -1199,7 +1199,7 @@ if (empty($reshook)) { $remise_percent = GETPOST('remise_percent') != '' ? price2num(GETPOST('remise_percent'), '', 2) : 0; // Check minimum price - $productid = GETPOST('productid', 'int'); + $productid = GETPOSTINT('productid'); if (!empty($productid)) { $product = new Product($db); $product->fetch($productid); @@ -1252,7 +1252,7 @@ if (empty($reshook)) { if (!$error) { if (!$user->hasRight('margins', 'creer')) { foreach ($object->lines as &$line) { - if ($line->id == GETPOST('lineid', 'int')) { + if ($line->id == GETPOSTINT('lineid')) { $fournprice = $line->fk_fournprice; $buyingprice = $line->pa_ht; break; @@ -1267,7 +1267,7 @@ if (empty($reshook)) { $price_base_type = 'TTC'; } - $result = $object->updateline(GETPOST('lineid', 'int'), $description, $pu, $qty, $remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, $price_base_type, $info_bits, $date_start, $date_end, $type, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $special_code, $array_options, GETPOST('units'), $pu_ht_devise); + $result = $object->updateline(GETPOSTINT('lineid'), $description, $pu, $qty, $remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, $price_base_type, $info_bits, $date_start, $date_end, $type, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $special_code, $array_options, GETPOST('units'), $pu_ht_devise); if ($result >= 0) { if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) { @@ -1323,7 +1323,7 @@ if (empty($reshook)) { header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // To re-display card in edit mode exit(); } elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) { - $idwarehouse = GETPOST('idwarehouse', 'int'); + $idwarehouse = GETPOSTINT('idwarehouse'); $qualified_for_stock_change = 0; if (!getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { @@ -1359,14 +1359,14 @@ if (empty($reshook)) { ) { require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; - $date = dol_mktime(0, 0, 0, GETPOST('datefmonth', 'int'), GETPOST('datefday', 'int'), GETPOST('datefyear', 'int')); + $date = dol_mktime(0, 0, 0, GETPOSTINT('datefmonth'), GETPOSTINT('datefday'), GETPOSTINT('datefyear')); $forceFields = array(); if (GETPOSTISSET('date_pointoftax')) { - $forceFields['date_pointoftax'] = dol_mktime(0, 0, 0, GETPOST('date_pointoftaxmonth', 'int'), GETPOST('date_pointoftaxday', 'int'), GETPOST('date_pointoftaxyear', 'int')); + $forceFields['date_pointoftax'] = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear')); } - $deposit = Facture::createDepositFromOrigin($object, $date, GETPOST('cond_reglement_id', 'int'), $user, 0, GETPOST('validate_generated_deposit', 'alpha') == 'on', $forceFields); + $deposit = Facture::createDepositFromOrigin($object, $date, GETPOSTINT('cond_reglement_id'), $user, 0, GETPOSTINT('validate_generated_deposit') == 'on', $forceFields); if ($deposit) { setEventMessage('DepositGenerated'); @@ -1469,7 +1469,7 @@ if (empty($reshook)) { setEventMessages($object->error, $object->errors, 'errors'); } } elseif ($action == 'confirm_cancel' && $confirm == 'yes' && $usercanvalidate) { - $idwarehouse = GETPOST('idwarehouse', 'int'); + $idwarehouse = GETPOSTINT('idwarehouse'); $qualified_for_stock_change = 0; if (!getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { @@ -1633,7 +1633,7 @@ if (empty($reshook)) { } elseif ($action == 'swapstatut') { // bascule du statut d'un contact if ($object->id > 0) { - $result = $object->swapContactStatus(GETPOST('ligne', 'int')); + $result = $object->swapContactStatus(GETPOSTINT('ligne')); } else { dol_print_error($db); } @@ -1956,7 +1956,7 @@ if ($action == 'create' && $usercancreate) { if (isModEnabled('expedition')) { print ''.$langs->trans('SendingMethod').''; print img_picto('', 'object_dolly', 'class="pictofixedwidth"'); - $form->selectShippingMethod(((GETPOSTISSET('shipping_method_id') && GETPOST('shipping_method_id', 'int') != 0) ? GETPOST('shipping_method_id') : $shipping_method_id), 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx'); + $form->selectShippingMethod(((GETPOSTISSET('shipping_method_id') && GETPOSTINT('shipping_method_id') != 0) ? GETPOST('shipping_method_id') : $shipping_method_id), 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx'); print ''; } @@ -2216,7 +2216,7 @@ if ($action == 'create' && $usercancreate) { // 'text' => $langs->trans("ConfirmClone"), // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), - array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse', 'int') ? GETPOST('idwarehouse', 'int') : 'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo)) + array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOSTINT('idwarehouse') ? GETPOSTINT('idwarehouse') : 'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo)) ); } @@ -2428,7 +2428,7 @@ if ($action == 'create' && $usercancreate) { $filter = '(s.client:IN:1,2,3)'; // Create an array for form $formquestion = array( - array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', $filter, '', 0, 0, null, 0, 'maxwidth300')) + array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOSTINT('socid'), 'socid', $filter, '', 0, 0, null, 0, 'maxwidth300')) ); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index f031865993b..0df141b3c41 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; // Load translation files required by the page $langs->loadLangs(array('orders', 'sendings', 'companies', 'bills')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); @@ -71,7 +71,7 @@ if (empty($reshook)) { $result = $object->fetch($id); if ($result > 0 && $id > 0) { - $contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); + $contactid = (GETPOSTINT('userid') ? GETPOSTINT('userid') : GETPOSTINT('contactid')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } @@ -90,14 +90,14 @@ if (empty($reshook)) { } elseif ($action == 'swapstatut' && $user->hasRight('commande', 'creer')) { // Toggle the status of a contact if ($object->fetch($id)) { - $result = $object->swapContactStatus(GETPOST('ligne', 'int')); + $result = $object->swapContactStatus(GETPOSTINT('ligne')); } else { dol_print_error($db); } } elseif ($action == 'deletecontact' && $user->hasRight('commande', 'creer')) { // Delete contact $object->fetch($id); - $result = $object->delete_contact(GETPOST("lineid", 'int')); + $result = $object->delete_contact(GETPOSTINT("lineid")); if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 828722687d4..07086496213 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -46,10 +46,10 @@ if (!$user->hasRight('facture', 'creer')) { // Load translation files required by the page $langs->loadLangs(array("companies", "orders")); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 864375fbf5d..550ed05cc01 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -42,14 +42,14 @@ $langs->loadLangs(array('companies', 'other', 'bills', 'orders')); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm'); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref'); // Get parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 3d3bdc94425..0186d660953 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -50,7 +50,7 @@ $hookmanager->initHooks(array('ordersindex')); // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid > 0) { $action = ''; $socid = $user->socid; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index de9e0bd9892..c9fa02304f5 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -56,29 +56,29 @@ $langs->loadLangs(array('orders', 'sendings', 'deliveries', 'companies', 'compta // Get Parameters $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); -$show_files = GETPOST('show_files', 'int'); +$show_files = GETPOSTINT('show_files'); $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'orderlist'; $mode = GETPOST('mode', 'alpha'); // Search Parameters -$search_datecloture_start = GETPOST('search_datecloture_start', 'int'); +$search_datecloture_start = GETPOSTINT('search_datecloture_start'); if (empty($search_datecloture_start)) { - $search_datecloture_start = dol_mktime(0, 0, 0, GETPOST('search_datecloture_startmonth', 'int'), GETPOST('search_datecloture_startday', 'int'), GETPOST('search_datecloture_startyear', 'int')); + $search_datecloture_start = dol_mktime(0, 0, 0, GETPOSTINT('search_datecloture_startmonth'), GETPOSTINT('search_datecloture_startday'), GETPOSTINT('search_datecloture_startyear')); } -$search_datecloture_end = GETPOST('search_datecloture_end', 'int'); +$search_datecloture_end = GETPOSTINT('search_datecloture_end'); if (empty($search_datecloture_end)) { - $search_datecloture_end = dol_mktime(23, 59, 59, GETPOST('search_datecloture_endmonth', 'int'), GETPOST('search_datecloture_endday', 'int'), GETPOST('search_datecloture_endyear', 'int')); + $search_datecloture_end = dol_mktime(23, 59, 59, GETPOSTINT('search_datecloture_endmonth'), GETPOSTINT('search_datecloture_endday'), GETPOSTINT('search_datecloture_endyear')); } -$search_dateorder_start = dol_mktime(0, 0, 0, GETPOST('search_dateorder_start_month', 'int'), GETPOST('search_dateorder_start_day', 'int'), GETPOST('search_dateorder_start_year', 'int')); -$search_dateorder_end = dol_mktime(23, 59, 59, GETPOST('search_dateorder_end_month', 'int'), GETPOST('search_dateorder_end_day', 'int'), GETPOST('search_dateorder_end_year', 'int')); -$search_datedelivery_start = dol_mktime(0, 0, 0, GETPOST('search_datedelivery_start_month', 'int'), GETPOST('search_datedelivery_start_day', 'int'), GETPOST('search_datedelivery_start_year', 'int')); -$search_datedelivery_end = dol_mktime(23, 59, 59, GETPOST('search_datedelivery_end_month', 'int'), GETPOST('search_datedelivery_end_day', 'int'), GETPOST('search_datedelivery_end_year', 'int')); +$search_dateorder_start = dol_mktime(0, 0, 0, GETPOSTINT('search_dateorder_start_month'), GETPOSTINT('search_dateorder_start_day'), GETPOSTINT('search_dateorder_start_year')); +$search_dateorder_end = dol_mktime(23, 59, 59, GETPOSTINT('search_dateorder_end_month'), GETPOSTINT('search_dateorder_end_day'), GETPOSTINT('search_dateorder_end_year')); +$search_datedelivery_start = dol_mktime(0, 0, 0, GETPOSTINT('search_datedelivery_start_month'), GETPOSTINT('search_datedelivery_start_day'), GETPOSTINT('search_datedelivery_start_year')); +$search_datedelivery_end = dol_mktime(23, 59, 59, GETPOSTINT('search_datedelivery_end_month'), GETPOSTINT('search_datedelivery_end_day'), GETPOSTINT('search_datedelivery_end_year')); -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); $search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); -$search_product_category = GETPOST('search_product_category', 'int'); +$search_product_category = GETPOSTINT('search_product_category'); $search_ref = GETPOST('search_ref', 'alpha') != '' ? GETPOST('search_ref', 'alpha') : GETPOST('sref', 'alpha'); $search_ref_customer = GETPOST('search_ref_customer', 'alpha'); $search_company = GETPOST('search_company', 'alpha'); @@ -87,14 +87,14 @@ $search_parent_name = trim(GETPOST('search_parent_name', 'alphanohtml')); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); $search_state = GETPOST('search_state', 'alpha'); -$search_country = GETPOST('search_country', 'int'); -$search_type_thirdparty = GETPOST('search_type_thirdparty', 'int'); -$search_user = GETPOST('search_user', 'int'); -$search_sale = GETPOST('search_sale', 'int'); +$search_country = GETPOSTINT('search_country'); +$search_type_thirdparty = GETPOSTINT('search_type_thirdparty'); +$search_user = GETPOSTINT('search_user'); +$search_sale = GETPOSTINT('search_sale'); $search_total_ht = GETPOST('search_total_ht', 'alpha'); $search_total_vat = GETPOST('search_total_vat', 'alpha'); $search_total_ttc = GETPOST('search_total_ttc', 'alpha'); -$search_warehouse = GETPOST('search_warehouse', 'int'); +$search_warehouse = GETPOSTINT('search_warehouse'); $search_multicurrency_code = GETPOST('search_multicurrency_code', 'alpha'); $search_multicurrency_tx = GETPOST('search_multicurrency_tx', 'alpha'); @@ -103,26 +103,26 @@ $search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha'); $search_login = GETPOST('search_login', 'alpha'); -$search_categ_cus = GETPOST("search_categ_cus", 'int'); +$search_categ_cus = GETPOSTINT("search_categ_cus"); $optioncss = GETPOST('optioncss', 'alpha'); -$search_billed = GETPOST('search_billed', 'int'); -$search_status = GETPOST('search_status', 'int'); +$search_billed = GETPOSTINT('search_billed'); +$search_status = GETPOSTINT('search_status'); $search_project_ref = GETPOST('search_project_ref', 'alpha'); $search_project = GETPOST('search_project', 'alpha'); $search_shippable = GETPOST('search_shippable', 'aZ09'); -$search_fk_cond_reglement = GETPOST('search_fk_cond_reglement', 'int'); -$search_fk_shipping_method = GETPOST('search_fk_shipping_method', 'int'); -$search_fk_mode_reglement = GETPOST('search_fk_mode_reglement', 'int'); -$search_fk_input_reason = GETPOST('search_fk_input_reason', 'int'); +$search_fk_cond_reglement = GETPOSTINT('search_fk_cond_reglement'); +$search_fk_shipping_method = GETPOSTINT('search_fk_shipping_method'); +$search_fk_mode_reglement = GETPOSTINT('search_fk_mode_reglement'); +$search_fk_input_reason = GETPOSTINT('search_fk_input_reason'); $diroutputmassaction = $conf->commande->multidir_output[$conf->entity].'/temp/massgeneration/'.$user->id; // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -228,7 +228,7 @@ if (!$user->hasRight('societe', 'client', 'voir')) { } // Security check -$id = (GETPOST('orderid') ? GETPOST('orderid', 'int') : GETPOST('id', 'int')); +$id = (GETPOST('orderid') ? GETPOSTINT('orderid') : GETPOSTINT('id')); if ($user->socid) { $socid = $user->socid; } @@ -333,8 +333,8 @@ if (empty($reshook)) { if ($massaction == 'confirm_createbills') { // Create bills from orders. $orders = GETPOST('toselect', 'array'); - $createbills_onebythird = GETPOST('createbills_onebythird', 'int'); - $validate_invoices = GETPOST('validate_invoices', 'int'); + $createbills_onebythird = GETPOSTINT('createbills_onebythird'); + $validate_invoices = GETPOSTINT('validate_invoices'); $errors = array(); @@ -376,7 +376,7 @@ if (empty($reshook)) { $objecttmp->ref_client = $cmd->ref_client; } - $datefacture = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); + $datefacture = dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); if (empty($datefacture)) { $datefacture = dol_now(); } @@ -1512,7 +1512,7 @@ $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); -if (GETPOST('autoselectall', 'int')) { +if (GETPOSTINT('autoselectall')) { $selectedfields .= ''; } - if (!GETPOST('fac_rec', 'int')) { + if (!GETPOSTINT('fac_rec')) { print ' '; } print ''; @@ -3394,8 +3394,8 @@ if ($action == 'create') { } // Overwrite some values if creation of invoice is from a predefined invoice - if (empty($origin) && empty($originid) && GETPOST('fac_rec', 'int') > 0) { - $invoice_predefined->fetch(GETPOST('fac_rec', 'int')); + if (empty($origin) && empty($originid) && GETPOSTINT('fac_rec') > 0) { + $invoice_predefined->fetch(GETPOSTINT('fac_rec')); $dateinvoice = $invoice_predefined->date_when; // To use next gen date by default later if (empty($projectid)) { @@ -3431,9 +3431,9 @@ if ($action == 'create') { while ($i < $num) { $objp = $db->fetch_object($resql); print ''; $i++; @@ -3469,7 +3469,7 @@ if ($action == 'create') { // Standard invoice print '
'; - $tmp = ' '; + $tmp = ' '; $tmp = $tmp.''; $desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3, 'standardonsmartphone'); print ''; @@ -3540,7 +3540,7 @@ if ($action == 'create') { 'variablealllines' => $langs->transnoentitiesnoconv('VarAmountAllLines') ); $typedeposit = GETPOST('typedeposit', 'aZ09'); - $valuedeposit = GETPOST('valuedeposit', 'int'); + $valuedeposit = GETPOSTINT('valuedeposit'); if (empty($typedeposit) && !empty($objectsrc->deposit_percent)) { $origin_payment_conditions_deposit_percent = getDictionaryValue('c_payment_term', 'deposit_percent', $objectsrc->cond_reglement_id); if (!empty($origin_payment_conditions_deposit_percent)) { @@ -3573,10 +3573,10 @@ if ($action == 'create') { print ''; // Next situation invoice - $opt = $form->selectSituationInvoices(GETPOST('originid', 'int'), $socid); + $opt = $form->selectSituationInvoices(GETPOSTINT('originid'), $socid); print '
'; - $tmp = ''.$langs->trans('NoSituations').'') || (GETPOST('origin') && GETPOST('origin') != 'facture' && GETPOST('origin') != 'commande')) { $tmp .= ' disabled'; } @@ -3606,7 +3606,7 @@ if ($action == 'create') { if (is_array($facids)) { foreach ($facids as $facparam) { $options .= '
'; print '
'; @@ -3828,8 +3828,8 @@ if ($action == 'create') { print ''; } - $newdateinvoice = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'), 'tzserver'); - $date_pointoftax = dol_mktime(0, 0, 0, GETPOST('date_pointoftaxmonth', 'int'), GETPOST('date_pointoftaxday', 'int'), GETPOST('date_pointoftaxyear', 'int'), 'tzserver'); + $newdateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); + $date_pointoftax = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear'), 'tzserver'); // Date invoice print ''; // Number diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index fc1dbded732..16d1af4f562 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -34,10 +34,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; // Load translation files required by the page $langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "product", "trips", "admin")); -$local = GETPOST('localTaxType', 'int'); +$local = GETPOSTINT('localTaxType'); // Date range -$year = GETPOST("year", "int"); +$year = GETPOSTINT("year"); if (empty($year)) { $year_current = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $year_start = $year_current; @@ -93,14 +93,14 @@ if (empty($min)) { // 0=normal, 1=option vat for services is on debit, 2=option on payments for products $modetax = getDolGlobalString('TAX_MODE'); if (GETPOSTISSET("modetax")) { - $modetax = GETPOST("modetax", 'int'); + $modetax = GETPOSTINT("modetax"); } if (empty($modetax)) { $modetax = 0; } // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index caa5173a13c..0e6ffde780c 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -35,10 +35,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; // Load translation files required by the page $langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "product", "trips", "admin")); -$localTaxType = GETPOST('localTaxType', 'int'); +$localTaxType = GETPOSTINT('localTaxType'); // Date range -$year = GETPOST("year", "int"); +$year = GETPOSTINT("year"); if (empty($year)) { $year_current = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $year_start = $year_current; @@ -49,11 +49,11 @@ if (empty($year)) { $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear")); $date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear")); if (empty($date_start) || empty($date_end)) { // We define date_start and date_end - $q = GETPOST("q", "int"); + $q = GETPOSTINT("q"); if (empty($q)) { - if (GETPOST("month", "int")) { - $date_start = dol_get_first_day($year_start, GETPOST("month", "int"), false); - $date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false); + if (GETPOSTINT("month")) { + $date_start = dol_get_first_day($year_start, GETPOSTINT("month"), false); + $date_end = dol_get_last_day($year_start, GETPOSTINT("month"), false); } else { $date_start = dol_get_first_day($year_start, $conf->global->SOCIETE_FISCAL_MONTH_START, false); $date_end = dol_time_plus_duree($date_start, 1, 'y') - 1; @@ -82,14 +82,14 @@ if (empty($date_start) || empty($date_end)) { // We define date_start and date_e // 0=normal, 1=option vat for services is on debit, 2=option on payments for products $modetax = getDolGlobalString('TAX_MODE'); if (GETPOSTISSET("modetax")) { - $modetax = GETPOST("modetax", 'int'); + $modetax = GETPOSTINT("modetax"); } if (empty($modetax)) { $modetax = 0; } // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/compta/localtax/list.php b/htdocs/compta/localtax/list.php index f7e1a6a5431..6b11de62daa 100644 --- a/htdocs/compta/localtax/list.php +++ b/htdocs/compta/localtax/list.php @@ -28,16 +28,16 @@ require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; // Load translation files required by the page $langs->load("compta"); -$limit = GETPOST('limit', 'int'); +$limit = GETPOSTINT('limit'); // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } $result = restrictedArea($user, 'tax', '', '', 'charges'); -$ltt = GETPOST("localTaxType", 'int'); +$ltt = GETPOSTINT("localTaxType"); $mode = GETPOST('mode', 'alpha'); diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 6a508abb5f8..63df3750d22 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -45,9 +45,9 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class. // Load translation files required by the page $langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "product", "trips", "admin")); -$local = GETPOST('localTaxType', 'int'); +$local = GETPOSTINT('localTaxType'); // Date range -$year = GETPOST("year", "int"); +$year = GETPOSTINT("year"); if (empty($year)) { $year_current = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $year_start = $year_current; @@ -59,11 +59,11 @@ $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_star $date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear")); // Quarter if (empty($date_start) || empty($date_end)) { // We define date_start and date_end - $q = GETPOST("q", "int"); + $q = GETPOSTINT("q"); if (empty($q)) { - if (GETPOST("month", "int")) { - $date_start = dol_get_first_day($year_start, GETPOST("month", "int"), false); - $date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false); + if (GETPOSTINT("month")) { + $date_start = dol_get_first_day($year_start, GETPOSTINT("month"), false); + $date_end = dol_get_last_day($year_start, GETPOSTINT("month"), false); } else { $date_start = dol_get_first_day($year_start, !getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START, false); if (!getDolGlobalString('MAIN_INFO_VAT_RETURN') || getDolGlobalInt('MAIN_INFO_VAT_RETURN') == 2) { @@ -105,14 +105,14 @@ if (empty($min)) { $calc = getDolGlobalString('MAIN_INFO_LOCALTAX_CALC').$local; $modetax = getDolGlobalInt('TAX_MODE'); if (GETPOSTISSET("modetax")) { - $modetax = GETPOST("modetax", 'int'); + $modetax = GETPOSTINT("modetax"); } if (empty($modetax)) { $modetax = 0; } // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 8a066a3ba42..2a593eb6543 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -53,7 +53,7 @@ $socid = GETPOSTINT('socid'); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); $amounts = array(); $amountsresttopay = array(); @@ -164,7 +164,7 @@ if (empty($reshook)) { } } - $formquestion[$i++] = array('type' => 'hidden', 'name' => $key, 'value' => GETPOST($key, 'int')); + $formquestion[$i++] = array('type' => 'hidden', 'name' => $key, 'value' => GETPOSTINT($key)); } } @@ -253,7 +253,7 @@ if (empty($reshook)) { if (isModEnabled("banque")) { // If the bank module is active, an account is required to input a payment - if (GETPOST('accountid', 'int') <= 0) { + if (GETPOSTINT('accountid') <= 0) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('AccountToCredit')), null, 'errors'); $error++; } @@ -933,7 +933,7 @@ if (!GETPOST('action', 'aZ09')) { if (empty($page) || $page == -1) { $page = 0; } - $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; + $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $offset = $limit * $page; if (!$sortorder) { diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 7252650d2e0..bfdd60e522f 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -43,13 +43,13 @@ if (isModEnabled('margin')) { // Load translation files required by the page $langs->loadLangs(array('bills', 'banks', 'companies')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($socid < 0) { $socid = 0; } @@ -218,7 +218,7 @@ if (empty($reshook)) { } if ($action == 'setdatep' && GETPOST('datepday') && $user->hasRight('facture', 'paiement')) { - $datepaye = dol_mktime(GETPOST('datephour', 'int'), GETPOST('datepmin', 'int'), GETPOST('datepsec', 'int'), GETPOST('datepmonth', 'int'), GETPOST('datepday', 'int'), GETPOST('datepyear', 'int')); + $datepaye = dol_mktime(GETPOSTINT('datephour'), GETPOSTINT('datepmin'), GETPOSTINT('datepsec'), GETPOSTINT('datepmonth'), GETPOSTINT('datepday'), GETPOSTINT('datepyear')); $res = $object->update_date($datepaye); if ($res === 0) { setEventMessages($langs->trans('PaymentDateUpdateSucceeded'), null, 'mesgs'); @@ -237,7 +237,7 @@ if (empty($reshook)) { $label = '(CustomerInvoicePaymentBack)'; // Refund of a credit note } - $bankaccountid = GETPOST('accountid', 'int'); + $bankaccountid = GETPOSTINT('accountid'); if ($bankaccountid > 0) { $object->paiementcode = $object->type_code; $object->amounts = $object->getAmountsArray(); diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 898320fdb1c..b2dcd4f0bc5 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -51,7 +51,7 @@ $object = new RemiseCheque($db); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (!$sortorder) { $sortorder = "ASC"; } @@ -61,21 +61,21 @@ if (!$sortfield) { if (empty($page) || $page == -1) { $page = 0; } -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $offset = $limit * $page; $upload_dir = $conf->bank->multidir_output[$object->entity ? $object->entity : $conf->entity]."/checkdeposits"; // filter by dates from / to -$search_date_start_day = GETPOST('search_date_start_day', 'int'); -$search_date_start_month = GETPOST('search_date_start_month', 'int'); -$search_date_start_year = GETPOST('search_date_start_year', 'int'); -$search_date_end_day = GETPOST('search_date_end_day', 'int'); -$search_date_end_month = GETPOST('search_date_end_month', 'int'); -$search_date_end_year = GETPOST('search_date_end_year', 'int'); +$search_date_start_day = GETPOSTINT('search_date_start_day'); +$search_date_start_month = GETPOSTINT('search_date_start_month'); +$search_date_start_year = GETPOSTINT('search_date_start_year'); +$search_date_end_day = GETPOSTINT('search_date_end_day'); +$search_date_end_month = GETPOSTINT('search_date_end_month'); +$search_date_end_year = GETPOSTINT('search_date_end_year'); $search_date_start = dol_mktime(0, 0, 0, $search_date_start_month, $search_date_start_day, $search_date_start_year); $search_date_end = dol_mktime(23, 59, 59, $search_date_end_month, $search_date_end_day, $search_date_end_year); -$filteraccountid = GETPOST('accountid', 'int'); +$filteraccountid = GETPOSTINT('accountid'); // Security check $fieldname = (!empty($ref) ? 'ref' : 'rowid'); @@ -100,9 +100,9 @@ $arrayofpaymentmodetomanage = explode(',', getDolGlobalString('BANK_PAYMENT_MODE */ if ($action == 'setdate' && $user->hasRight('banque', 'cheque')) { - $result = $object->fetch(GETPOST('id', 'int')); + $result = $object->fetch(GETPOSTINT('id')); if ($result > 0) { - $date = dol_mktime(0, 0, 0, GETPOST('datecreate_month', 'int'), GETPOST('datecreate_day', 'int'), GETPOST('datecreate_year', 'int')); + $date = dol_mktime(0, 0, 0, GETPOSTINT('datecreate_month'), GETPOSTINT('datecreate_day'), GETPOSTINT('datecreate_year')); $result = $object->set_date($user, $date); if ($result < 0) { @@ -114,7 +114,7 @@ if ($action == 'setdate' && $user->hasRight('banque', 'cheque')) { } if ($action == 'setrefext' && $user->hasRight('banque', 'cheque')) { - $result = $object->fetch(GETPOST('id', 'int')); + $result = $object->fetch(GETPOSTINT('id')); if ($result > 0) { $ref_ext = GETPOST('ref_ext'); @@ -128,7 +128,7 @@ if ($action == 'setrefext' && $user->hasRight('banque', 'cheque')) { } if ($action == 'setref' && $user->hasRight('banque', 'cheque')) { - $result = $object->fetch(GETPOST('id', 'int')); + $result = $object->fetch(GETPOSTINT('id')); if ($result > 0) { $ref = GETPOST('ref'); @@ -141,12 +141,12 @@ if ($action == 'setref' && $user->hasRight('banque', 'cheque')) { } } -if ($action == 'create' && GETPOST("accountid", "int") > 0 && $user->hasRight('banque', 'cheque')) { +if ($action == 'create' && GETPOSTINT("accountid") > 0 && $user->hasRight('banque', 'cheque')) { if (GETPOSTISARRAY('toRemise')) { $object->type = $type; $arrayofid = GETPOST('toRemise', 'array:int'); - $result = $object->create($user, GETPOST("accountid", "int"), 0, $arrayofid); + $result = $object->create($user, GETPOSTINT("accountid"), 0, $arrayofid); if ($result > 0) { if ($object->statut == 1) { // If statut is validated, we build doc $object->fetch($object->id); // To force to reload all properties in correct property name @@ -175,9 +175,9 @@ if ($action == 'create' && GETPOST("accountid", "int") > 0 && $user->hasRight('b } } -if ($action == 'remove' && $id > 0 && GETPOST("lineid", 'int') > 0 && $user->hasRight('banque', 'cheque')) { +if ($action == 'remove' && $id > 0 && GETPOSTINT("lineid") > 0 && $user->hasRight('banque', 'cheque')) { $object->id = $id; - $result = $object->removeCheck(GETPOST("lineid", "int")); + $result = $object->removeCheck(GETPOSTINT("lineid")); if ($result === 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; @@ -223,7 +223,7 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $user->hasRight('banqu if ($action == 'confirm_reject_check' && $confirm == 'yes' && $user->hasRight('banque', 'cheque')) { $reject_date = dol_mktime(0, 0, 0, GETPOST('rejectdate_month'), GETPOST('rejectdate_day'), GETPOST('rejectdate_year')); - $rejected_check = GETPOST('bankid', 'int'); + $rejected_check = GETPOSTINT('bankid'); $object->fetch($id); $paiement_id = $object->rejectCheck($rejected_check, $reject_date); @@ -362,7 +362,7 @@ if ($action == 'new') { */ if ($action == 'reject_check') { $formquestion = array( - array('type' => 'hidden', 'name' => 'bankid', 'value' => GETPOST('lineid', 'int')), + array('type' => 'hidden', 'name' => 'bankid', 'value' => GETPOSTINT('lineid')), array('type' => 'date', 'name' => 'rejectdate_', 'label' => $langs->trans("RejectCheckDate"), 'value' => dol_now()) ); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("RejectCheck"), $langs->trans("ConfirmRejectCheck"), 'confirm_reject_check', $formquestion, '', 1); diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 8aa74f5fe2a..3d7129afbcd 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -42,22 +42,22 @@ if ($user->socid) { $result = restrictedArea($user, 'banque', '', ''); $search_ref = GETPOST('search_ref', 'alpha'); -$search_date_startday = GETPOST('search_date_startday', 'int'); -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); -$search_date_startyear = GETPOST('search_date_startyear', 'int'); -$search_date_endday = GETPOST('search_date_endday', 'int'); -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); -$search_date_endyear = GETPOST('search_date_endyear', 'int'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_endday = GETPOSTINT('search_date_endday'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); -$search_account = GETPOST('search_account', 'int'); +$search_account = GETPOSTINT('search_account'); $search_amount = GETPOST('search_amount', 'alpha'); $mode = GETPOST('mode', 'alpha'); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/compta/paiement/info.php b/htdocs/compta/paiement/info.php index 1cbee7a50cb..424a960061e 100644 --- a/htdocs/compta/paiement/info.php +++ b/htdocs/compta/paiement/info.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; // Load translation files required by the page $langs->loadLangs(array('bills', 'companies')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 693f6c8de39..bbded249fb9 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -47,32 +47,32 @@ $confirm = GETPOST('confirm', 'alpha'); $optioncss = GETPOST('optioncss', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'paymentlist'; -$facid = GETPOST('facid', 'int'); -$socid = GETPOST('socid', 'int'); -$userid = GETPOST('userid', 'int'); +$facid = GETPOSTINT('facid'); +$socid = GETPOSTINT('socid'); +$userid = GETPOSTINT('userid'); $search_ref = GETPOST("search_ref", "alpha"); -$search_date_startday = GETPOST('search_date_startday', 'int'); -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); -$search_date_startyear = GETPOST('search_date_startyear', 'int'); -$search_date_endday = GETPOST('search_date_endday', 'int'); -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); -$search_date_endyear = GETPOST('search_date_endyear', 'int'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_endday = GETPOSTINT('search_date_endday'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); $search_company = GETPOST("search_company", 'alpha'); $search_paymenttype = GETPOST("search_paymenttype"); -$search_account = GETPOST("search_account", "int"); +$search_account = GETPOSTINT("search_account"); $search_payment_num = GETPOST('search_payment_num', 'alpha'); $search_amount = GETPOST("search_amount", 'alpha'); // alpha because we must be able to search on "< x" $search_status = GETPOST('search_status', 'intcomma'); -$search_sale = GETPOST('search_sale', 'int'); +$search_sale = GETPOSTINT('search_sale'); $mode = GETPOST('mode', 'alpha'); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; // If $page is not defined, or '' or -1 diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index 9685b6821c2..52c5bfb27fe 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -44,7 +44,7 @@ if (!$user->hasRight('societe', 'client', 'voir')) { $dir .= '/private/'.$user->id; // If user has no permission to see all, output dir is specific to user } -$year = GETPOST('year', 'int'); +$year = GETPOSTINT('year'); if (!$year) { $year = date("Y"); } @@ -71,14 +71,14 @@ if ($action == 'builddoc') { // We save charset_output to restore it because write_file can change it if needed for // output format that does not support UTF8. $sav_charset_output = $outputlangs->charset_output; - if ($rap->write_file($dir, GETPOST("remonth", "int"), GETPOST("reyear", "int"), $outputlangs) > 0) { + if ($rap->write_file($dir, GETPOSTINT("remonth"), GETPOSTINT("reyear"), $outputlangs) > 0) { $outputlangs->charset_output = $sav_charset_output; } else { $outputlangs->charset_output = $sav_charset_output; dol_print_error($db, $obj->error); } - $year = GETPOST("reyear", "int"); + $year = GETPOSTINT("reyear"); } diff --git a/htdocs/compta/paiement/tovalidate.php b/htdocs/compta/paiement/tovalidate.php index 5caada7cd7e..8735b7c0ebd 100644 --- a/htdocs/compta/paiement/tovalidate.php +++ b/htdocs/compta/paiement/tovalidate.php @@ -35,10 +35,10 @@ if ($user->socid > 0) { } -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index c61dbcf3084..dce1a7f5d83 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -60,7 +60,7 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y exit; } - $datepaye = dol_mktime(12, 0, 0, GETPOST("remonth", "int"), GETPOST("reday", "int"), GETPOST("reyear", "int")); + $datepaye = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); if (!(GETPOST("paiementtype") > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")), null, 'errors'); @@ -118,7 +118,7 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y } if (!$error) { - $result = $paiement->addPaymentToBank($user, 'payment_sc', '(SocialContributionPayment)', GETPOST('accountid', 'int'), '', ''); + $result = $paiement->addPaymentToBank($user, 'payment_sc', '(SocialContributionPayment)', GETPOSTINT('accountid'), '', ''); if (!($result > 0)) { $error++; setEventMessages($paiement->error, null, 'errors'); @@ -202,7 +202,7 @@ if ($action == 'create') { print '';*/ print '"; @@ -218,7 +218,7 @@ if ($action == 'create') { print ''; print ''; // Number diff --git a/htdocs/compta/paiement_vat.php b/htdocs/compta/paiement_vat.php index 3cac781c50e..30fb1768dc7 100644 --- a/htdocs/compta/paiement_vat.php +++ b/htdocs/compta/paiement_vat.php @@ -58,9 +58,9 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y exit; } - $datepaye = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int')); + $datepaye = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); - if (!(GETPOST("paiementtype", 'int') > 0)) { + if (!(GETPOSTINT("paiementtype") > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")), null, 'errors'); $error++; $action = 'create'; @@ -70,7 +70,7 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y $error++; $action = 'create'; } - if (isModEnabled("banque") && !(GETPOST("accountid", 'int') > 0)) { + if (isModEnabled("banque") && !(GETPOSTINT("accountid") > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToDebit")), null, 'errors'); $error++; $action = 'create'; @@ -116,7 +116,7 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y } if (!$error) { - $result = $paiement->addPaymentToBank($user, 'payment_vat', '(VATPayment)', GETPOST('accountid', 'int'), '', ''); + $result = $paiement->addPaymentToBank($user, 'payment_vat', '(VATPayment)', GETPOSTINT('accountid'), '', ''); if (!($result > 0)) { $error++; setEventMessages($paiement->error, null, 'errors'); @@ -201,14 +201,14 @@ if ($action == 'create') { print '';*/ print '"; print ''; print '\n"; print ''; @@ -216,7 +216,7 @@ if ($action == 'create') { print ''; print ''; // Number diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index fe6eb04fcde..7e6303486d0 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -40,7 +40,7 @@ if (isModEnabled("banque")) { $langs->loadLangs(array('bills', 'banks', 'companies')); // Security check -$id = GETPOST("id", 'int'); +$id = GETPOSTINT("id"); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'aZ09'); if ($user->socid) { diff --git a/htdocs/compta/payment_vat/card.php b/htdocs/compta/payment_vat/card.php index 12650cb0122..f27bec0c8b6 100644 --- a/htdocs/compta/payment_vat/card.php +++ b/htdocs/compta/payment_vat/card.php @@ -40,7 +40,7 @@ if (isModEnabled("banque")) { $langs->loadLangs(array('bills', 'banks', 'companies')); // Security check -$id = GETPOST("id", 'int'); +$id = GETPOSTINT("id"); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm'); if ($user->socid) { diff --git a/htdocs/compta/paymentbybanktransfer/index.php b/htdocs/compta/paymentbybanktransfer/index.php index 5f808e03e2e..8848d70c325 100644 --- a/htdocs/compta/paymentbybanktransfer/index.php +++ b/htdocs/compta/paymentbybanktransfer/index.php @@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; $langs->loadLangs(array('banks', 'categories', 'withdrawals')); // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index e9cf5f7dfa8..508c05c777f 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -38,17 +38,17 @@ $langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'withdrawal // Get supervariables $action = GETPOST('action', 'aZ09'); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); $type = GETPOST('type', 'aZ09'); -$date_trans = dol_mktime(GETPOST('date_transhour', 'int'), GETPOST('date_transmin', 'int'), GETPOST('date_transsec', 'int'), GETPOST('date_transmonth', 'int'), GETPOST('date_transday', 'int'), GETPOST('date_transyear', 'int')); +$date_trans = dol_mktime(GETPOSTINT('date_transhour'), GETPOSTINT('date_transmin'), GETPOSTINT('date_transsec'), GETPOSTINT('date_transmonth'), GETPOSTINT('date_transday'), GETPOSTINT('date_transyear')); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -104,7 +104,7 @@ if ($reshook < 0) { if (empty($reshook)) { if ($action == 'setbankaccount' && $permissiontoadd) { $object->oldcopy = dol_clone($object, 2); - $object->fk_bank_account = GETPOST('fk_bank_account', 'int'); + $object->fk_bank_account = GETPOSTINT('fk_bank_account'); $object->update($user); } @@ -119,7 +119,7 @@ if (empty($reshook)) { if ($action == 'infotrans' && $permissiontosend) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); + $dt = dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); /* if ($_FILES['userfile']['name'] && basename($_FILES['userfile']['name'],".ps") == $object->ref) @@ -150,7 +150,7 @@ if (empty($reshook)) { // Set direct debit order to credited, create payment and close invoices if ($action == 'setinfocredit' && $permissiontocreditdebit) { - $dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); + $dt = dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); if (($object->type != 'bank-transfer' && $object->statut == BonPrelevement::STATUS_CREDITED) || ($object->type == 'bank-transfer' && $object->statut == BonPrelevement::STATUS_DEBITED)) { $error = 1; diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index f9cbe577064..1e44e0d7088 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -51,11 +51,11 @@ $mode = GETPOST('mode', 'alpha') ? GETPOST('mode', 'alpha') : 'real'; $type = GETPOST('type', 'aZ09'); $sourcetype = GETPOST('sourcetype', 'aZ09'); $format = GETPOST('format', 'aZ09'); -$id_bankaccount = GETPOST('id_bankaccount', 'int'); -$executiondate = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); +$id_bankaccount = GETPOSTINT('id_bankaccount'); +$executiondate = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -64,7 +64,7 @@ $offset = $limit * $page; $hookmanager->initHooks(array('directdebitcreatecard', 'globalcard')); // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } @@ -218,7 +218,7 @@ $arrayofselected = is_array($toselect) ? $toselect : array(); // List of mass actions available $arrayofmassactions = array( ); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index a072d5774da..50177879826 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -37,8 +37,8 @@ require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; $langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies')); // Security check -$socid = GETPOST('socid', 'int'); -$status = GETPOST('status', 'int'); +$socid = GETPOSTINT('socid'); +$status = GETPOSTINT('status'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'directdebitcredittransferlist'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page @@ -51,10 +51,10 @@ $search_facture = GETPOST('search_facture', 'alpha'); $search_societe = GETPOST('search_societe', 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index 157188d326f..358d5c9fff6 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -38,17 +38,17 @@ require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; $langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'withdrawals', 'salaries', 'suppliers')); // Get supervariables -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); -$socid = GETPOST('socid', 'int'); -$userid = GETPOST('userid', 'int'); +$socid = GETPOSTINT('socid'); +$userid = GETPOSTINT('userid'); $type = GETPOST('type', 'aZ09'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 28992168195..fe3334fcfb9 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -45,16 +45,16 @@ if ($user->socid > 0) { } // Get supervariables -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $type = GETPOST('type', 'aZ09'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index dee3198493b..370a9a21ddc 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -35,16 +35,16 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->loadLangs(array("banks", "categories", 'withdrawals', 'bills')); // Get supervariables -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $type = GETPOST('type', 'aZ09'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index 341b378cc05..b8c75847372 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->loadLangs(array('banks', 'categories', 'withdrawals')); // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php index 340e0cde34e..ff5bdf390b3 100644 --- a/htdocs/compta/prelevement/line.php +++ b/htdocs/compta/prelevement/line.php @@ -38,15 +38,15 @@ $langs->loadlangs(array('banks', 'categories', 'bills', 'companies', 'withdrawal // Get supervariables $action = GETPOST('action', 'aZ09'); -$id = GETPOST('id', 'int'); -$socid = GETPOST('socid', 'int'); +$id = GETPOSTINT('id'); +$socid = GETPOSTINT('socid'); $type = GETPOST('type', 'aZ09'); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortorder = GETPOST('sortorder', 'aZ09comma'); $sortfield = GETPOST('sortfield', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -84,8 +84,8 @@ $error = 0; if ($action == 'confirm_rejet' && $permissiontoadd) { if (GETPOST("confirm") == 'yes') { - if (GETPOST('remonth', 'int')) { - $daterej = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); + if (GETPOSTINT('remonth')) { + $daterej = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); } if (empty($daterej)) { @@ -108,7 +108,7 @@ if ($action == 'confirm_rejet' && $permissiontoadd) { if ($lipre->fetch($id) == 0) { $rej = new RejetPrelevement($db, $user, $type); - $result = $rej->create($user, $id, GETPOST('motif', 'alpha'), $daterej, $lipre->bon_rowid, GETPOST('facturer', 'int')); + $result = $rej->create($user, $id, GETPOSTINT('motif'), $daterej, $lipre->bon_rowid, GETPOSTINT('facturer')); if ($result > 0) { header("Location: line.php?id=".urlencode($id).'&type='.urlencode($type)); @@ -239,7 +239,7 @@ if ($id) { //Reason print ''; print ''; //Facturer @@ -247,7 +247,7 @@ if ($id) { print $form->textwithpicto($langs->trans("RefusedInvoicing"), $langs->trans("DirectDebitRefusedInvoicingDesc")); print ''; print ''; print '
'.$langs->trans('DateInvoice').''; @@ -3854,11 +3854,11 @@ if ($action == 'create') { if (getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY')) { $rwStyle = 'display:none;'; - if (in_array(GETPOST('type', 'int'), $retainedWarrantyInvoiceAvailableType)) { + if (in_array(GETPOSTINT('type'), $retainedWarrantyInvoiceAvailableType)) { $rwStyle = ''; } - $retained_warranty = GETPOST('retained_warranty', 'int'); + $retained_warranty = GETPOSTINT('retained_warranty'); if (empty($retained_warranty)) { if (!empty($objectsrc->retained_warranty)) { // use previous situation value $retained_warranty = $objectsrc->retained_warranty; @@ -3871,7 +3871,7 @@ if ($action == 'create') { // Retained warranty payment term print '
'.$langs->trans('PaymentConditionsShortRetainedWarranty').''; - $retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int'); + $retained_warranty_fk_cond_reglement = GETPOSTINT('retained_warranty_fk_cond_reglement'); if (empty($retained_warranty_fk_cond_reglement)) { $retained_warranty_fk_cond_reglement = getDolGlobalString('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID'); if (!empty($objectsrc->retained_warranty_fk_cond_reglement)) { // use previous situation value @@ -3986,7 +3986,7 @@ if ($action == 'create') { // Help of substitution key $htmltext = ''; - if (GETPOST('fac_rec', 'int') > 0) { + if (GETPOSTINT('fac_rec') > 0) { $dateexample = ($newdateinvoice ? $newdateinvoice : $dateinvoice); if (empty($dateexample)) { $dateexample = dol_now(); @@ -4910,7 +4910,7 @@ if ($action == 'create') { print ''; print ''; print ''; - $retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int'); + $retained_warranty_fk_cond_reglement = GETPOSTINT('retained_warranty_fk_cond_reglement'); $retained_warranty_fk_cond_reglement = !empty($retained_warranty_fk_cond_reglement) ? $retained_warranty_fk_cond_reglement : $object->retained_warranty_fk_cond_reglement; $retained_warranty_fk_cond_reglement = !empty($retained_warranty_fk_cond_reglement) ? $retained_warranty_fk_cond_reglement : getDolGlobalString('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID'); print $form->getSelectConditionsPaiements($retained_warranty_fk_cond_reglement, 'retained_warranty_fk_cond_reglement', -1, 1); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 76941f3ee16..12bbd6fa5f0 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -538,12 +538,12 @@ class Facture extends CommonInvoice // Fields coming from GUI. // @TODO Value of template should be used as default value on the form on the GUI, and we should here always use the value from GUI // set by posted page with $object->xxx = ... and this section should be removed. - $this->fk_project = GETPOST('projectid', 'int') > 0 ? GETPOSTINT('projectid') : $_facrec->fk_project; + $this->fk_project = GETPOSTINT('projectid') > 0 ? GETPOSTINT('projectid') : $_facrec->fk_project; $this->note_public = GETPOSTISSET('note_public') ? GETPOST('note_public', 'restricthtml') : $_facrec->note_public; $this->note_private = GETPOSTISSET('note_private') ? GETPOST('note_private', 'restricthtml') : $_facrec->note_private; $this->model_pdf = GETPOSTISSET('model') ? GETPOST('model', 'alpha') : $_facrec->model_pdf; - $this->cond_reglement_id = GETPOST('cond_reglement_id', 'int') > 0 ? GETPOSTINT('cond_reglement_id') : $_facrec->cond_reglement_id; - $this->mode_reglement_id = GETPOST('mode_reglement_id', 'int') > 0 ? GETPOSTINT('mode_reglement_id') : $_facrec->mode_reglement_id; + $this->cond_reglement_id = GETPOSTINT('cond_reglement_id') > 0 ? GETPOSTINT('cond_reglement_id') : $_facrec->cond_reglement_id; + $this->mode_reglement_id = GETPOSTINT('mode_reglement_id') > 0 ? GETPOSTINT('mode_reglement_id') : $_facrec->mode_reglement_id; $this->fk_account = GETPOST('fk_account') > 0 ? GETPOSTINT('fk_account') : $_facrec->fk_account; // Set here to have this defined for substitution into notes, should be recalculated after adding lines to get same result diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 616a365e879..a6bb2603558 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -40,10 +40,10 @@ if (isModEnabled('project')) { // Load translation files required by the page $langs->loadLangs(array('bills', 'companies')); -$id = (GETPOST('id') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility +$id = (GETPOST('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); -$lineid = GETPOST('lineid', 'int'); -$socid = GETPOST('socid', 'int'); +$lineid = GETPOSTINT('lineid'); +$socid = GETPOSTINT('socid'); $action = GETPOST('action', 'aZ09'); // Security check @@ -77,7 +77,7 @@ if (empty($reshook)) { // Add new contact if ($action == 'addcontact' && $user->hasRight('facture', 'creer')) { if ($result > 0 && $id > 0) { - $contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); + $contactid = (GETPOST('userid') ? GETPOSTINT('userid') : GETPOSTINT('contactid')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } @@ -95,7 +95,7 @@ if (empty($reshook)) { } } elseif ($action == 'swapstatut' && $user->hasRight('facture', 'creer')) { // Toggle the status of a contact - $result = $object->swapContactStatus(GETPOST('ligne', 'int')); + $result = $object->swapContactStatus(GETPOSTINT('ligne')); } elseif ($action == 'deletecontact' && $user->hasRight('facture', 'creer')) { // Delete contact $result = $object->delete_contact($lineid); diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index a687998b04a..44519923cbe 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -43,17 +43,17 @@ if (isModEnabled('project')) { $langs->loadLangs(array('propal', 'compta', 'other', 'bills', 'companies')); -$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility +$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Get parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/compta/facture/index.php b/htdocs/compta/facture/index.php index fe614a7d2dc..ea2543aeb90 100644 --- a/htdocs/compta/facture/index.php +++ b/htdocs/compta/facture/index.php @@ -35,7 +35,7 @@ restrictedArea($user, 'facture'); $langs->load('bills'); // Filter to show only result of one customer -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if (isset($user->socid) && $user->socid > 0) { $action = ''; $socid = $user->socid; diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index 95b739eb5a7..13052314892 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -47,7 +47,7 @@ $langs->loadLangs(array('companies', 'bills', 'compta', 'admin', 'other')); $action = GETPOST('action', 'alpha'); $massaction = GETPOST('massaction', 'alpha'); -$show_files = GETPOST('show_files', 'int'); +$show_files = GETPOSTINT('show_files'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $toselect = GETPOST('toselect', 'array'); @@ -55,10 +55,10 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'in $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); -$id = (GETPOST('facid', 'int') ? GETPOST('facid', 'int') : GETPOST('id', 'int')); -$lineid = GETPOST('lineid', 'int'); +$id = (GETPOSTINT('facid') ? GETPOSTINT('facid') : GETPOSTINT('id')); +$lineid = GETPOSTINT('lineid'); $ref = GETPOST('ref', 'alpha'); if ($user->socid) { $socid = $user->socid; @@ -75,32 +75,32 @@ $search_montant_vat = GETPOST('search_montant_vat'); $search_montant_ttc = GETPOST('search_montant_ttc'); $search_payment_mode = GETPOST('search_payment_mode'); $search_payment_term = GETPOST('search_payment_term'); -$search_date_startday = GETPOST('search_date_startday', 'int'); -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); -$search_date_startyear = GETPOST('search_date_startyear', 'int'); -$search_date_endday = GETPOST('search_date_endday', 'int'); -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); -$search_date_endyear = GETPOST('search_date_endyear', 'int'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_endday = GETPOSTINT('search_date_endday'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); -$search_date_when_startday = GETPOST('search_date_when_startday', 'int'); -$search_date_when_startmonth = GETPOST('search_date_when_startmonth', 'int'); -$search_date_when_startyear = GETPOST('search_date_when_startyear', 'int'); -$search_date_when_endday = GETPOST('search_date_when_endday', 'int'); -$search_date_when_endmonth = GETPOST('search_date_when_endmonth', 'int'); -$search_date_when_endyear = GETPOST('search_date_when_endyear', 'int'); +$search_date_when_startday = GETPOSTINT('search_date_when_startday'); +$search_date_when_startmonth = GETPOSTINT('search_date_when_startmonth'); +$search_date_when_startyear = GETPOSTINT('search_date_when_startyear'); +$search_date_when_endday = GETPOSTINT('search_date_when_endday'); +$search_date_when_endmonth = GETPOSTINT('search_date_when_endmonth'); +$search_date_when_endyear = GETPOSTINT('search_date_when_endyear'); $search_date_when_start = dol_mktime(0, 0, 0, $search_date_when_startmonth, $search_date_when_startday, $search_date_when_startyear); // Use tzserver $search_date_when_end = dol_mktime(23, 59, 59, $search_date_when_endmonth, $search_date_when_endday, $search_date_when_endyear); -$search_recurring = GETPOST('search_recurring', 'int'); +$search_recurring = GETPOSTINT('search_recurring'); $search_frequency = GETPOST('search_frequency', 'alpha'); $search_unit_frequency = GETPOST('search_unit_frequency', 'alpha'); $search_nb_gen_done = GETPOST('search_nb_gen_done', 'alpha'); -$search_status = GETPOST('search_status', 'int'); +$search_status = GETPOSTINT('search_status'); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 391b9bb084d..d728541b8d9 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -64,15 +64,15 @@ if (isModEnabled('commande')) { $langs->loadLangs(array('bills', 'companies', 'products', 'categories')); $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); -$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0); +$projectid = (GETPOST('projectid') ? GETPOSTINT('projectid') : 0); -$id = (GETPOST('id', 'int') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility +$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); $socid = GETPOSTINT('socid'); $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); -$show_files = GETPOST('show_files', 'int'); +$show_files = GETPOSTINT('show_files'); $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); $optioncss = GETPOST('optioncss', 'alpha'); @@ -87,8 +87,8 @@ $lineid = GETPOSTINT('lineid'); $userid = GETPOSTINT('userid'); $search_ref = GETPOST('sf_ref') ? GETPOST('sf_ref', 'alpha') : GETPOST('search_ref', 'alpha'); $search_refcustomer = GETPOST('search_refcustomer', 'alpha'); -$search_type = GETPOST('search_type', 'int'); -$search_subtype = GETPOST('search_subtype', 'int'); +$search_type = GETPOSTINT('search_type'); +$search_subtype = GETPOSTINT('search_subtype'); $search_project_ref = GETPOST('search_project_ref', 'alpha'); $search_project = GETPOST('search_project', 'alpha'); $search_company = GETPOST('search_company', 'alpha'); @@ -106,8 +106,8 @@ $search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'a $search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', 'alpha'); $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha'); $search_status = GETPOST('search_status', 'intcomma'); -$search_paymentmode = GETPOST('search_paymentmode', 'int'); -$search_paymentterms = GETPOST('search_paymentterms', 'int'); +$search_paymentmode = GETPOSTINT('search_paymentmode'); +$search_paymentterms = GETPOSTINT('search_paymentterms'); $search_module_source = GETPOST('search_module_source', 'alpha'); $search_pos_source = GETPOST('search_pos_source', 'alpha'); $search_town = GETPOST('search_town', 'alpha'); @@ -115,9 +115,9 @@ $search_zip = GETPOST('search_zip', 'alpha'); $search_state = GETPOST("search_state"); $search_country = GETPOST("search_country", 'alpha'); $search_customer_code = GETPOST("search_customer_code", 'alphanohtml'); -$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int'); -$search_user = GETPOST('search_user', 'int'); -$search_sale = GETPOST('search_sale', 'int'); +$search_type_thirdparty = GETPOSTINT("search_type_thirdparty"); +$search_user = GETPOSTINT('search_user'); +$search_sale = GETPOSTINT('search_sale'); $search_date_startday = GETPOSTINT('search_date_startday'); $search_date_startmonth = GETPOSTINT('search_date_startmonth'); $search_date_startyear = GETPOSTINT('search_date_startyear'); @@ -142,8 +142,8 @@ $search_datelimit_endmonth = GETPOSTINT('search_datelimit_endmonth'); $search_datelimit_endyear = GETPOSTINT('search_datelimit_endyear'); $search_datelimit_start = dol_mktime(0, 0, 0, $search_datelimit_startmonth, $search_datelimit_startday, $search_datelimit_startyear); $search_datelimit_end = dol_mktime(23, 59, 59, $search_datelimit_endmonth, $search_datelimit_endday, $search_datelimit_endyear); -$search_categ_cus = GETPOST("search_categ_cus", 'int'); -$search_product_category = GETPOST('search_product_category', 'int'); +$search_categ_cus = GETPOSTINT("search_categ_cus"); +$search_product_category = GETPOSTINT('search_product_category'); $search_fac_rec_source_title = GETPOST("search_fac_rec_source_title", 'alpha'); $search_btn = GETPOST('button_search', 'alpha'); $search_remove_btn = GETPOST('button_removefilter', 'alpha'); @@ -157,7 +157,7 @@ $filtre = GETPOST('filtre', 'alpha'); $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 226984ec5f4..7c93f507ff9 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -37,9 +37,9 @@ if (isModEnabled('project')) { // Load translation files required by the page $langs->loadLangs(array('companies', 'bills')); -$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility +$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); $action = GETPOST('action', 'aZ09'); $object = new Facture($db); diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 9942b002a73..e79cc953f3a 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -42,9 +42,9 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; // Load translation files required by the page $langs->loadLangs(array('bills', 'banks', 'withdrawals', 'companies')); -$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility +$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); $action = GETPOST('action', 'aZ09'); $type = GETPOST('type', 'aZ09'); @@ -130,7 +130,7 @@ if (empty($reshook)) { if ($action == "delete" && $usercancreate) { if ($object->id > 0) { - $result = $object->demande_prelevement_delete($user, GETPOST('did', 'int')); + $result = $object->demande_prelevement_delete($user, GETPOSTINT('did')); if ($result == 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id.'&type='.$type); exit; @@ -140,7 +140,7 @@ if (empty($reshook)) { // Make payment with Direct Debit Stripe if ($action == 'sepastripedirectdebit' && $usercancreate) { - $result = $object->makeStripeSepaRequest($user, GETPOST('did', 'int'), 'direct-debit', 'facture'); + $result = $object->makeStripeSepaRequest($user, GETPOSTINT('did'), 'direct-debit', 'facture'); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { @@ -155,7 +155,7 @@ if (empty($reshook)) { // Make payment with Direct Debit Stripe if ($action == 'sepastripecredittransfer' && $usercancreate) { - $result = $object->makeStripeSepaRequest($user, GETPOST('did', 'int'), 'bank-transfer', 'supplier_invoice'); + $result = $object->makeStripeSepaRequest($user, GETPOSTINT('did'), 'bank-transfer', 'supplier_invoice'); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { @@ -179,7 +179,7 @@ if (empty($reshook)) { $db->begin(); if (!$error) { - $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); + $result = $object->setPaymentTerms(GETPOSTINT('cond_reglement_id')); if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); @@ -209,9 +209,9 @@ if (empty($reshook)) { } } elseif ($action == 'setmode' && $usercancreate) { // payment mode - $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); + $result = $object->setPaymentMethods(GETPOSTINT('mode_reglement_id')); } elseif ($action == 'setdatef' && $usercancreate) { - $newdate = dol_mktime(0, 0, 0, GETPOST('datefmonth', 'int'), GETPOST('datefday', 'int'), GETPOST('datefyear', 'int'), 'tzserver'); + $newdate = dol_mktime(0, 0, 0, GETPOSTINT('datefmonth'), GETPOSTINT('datefday'), GETPOSTINT('datefyear'), 'tzserver'); if ($newdate > (dol_now('tzuserrel') + (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY') ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) { if (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY')) { setEventMessages($langs->trans("WarningInvoiceDateInFuture"), null, 'warnings'); @@ -234,7 +234,7 @@ if (empty($reshook)) { dol_print_error($db, $object->error); } } elseif ($action == 'setdate_lim_reglement' && $usercancreate) { - $object->date_echeance = dol_mktime(12, 0, 0, GETPOST('date_lim_reglementmonth', 'int'), GETPOST('date_lim_reglementday', 'int'), GETPOST('date_lim_reglementyear', 'int')); + $object->date_echeance = dol_mktime(12, 0, 0, GETPOSTINT('date_lim_reglementmonth'), GETPOSTINT('date_lim_reglementday'), GETPOSTINT('date_lim_reglementyear')); if (!empty($object->date_echeance) && $object->date_echeance < $object->date) { $object->date_echeance = $object->date; setEventMessages($langs->trans("DatePaymentTermCantBeLowerThanObjectDate"), null, 'warnings'); diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index f98216140f9..8e5ca60137a 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -55,8 +55,8 @@ $object_status = GETPOST('object_status', 'intcomma'); $typent_id = GETPOSTINT('typent_id'); $categ_id = GETPOSTINT('categ_id'); -$userid = GETPOST('userid', 'int'); -$socid = GETPOST('socid', 'int'); +$userid = GETPOSTINT('userid'); +$socid = GETPOSTINT('socid'); $custcats = GETPOST('custcats', 'array'); // Security check if ($user->socid > 0) { @@ -65,7 +65,7 @@ if ($user->socid > 0) { } $nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); -$year = GETPOST('year') > 0 ? GETPOST('year', 'int') : $nowyear; +$year = GETPOST('year') > 0 ? GETPOSTINT('year') : $nowyear; $startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS')))); $endyear = $year; diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index e5e49696f0f..c280a92183e 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -56,7 +56,7 @@ if (isModEnabled('commande')) { // Get parameters $action = GETPOST('action', 'aZ09'); -$bid = GETPOST('bid', 'int'); +$bid = GETPOSTINT('bid'); // Security check $socid = ''; diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index 894aa3986d1..f52b3c2f72e 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -32,19 +32,19 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/vat.lib.php'; // Load translation files required by the page $langs->loadLangs(array('compta', 'banks', 'bills')); -$id = GETPOST("id", 'int'); +$id = GETPOSTINT("id"); $action = GETPOST("action", "aZ09"); $cancel = GETPOST('cancel', 'aZ09'); -$refund = GETPOST("refund", "int"); +$refund = GETPOSTINT("refund"); if (empty($refund)) { $refund = 0; } -$lttype = GETPOST('localTaxType', 'int'); +$lttype = GETPOSTINT('localTaxType'); // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } @@ -188,7 +188,7 @@ if ($action == 'create') { // Bank account print '
'.$langs->trans("BankAccount").''; print img_picto('', 'bank_account', 'pictofixedwidth'); - $form->select_comptes(GETPOST("accountid", "int"), "accountid", 0, "courant=1", 2, '', 0, 'maxwidth500 widthcentpercentminusx'); // Affiche liste des comptes courant + $form->select_comptes(GETPOSTINT("accountid"), "accountid", 0, "courant=1", 2, '', 0, 'maxwidth500 widthcentpercentminusx'); // Affiche liste des comptes courant print '
'.$langs->trans("RemainderToPay").''.price($total-$sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).'
'.$langs->trans("Date").''; - $datepaye = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int')); + $datepaye = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); $datepayment = !getDolGlobalString('MAIN_AUTOFILL_DATE') ? (GETPOSTISSET("remonth") ? $datepaye : -1) : ''; print $form->selectDate($datepayment, '', '', '', 0, "add_payment", 1, 1, 0, '', '', $charge->date_ech, '', 1, $langs->trans("DateOfSocialContribution")); print "'.$langs->trans('AccountToDebit').''; print img_picto('', 'bank_account', 'class="pictofixedwidth"'); - print $form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid", 'int') : $charge->accountid, "accountid", 0, '', 2, '', 0, 'maxwidth500 widthcentpercentminusx', 1); // Show opend bank account list + print $form->select_comptes(GETPOSTISSET("accountid") ? GETPOSTINT("accountid") : $charge->accountid, "accountid", 0, '', 2, '', 0, 'maxwidth500 widthcentpercentminusx', 1); // Show opend bank account list print '
'.$langs->trans("RemainderToPay").''.price($total-$sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).'
'.$langs->trans("Date").''; - $datepaye = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int')); - $datepayment = !getDolGlobalString('MAIN_AUTOFILL_DATE') ? (GETPOST("remonth", 'int') ? $datepaye : -1) : 0; + $datepaye = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); + $datepayment = !getDolGlobalString('MAIN_AUTOFILL_DATE') ? (GETPOSTINT("remonth") ? $datepaye : -1) : 0; print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1); print "
'.$langs->trans("PaymentMode").''; - print $form->select_types_paiements(GETPOSTISSET("paiementtype") ? GETPOST("paiementtype", "int") : $tva->paiementtype, "paiementtype", '', 0, 1, 0, 0, 1, 'maxwidth500 widthcentpercentminusx', 1); + print $form->select_types_paiements(GETPOSTISSET("paiementtype") ? GETPOSTINT("paiementtype") : $tva->paiementtype, "paiementtype", '', 0, 1, 0, 0, 1, 'maxwidth500 widthcentpercentminusx', 1); print "
'.$langs->trans('AccountToDebit').''; print img_picto('', 'bank_account', 'pictofixedwidth'); - $form->select_comptes(GETPOST("accountid", "int") ? GETPOST("accountid", "int") : $tva->accountid, "accountid", 0, '', 1, '', 0, 'maxwidth500 widthcentpercentminusx'); // Show opend bank account list + $form->select_comptes(GETPOSTINT("accountid") ? GETPOSTINT("accountid") : $tva->accountid, "accountid", 0, '', 1, '', 0, 'maxwidth500 widthcentpercentminusx'); // Show opend bank account list print '
'.$langs->trans("RefusedReason").''; - print $form->selectarray("motif", $rej->motifs, GETPOSTISSET('motif') ? GETPOST('motif', 'int') : ''); + print $form->selectarray("motif", $rej->motifs, GETPOSTISSET('motif') ? GETPOSTINT('motif') : ''); print '
'; - print $form->selectarray("facturer", $rej->labelsofinvoicing, GETPOSTISSET('facturer') ? GETPOST('facturer', 'int') : '', 0); + print $form->selectarray("facturer", $rej->labelsofinvoicing, GETPOSTISSET('facturer') ? GETPOSTINT('facturer') : '', 0); print '
'; diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index a03fa0e1148..e77bd4a2343 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -36,7 +36,7 @@ $langs->loadLangs(array('banks', 'withdrawals', 'companies', 'categories')); $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list @@ -48,10 +48,10 @@ $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hier $type = GETPOST('type', 'aZ09'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -70,7 +70,7 @@ $search_line = GETPOST('search_line', 'alpha'); $search_bon = GETPOST('search_bon', 'alpha'); $search_code = GETPOST('search_code', 'alpha'); $search_company = GETPOST('search_company', 'alpha'); -$statut = GETPOST('statut', 'int'); +$statut = GETPOSTINT('statut'); $bon = new BonPrelevement($db); $line = new LignePrelevement($db); @@ -80,7 +80,7 @@ $userstatic = new User($db); $hookmanager->initHooks(array('withdrawalsreceiptslineslist')); // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/compta/prelevement/orders_list.php b/htdocs/compta/prelevement/orders_list.php index 912e725e91d..5efc08d75ea 100644 --- a/htdocs/compta/prelevement/orders_list.php +++ b/htdocs/compta/prelevement/orders_list.php @@ -45,10 +45,10 @@ $mode = GETPOST('mode', 'alpha'); $type = GETPOST('type', 'aZ09'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -64,7 +64,7 @@ if (!$sortfield) { } // Get supervariables -$statut = GETPOST('statut', 'int'); +$statut = GETPOSTINT('statut'); $search_ref = GETPOST('search_ref', 'alpha'); $search_amount = GETPOST('search_amount', 'alpha'); @@ -79,7 +79,7 @@ if ($type == 'bank-transfer') { } // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 30db9e40c50..68e5c098bcd 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -40,10 +40,10 @@ $langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies')); $type = GETPOST('type', 'aZ09'); // Get supervariables -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortorder = GETPOST('sortorder', 'aZ09comma'); $sortfield = GETPOST('sortfield', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -52,7 +52,7 @@ $pageprev = $page - 1; $pagenext = $page + 1; // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index 1ebee939615..ad8792944dd 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -35,7 +35,7 @@ $langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies')); $type = GETPOST('type', 'aZ09'); // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php index 2dda35eb209..17281ae721c 100644 --- a/htdocs/compta/recap-compta.php +++ b/htdocs/compta/recap-compta.php @@ -35,7 +35,7 @@ if (isModEnabled('facture')) { $langs->load("bills"); } -$id = GETPOST('id') ? GETPOST('id', 'int') : GETPOST('socid', 'int'); +$id = GETPOST('id') ? GETPOSTINT('id') : GETPOSTINT('socid'); // Security check if ($user->socid) { @@ -52,10 +52,10 @@ if ($id > 0) { $hookmanager->initHooks(array('recapcomptacard', 'globalcard')); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 62b86621a6a..efa2ed773d4 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -46,18 +46,18 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; // Load translation files required by the page $langs->loadLangs(array('compta', 'bills', 'donation', 'salaries', 'accountancy', 'loan')); -$date_startmonth = GETPOST('date_startmonth', 'int'); -$date_startday = GETPOST('date_startday', 'int'); -$date_startyear = GETPOST('date_startyear', 'int'); -$date_endmonth = GETPOST('date_endmonth', 'int'); -$date_endday = GETPOST('date_endday', 'int'); -$date_endyear = GETPOST('date_endyear', 'int'); +$date_startmonth = GETPOSTINT('date_startmonth'); +$date_startday = GETPOSTINT('date_startday'); +$date_startyear = GETPOSTINT('date_startyear'); +$date_endmonth = GETPOSTINT('date_endmonth'); +$date_endday = GETPOSTINT('date_endday'); +$date_endyear = GETPOSTINT('date_endyear'); $showaccountdetail = GETPOST('showaccountdetail', 'aZ09') ? GETPOST('showaccountdetail', 'aZ09') : 'yes'; -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -70,7 +70,7 @@ if (!$sortorder) { } // Date range -$year = GETPOST('year', 'int'); // this is used for navigation previous/next. It is the last year to show in filter +$year = GETPOSTINT('year'); // this is used for navigation previous/next. It is the last year to show in filter if (empty($year)) { $year_current = dol_print_date(dol_now(), "%Y"); $month_current = dol_print_date(dol_now(), "%m"); @@ -85,11 +85,11 @@ $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear); // We define date_start and date_end if (empty($date_start) || empty($date_end)) { // We define date_start and date_end - $q = GETPOST("q") ? GETPOST("q", 'int') : 0; + $q = GETPOST("q") ? GETPOSTINT("q") : 0; if ($q == 0) { // We define date_start and date_end $year_end = $year_start; - $month_start = GETPOST("month") ? GETPOST("month", 'int') : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); + $month_start = GETPOST("month") ? GETPOSTINT("month") : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); $month_end = ""; if (!GETPOST('month')) { if (!$year && $month_start > $month_current) { @@ -147,7 +147,7 @@ if (GETPOST("modecompta", 'alpha')) { $AccCat = new AccountancyCategory($db); // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid > 0) { $socid = $user->socid; } diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index c769adfade6..167ca1793f6 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -36,12 +36,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Load translation files required by the page $langs->loadLangs(array('compta', 'bills', 'donation', 'salaries')); -$date_startday = GETPOST('date_startday', 'int'); -$date_startmonth = GETPOST('date_startmonth', 'int'); -$date_startyear = GETPOST('date_startyear', 'int'); -$date_endday = GETPOST('date_endday', 'int'); -$date_endmonth = GETPOST('date_endmonth', 'int'); -$date_endyear = GETPOST('date_endyear', 'int'); +$date_startday = GETPOSTINT('date_startday'); +$date_startmonth = GETPOSTINT('date_startmonth'); +$date_startyear = GETPOSTINT('date_startyear'); +$date_endday = GETPOSTINT('date_endday'); +$date_endmonth = GETPOSTINT('date_endmonth'); +$date_endyear = GETPOSTINT('date_endyear'); $nbofyear = 4; @@ -50,7 +50,7 @@ $nbofyear = 4; // Date range -$year = GETPOST('year', 'int'); // this is used for navigation previous/next. It is the last year to show in filter +$year = GETPOSTINT('year'); // this is used for navigation previous/next. It is the last year to show in filter if (empty($year)) { $year_current = dol_print_date(dol_now(), "%Y"); $month_current = dol_print_date(dol_now(), "%m"); @@ -65,11 +65,11 @@ $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear, // We define date_start and date_end if (empty($date_start) || empty($date_end)) { // We define date_start and date_end - $q = GETPOST("q") ? GETPOST("q", 'int') : 0; + $q = GETPOST("q") ? GETPOSTINT("q") : 0; if ($q == 0) { // We define date_start and date_end $year_end = $year_start + $nbofyear - (getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') > 1 ? 0 : 1); - $month_start = GETPOST("month") ? GETPOST("month", 'int') : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); + $month_start = GETPOST("month") ? GETPOSTINT("month") : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); if (!GETPOST('month')) { if (!$year && $month_start > $month_current) { $year_start--; @@ -121,7 +121,7 @@ if (GETPOST("modecompta", 'alpha')) { } // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid > 0) { $socid = $user->socid; } diff --git a/htdocs/compta/resultat/result.php b/htdocs/compta/resultat/result.php index b03d6299aea..0a38507ccb6 100644 --- a/htdocs/compta/resultat/result.php +++ b/htdocs/compta/resultat/result.php @@ -41,18 +41,18 @@ $mesg = ''; $action = GETPOST('action', 'aZ09'); $cat_id = GETPOST('account_category'); $selectcpt = GETPOST('cpt_bk'); -$id = GETPOST('id', 'int'); -$rowid = GETPOST('rowid', 'int'); +$id = GETPOSTINT('id'); +$rowid = GETPOSTINT('rowid'); $cancel = GETPOST('cancel', 'alpha'); $showaccountdetail = GETPOST('showaccountdetail', 'aZ09') ? GETPOST('showaccountdetail', 'aZ09') : 'no'; -$date_startmonth = GETPOST('date_startmonth', 'int'); -$date_startday = GETPOST('date_startday', 'int'); -$date_startyear = GETPOST('date_startyear', 'int'); -$date_endmonth = GETPOST('date_endmonth', 'int'); -$date_endday = GETPOST('date_endday', 'int'); -$date_endyear = GETPOST('date_endyear', 'int'); +$date_startmonth = GETPOSTINT('date_startmonth'); +$date_startday = GETPOSTINT('date_startday'); +$date_startyear = GETPOSTINT('date_startyear'); +$date_endmonth = GETPOSTINT('date_endmonth'); +$date_endday = GETPOSTINT('date_endday'); +$date_endyear = GETPOSTINT('date_endyear'); $nbofyear = 1; @@ -60,7 +60,7 @@ $nbofyear = 1; //$conf->global->SOCIETE_FISCAL_MONTH_START = 7; // Date range -$year = GETPOST('year', 'int'); // year with current month, is the month of the period we must show +$year = GETPOSTINT('year'); // year with current month, is the month of the period we must show if (empty($year)) { $year_current = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $month_current = dol_print_date(dol_now(), "%m"); @@ -75,11 +75,11 @@ $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear); // We define date_start and date_end if (empty($date_start) || empty($date_end)) { // We define date_start and date_end - $q = GETPOST("q") ? GETPOST("q", 'int') : 0; + $q = GETPOST("q") ? GETPOSTINT("q") : 0; if ($q == 0) { // We define date_start and date_end $year_end = $year_start + ($nbofyear - 1); - $month_start = GETPOST("month", 'int') ? GETPOST("month", 'int') : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); + $month_start = GETPOSTINT("month") ? GETPOSTINT("month") : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); $date_startmonth = $month_start; if (!GETPOST('month')) { if (!$year && $month_start > $month_current) { @@ -151,7 +151,7 @@ if (GETPOST("modecompta", 'alpha')) { $AccCat = new AccountancyCategory($db); // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid > 0) { $socid = $user->socid; } diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 9911bb2f6e8..6bb11589a2d 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -47,7 +47,7 @@ if (isModEnabled('accounting')) { // Load translation files required by the page $langs->loadLangs(array('compta', 'bills', 'banks', 'hrm')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); @@ -55,15 +55,15 @@ $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOSTINT('lineid'); -$fk_project = (GETPOST('fk_project') ? GETPOST('fk_project', 'int') : 0); +$fk_project = (GETPOST('fk_project') ? GETPOSTINT('fk_project') : 0); $dateech = dol_mktime(GETPOST('echhour'), GETPOST('echmin'), GETPOST('echsec'), GETPOST('echmonth'), GETPOST('echday'), GETPOST('echyear')); $dateperiod = dol_mktime(GETPOST('periodhour'), GETPOST('periodmin'), GETPOST('periodsec'), GETPOST('periodmonth'), GETPOST('periodday'), GETPOST('periodyear')); $label = GETPOST('label', 'alpha'); $actioncode = GETPOST('actioncode'); -$fk_user = GETPOST('userid', 'int') > 0 ? GETPOST('userid', 'int') : 0; +$fk_user = GETPOSTINT('userid') > 0 ? GETPOSTINT('userid') : 0; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('taxcard', 'globalcard')); @@ -91,7 +91,7 @@ $permissiondellink = $user->hasRight('tax', 'charges', 'creer'); // Used by the $upload_dir = $conf->tax->multidir_output[isset($object->entity) ? $object->entity : 1]; // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } @@ -146,7 +146,7 @@ if (empty($reshook)) { // payment mode if ($action == 'setmode' && $permissiontoadd) { - $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); + $result = $object->setPaymentMethods(GETPOSTINT('mode_reglement_id')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -154,7 +154,7 @@ if (empty($reshook)) { // Bank account if ($action == 'setbankaccount' && $permissiontoadd) { - $result = $object->setBankAccount(GETPOST('fk_account', 'int')); + $result = $object->setBankAccount(GETPOSTINT('fk_account')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -204,9 +204,9 @@ if (empty($reshook)) { $object->period = $dateperiod; $object->amount = $amount; $object->fk_user = $fk_user; - $object->mode_reglement_id = (int) GETPOST('mode_reglement_id', 'int'); - $object->fk_account = (int) GETPOST('fk_account', 'int'); - $object->fk_project = (int) GETPOST('fk_project', 'int'); + $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); + $object->fk_account = GETPOSTINT('fk_account'); + $object->fk_project = GETPOSTINT('fk_project'); $id = $object->create($user); if ($id <= 0) { @@ -271,14 +271,14 @@ if (empty($reshook)) { $object->label = $langs->trans("CopyOf").' '.$object->label; } - if (GETPOST('clone_for_next_month', 'int')) { // This can be true only if TAX_ADD_CLONE_FOR_NEXT_MONTH_CHECKBOX has been set + if (GETPOSTINT('clone_for_next_month')) { // This can be true only if TAX_ADD_CLONE_FOR_NEXT_MONTH_CHECKBOX has been set $object->periode = dol_time_plus_duree($object->periode, 1, 'm'); $object->period = dol_time_plus_duree($object->periode, 1, 'm'); $object->date_ech = dol_time_plus_duree($object->date_ech, 1, 'm'); } else { // Note date_ech is often a little bit higher than dateperiod - $newdateperiod = dol_mktime(0, 0, 0, GETPOST('clone_periodmonth', 'int'), GETPOST('clone_periodday', 'int'), GETPOST('clone_periodyear', 'int')); - $newdateech = dol_mktime(0, 0, 0, GETPOST('clone_date_echmonth', 'int'), GETPOST('clone_date_echday', 'int'), GETPOST('clone_date_echyear', 'int')); + $newdateperiod = dol_mktime(0, 0, 0, GETPOSTINT('clone_periodmonth'), GETPOSTINT('clone_periodday'), GETPOSTINT('clone_periodyear')); + $newdateech = dol_mktime(0, 0, 0, GETPOSTINT('clone_date_echmonth'), GETPOSTINT('clone_date_echday'), GETPOSTINT('clone_date_echyear')); if ($newdateperiod) { $object->periode = $newdateperiod; $object->period = $newdateperiod; @@ -423,13 +423,13 @@ if ($action == 'create') { // Payment Mode print ''.$langs->trans('DefaultPaymentMode').''; - $form->select_types_paiements(GETPOST('mode_reglement_id', 'int'), 'mode_reglement_id'); + $form->select_types_paiements(GETPOSTINT('mode_reglement_id'), 'mode_reglement_id'); print ''; // Bank Account if (isModEnabled("banque")) { print ''.$langs->trans('DefaultBankAccount').''; - print img_picto('', 'bank_account', 'class="pictofixedwidth"').$form->select_comptes(GETPOST('fk_account', 'int'), 'fk_account', 0, '', 2, '', 0, '', 1); + print img_picto('', 'bank_account', 'class="pictofixedwidth"').$form->select_comptes(GETPOSTINT('fk_account'), 'fk_account', 0, '', 2, '', 0, '', 1); print ''; } diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index ef68f325cc4..8c22eeed12d 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -42,15 +42,15 @@ if (isModEnabled('project')) { // Load translation files required by the page $langs->loadLangs(array('other', 'companies', 'compta', 'bills')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Get parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } diff --git a/htdocs/compta/sociales/info.php b/htdocs/compta/sociales/info.php index 2d78bc86c66..24181ae4b7b 100644 --- a/htdocs/compta/sociales/info.php +++ b/htdocs/compta/sociales/info.php @@ -34,7 +34,7 @@ if (isModEnabled('project')) { // Load translation files required by the page $langs->loadLangs(array('compta', 'bills')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $action = GETPOST('action', 'aZ09'); $object = new ChargeSociales($db); @@ -43,7 +43,7 @@ if ($id > 0) { } // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index a0145c6a260..e2f887eb034 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -49,36 +49,36 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'sc $mode = GETPOST('mode', 'alpha'); -$search_ref = GETPOST('search_ref', 'int'); +$search_ref = GETPOSTINT('search_ref'); $search_label = GETPOST('search_label', 'alpha'); -$search_typeid = GETPOST('search_typeid', 'int'); +$search_typeid = GETPOSTINT('search_typeid'); $search_amount = GETPOST('search_amount', 'alpha'); -$search_status = GETPOST('search_status', 'int'); -$search_date_startday = GETPOST('search_date_startday', 'int'); -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); -$search_date_startyear = GETPOST('search_date_startyear', 'int'); -$search_date_endday = GETPOST('search_date_endday', 'int'); -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); -$search_date_endyear = GETPOST('search_date_endyear', 'int'); +$search_status = GETPOSTINT('search_status'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_endday = GETPOSTINT('search_date_endday'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); -$search_date_limit_startday = GETPOST('search_date_limit_startday', 'int'); -$search_date_limit_startmonth = GETPOST('search_date_limit_startmonth', 'int'); -$search_date_limit_startyear = GETPOST('search_date_limit_startyear', 'int'); -$search_date_limit_endday = GETPOST('search_date_limit_endday', 'int'); -$search_date_limit_endmonth = GETPOST('search_date_limit_endmonth', 'int'); -$search_date_limit_endyear = GETPOST('search_date_limit_endyear', 'int'); +$search_date_limit_startday = GETPOSTINT('search_date_limit_startday'); +$search_date_limit_startmonth = GETPOSTINT('search_date_limit_startmonth'); +$search_date_limit_startyear = GETPOSTINT('search_date_limit_startyear'); +$search_date_limit_endday = GETPOSTINT('search_date_limit_endday'); +$search_date_limit_endmonth = GETPOSTINT('search_date_limit_endmonth'); +$search_date_limit_endyear = GETPOSTINT('search_date_limit_endyear'); $search_date_limit_start = dol_mktime(0, 0, 0, $search_date_limit_startmonth, $search_date_limit_startday, $search_date_limit_startyear); $search_date_limit_end = dol_mktime(23, 59, 59, $search_date_limit_endmonth, $search_date_limit_endday, $search_date_limit_endyear); $search_project_ref = GETPOST('search_project_ref', 'alpha'); $search_users = GETPOST('search_users'); -$search_type = GETPOST('search_type', 'int'); -$search_account = GETPOST('search_account', 'int'); +$search_type = GETPOSTINT('search_type'); +$search_account = GETPOSTINT('search_account'); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST("sortorder", 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; // If $page is not defined, or '' or -1 @@ -94,7 +94,7 @@ if (!$sortorder) { $sortorder = "DESC"; } -$filtre = GETPOST("filtre", 'int'); +$filtre = GETPOSTINT("filtre"); $arrayfields = array( 'cs.rowid' =>array('label'=>"Ref", 'checked'=>1, 'position'=>10), @@ -123,7 +123,7 @@ $permissiontoadd = $user->hasRight('tax', 'charges', 'creer'); $permissiontodelete = $user->hasRight('tax', 'charges', 'supprimer'); // Security check -$socid = GETPOST("socid", 'int'); +$socid = GETPOSTINT("socid"); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/compta/sociales/note.php b/htdocs/compta/sociales/note.php index cdabc0cede5..2f5487497f6 100644 --- a/htdocs/compta/sociales/note.php +++ b/htdocs/compta/sociales/note.php @@ -35,7 +35,7 @@ if (isModEnabled('project')) { $langs->loadLangs(array('compta', 'bills')); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); @@ -47,7 +47,7 @@ if ($id > 0) { } // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/compta/sociales/payments.php b/htdocs/compta/sociales/payments.php index 749e9497c25..fb3ecf981cb 100644 --- a/htdocs/compta/sociales/payments.php +++ b/htdocs/compta/sociales/payments.php @@ -50,14 +50,14 @@ $hookmanager->initHooks(array('specialexpensesindex')); // Load translation files required by the page $langs->loadLangs(array('compta', 'bills', 'hrm')); -$year = GETPOST("year", 'int'); -$search_sc_type = GETPOST('search_sc_type', 'int'); +$year = GETPOSTINT("year"); +$search_sc_type = GETPOSTINT('search_sc_type'); $optioncss = GETPOST('optioncss', 'alpha'); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/compta/stats/byratecountry.php b/htdocs/compta/stats/byratecountry.php index 60de44d0545..85906cd2c12 100644 --- a/htdocs/compta/stats/byratecountry.php +++ b/htdocs/compta/stats/byratecountry.php @@ -43,8 +43,8 @@ $langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "produ $modecompta = (GETPOST('modecompta', 'alpha') ? GETPOST('modecompta', 'alpha') : $conf->global->ACCOUNTING_MODE); // Date range -$year = GETPOST("year", 'int'); -$month = GETPOST("month", 'int'); +$year = GETPOSTINT("year"); +$month = GETPOSTINT("month"); if (empty($year)) { $year_current = dol_print_date(dol_now(), '%Y'); $month_current = dol_print_date(dol_now(), '%m'); @@ -60,7 +60,7 @@ $date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endda // Quarter $q = ''; if (empty($date_start) || empty($date_end)) { // We define date_start and date_end - $q = GETPOST("q", "int"); + $q = GETPOSTINT("q"); if (empty($q)) { // We define date_start and date_end $month_start = GETPOST("month") ? GETPOST("month") : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); @@ -120,14 +120,14 @@ if (empty($min)) { // 0=normal, 1=option vat for services is on debit, 2=option on payments for products $modetax = !getDolGlobalString('TAX_MODE') ? 0 : $conf->global->TAX_MODE; if (GETPOSTISSET("modetax")) { - $modetax = GETPOST("modetax", 'int'); + $modetax = GETPOSTINT("modetax"); } if (empty($modetax)) { $modetax = 0; } // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index 34b0b614b7a..6a52f9ee62a 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $langs->loadLangs(array("products", "categories", "errors", 'accountancy')); // Security pack (data & check) -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid > 0) { $socid = $user->socid; @@ -64,8 +64,8 @@ if (!$sortfield) { } // Category -$selected_cat = (int) GETPOST('search_categ', 'int'); -$selected_soc = (int) GETPOST('search_soc', 'int'); +$selected_cat = GETPOSTINT('search_categ'); +$selected_soc = GETPOSTINT('search_soc'); $subcat = false; if (GETPOST('subcat', 'alpha') === 'yes') { $subcat = true; @@ -73,7 +73,7 @@ if (GETPOST('subcat', 'alpha') === 'yes') { $categorie = new Categorie($db); // product/service -$selected_type = GETPOST('search_type', 'int'); +$selected_type = GETPOSTINT('search_type'); if ($selected_type == '') { $selected_type = -1; } @@ -103,7 +103,7 @@ $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_star $date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere // Quarter if (empty($date_start) || empty($date_end)) { // We define date_start and date_end - $q = GETPOST("q", "int"); + $q = GETPOSTINT("q"); if (empty($q)) { // We define date_start and date_end $month_start = GETPOST("month") ? GETPOST("month") : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 7529db23725..768867e0ddc 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Load translation files required by the page $langs->load("accountancy"); -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); // Security check if ($user->socid > 0) { @@ -63,14 +63,14 @@ if (!$sortfield) { } // Date range -$year = GETPOST("year", 'int'); -$month = GETPOST("month", 'int'); -$date_startyear = GETPOST("date_startyear", 'int'); -$date_startmonth = GETPOST("date_startmonth", 'int'); -$date_startday = GETPOST("date_startday", 'int'); -$date_endyear = GETPOST("date_endyear", 'int'); -$date_endmonth = GETPOST("date_endmonth", 'int'); -$date_endday = GETPOST("date_endday", 'int'); +$year = GETPOSTINT("year"); +$month = GETPOSTINT("month"); +$date_startyear = GETPOSTINT("date_startyear"); +$date_startmonth = GETPOSTINT("date_startmonth"); +$date_startday = GETPOSTINT("date_startday"); +$date_endyear = GETPOSTINT("date_endyear"); +$date_endmonth = GETPOSTINT("date_endmonth"); +$date_endday = GETPOSTINT("date_endday"); if (empty($year)) { $year_current = dol_print_date(dol_now(), '%Y'); $month_current = dol_print_date(dol_now(), '%m'); diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index aada2d53b30..afd631a8cdc 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -55,10 +55,10 @@ if (!$sortfield) { $sortfield = "nom"; } -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); // Category -$selected_cat = (int) GETPOST('search_categ', 'int'); +$selected_cat = GETPOSTINT('search_categ'); if ($selected_cat == -1) { $selected_cat = ''; } @@ -82,18 +82,18 @@ if (isModEnabled('accounting')) { $hookmanager->initHooks(array('casoclist')); // Date range -$year = GETPOST("year", 'int'); -$month = GETPOST("month", 'int'); +$year = GETPOSTINT("year"); +$month = GETPOSTINT("month"); $search_societe = GETPOST("search_societe", 'alpha'); $search_zip = GETPOST("search_zip", 'alpha'); $search_town = GETPOST("search_town", 'alpha'); $search_country = GETPOST("search_country", 'alpha'); -$date_startyear = GETPOST("date_startyear", 'int'); -$date_startmonth = GETPOST("date_startmonth", 'int'); -$date_startday = GETPOST("date_startday", 'int'); -$date_endyear = GETPOST("date_endyear", 'int'); -$date_endmonth = GETPOST("date_endmonth", 'int'); -$date_endday = GETPOST("date_endday", 'int'); +$date_startyear = GETPOSTINT("date_startyear"); +$date_startmonth = GETPOSTINT("date_startmonth"); +$date_startday = GETPOSTINT("date_startday"); +$date_endyear = GETPOSTINT("date_endyear"); +$date_endmonth = GETPOSTINT("date_endmonth"); +$date_endday = GETPOSTINT("date_endday"); if (empty($year)) { $year_current = dol_print_date(dol_now(), '%Y'); $month_current = dol_print_date(dol_now(), '%m'); @@ -107,7 +107,7 @@ $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_star $date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere // Quarter if (empty($date_start) || empty($date_end)) { // We define date_start and date_end - $q = GETPOST("q", "int") ? GETPOST("q", "int") : 0; + $q = GETPOSTINT("q") ? GETPOSTINT("q") : 0; if (empty($q)) { // We define date_start and date_end $month_start = GETPOST("month") ? GETPOST("month") : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index 7bdf3a279ce..927b5760979 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -32,17 +32,17 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Load translation files required by the page $langs->loadLangs(array('compta', 'bills', 'donation', 'salaries')); -$date_startday = GETPOST('date_startday', 'int'); -$date_startmonth = GETPOST('date_startmonth', 'int'); -$date_startyear = GETPOST('date_startyear', 'int'); -$date_endday = GETPOST('date_endday', 'int'); -$date_endmonth = GETPOST('date_endmonth', 'int'); -$date_endyear = GETPOST('date_endyear', 'int'); +$date_startday = GETPOSTINT('date_startday'); +$date_startmonth = GETPOSTINT('date_startmonth'); +$date_startyear = GETPOSTINT('date_startyear'); +$date_endday = GETPOSTINT('date_endday'); +$date_endmonth = GETPOSTINT('date_endmonth'); +$date_endyear = GETPOSTINT('date_endyear'); $nbofyear = 4; // Date range -$year = GETPOST('year', 'int'); +$year = GETPOSTINT('year'); if (empty($year)) { $year_current = dol_print_date(dol_now(), "%Y"); $month_current = dol_print_date(dol_now(), "%m"); @@ -61,7 +61,7 @@ if (empty($date_start) || empty($date_end)) { // We define date_start and date_e if ($q == 0) { // We define date_start and date_end $year_end = $year_start + $nbofyear - (getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') > 1 ? 0 : 1); - $month_start = GETPOSTISSET("month") ? GETPOST("month", 'int') : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); + $month_start = GETPOSTISSET("month") ? GETPOSTINT("month") : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); if (!GETPOST('month')) { if (!$year && $month_start > $month_current) { $year_start--; @@ -112,10 +112,10 @@ if (GETPOST("modecompta", 'alpha')) { $modecompta = GETPOST("modecompta", 'alpha'); } -$userid = GETPOST('userid', 'int'); +$userid = GETPOSTINT('userid'); // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid > 0) { $socid = $user->socid; } @@ -384,7 +384,7 @@ $now = dol_now(); $casenow = dol_print_date($now, "%Y-%m"); // Loop on each month -$nb_mois_decalage = GETPOSTISSET('date_startmonth') ? (GETPOST('date_startmonth', 'int') - 1) : (!getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') ? 0 : ($conf->global->SOCIETE_FISCAL_MONTH_START - 1)); +$nb_mois_decalage = GETPOSTISSET('date_startmonth') ? (GETPOSTINT('date_startmonth') - 1) : (!getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') ? 0 : ($conf->global->SOCIETE_FISCAL_MONTH_START - 1)); for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) { $mois_modulo = $mois; // ajout if ($mois > 12) { diff --git a/htdocs/compta/stats/supplier_turnover.php b/htdocs/compta/stats/supplier_turnover.php index ca856e67747..2b819e74fa6 100644 --- a/htdocs/compta/stats/supplier_turnover.php +++ b/htdocs/compta/stats/supplier_turnover.php @@ -28,17 +28,17 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Load translation files required by the page $langs->loadLangs(array('compta', 'bills')); -$date_startday = GETPOST('date_startday', 'int'); -$date_startmonth = GETPOST('date_startmonth', 'int'); -$date_startyear = GETPOST('date_startyear', 'int'); -$date_endday = GETPOST('date_endday', 'int'); -$date_endmonth = GETPOST('date_endmonth', 'int'); -$date_endyear = GETPOST('date_endyear', 'int'); +$date_startday = GETPOSTINT('date_startday'); +$date_startmonth = GETPOSTINT('date_startmonth'); +$date_startyear = GETPOSTINT('date_startyear'); +$date_endday = GETPOSTINT('date_endday'); +$date_endmonth = GETPOSTINT('date_endmonth'); +$date_endyear = GETPOSTINT('date_endyear'); $nbofyear = 4; // Date range -$year = GETPOST('year', 'int'); +$year = GETPOSTINT('year'); if (empty($year)) { $year_current = dol_print_date(dol_now(), "%Y"); $month_current = dol_print_date(dol_now(), "%m"); @@ -57,7 +57,7 @@ if (empty($date_start) || empty($date_end)) { // We define date_start and date_e if ($q == 0) { // We define date_start and date_end $year_end = $year_start + $nbofyear - (getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') > 1 ? 0 : 1); - $month_start = GETPOSTISSET("month") ? GETPOST("month", 'int') : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); + $month_start = GETPOSTISSET("month") ? GETPOSTINT("month") : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); if (!GETPOST('month')) { if (!$year && $month_start > $month_current) { $year_start--; @@ -91,8 +91,8 @@ if (empty($date_start) || empty($date_end)) { // We define date_start and date_e } } -$userid = GETPOST('userid', 'int'); -$socid = GETPOST('socid', 'int'); +$userid = GETPOSTINT('userid'); +$socid = GETPOSTINT('socid'); $tmps = dol_getdate($date_start); $year_start = $tmps['year']; diff --git a/htdocs/compta/stats/supplier_turnover_by_prodserv.php b/htdocs/compta/stats/supplier_turnover_by_prodserv.php index f49e79a18a0..e9568c4aa73 100644 --- a/htdocs/compta/stats/supplier_turnover_by_prodserv.php +++ b/htdocs/compta/stats/supplier_turnover_by_prodserv.php @@ -47,14 +47,14 @@ if (!$sortfield) { } // Category -$selected_cat = (int) GETPOST('search_categ', 'int'); -$selected_soc = (int) GETPOST('search_soc', 'int'); +$selected_cat = GETPOSTINT('search_categ'); +$selected_soc = GETPOSTINT('search_soc'); $subcat = false; if (GETPOST('subcat', 'alpha') === 'yes') { $subcat = true; } // product/service -$selected_type = GETPOST('search_type', 'int'); +$selected_type = GETPOSTINT('search_type'); if ($selected_type == '') { $selected_type = -1; } @@ -84,7 +84,7 @@ $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_star $date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere // Quarter if (empty($date_start) || empty($date_end)) { // We define date_start and date_end - $q = GETPOST("q", "int"); + $q = GETPOSTINT("q"); if (empty($q)) { // We define date_start and date_end $month_start = GETPOST("month") ? GETPOST("month") : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); @@ -194,7 +194,7 @@ foreach ($allparams as $key => $value) { } // Security pack (data & check) -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid > 0) { $socid = $user->socid; diff --git a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php index fe20a1e6bee..205f9000031 100644 --- a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php +++ b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php @@ -52,10 +52,10 @@ if (!$sortfield) { } -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); // Category -$selected_cat = (int) GETPOST('search_categ', 'int'); +$selected_cat = GETPOSTINT('search_categ'); $subcat = false; if (GETPOST('subcat', 'alpha') === 'yes') { $subcat = true; @@ -73,8 +73,8 @@ $search_country = GETPOST("search_country", 'alpha'); // Date range -$year = GETPOST("year", 'int'); -$month = GETPOST("month", 'int'); +$year = GETPOSTINT("year"); +$month = GETPOSTINT("month"); $date_startyear = GETPOST("date_startyear", 'alpha'); $date_startmonth = GETPOST("date_startmonth", 'alpha'); $date_startday = GETPOST("date_startday", 'alpha'); @@ -94,7 +94,7 @@ $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_star $date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere // Quarter if (empty($date_start) || empty($date_end)) { // We define date_start and date_end - $q = GETPOST("q", "int") ? GETPOST("q", "int") : 0; + $q = GETPOSTINT("q") ? GETPOSTINT("q") : 0; if (empty($q)) { // We define date_start and date_end $month_start = GETPOST("month") ? GETPOST("month") : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 127aca426d3..df825768fee 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -43,7 +43,7 @@ if (isModEnabled('accounting')) { // Load translation files required by the page $langs->loadLangs(array('compta', 'banks', 'bills')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); @@ -52,9 +52,9 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'my $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -$refund = GETPOST("refund", "int"); +$refund = GETPOSTINT("refund"); if (GETPOSTISSET('auto_create_paiement') || $action === 'add') { - $auto_create_payment = GETPOST("auto_create_paiement", "int"); + $auto_create_payment = GETPOSTINT("auto_create_paiement"); } else { $auto_create_payment = !getDolGlobalString('CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT'); } @@ -63,8 +63,8 @@ if (empty($refund)) { $refund = 0; } -$datev = dol_mktime(12, 0, 0, GETPOST("datevmonth", 'int'), GETPOST("datevday", 'int'), GETPOST("datevyear", 'int')); -$datep = dol_mktime(12, 0, 0, GETPOST("datepmonth", 'int'), GETPOST("datepday", 'int'), GETPOST("datepyear", 'int')); +$datev = dol_mktime(12, 0, 0, GETPOSTINT("datevmonth"), GETPOSTINT("datevday"), GETPOSTINT("datevyear")); +$datep = dol_mktime(12, 0, 0, GETPOSTINT("datepmonth"), GETPOSTINT("datepday"), GETPOSTINT("datepyear")); // Initialize technical objects $object = new Tva($db); @@ -90,7 +90,7 @@ $permissiondellink = $user->hasRight('tax', 'charges', 'creer'); // Used by the $upload_dir = $conf->tax->multidir_output[isset($object->entity) ? $object->entity : 1].'/vat'; // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if (!empty($user->socid)) { $socid = $user->socid; } @@ -135,7 +135,7 @@ if (empty($reshook)) { // payment mode if ($action == 'setmode' && $user->hasRight('tax', 'charges', 'creer')) { $object->fetch($id); - $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); + $result = $object->setPaymentMethods(GETPOSTINT('mode_reglement_id')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -144,7 +144,7 @@ if (empty($reshook)) { // Bank account if ($action == 'setbankaccount' && $user->hasRight('tax', 'charges', 'creer')) { $object->fetch($id); - $result = $object->setBankAccount(GETPOST('fk_account', 'int')); + $result = $object->setBankAccount(GETPOSTINT('fk_account')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -238,7 +238,7 @@ if (empty($reshook)) { } if (!$error) { - $result = $paiement->addPaymentToBank($user, 'payment_vat', '(VATPayment)', GETPOST('accountid', 'int'), '', ''); + $result = $paiement->addPaymentToBank($user, 'payment_vat', '(VATPayment)', GETPOSTINT('accountid'), '', ''); if (!($result > 0)) { $error++; setEventMessages($paiement->error, null, 'errors'); @@ -343,7 +343,7 @@ if (empty($reshook)) { $object->label = $langs->trans("CopyOf").' '.$object->label; } - $newdateperiod = dol_mktime(0, 0, 0, GETPOST('clone_periodmonth', 'int'), GETPOST('clone_periodday', 'int'), GETPOST('clone_periodyear', 'int')); + $newdateperiod = dol_mktime(0, 0, 0, GETPOSTINT('clone_periodmonth'), GETPOSTINT('clone_periodday'), GETPOSTINT('clone_periodyear')); if ($newdateperiod) { $object->datev = $newdateperiod; } @@ -460,7 +460,7 @@ if ($action == 'create') { print ''.$langs->trans("Label").''; print ''.$form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")).''; - print $form->selectDate((GETPOST("datevmonth", 'int') ? $datev : -1), "datev", '', '', '', 'add', 1, 1); + print $form->selectDate((GETPOSTINT("datevmonth") ? $datev : -1), "datev", '', '', '', 'add', 1, 1); print ''; // Amount @@ -479,7 +479,7 @@ if ($action == 'create') { // Type payment print ''.$langs->trans("PaymentMode").''; - print $form->select_types_paiements(GETPOST("type_payment", 'int'), "type_payment", '', 0, 1, 0, 0, 1, 'maxwidth500 widthcentpercentminusx', 1); + print $form->select_types_paiements(GETPOSTINT("type_payment"), "type_payment", '', 0, 1, 0, 0, 1, 'maxwidth500 widthcentpercentminusx', 1); print "\n"; print ""; @@ -487,7 +487,7 @@ if ($action == 'create') { // Bank account print ''.$langs->trans("BankAccount").''; print img_picto('', 'bank_account', 'pictofixedwidth'); - $form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1", 1, '', 0, 'maxwidth500 widthcentpercentminusx'); // List of bank account available + $form->select_comptes(GETPOSTINT("accountid"), "accountid", 0, "courant=1", 1, '', 0, 'maxwidth500 widthcentpercentminusx'); // List of bank account available print ''; } diff --git a/htdocs/compta/tva/document.php b/htdocs/compta/tva/document.php index c7b9f2dcc61..ba9af57f4c5 100644 --- a/htdocs/compta/tva/document.php +++ b/htdocs/compta/tva/document.php @@ -43,15 +43,15 @@ if (isModEnabled('project')) { // Load translation files required by the page $langs->loadLangs(array('other', 'companies', 'compta', 'bills')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Get parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index 5b30b2a9214..db73cc25e56 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -40,9 +40,9 @@ $langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "produ $now = dol_now(); $refresh = GETPOSTISSET('submit') ? true : false; -$year_current = GETPOSTISSET('year') ? GETPOST('year', 'int') : dol_print_date($now, '%Y', 'tzserver'); +$year_current = GETPOSTISSET('year') ? GETPOSTINT('year') : dol_print_date($now, '%Y', 'tzserver'); $year_start = $year_current; -$month_current = GETPOSTISSET('month') ? GETPOST('month', 'int') : dol_print_date($now, '%m', 'tzserver'); +$month_current = GETPOSTISSET('month') ? GETPOSTINT('month') : dol_print_date($now, '%m', 'tzserver'); $month_start = $month_current; $refresh = true; @@ -53,14 +53,14 @@ include DOL_DOCUMENT_ROOT.'/compta/tva/initdatesforvat.inc.php'; // 0=normal, 1=option vat for services is on debit, 2=option on payments for products $modetax = getDolGlobalString('TAX_MODE'); if (GETPOSTISSET("modetax")) { - $modetax = GETPOST("modetax", 'int'); + $modetax = GETPOSTINT("modetax"); } if (empty($modetax)) { $modetax = 0; } // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/compta/tva/info.php b/htdocs/compta/tva/info.php index a54be0cdf28..3e02aaa8c0c 100644 --- a/htdocs/compta/tva/info.php +++ b/htdocs/compta/tva/info.php @@ -30,13 +30,13 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Load translation files required by the page $langs->loadLangs(array('compta', 'bills')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $action = GETPOST('action', 'aZ09'); $object = new Tva($db); // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/compta/tva/initdatesforvat.inc.php b/htdocs/compta/tva/initdatesforvat.inc.php index 59106f8750c..53cbd63b8cc 100644 --- a/htdocs/compta/tva/initdatesforvat.inc.php +++ b/htdocs/compta/tva/initdatesforvat.inc.php @@ -28,7 +28,7 @@ if (!getDolGlobalInt('SOCIETE_FISCAL_MONTH_START')) { } // Date range -$year = GETPOST("year", "int"); +$year = GETPOSTINT("year"); if (empty($year)) { $year_current = $current_date['year']; $year_start = $year_current; @@ -40,11 +40,11 @@ $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_star $date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // Set default period if not defined if (empty($date_start) || empty($date_end)) { // We define date_start and date_end - $q = GETPOST("q", "int"); + $q = GETPOSTINT("q"); if (empty($q)) { - if (GETPOST("month", 'int')) { - $date_start = dol_get_first_day($year_start, GETPOST("month", 'int'), 'tzserver'); - $date_end = dol_get_last_day($year_start, GETPOST("month", 'int'), 'tzserver'); + if (GETPOSTINT("month")) { + $date_start = dol_get_first_day($year_start, GETPOSTINT("month"), 'tzserver'); + $date_end = dol_get_last_day($year_start, GETPOSTINT("month"), 'tzserver'); } else { if (!getDolGlobalString('MAIN_INFO_VAT_RETURN') || getDolGlobalInt('MAIN_INFO_VAT_RETURN') == 2) { // quaterly vat, we take last past complete quarter $date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -3 - (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) % 3), 'm'); diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index 4912417bdf9..32c982c080c 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -41,7 +41,7 @@ $langs->loadLangs(array('compta', 'bills')); $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list @@ -53,20 +53,20 @@ $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hier $search_ref = GETPOST('search_ref', 'alpha'); $search_label = GETPOST('search_label', 'alpha'); -$search_dateend_start = dol_mktime(0, 0, 0, GETPOST('search_dateend_startmonth', 'int'), GETPOST('search_dateend_startday', 'int'), GETPOST('search_dateend_startyear', 'int')); -$search_dateend_end = dol_mktime(23, 59, 59, GETPOST('search_dateend_endmonth', 'int'), GETPOST('search_dateend_endday', 'int'), GETPOST('search_dateend_endyear', 'int')); -$search_datepayment_start = dol_mktime(0, 0, 0, GETPOST('search_datepayment_startmonth', 'int'), GETPOST('search_datepayment_startday', 'int'), GETPOST('search_datepayment_startyear', 'int')); -$search_datepayment_end = dol_mktime(23, 59, 59, GETPOST('search_datepayment_endmonth', 'int'), GETPOST('search_datepayment_endday', 'int'), GETPOST('search_datepayment_endyear', 'int')); -$search_type = GETPOST('search_type', 'int'); -$search_account = GETPOST('search_account', 'int'); +$search_dateend_start = dol_mktime(0, 0, 0, GETPOSTINT('search_dateend_startmonth'), GETPOSTINT('search_dateend_startday'), GETPOSTINT('search_dateend_startyear')); +$search_dateend_end = dol_mktime(23, 59, 59, GETPOSTINT('search_dateend_endmonth'), GETPOSTINT('search_dateend_endday'), GETPOSTINT('search_dateend_endyear')); +$search_datepayment_start = dol_mktime(0, 0, 0, GETPOSTINT('search_datepayment_startmonth'), GETPOSTINT('search_datepayment_startday'), GETPOSTINT('search_datepayment_startyear')); +$search_datepayment_end = dol_mktime(23, 59, 59, GETPOSTINT('search_datepayment_endmonth'), GETPOSTINT('search_datepayment_endday'), GETPOSTINT('search_datepayment_endyear')); +$search_type = GETPOSTINT('search_type'); +$search_account = GETPOSTINT('search_account'); $search_amount = GETPOST('search_amount', 'alpha'); -$search_status = GETPOST('search_status', 'int'); -$ltt = GETPOST("ltt", "int"); +$search_status = GETPOSTINT('search_status'); +$ltt = GETPOSTINT("ltt"); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST('page', 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT('page'); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -105,7 +105,7 @@ $permissiontoadd = $user->hasRight('tax', 'charges', 'creer'); $permissiontodelete = $user->hasRight('tax', 'charges', 'supprimer'); // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } @@ -281,40 +281,40 @@ if (!empty($search_label)) { $param .= '&search_label="'.$search_label.'"'; } if (!empty($search_dateend_start)) { - $param .= '&search_dateend_startyear='.GETPOST('search_dateend_startyear', 'int'); + $param .= '&search_dateend_startyear='.GETPOSTINT('search_dateend_startyear'); } if (!empty($search_dateend_start)) { - $param .= '&search_dateend_startmonth='.GETPOST('search_dateend_startmonth', 'int'); + $param .= '&search_dateend_startmonth='.GETPOSTINT('search_dateend_startmonth'); } if (!empty($search_dateend_start)) { - $param .= '&search_dateend_startday='.GETPOST('search_dateend_startday', 'int'); + $param .= '&search_dateend_startday='.GETPOSTINT('search_dateend_startday'); } if (!empty($search_dateend_end)) { - $param .= '&search_dateend_endyear='.GETPOST('search_dateend_endyear', 'int'); + $param .= '&search_dateend_endyear='.GETPOSTINT('search_dateend_endyear'); } if (!empty($search_dateend_end)) { - $param .= '&search_dateend_endmonth='.GETPOST('search_dateend_endmonth', 'int'); + $param .= '&search_dateend_endmonth='.GETPOSTINT('search_dateend_endmonth'); } if (!empty($search_dateend_end)) { - $param .= '&search_dateend_endday='.GETPOST('search_dateend_endday', 'int'); + $param .= '&search_dateend_endday='.GETPOSTINT('search_dateend_endday'); } if (!empty($search_datepayment_start)) { - $param .= '&search_datepayment_startyear='.GETPOST('search_datepayment_startyear', 'int'); + $param .= '&search_datepayment_startyear='.GETPOSTINT('search_datepayment_startyear'); } if (!empty($search_datepayment_start)) { - $param .= '&search_datepayment_startmonth='.GETPOST('search_datepayment_startmonth', 'int'); + $param .= '&search_datepayment_startmonth='.GETPOSTINT('search_datepayment_startmonth'); } if (!empty($search_datepayment_start)) { - $param .= '&search_datepayment_startday='.GETPOST('search_datepayment_startday', 'int'); + $param .= '&search_datepayment_startday='.GETPOSTINT('search_datepayment_startday'); } if (!empty($search_datepayment_end)) { - $param .= '&search_datepayment_endyear='.GETPOST('search_datepayment_endyear', 'int'); + $param .= '&search_datepayment_endyear='.GETPOSTINT('search_datepayment_endyear'); } if (!empty($search_datepayment_end)) { - $param .= '&search_datepayment_endmonth='.GETPOST('search_datepayment_endmonth', 'int'); + $param .= '&search_datepayment_endmonth='.GETPOSTINT('search_datepayment_endmonth'); } if (!empty($search_datepayment_end)) { - $param .= '&search_datepayment_endday='.GETPOST('search_datepayment_endday', 'int'); + $param .= '&search_datepayment_endday='.GETPOSTINT('search_datepayment_endday'); } if (!empty($search_type) && $search_type > 0) { $param .= '&search_type='.$search_type; diff --git a/htdocs/compta/tva/payments.php b/htdocs/compta/tva/payments.php index e5cb19877e6..b877b472551 100644 --- a/htdocs/compta/tva/payments.php +++ b/htdocs/compta/tva/payments.php @@ -40,17 +40,17 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; $langs->loadLangs(array('compta', 'bills')); $mode = GETPOST("mode", 'alpha'); -$year = GETPOST("year", 'int'); +$year = GETPOSTINT("year"); $filtre = GETPOST("filtre", 'alpha'); $optioncss = GETPOST('optioncss', 'alpha'); if (!$year && $mode != 'tvaonly') { $year = date("Y", time()); } -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php index a0134194b48..40d49e2404f 100644 --- a/htdocs/contact/agenda.php +++ b/htdocs/contact/agenda.php @@ -55,8 +55,8 @@ $mesg = ''; $error = 0; $errors = array(); $action = (GETPOST('action', 'alpha') ? GETPOST('action', 'alpha') : 'view'); $confirm = GETPOST('confirm', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); -$id = GETPOST('id', 'int'); -$socid = GETPOST('socid', 'int'); +$id = GETPOSTINT('id'); +$socid = GETPOSTINT('socid'); // Initialize objects $object = new Contact($db); @@ -92,10 +92,10 @@ if ($user->socid) { } $result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index d0db16191d0..ab35f938890 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -285,7 +285,7 @@ abstract class ActionsContactCardCommon // phpcs:enable global $langs, $mysoc; - $this->object->socid = GETPOST("socid", 'int'); + $this->object->socid = GETPOSTINT("socid"); $this->object->lastname = GETPOST("name"); $this->object->firstname = GETPOST("firstname"); $this->object->civility_id = GETPOST("civility_id"); diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 9d8ee6762ce..3ca3250d3c3 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -205,7 +205,7 @@ if (empty($reshook)) { $object->canvas = $canvas; } - $object->entity = (GETPOSTISSET('entity') ? GETPOST('entity', 'int') : $conf->entity); + $object->entity = (GETPOSTISSET('entity') ? GETPOSTINT('entity') : $conf->entity); $object->socid = $socid; $object->lastname = (string) GETPOST("lastname", 'alpha'); $object->firstname = (string) GETPOST("firstname", 'alpha'); @@ -214,8 +214,8 @@ if (empty($reshook)) { $object->address = (string) GETPOST("address", 'alpha'); $object->zip = (string) GETPOST("zipcode", 'alpha'); $object->town = (string) GETPOST("town", 'alpha'); - $object->country_id = (int) GETPOST("country_id", 'int'); - $object->state_id = (int) GETPOST("state_id", 'int'); + $object->country_id = GETPOSTINT("country_id"); + $object->state_id = GETPOSTINT("state_id"); $object->socialnetworks = array(); if (isModEnabled('socialnetworks')) { foreach ($socialnetworks as $key => $value) { @@ -238,7 +238,7 @@ if (empty($reshook)) { $object->statut = 1; //Default status to Actif // Note: Correct date should be completed with location to have exact GM time of birth. - $object->birthday = dol_mktime(0, 0, 0, GETPOST("birthdaymonth", 'int'), GETPOST("birthdayday", 'int'), GETPOST("birthdayyear", 'int')); + $object->birthday = dol_mktime(0, 0, 0, GETPOSTINT("birthdaymonth"), GETPOSTINT("birthdayday"), GETPOSTINT("birthdayyear")); $object->birthday_alert = GETPOSTINT("birthday_alert"); //Default language @@ -342,7 +342,7 @@ if (empty($reshook)) { $action = 'edit'; } - if (isModEnabled('mailing') && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST("no_email", "int") == -1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { + if (isModEnabled('mailing') && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOSTINT("no_email") == -1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { $error++; $errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")); $action = 'edit'; @@ -356,7 +356,7 @@ if (empty($reshook)) { } if (!$error) { - $contactid = GETPOST("contactid", 'int'); + $contactid = GETPOSTINT("contactid"); $object->fetch($contactid); $object->fetchRoles(); @@ -413,11 +413,11 @@ if (empty($reshook)) { $object->address = (string) GETPOST("address", 'alpha'); $object->zip = (string) GETPOST("zipcode", 'alpha'); $object->town = (string) GETPOST("town", 'alpha'); - $object->state_id = GETPOST("state_id", 'int'); - $object->country_id = GETPOST("country_id", 'int'); + $object->state_id = GETPOSTINT("state_id"); + $object->country_id = GETPOSTINT("country_id"); $object->email = (string) GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); - $object->no_email = GETPOST("no_email", "int"); + $object->no_email = GETPOSTINT("no_email"); $object->socialnetworks = array(); if (isModEnabled('socialnetworks')) { foreach ($socialnetworks as $key => $value) { @@ -430,7 +430,7 @@ if (empty($reshook)) { $object->phone_perso = (string) GETPOST("phone_perso", 'alpha'); $object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha'); $object->fax = (string) GETPOST("fax", 'alpha'); - $object->priv = (string) GETPOST("priv", 'int'); + $object->priv = (string) GETPOSTINT("priv"); $object->note_public = (string) GETPOST("note_public", 'restricthtml'); $object->note_private = (string) GETPOST("note_private", 'restricthtml'); @@ -455,7 +455,7 @@ if (empty($reshook)) { // Update mass emailing flag into table mailing_unsubscribe if (GETPOSTISSET('no_email') && $object->email) { - $no_email = GETPOST('no_email', 'int'); + $no_email = GETPOSTINT('no_email'); $result = $object->setNoEmail($no_email); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -500,14 +500,14 @@ if (empty($reshook)) { // Update extrafields if ($action == "update_extras" && !empty($permissiontoadd)) { - $object->fetch(GETPOST('id', 'int')); + $object->fetch(GETPOSTINT('id')); $attributekey = GETPOST('attribute', 'alpha'); $attributekeylong = 'options_'.$attributekey; if (GETPOSTISSET($attributekeylong.'day') && GETPOSTISSET($attributekeylong.'month') && GETPOSTISSET($attributekeylong.'year')) { // This is properties of a date - $object->array_options['options_'.$attributekey] = dol_mktime(GETPOST($attributekeylong.'hour', 'int'), GETPOST($attributekeylong.'min', 'int'), GETPOST($attributekeylong.'sec', 'int'), GETPOST($attributekeylong.'month', 'int'), GETPOST($attributekeylong.'day', 'int'), GETPOST($attributekeylong.'year', 'int')); + $object->array_options['options_'.$attributekey] = dol_mktime(GETPOSTINT($attributekeylong.'hour'), GETPOSTINT($attributekeylong.'min'), GETPOSTINT($attributekeylong.'sec'), GETPOSTINT($attributekeylong.'month'), GETPOSTINT($attributekeylong.'day'), GETPOSTINT($attributekeylong.'year')); //var_dump(dol_print_date($object->array_options['options_'.$attributekey]));exit; } else { $object->array_options['options_'.$attributekey] = GETPOST($attributekeylong, 'alpha'); @@ -628,10 +628,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { */ $object->canvas = $canvas; - $object->state_id = GETPOST("state_id", "int"); + $object->state_id = GETPOSTINT("state_id"); // We set country_id, country_code and label for the selected country - $object->country_id = GETPOST("country_id") ? GETPOST("country_id", "int") : (empty($objsoc->country_id) ? $mysoc->country_id : $objsoc->country_id); + $object->country_id = GETPOST("country_id") ? GETPOSTINT("country_id") : (empty($objsoc->country_id) ? $mysoc->country_id : $objsoc->country_id); if ($object->country_id) { $tmparray = getCountry($object->country_id, 'all'); $object->country_code = $tmparray['code']; @@ -848,7 +848,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; print ''; // Default value is in MAILING_CONTACT_DEFAULT_BULK_STATUS that you can modify in setup of module emailing - print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS')), 1, false, (getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2)); + print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOSTINT("no_email") : getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS')), 1, false, (getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2)); print ''; print ''; } @@ -1002,7 +1002,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if (!getDolGlobalString('SOCIETE_DISABLE_CONTACTS')) { print ''; print ''; - print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company(GETPOST('socid', 'int') ? GETPOST('socid', 'int') : ($object->socid ? $object->socid : -1), 'socid', '', $langs->trans("SelectThirdParty")); + print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company(GETPOSTINT('socid') ? GETPOSTINT('socid') : ($object->socid ? $object->socid : -1), 'socid', '', $langs->trans("SelectThirdParty")); print ''; print ''; } @@ -1126,7 +1126,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; print ''; $useempty = (getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2); - print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $object->no_email), 1, false, $useempty); + print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOSTINT("no_email") : $object->no_email), 1, false, $useempty); print ''; print ''; } diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php index 1e82f807105..21ba9ed848f 100644 --- a/htdocs/contact/consumption.php +++ b/htdocs/contact/consumption.php @@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $object = new Contact($db); if ($id > 0) { @@ -49,10 +49,10 @@ if (empty($object->thirdparty)) { $socid = !empty($object->thirdparty->id) ? $object->thirdparty->id : null; // Sort & Order fields -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -69,8 +69,8 @@ if (!$sortfield) { // Search fields $sref = GETPOST("sref"); $sprod_fulldescr = GETPOST("sprod_fulldescr"); -$month = GETPOST('month', 'int'); -$year = GETPOST('year', 'int'); +$month = GETPOSTINT('month'); +$year = GETPOSTINT('year'); // Clean up on purge search criteria ? if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // Both test are required to be compatible with all browsers diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index 0ab502e6fa9..ede18370781 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; $langs->loadLangs(array('other', 'companies', 'contact')); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); @@ -53,10 +53,10 @@ if (!empty($canvas)) { } // Get parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index f92734644de..d1248286792 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.php @@ -35,7 +35,7 @@ $langs->load("companies"); // Security check -$id = GETPOST("id", 'int'); +$id = GETPOSTINT("id"); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php index 4d74382ad4e..337966133c5 100644 --- a/htdocs/contact/ldap.php +++ b/htdocs/contact/ldap.php @@ -36,7 +36,7 @@ $langs->load("admin"); $action = GETPOST('action', 'aZ09'); // Security check -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index a9878be3a28..45a39bfee2f 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -49,7 +49,7 @@ $socialnetworks = getArrayOfSocialNetworks(); // Get parameters $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); -$show_files = GETPOST('show_files', 'int'); +$show_files = GETPOSTINT('show_files'); $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'contactlist'; @@ -60,8 +60,8 @@ if ($contextpage == 'poslist') { } // Security check -$id = GETPOST('id', 'int'); -$contactid = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); +$contactid = GETPOSTINT('id'); $ref = ''; // There is no ref for contacts if ($user->socid) { $socid = $user->socid; @@ -72,7 +72,7 @@ $search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('searc $search_cti = preg_replace('/^0+/', '', preg_replace('/[^0-9]/', '', GETPOST('search_cti', 'alphanohtml'))); // Phone number without any special chars $search_phone = GETPOST("search_phone", 'alpha'); -$search_id = GETPOST("search_id", "int"); +$search_id = GETPOSTINT("search_id"); $search_firstlast_only = GETPOST("search_firstlast_only", 'alpha'); $search_lastname = GETPOST("search_lastname", 'alpha'); $search_firstname = GETPOST("search_firstname", 'alpha'); @@ -85,7 +85,7 @@ $search_phone_mobile = GETPOST("search_phone_mobile", 'alpha'); $search_fax = GETPOST("search_fax", 'alpha'); $search_email = GETPOST("search_email", 'alpha'); if (isModEnabled('mailing')) { - $search_no_email = GETPOSTISSET("search_no_email") ? GETPOST("search_no_email", 'int') : -1; + $search_no_email = GETPOSTISSET("search_no_email") ? GETPOSTINT("search_no_email") : -1; } else { $search_no_email = -1; } @@ -98,10 +98,10 @@ if (isModEnabled('socialnetworks')) { } $search_priv = GETPOST("search_priv", 'alpha'); $search_sale = GETPOSTINT('search_sale'); -$search_categ = GETPOST("search_categ", 'int'); -$search_categ_thirdparty = GETPOST("search_categ_thirdparty", 'int'); -$search_categ_supplier = GETPOST("search_categ_supplier", 'int'); -$search_status = GETPOST("search_status", 'int'); +$search_categ = GETPOSTINT("search_categ"); +$search_categ_thirdparty = GETPOSTINT("search_categ_thirdparty"); +$search_categ_supplier = GETPOSTINT("search_categ_supplier"); +$search_status = GETPOSTINT("search_status"); $search_type = GETPOST('search_type', 'alpha'); $search_address = GETPOST('search_address', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); @@ -110,9 +110,9 @@ $search_import_key = GETPOST("search_import_key", 'alpha'); $search_country = GETPOST("search_country", 'intcomma'); $search_roles = GETPOST("search_roles", 'array'); $search_level = GETPOST("search_level", 'array'); -$search_stcomm = GETPOST('search_stcomm', 'int'); -$search_birthday_start = dol_mktime(0, 0, 0, GETPOST('search_birthday_startmonth', 'int'), GETPOST('search_birthday_startday', 'int'), GETPOST('search_birthday_startyear', 'int')); -$search_birthday_end = dol_mktime(23, 59, 59, GETPOST('search_birthday_endmonth', 'int'), GETPOST('search_birthday_endday', 'int'), GETPOST('search_birthday_endyear', 'int')); +$search_stcomm = GETPOSTINT('search_stcomm'); +$search_birthday_start = dol_mktime(0, 0, 0, GETPOSTINT('search_birthday_startmonth'), GETPOSTINT('search_birthday_startday'), GETPOSTINT('search_birthday_startyear')); +$search_birthday_end = dol_mktime(23, 59, 59, GETPOSTINT('search_birthday_endmonth'), GETPOSTINT('search_birthday_endday'), GETPOSTINT('search_birthday_endyear')); if ($search_status === '') { $search_status = 1; // always display active customer first @@ -128,14 +128,14 @@ $place = GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : '0'; // $place is $type = GETPOST("type", 'aZ'); $view = GETPOST("view", 'alpha'); -$userid = GETPOST('userid', 'int'); +$userid = GETPOSTINT('userid'); $begin = GETPOST('begin'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (!$sortorder) { $sortorder = "ASC"; } @@ -288,8 +288,8 @@ if (!$permissiontoread) { */ if ($action == "change" && $user->hasRight('takepos', 'run')) { // Change customer for TakePOS - $idcustomer = GETPOST('idcustomer', 'int'); - $idcontact = GETPOST('idcontact', 'int'); + $idcustomer = GETPOSTINT('idcustomer'); + $idcontact = GETPOSTINT('idcontact'); // Check if draft invoice already exists, if not create it $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")' AND entity IN (".getEntity('invoice').")"; @@ -935,7 +935,7 @@ if (!empty($permissiontodelete)) { if (isModEnabled('category') && $user->hasRight('societe', 'creer')) { $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) { $arrayofmassactions = array(); } if ($contextpage != 'poslist') { diff --git a/htdocs/contact/note.php b/htdocs/contact/note.php index 7dd2b319e67..1f7a328e614 100644 --- a/htdocs/contact/note.php +++ b/htdocs/contact/note.php @@ -35,7 +35,7 @@ $action = GETPOST('action', 'aZ09'); // Load translation files required by the page $langs->load("companies"); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $object = new Contact($db); if ($id > 0) { diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index c9e96439ef9..357b6401023 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php'; // Load translation files required by the page $langs->loadLangs(array('companies', 'other')); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $action = GETPOST('action', 'aZ09'); // Security check diff --git a/htdocs/contact/project.php b/htdocs/contact/project.php index 9cc60d2cbe4..389bb693d1d 100644 --- a/htdocs/contact/project.php +++ b/htdocs/contact/project.php @@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $langs->loadLangs(array("contacts", "companies", "projects")); // Security check -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index 5760cc9e670..a8434eff2d9 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/vcard.class.php'; $contact = new Contact($db); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); // Security check $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); diff --git a/htdocs/contrat/agenda.php b/htdocs/contrat/agenda.php index 45f81b633c9..5c0506a94c7 100644 --- a/htdocs/contrat/agenda.php +++ b/htdocs/contrat/agenda.php @@ -50,7 +50,7 @@ $search_agenda_label = GETPOST('search_agenda_label'); $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); // Security check @@ -63,10 +63,10 @@ $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($id) ? 'rowid' : 'ref'); $result = restrictedArea($user, 'contrat', $fieldvalue, '', '', '', $fieldtype); -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index fb3290f6124..231f433f3b4 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -61,16 +61,16 @@ $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); -$socid = GETPOST('socid', 'int'); -$id = GETPOST('id', 'int'); +$socid = GETPOSTINT('socid'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $origin = GETPOST('origin', 'alpha'); -$originid = GETPOST('originid', 'int'); +$originid = GETPOSTINT('originid'); // PDF -$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0)); -$hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0)); -$hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0)); +$hidedetails = (GETPOSTINT('hidedetails') ? GETPOSTINT('hidedetails') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0)); +$hidedesc = (GETPOSTINT('hidedesc') ? GETPOSTINT('hidedesc') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0)); +$hideref = (GETPOSTINT('hideref') ? GETPOSTINT('hideref') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0)); $datecontrat = ''; @@ -164,7 +164,7 @@ if (empty($reshook)) { $date_end = dol_mktime(GETPOST('endhour'), GETPOST('endmin'), 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); } - $result = $object->active_line($user, GETPOST('ligne', 'int'), $date_start, $date_end, GETPOST('comment')); + $result = $object->active_line($user, GETPOSTINT('ligne'), $date_start, $date_end, GETPOST('comment')); if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); @@ -182,7 +182,7 @@ if (empty($reshook)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd")), null, 'errors'); } if (!$error) { - $result = $object->close_line($user, GETPOST('ligne', 'int'), $date_end, urldecode(GETPOST('comment'))); + $result = $object->close_line($user, GETPOSTINT('ligne'), $date_end, urldecode(GETPOST('comment'))); if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; @@ -250,12 +250,12 @@ if (empty($reshook)) { $object->socid = $socid; $object->date_contrat = $datecontrat; - $object->commercial_suivi_id = GETPOST('commercial_suivi_id', 'int'); - $object->commercial_signature_id = GETPOST('commercial_signature_id', 'int'); + $object->commercial_suivi_id = GETPOSTINT('commercial_suivi_id'); + $object->commercial_signature_id = GETPOSTINT('commercial_signature_id'); $object->note_private = GETPOST('note_private', 'alpha'); $object->note_public = GETPOST('note_public', 'alpha'); - $object->fk_project = GETPOST('projectid', 'int'); + $object->fk_project = GETPOSTINT('projectid'); $object->remise_percent = price2num(GETPOST('remise_percent'), '', 2); $object->ref = GETPOST('ref', 'alpha'); $object->ref_customer = GETPOST('ref_customer', 'alpha'); @@ -451,7 +451,7 @@ if (empty($reshook)) { if (GETPOST('prod_entry_mode', 'alpha') == 'free') { $idprod = 0; } else { - $idprod = GETPOST('idprod', 'int'); + $idprod = GETPOSTINT('idprod'); if (getDolGlobalString('MAIN_DISABLE_FREE_LINES') && $idprod <= 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ProductOrService")), null, 'errors'); @@ -712,7 +712,7 @@ if (empty($reshook)) { if (!$error) { $objectline = new ContratLigne($db); - if ($objectline->fetch(GETPOST('elrowid', 'int')) < 0) { + if ($objectline->fetch(GETPOSTINT('elrowid')) < 0) { setEventMessages($objectline->error, $objectline->errors, 'errors'); $error++; } @@ -771,7 +771,7 @@ if (empty($reshook)) { $remise = round(($price_ht * $remise_percent / 100), 2); } - $objectline->fk_product = GETPOST('idprod', 'int'); + $objectline->fk_product = GETPOSTINT('idprod'); $objectline->description = GETPOST('product_desc', 'restricthtml'); $objectline->price_ht = $price_ht; $objectline->subprice = price2num(GETPOST('elprice'), 'MU'); @@ -822,7 +822,7 @@ if (empty($reshook)) { $db->rollback(); } } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->hasRight('contrat', 'creer')) { - $result = $object->deleteLine(GETPOST('lineid', 'int'), $user); + $result = $object->deleteLine(GETPOSTINT('lineid'), $user); if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); @@ -1036,10 +1036,10 @@ if (empty($reshook)) { } } elseif ($action == 'swapstatut') { // bascule du statut d'un contact - $result = $object->swapContactStatus(GETPOST('ligne', 'int')); + $result = $object->swapContactStatus(GETPOSTINT('ligne')); } elseif ($action == 'deletecontact') { // Efface un contact - $result = $object->delete_contact(GETPOST('lineid', 'int')); + $result = $object->delete_contact(GETPOSTINT('lineid')); if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); @@ -1111,7 +1111,7 @@ if ($action == 'create') { $soc->fetch($socid); } - if (GETPOST('origin') && GETPOST('originid', 'int')) { + if (GETPOST('origin') && GETPOSTINT('originid')) { // Parse element/subelement (ex: project_task) $regs = array(); $element = $subelement = GETPOST('origin'); @@ -1121,7 +1121,7 @@ if ($action == 'create') { } if ($element == 'project') { - $projectid = GETPOST('originid', 'int'); + $projectid = GETPOSTINT('originid'); } else { // For compatibility if ($element == 'order' || $element == 'commande') { @@ -1161,7 +1161,7 @@ if ($action == 'create') { $srccontactslist = $objectsrc->liste_contact(-1, 'external', 1); } } else { - $projectid = GETPOST('projectid', 'int'); + $projectid = GETPOSTINT('projectid'); $note_private = GETPOST("note_private"); $note_public = GETPOST("note_public"); } @@ -1358,7 +1358,7 @@ if ($action == 'create') { } elseif ($action == 'clone') { $filter = '(s.client:IN:1,2,3)'; // Clone confirmation - $formquestion = array(array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', $filter))); + $formquestion = array(array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOSTINT('socid'), 'socid', $filter))); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneContract', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } @@ -1892,7 +1892,7 @@ if ($action == 'create') { 'text' => $langs->trans("ConfirmMoveToAnotherContractQuestion"), array('type' => 'select', 'name' => 'newcid', 'values' => $arraycontractid)); - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid', 'int'), $langs->trans("MoveToAnotherContract"), $langs->trans("ConfirmMoveToAnotherContract"), "confirm_move", $formquestion); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOSTINT('rowid'), $langs->trans("MoveToAnotherContract"), $langs->trans("ConfirmMoveToAnotherContract"), "confirm_move", $formquestion); print '
'; } @@ -1960,13 +1960,13 @@ if ($action == 'create') { } // Form to activate line - if ($user->hasRight('contrat', 'activer') && $action == 'activateline' && $object->lines[$cursorline - 1]->id == GETPOST('ligne', 'int')) { + if ($user->hasRight('contrat', 'activer') && $action == 'activateline' && $object->lines[$cursorline - 1]->id == GETPOSTINT('ligne')) { print ''; print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; @@ -2015,7 +2015,7 @@ if ($action == 'create') { print ''; } - if ($user->hasRight('contrat', 'activer') && $action == 'unactivateline' && $object->lines[$cursorline - 1]->id == GETPOST('ligne', 'int')) { + if ($user->hasRight('contrat', 'activer') && $action == 'unactivateline' && $object->lines[$cursorline - 1]->id == GETPOSTINT('ligne')) { /** * Disable a contract line */ @@ -2084,7 +2084,7 @@ if ($action == 'create') { $dateSelector = 1; print "\n"; - print ' + print ' diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index df7331cb65a..2af94f7654c 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -40,8 +40,8 @@ $langs->loadLangs(array('contracts', 'companies')); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); -$socid = GETPOST('socid', 'int'); -$id = GETPOST('id', 'int'); +$socid = GETPOSTINT('socid'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); // Security check @@ -98,7 +98,7 @@ if (empty($reshook)) { // Toggle the status of a contact if ($action == 'swapstatut' && $user->hasRight('contrat', 'creer')) { if ($object->fetch($id)) { - $result = $object->swapContactStatus(GETPOST('ligne', 'int')); + $result = $object->swapContactStatus(GETPOSTINT('ligne')); } else { dol_print_error($db, $object->error); } @@ -107,7 +107,7 @@ if (empty($reshook)) { // Delete contact if ($action == 'deletecontact' && $user->hasRight('contrat', 'creer')) { $object->fetch($id); - $result = $object->delete_contact(GETPOST("lineid", 'int')); + $result = $object->delete_contact(GETPOSTINT("lineid")); if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 9cea403d00c..df1fe678317 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -42,7 +42,7 @@ $langs->loadLangs(array('other', 'products', 'contracts')); $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); // Security check @@ -53,10 +53,10 @@ if ($user->socid > 0) { } // Get parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index be492d4cea0..584ea7d0697 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -39,13 +39,13 @@ $langs->loadLangs(array('products', 'companies', 'contracts')); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); $statut = GETPOST('statut') ? GETPOST('statut') : 1; // Security check $socid = 0; -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); if (!empty($user->socid)) { $socid = $user->socid; } diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 72fd00021c8..8c5d25cbb97 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -47,7 +47,7 @@ $langs->loadLangs(array('contracts', 'products', 'companies', 'compta')); $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); -$show_files = GETPOST('show_files', 'int'); +$show_files = GETPOSTINT('show_files'); $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'contractlist'; // To manage different context of search @@ -59,59 +59,59 @@ $search_email = GETPOST('search_email', 'alpha'); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); $search_state = GETPOST("search_state", 'alpha'); -$search_country = GETPOST("search_country", 'int'); -$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int'); +$search_country = GETPOSTINT("search_country"); +$search_type_thirdparty = GETPOSTINT("search_type_thirdparty"); $search_contract = GETPOST('search_contract', 'alpha'); $search_ref_customer = GETPOST('search_ref_customer', 'alpha'); $search_ref_supplier = GETPOST('search_ref_supplier', 'alpha'); $search_all = (GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); $search_status = GETPOST('search_status', 'alpha'); -$socid = GETPOST('socid', 'int'); -$search_user = GETPOST('search_user', 'int'); -$search_sale = GETPOST('search_sale', 'int'); -$search_product_category = GETPOST('search_product_category', 'int'); -$search_dfmonth = GETPOST('search_dfmonth', 'int'); -$search_dfyear = GETPOST('search_dfyear', 'int'); +$socid = GETPOSTINT('socid'); +$search_user = GETPOSTINT('search_user'); +$search_sale = GETPOSTINT('search_sale'); +$search_product_category = GETPOSTINT('search_product_category'); +$search_dfmonth = GETPOSTINT('search_dfmonth'); +$search_dfyear = GETPOSTINT('search_dfyear'); $search_op2df = GETPOST('search_op2df', 'alpha'); -$search_date_startday = GETPOST('search_date_startday', 'int'); -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); -$search_date_startyear = GETPOST('search_date_startyear', 'int'); -$search_date_endday = GETPOST('search_date_endday', 'int'); -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); -$search_date_endyear = GETPOST('search_date_endyear', 'int'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_endday = GETPOSTINT('search_date_endday'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); $searchCategoryCustomerOperator = 0; if (GETPOSTISSET('formfilteraction')) { - $searchCategoryCustomerOperator = GETPOST('search_category_customer_operator', 'int'); + $searchCategoryCustomerOperator = GETPOSTINT('search_category_customer_operator'); } elseif (getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT')) { $searchCategoryCustomerOperator = getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT'); } $searchCategoryCustomerList = GETPOST('search_category_customer_list', 'array'); -$search_date_creation_startmonth = GETPOST('search_date_creation_startmonth', 'int'); -$search_date_creation_startyear = GETPOST('search_date_creation_startyear', 'int'); -$search_date_creation_startday = GETPOST('search_date_creation_startday', 'int'); +$search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); +$search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); +$search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); $search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver -$search_date_creation_endmonth = GETPOST('search_date_creation_endmonth', 'int'); -$search_date_creation_endyear = GETPOST('search_date_creation_endyear', 'int'); -$search_date_creation_endday = GETPOST('search_date_creation_endday', 'int'); +$search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); +$search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); +$search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); $search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver -$search_date_modif_startmonth = GETPOST('search_date_modif_startmonth', 'int'); -$search_date_modif_startyear = GETPOST('search_date_modif_startyear', 'int'); -$search_date_modif_startday = GETPOST('search_date_modif_startday', 'int'); +$search_date_modif_startmonth = GETPOSTINT('search_date_modif_startmonth'); +$search_date_modif_startyear = GETPOSTINT('search_date_modif_startyear'); +$search_date_modif_startday = GETPOSTINT('search_date_modif_startday'); $search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver -$search_date_modif_endmonth = GETPOST('search_date_modif_endmonth', 'int'); -$search_date_modif_endyear = GETPOST('search_date_modif_endyear', 'int'); -$search_date_modif_endday = GETPOST('search_date_modif_endday', 'int'); +$search_date_modif_endmonth = GETPOSTINT('search_date_modif_endmonth'); +$search_date_modif_endyear = GETPOSTINT('search_date_modif_endyear'); +$search_date_modif_endday = GETPOSTINT('search_date_modif_endday'); $search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -127,7 +127,7 @@ if (!$sortorder) { } // Security check -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); if ($user->socid) { $socid = $user->socid; } @@ -733,7 +733,7 @@ $arrayofmassactions = array( if (!empty($permissiontodelete)) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/contrat/messaging.php b/htdocs/contrat/messaging.php index 5eaaac8d51f..edaeb02525b 100644 --- a/htdocs/contrat/messaging.php +++ b/htdocs/contrat/messaging.php @@ -53,13 +53,13 @@ $search_agenda_label = GETPOST('search_agenda_label'); $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ?GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -80,7 +80,7 @@ $object = new Contrat($db); $hookmanager->initHooks(array('agendacontract', 'globalcard')); // Security check -$id = GETPOST("id", 'int'); +$id = GETPOSTINT("id"); $socid = 0; if ($user->socid) { $socid = $user->socid; diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index ec9f9da7dc2..996eace982f 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -37,8 +37,8 @@ $langs->loadLangs(array('companies', 'contracts')); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); -$socid = GETPOST('socid', 'int'); -$id = GETPOST('id', 'int'); +$socid = GETPOSTINT('socid'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); // Security check diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index 69025a66d0f..eae46a028e6 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -44,10 +44,10 @@ $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always ' $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -71,8 +71,8 @@ $search_total_ttc = GETPOST("search_total_ttc", 'alpha'); $search_contract = GETPOST("search_contract", 'alpha'); $search_service = GETPOST("search_service", 'alpha'); $search_status = GETPOST("search_status", 'alpha'); -$search_product_category = GETPOST('search_product_category', 'int'); -$socid = GETPOST('socid', 'int'); +$search_product_category = GETPOSTINT('search_product_category'); +$socid = GETPOSTINT('socid'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'contractservicelist'.$mode; $opouvertureprevuemonth = GETPOST('opouvertureprevuemonth'); @@ -80,19 +80,19 @@ $opouvertureprevueday = GETPOST('opouvertureprevueday'); $opouvertureprevueyear = GETPOST('opouvertureprevueyear'); $filter_opouvertureprevue = GETPOST('filter_opouvertureprevue'); -$op1month = GETPOST('op1month', 'int'); -$op1day = GETPOST('op1day', 'int'); -$op1year = GETPOST('op1year', 'int'); +$op1month = GETPOSTINT('op1month'); +$op1day = GETPOSTINT('op1day'); +$op1year = GETPOSTINT('op1year'); $filter_op1 = GETPOST('filter_op1', 'alpha'); -$op2month = GETPOST('op2month', 'int'); -$op2day = GETPOST('op2day', 'int'); -$op2year = GETPOST('op2year', 'int'); +$op2month = GETPOSTINT('op2month'); +$op2day = GETPOSTINT('op2day'); +$op2year = GETPOSTINT('op2year'); $filter_op2 = GETPOST('filter_op2', 'alpha'); -$opcloturemonth = GETPOST('opcloturemonth', 'int'); -$opclotureday = GETPOST('opclotureday', 'int'); -$opclotureyear = GETPOST('opclotureyear', 'int'); +$opcloturemonth = GETPOSTINT('opcloturemonth'); +$opclotureday = GETPOSTINT('opclotureday'); +$opclotureyear = GETPOSTINT('opclotureyear'); $filter_opcloture = GETPOST('filter_opcloture', 'alpha'); @@ -107,7 +107,7 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Security check -$contratid = GETPOST('id', 'int'); +$contratid = GETPOSTINT('id'); if (!empty($user->socid)) { $socid = $user->socid; } diff --git a/htdocs/contrat/ticket.php b/htdocs/contrat/ticket.php index e4e1296ccdb..7c7cce00982 100644 --- a/htdocs/contrat/ticket.php +++ b/htdocs/contrat/ticket.php @@ -37,8 +37,8 @@ require_once DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php"; $langs->loadLangs(array('companies', 'contracts', 'tickets')); -$socid=GETPOST('socid', 'int'); -$id=GETPOST('id', 'int'); +$socid=GETPOSTINT('socid'); +$id=GETPOSTINT('id'); $ref=GETPOST('ref', 'alpha'); $action=GETPOST('action', 'alpha'); diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index 9f5228561d0..1fac2f45c9e 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -110,9 +110,9 @@ if ($action == 'add' && !empty($permissiontoadd)) { $value = GETPOST($key, 'restricthtml'); } } elseif ($object->fields[$key]['type'] == 'date') { - $value = dol_mktime(12, 0, 0, GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int')); // for date without hour, we use gmt + $value = dol_mktime(12, 0, 0, GETPOSTINT($key.'month'), GETPOSTINT($key.'day'), GETPOSTINT($key.'year')); // for date without hour, we use gmt } elseif ($object->fields[$key]['type'] == 'datetime') { - $value = dol_mktime(GETPOST($key.'hour', 'int'), GETPOST($key.'min', 'int'), GETPOST($key.'sec', 'int'), GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int'), 'tzuserrel'); + $value = dol_mktime(GETPOSTINT($key.'hour'), GETPOSTINT($key.'min'), GETPOSTINT($key.'sec'), GETPOSTINT($key.'month'), GETPOSTINT($key.'day'), GETPOSTINT($key.'year'), 'tzuserrel'); } elseif ($object->fields[$key]['type'] == 'duration') { $value = 60 * 60 * GETPOSTINT($key.'hour') + 60 * GETPOSTINT($key.'min'); } elseif (preg_match('/^(integer|price|real|double)/', $object->fields[$key]['type'])) { @@ -263,12 +263,12 @@ if ($action == 'update' && !empty($permissiontoadd)) { $value = GETPOST($key, 'restricthtml'); } } elseif ($object->fields[$key]['type'] == 'date') { - $value = dol_mktime(12, 0, 0, GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int')); // for date without hour, we use gmt + $value = dol_mktime(12, 0, 0, GETPOSTINT($key.'month'), GETPOSTINT($key.'day'), GETPOSTINT($key.'year')); // for date without hour, we use gmt } elseif ($object->fields[$key]['type'] == 'datetime') { - $value = dol_mktime(GETPOST($key.'hour', 'int'), GETPOST($key.'min', 'int'), GETPOST($key.'sec', 'int'), GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int'), 'tzuserrel'); + $value = dol_mktime(GETPOSTINT($key.'hour'), GETPOSTINT($key.'min'), GETPOSTINT($key.'sec'), GETPOSTINT($key.'month'), GETPOSTINT($key.'day'), GETPOSTINT($key.'year'), 'tzuserrel'); } elseif ($object->fields[$key]['type'] == 'duration') { - if (GETPOST($key.'hour', 'int') != '' || GETPOST($key.'min', 'int') != '') { - $value = 60 * 60 * GETPOST($key.'hour', 'int') + 60 * GETPOST($key.'min', 'int'); + if (GETPOSTINT($key.'hour') != '' || GETPOSTINT($key.'min') != '') { + $value = 60 * 60 * GETPOSTINT($key.'hour') + 60 * GETPOSTINT($key.'min'); } else { $value = ''; } @@ -353,8 +353,8 @@ if ($action == 'update' && !empty($permissiontoadd)) { // Action to update one modulebuilder field $reg = array(); -if (preg_match('/^set(\w+)$/', $action, $reg) && GETPOST('id', 'int') > 0 && !empty($permissiontoadd)) { - $object->fetch(GETPOST('id', 'int')); +if (preg_match('/^set(\w+)$/', $action, $reg) && GETPOSTINT('id') > 0 && !empty($permissiontoadd)) { + $object->fetch(GETPOSTINT('id')); $keyforfield = $reg[1]; if (property_exists($object, $keyforfield)) { @@ -378,8 +378,8 @@ if (preg_match('/^set(\w+)$/', $action, $reg) && GETPOST('id', 'int') > 0 && !em } // Action to update one extrafield -if ($action == "update_extras" && GETPOST('id', 'int') > 0 && !empty($permissiontoadd)) { - $object->fetch(GETPOST('id', 'int')); +if ($action == "update_extras" && GETPOSTINT('id') > 0 && !empty($permissiontoadd)) { + $object->fetch(GETPOSTINT('id')); $object->oldcopy = dol_clone($object, 2); diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index 5efa4df394d..8e34bcdbc52 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -55,9 +55,9 @@ if ($action == 'builddoc' && ($permissiontoadd || !empty($usercangeneretedoc))) // Special case to force bank account //if (property_exists($object, 'fk_bank')) //{ - if (GETPOST('fk_bank', 'int')) { + if (GETPOSTINT('fk_bank')) { // this field may come from an external module - $object->fk_bank = GETPOST('fk_bank', 'int'); + $object->fk_bank = GETPOSTINT('fk_bank'); } elseif (!empty($object->fk_account)) { $object->fk_bank = $object->fk_account; } diff --git a/htdocs/core/actions_dellink.inc.php b/htdocs/core/actions_dellink.inc.php index 3ba1df0b0e8..9d5bb687c64 100644 --- a/htdocs/core/actions_dellink.inc.php +++ b/htdocs/core/actions_dellink.inc.php @@ -26,9 +26,9 @@ // $object must be defined // $permissiondellink must be defined -$dellinkid = GETPOST('dellinkid', 'int'); +$dellinkid = GETPOSTINT('dellinkid'); $addlink = GETPOST('addlink', 'alpha'); -$addlinkid = GETPOST('idtolinkto', 'int'); +$addlinkid = GETPOSTINT('idtolinkto'); $addlinkref = GETPOST('reftolinkto', 'alpha'); $cancellink = GETPOST('cancel', 'alpha'); diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php index a563b791f51..affca98a90d 100644 --- a/htdocs/core/actions_extrafields.inc.php +++ b/htdocs/core/actions_extrafields.inc.php @@ -200,7 +200,7 @@ if ($action == 'add') { GETPOST('attrname', 'aZ09'), GETPOST('label', 'alpha'), $type, - GETPOST('pos', 'int'), + GETPOSTINT('pos'), $extrasize, $elementtype, (GETPOST('unique', 'alpha') ? 1 : 0), @@ -337,7 +337,7 @@ if ($action == 'update') { if (!$error) { if (GETPOSTISSET("attrname") && preg_match("/^\w[a-zA-Z0-9-_]*$/", GETPOST('attrname', 'aZ09')) && !is_numeric(GETPOST('attrname', 'aZ09'))) { - $pos = GETPOST('pos', 'int'); + $pos = GETPOSTINT('pos'); // Construct array for parameter (value of select list) $parameters = $param; $parameters_array = explode("\r\n", $parameters); diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index 28d5d33800c..ed0d8b4e8ec 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -28,7 +28,7 @@ // Protection to understand what happen when submitting files larger than post_max_size -if (GETPOST('uploadform', 'int') && empty($_POST) && empty($_FILES)) { +if (GETPOSTINT('uploadform') && empty($_POST) && empty($_FILES)) { dol_syslog("The PHP parameter 'post_max_size' is too low. All POST parameters and FILES were set to empty."); $langs->loadLangs(array("errors", "install")); print $langs->trans("ErrorFileSizeTooLarge").' '; @@ -77,7 +77,7 @@ if (GETPOST('sendit', 'alpha') && getDolGlobalString('MAIN_UPLOAD_DOC') && !empt if (GETPOST('section_dir', 'alpha')) { $generatethumbs = 0; } - $allowoverwrite = (GETPOST('overwritefile', 'int') ? 1 : 0); + $allowoverwrite = (GETPOSTINT('overwritefile') ? 1 : 0); if (!empty($upload_dirold) && getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $result = dol_add_file_process($upload_dirold, $allowoverwrite, 1, 'userfile', GETPOST('savingdocmask', 'alpha'), null, '', $generatethumbs, $object); @@ -130,7 +130,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes' && !empty($permissionto $fileold = $upload_dirold."/".$urlfile; } } - $linkid = GETPOST('linkid', 'int'); + $linkid = GETPOSTINT('linkid'); if ($urlfile) { // delete of a file @@ -192,7 +192,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes' && !empty($permissionto require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; $link = new Link($db); - $f = $link->fetch(GETPOST('linkid', 'int')); + $f = $link->fetch(GETPOSTINT('linkid')); if ($f) { $link->url = GETPOST('link', 'alpha'); if (substr($link->url, 0, 7) != 'http://' && substr($link->url, 0, 8) != 'https://' && substr($link->url, 0, 7) != 'file://') { @@ -299,12 +299,12 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes' && !empty($permissionto } // Update properties in ECM table - if (GETPOST('ecmfileid', 'int') > 0) { + if (GETPOSTINT('ecmfileid') > 0) { $shareenabled = GETPOST('shareenabled', 'alpha'); include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; $ecmfile = new EcmFiles($db); - $result = $ecmfile->fetch(GETPOST('ecmfileid', 'int')); + $result = $ecmfile->fetch(GETPOSTINT('ecmfileid')); if ($result > 0) { if ($shareenabled) { if (empty($ecmfile->share)) { diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 551c7b7c069..651b48e40a4 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -85,7 +85,7 @@ if (!$error && $massaction == 'confirm_presend') { $listofobjectref = array(); $contactidtosend = array(); $attachedfilesThirdpartyObj = array(); - $oneemailperrecipient = (GETPOST('oneemailperrecipient', 'int') ? 1 : 0); + $oneemailperrecipient = (GETPOSTINT('oneemailperrecipient') ? 1 : 0); if (!$error) { $objecttmp = new $objectclass($db); @@ -1270,7 +1270,7 @@ if (!$error && ($action == 'affecttag' && $confirm == 'yes') && $permissiontoadd if (!$error && ($action == 'updateprice' && $confirm == 'yes') && $permissiontoadd) { $db->begin(); if (GETPOSTISSET('pricerate')) { - $pricepercentage=GETPOST('pricerate', 'int'); + $pricepercentage=GETPOSTINT('pricerate'); if ($pricepercentage == 0) { setEventMessages($langs->trans("RecordsModified", 0), null); } else { @@ -1768,7 +1768,7 @@ if (!$error && ($massaction == 'clonetasks' || ($action == 'clonetasks' && $conf $taskid = $clone_task->create($user); if ($taskid > 0) { - $result = $clone_task->add_contact(GETPOST("userid", 'int'), 'TASKEXECUTIVE', 'internal'); + $result = $clone_task->add_contact(GETPOSTINT("userid"), 'TASKEXECUTIVE', 'internal'); $num++; } else { if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { @@ -1786,7 +1786,7 @@ if (!$error && ($massaction == 'clonetasks' || ($action == 'clonetasks' && $conf if (!$error) { setEventMessage($langs->trans('NumberOfTasksCloned', $num)); - header("Refresh: 1;URL=".DOL_URL_ROOT.'/projet/tasks.php?id=' . GETPOST('projectid', 'int')); + header("Refresh: 1;URL=".DOL_URL_ROOT.'/projet/tasks.php?id=' . GETPOSTINT('projectid')); } } diff --git a/htdocs/core/actions_setmoduleoptions.inc.php b/htdocs/core/actions_setmoduleoptions.inc.php index 1ca6c3d3697..27fb7649100 100644 --- a/htdocs/core/actions_setmoduleoptions.inc.php +++ b/htdocs/core/actions_setmoduleoptions.inc.php @@ -42,10 +42,10 @@ if ($action == 'update' && is_array($arrayofparameters) && !empty($user->admin)) // Modify constant only if key was posted (avoid resetting key to the null value) if (GETPOSTISSET($key)) { if (!empty($val['type']) && preg_match('/category:/', $val['type'])) { - if (GETPOST($key, 'int') == '-1') { + if (GETPOSTINT($key) == '-1') { $val_const = ''; } else { - $val_const = GETPOST($key, 'int'); + $val_const = GETPOSTINT($key); } } elseif ($val['type'] == 'html') { $val_const = GETPOST($key, 'restricthtml'); diff --git a/htdocs/core/actions_setnotes.inc.php b/htdocs/core/actions_setnotes.inc.php index 1e3efe420be..5f27c2a9091 100644 --- a/htdocs/core/actions_setnotes.inc.php +++ b/htdocs/core/actions_setnotes.inc.php @@ -59,9 +59,9 @@ if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel', $outputlangs->setDefaultLang($newlang); } $model = $object->model_pdf; - $hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0)); - $hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0)); - $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0)); + $hidedetails = (GETPOSTINT('hidedetails') ? GETPOSTINT('hidedetails') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0)); + $hidedesc = (GETPOSTINT('hidedesc') ? GETPOSTINT('hidedesc') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0)); + $hideref = (GETPOSTINT('hideref') ? GETPOSTINT('hideref') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0)); //see #21072: Update a public note with a "document model not found" is not really a problem : the PDF is not created/updated //but the note is saved, so just add a notification will be enough diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index f5ea99e4b36..11c2392f953 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -53,10 +53,10 @@ if (!isset($mode) || $mode != 'noajax') { // For ajax call $urlsource = GETPOST("urlsource", 'alpha'); $search_doc_ref = GETPOST('search_doc_ref', 'alpha'); - $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; + $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'aZ09comma'); $sortorder = GETPOST("sortorder", 'aZ09comma'); - $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); + $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -321,7 +321,7 @@ if ($type == 'directory') { $param .= '&website='.urlencode(GETPOST('website', 'alpha')); } if (!preg_match('/pageid=/', $param)) { - $param .= '&pageid='.urlencode(GETPOST('pageid', 'int')); + $param .= '&pageid='.urlencode(GETPOSTINT('pageid')); } //if (!preg_match('/backtopage=/',$param)) $param.='&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$websitekey.'&pageid='.$pageid); } diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index 07c1b8b13b1..680e46a244c 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -74,7 +74,7 @@ if (!isset($mode) || $mode != 'noajax') { // For ajax call } $websitekey = GETPOST('websitekey', 'alpha'); -$pageid = GETPOST('pageid', 'int'); +$pageid = GETPOSTINT('pageid'); // Load translation files required by the page $langs->load("ecm"); diff --git a/htdocs/core/ajax/ajaxinvoiceline.php b/htdocs/core/ajax/ajaxinvoiceline.php index f575bf326ac..2ce44ea57e3 100644 --- a/htdocs/core/ajax/ajaxinvoiceline.php +++ b/htdocs/core/ajax/ajaxinvoiceline.php @@ -34,7 +34,7 @@ if (!defined('NOREQUIREAJAX')) { require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; -$invoice_id = GETPOST('id', 'int'); // id of thirdparty +$invoice_id = GETPOSTINT('id'); // id of thirdparty $action = GETPOST('action', 'aZ09'); $htmlname = GETPOST('htmlname', 'alpha'); diff --git a/htdocs/core/ajax/ajaxstatusprospect.php b/htdocs/core/ajax/ajaxstatusprospect.php index 6fcb0dcfd78..1b389a32d4f 100644 --- a/htdocs/core/ajax/ajaxstatusprospect.php +++ b/htdocs/core/ajax/ajaxstatusprospect.php @@ -43,8 +43,8 @@ if (!defined('NOREQUIRESOC')) { require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; -$idstatus = GETPOST('id', 'int'); -$idprospect = GETPOST('prospectid', 'int'); +$idstatus = GETPOSTINT('id'); +$idprospect = GETPOSTINT('prospectid'); $action = GETPOST('action', 'aZ09'); $prospectstatic = new Client($db); diff --git a/htdocs/core/ajax/ajaxtooltip.php b/htdocs/core/ajax/ajaxtooltip.php index f76498c3b3c..782123ca317 100644 --- a/htdocs/core/ajax/ajaxtooltip.php +++ b/htdocs/core/ajax/ajaxtooltip.php @@ -47,7 +47,7 @@ $objecttype = GETPOST('objecttype', 'aZ09arobase'); // 'module' or 'myobject@mym $params = array('fromajaxtooltip' => 1); if (GETPOSTISSET('infologin')) { - $params['infologin'] = GETPOST('infologin', 'int'); + $params['infologin'] = GETPOSTINT('infologin'); } if (GETPOSTISSET('option')) { $params['option'] = GETPOST('option', 'restricthtml'); diff --git a/htdocs/core/ajax/bankconciliate.php b/htdocs/core/ajax/bankconciliate.php index c67f1455b42..deed93cecc4 100644 --- a/htdocs/core/ajax/bankconciliate.php +++ b/htdocs/core/ajax/bankconciliate.php @@ -60,8 +60,8 @@ top_httphead(); if (($user->hasRight('banque', 'modifier') || $user->hasRight('banque', 'consolidate')) && $action == 'dvnext') { // Increase date $al = new AccountLine($db); - $al->datev_next(GETPOST('rowid', 'int')); - $al->fetch(GETPOST('rowid', 'int')); + $al->datev_next(GETPOSTINT('rowid')); + $al->fetch(GETPOSTINT('rowid')); print ''.dol_print_date($al->datev, "day").''; @@ -71,8 +71,8 @@ if (($user->hasRight('banque', 'modifier') || $user->hasRight('banque', 'consoli if (($user->hasRight('banque', 'modifier') || $user->hasRight('banque', 'consolidate')) && $action == 'dvprev') { // Decrease date $al = new AccountLine($db); - $al->datev_previous(GETPOST('rowid', 'int')); - $al->fetch(GETPOST('rowid', 'int')); + $al->datev_previous(GETPOSTINT('rowid')); + $al->fetch(GETPOSTINT('rowid')); print ''.dol_print_date($al->datev, "day").''; @@ -82,8 +82,8 @@ if (($user->hasRight('banque', 'modifier') || $user->hasRight('banque', 'consoli if (($user->hasRight('banque', 'modifier') || $user->hasRight('banque', 'consolidate')) && $action == 'donext') { // Increase date $al = new AccountLine($db); - $al->dateo_next(GETPOST('rowid', 'int')); - $al->fetch(GETPOST('rowid', 'int')); + $al->dateo_next(GETPOSTINT('rowid')); + $al->fetch(GETPOSTINT('rowid')); print ''.dol_print_date($al->dateo, "day").''; @@ -93,8 +93,8 @@ if (($user->hasRight('banque', 'modifier') || $user->hasRight('banque', 'consoli if (($user->hasRight('banque', 'modifier') || $user->hasRight('banque', 'consolidate')) && $action == 'doprev') { // Decrease date $al = new AccountLine($db); - $al->dateo_previous(GETPOST('rowid', 'int')); - $al->fetch(GETPOST('rowid', 'int')); + $al->dateo_previous(GETPOSTINT('rowid')); + $al->fetch(GETPOSTINT('rowid')); print ''.dol_print_date($al->dateo, "day").''; diff --git a/htdocs/core/ajax/box.php b/htdocs/core/ajax/box.php index 621d6878098..82bcdf68983 100644 --- a/htdocs/core/ajax/box.php +++ b/htdocs/core/ajax/box.php @@ -41,10 +41,10 @@ if (!defined('NOREQUIRESOC')) { require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; -$boxid = GETPOST('boxid', 'int'); +$boxid = GETPOSTINT('boxid'); $boxorder = GETPOST('boxorder'); -$zone = GETPOST('zone', 'int'); -$userid = GETPOST('userid', 'int'); +$zone = GETPOSTINT('zone'); +$userid = GETPOSTINT('userid'); // Security check if ($userid != $user->id) { diff --git a/htdocs/core/ajax/check_notifications.php b/htdocs/core/ajax/check_notifications.php index 4408e327e2b..e636b499745 100644 --- a/htdocs/core/ajax/check_notifications.php +++ b/htdocs/core/ajax/check_notifications.php @@ -95,7 +95,7 @@ $eventfound = array(); //$eventfound[]=array('type'=>'agenda', 'id'=>1, 'tipo'=>'eee', 'location'=>'aaa'); // TODO Remove use of $_SESSION['auto_check_events_not_before']. Seems not used. -if (empty($_SESSION['auto_check_events_not_before']) || $time >= $_SESSION['auto_check_events_not_before'] || GETPOST('forcechecknow', 'int')) { +if (empty($_SESSION['auto_check_events_not_before']) || $time >= $_SESSION['auto_check_events_not_before'] || GETPOSTINT('forcechecknow')) { /*$time_update = (int) $conf->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY; // Always defined if (!empty($_SESSION['auto_check_events_not_before'])) { diff --git a/htdocs/core/ajax/constantonoff.php b/htdocs/core/ajax/constantonoff.php index 603de7408c0..7a7139fa6ff 100644 --- a/htdocs/core/ajax/constantonoff.php +++ b/htdocs/core/ajax/constantonoff.php @@ -49,7 +49,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; $action = GETPOST('action', 'aZ09'); // set or del $name = GETPOST('name', 'alpha'); -$entity = GETPOST('entity', 'int'); +$entity = GETPOSTINT('entity'); $value = (GETPOST('value', 'aZ09') != '' ? GETPOST('value', 'aZ09') : 1); // Security check diff --git a/htdocs/core/ajax/contacts.php b/htdocs/core/ajax/contacts.php index 4577fccf3c6..7c2f113510c 100644 --- a/htdocs/core/ajax/contacts.php +++ b/htdocs/core/ajax/contacts.php @@ -34,10 +34,10 @@ if (!defined('NOREQUIREAJAX')) { // Load Dolibarr environment require '../../main.inc.php'; -$id = GETPOST('id', 'int'); // id of thirdparty +$id = GETPOSTINT('id'); // id of thirdparty $action = GETPOST('action', 'aZ09'); $htmlname = GETPOST('htmlname', 'alpha'); -$showempty = GETPOST('showempty', 'int'); +$showempty = GETPOSTINT('showempty'); // Security check $result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0); diff --git a/htdocs/core/ajax/extraparams.php b/htdocs/core/ajax/extraparams.php index 0adef3e9d74..9b63da251f5 100644 --- a/htdocs/core/ajax/extraparams.php +++ b/htdocs/core/ajax/extraparams.php @@ -39,7 +39,7 @@ if (!defined('NOREQUIRESOC')) { include '../../main.inc.php'; -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $element = GETPOST('element', 'aZ09arobase'); $htmlelement = GETPOST('htmlelement', 'alpha'); $type = GETPOST('type', 'alpha'); diff --git a/htdocs/core/ajax/fileupload.php b/htdocs/core/ajax/fileupload.php index 1825477758a..44e0c943bc1 100644 --- a/htdocs/core/ajax/fileupload.php +++ b/htdocs/core/ajax/fileupload.php @@ -40,7 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/fileupload.class.php'; // Class to u require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; -$id = GETPOST('fk_element', 'int'); +$id = GETPOSTINT('fk_element'); $element = GETPOST('element', 'alpha'); // 'myobject' (myobject=mymodule) or 'myobject@mymodule' or 'myobject_mysubobject' (myobject=mymodule) $elementupload = $element; diff --git a/htdocs/core/ajax/objectonoff.php b/htdocs/core/ajax/objectonoff.php index 1bc87d06145..e70ea0b98e0 100644 --- a/htdocs/core/ajax/objectonoff.php +++ b/htdocs/core/ajax/objectonoff.php @@ -44,10 +44,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php'; $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage'); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $element = GETPOST('element', 'alpha'); // 'myobject' (myobject=mymodule) or 'myobject@mymodule' or 'myobject_mysubobject' (myobject=mymodule) $field = GETPOST('field', 'alpha'); -$value = GETPOST('value', 'int'); +$value = GETPOSTINT('value'); $format = 'int'; // Load object according to $id and $element diff --git a/htdocs/core/ajax/selectobject.php b/htdocs/core/ajax/selectobject.php index edc5eb32998..aa702375d3e 100644 --- a/htdocs/core/ajax/selectobject.php +++ b/htdocs/core/ajax/selectobject.php @@ -45,7 +45,7 @@ $extrafields = new ExtraFields($db); $objectdesc = GETPOST('objectdesc', 'alphanohtml', 0, null, null, 1); $htmlname = GETPOST('htmlname', 'aZ09'); -$outjson = (GETPOST('outjson', 'int') ? GETPOST('outjson', 'int') : 0); +$outjson = (GETPOSTINT('outjson') ? GETPOSTINT('outjson') : 0); $id = GETPOSTINT('id'); $objectfield = GETPOST('objectfield', 'alpha'); // 'MyObject:field' or 'MyModule_MyObject:field' or 'MyObject:option_field' or 'MyModule_MyObject:option_field' diff --git a/htdocs/core/ajax/vatrates.php b/htdocs/core/ajax/vatrates.php index a1049287f53..06173974d97 100644 --- a/htdocs/core/ajax/vatrates.php +++ b/htdocs/core/ajax/vatrates.php @@ -33,11 +33,11 @@ if (!defined('NOREQUIREAJAX')) { // Load Dolibarr environment require '../../main.inc.php'; -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $action = GETPOST('action', 'aZ09'); // 'getSellerVATRates' or 'getBuyerVATRates' $htmlname = GETPOST('htmlname', 'alpha'); $selected = (GETPOST('selected') ? GETPOST('selected') : '-1'); -$productid = (GETPOST('productid', 'int') ? GETPOST('productid', 'int') : 0); +$productid = (GETPOSTINT('productid') ? GETPOSTINT('productid') : 0); // Security check $result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0); diff --git a/htdocs/core/bookmarks_page.php b/htdocs/core/bookmarks_page.php index e7ced61cff3..a24918273d8 100644 --- a/htdocs/core/bookmarks_page.php +++ b/htdocs/core/bookmarks_page.php @@ -56,10 +56,10 @@ $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left'); */ // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. -if (empty($dolibarr_nocache) && GETPOST('cache', 'int')) { - header('Cache-Control: max-age='.GETPOST('cache', 'int').', public'); +if (empty($dolibarr_nocache) && GETPOSTINT('cache')) { + header('Cache-Control: max-age='.GETPOSTINT('cache').', public'); // For a .php, we must set an Expires to avoid to have it forced to an expired value by the web server - header('Expires: '.gmdate('D, d M Y H:i:s', dol_now('gmt') + GETPOST('cache', 'int')).' GMT'); + header('Expires: '.gmdate('D, d M Y H:i:s', dol_now('gmt') + GETPOSTINT('cache')).' GMT'); // HTTP/1.0 header('Pragma: token=public'); } else { diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index c6db2ca40e5..74b31a3daaf 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -106,7 +106,7 @@ class box_graph_invoices_permonth extends ModeleBoxes include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; $autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE')); if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) { - $endyear = GETPOST($param_year, 'int'); + $endyear = GETPOSTINT($param_year); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); } else { diff --git a/htdocs/core/boxes/box_graph_invoices_peryear.php b/htdocs/core/boxes/box_graph_invoices_peryear.php index cd3ee464eb2..f6decd57660 100644 --- a/htdocs/core/boxes/box_graph_invoices_peryear.php +++ b/htdocs/core/boxes/box_graph_invoices_peryear.php @@ -102,7 +102,7 @@ class box_graph_invoices_peryear extends ModeleBoxes include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; $autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE')); if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) { - $endyear = GETPOST($param_year, 'int'); + $endyear = GETPOSTINT($param_year); $showtot = GETPOST($param_showtot, 'alpha'); } else { $tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true); diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index 97fa847f897..818398324c8 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -102,7 +102,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; $autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE')); if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) { - $endyear = GETPOST($param_year, 'int'); + $endyear = GETPOSTINT($param_year); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); } else { diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index f0021fe403a..ce11fe9e93d 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -105,7 +105,7 @@ class box_graph_orders_permonth extends ModeleBoxes include_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php'; $autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE')); if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) { - $endyear = GETPOST($param_year, 'int'); + $endyear = GETPOSTINT($param_year); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); } else { diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index ca1da74b1bc..9b7e40ab20f 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -104,7 +104,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes include_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php'; $autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE')); if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) { - $endyear = GETPOST($param_year, 'int'); + $endyear = GETPOSTINT($param_year); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); } else { diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index 7bb406ff64e..a90b8604060 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -80,7 +80,7 @@ class box_graph_product_distribution extends ModeleBoxes $param_showordernb = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_showordernb'; $autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE')); if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) { - $year = GETPOST($param_year, 'int'); + $year = GETPOSTINT($param_year); $showinvoicenb = GETPOST($param_showinvoicenb, 'alpha'); $showpropalnb = GETPOST($param_showpropalnb, 'alpha'); $showordernb = GETPOST($param_showordernb, 'alpha'); diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index 796ba81a306..0192ecf2b12 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -105,7 +105,7 @@ class box_graph_propales_permonth extends ModeleBoxes include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propalestats.class.php'; $autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE')); if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) { - $endyear = GETPOST($param_year, 'int'); + $endyear = GETPOSTINT($param_year); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); } else { diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 33bd720fbdf..9f18717db03 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6177,11 +6177,11 @@ abstract class CommonObject if (in_array($key_type, array('date'))) { // Clean parameters // TODO GMT date in memory must be GMT so we should add gm=true in parameters - $value_key = dol_mktime(0, 0, 0, GETPOST($postfieldkey."month", 'int'), GETPOST($postfieldkey."day", 'int'), GETPOST($postfieldkey."year", 'int')); + $value_key = dol_mktime(0, 0, 0, GETPOSTINT($postfieldkey."month"), GETPOSTINT($postfieldkey."day"), GETPOSTINT($postfieldkey."year")); } elseif (in_array($key_type, array('datetime'))) { // Clean parameters // TODO GMT date in memory must be GMT so we should add gm=true in parameters - $value_key = dol_mktime(GETPOST($postfieldkey."hour", 'int'), GETPOST($postfieldkey."min", 'int'), 0, GETPOST($postfieldkey."month", 'int'), GETPOST($postfieldkey."day", 'int'), GETPOST($postfieldkey."year", 'int')); + $value_key = dol_mktime(GETPOSTINT($postfieldkey."hour"), GETPOSTINT($postfieldkey."min"), 0, GETPOSTINT($postfieldkey."month"), GETPOSTINT($postfieldkey."day"), GETPOSTINT($postfieldkey."year")); } elseif (in_array($key_type, array('checkbox', 'chkbxlst'))) { $value_arr = GETPOST($postfieldkey, 'array'); // check if an array if (!empty($value_arr)) { @@ -7760,9 +7760,9 @@ abstract class CommonObject } $paramforthenewlink = ''; $paramforthenewlink .= (GETPOSTISSET('action') ? '&action='.GETPOST('action', 'aZ09') : ''); - $paramforthenewlink .= (GETPOSTISSET('id') ? '&id='.GETPOST('id', 'int') : ''); + $paramforthenewlink .= (GETPOSTISSET('id') ? '&id='.GETPOSTINT('id') : ''); $paramforthenewlink .= (GETPOSTISSET('origin') ? '&origin='.GETPOST('origin', 'aZ09') : ''); - $paramforthenewlink .= (GETPOSTISSET('originid') ? '&originid='.GETPOST('originid', 'int') : ''); + $paramforthenewlink .= (GETPOSTISSET('originid') ? '&originid='.GETPOSTINT('originid') : ''); $paramforthenewlink .= '&fk_'.strtolower($class).'=--IDFORBACKTOPAGE--'; // TODO Add JavaScript code to add input fields already filled into $paramforthenewlink so we won't loose them when going back to main page $out .= ''; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 2153ad048a2..7bcdab198e0 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -2049,7 +2049,7 @@ class ExtraFields $expand_display = false; if (is_array($extrafield_param_list) && count($extrafield_param_list) > 0) { $extrafield_collapse_display_value = intval($extrafield_param_list[0]); - $expand_display = ((isset($_COOKIE['DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key]) || GETPOST('ignorecollapsesetup', 'int')) ? (empty($_COOKIE['DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key]) ? false : true) : ($extrafield_collapse_display_value == 2 ? false : true)); + $expand_display = ((isset($_COOKIE['DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key]) || GETPOSTINT('ignorecollapsesetup')) ? (empty($_COOKIE['DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key]) ? false : true) : ($extrafield_collapse_display_value == 2 ? false : true)); } $disabledcookiewrite = 0; if ($mode == 'create') { @@ -2207,13 +2207,13 @@ class ExtraFields if (in_array($key_type, array('date'))) { // Clean parameters - $value_key = dol_mktime(12, 0, 0, GETPOST("options_".$key."month", 'int'), GETPOST("options_".$key."day", 'int'), GETPOST("options_".$key."year", 'int')); + $value_key = dol_mktime(12, 0, 0, GETPOSTINT("options_".$key."month"), GETPOSTINT("options_".$key."day"), GETPOSTINT("options_".$key."year")); } elseif (in_array($key_type, array('datetime'))) { // Clean parameters - $value_key = dol_mktime(GETPOST("options_".$key."hour", 'int'), GETPOST("options_".$key."min", 'int'), GETPOST("options_".$key."sec", 'int'), GETPOST("options_".$key."month", 'int'), GETPOST("options_".$key."day", 'int'), GETPOST("options_".$key."year", 'int'), 'tzuserrel'); + $value_key = dol_mktime(GETPOSTINT("options_".$key."hour"), GETPOSTINT("options_".$key."min"), GETPOSTINT("options_".$key."sec"), GETPOSTINT("options_".$key."month"), GETPOSTINT("options_".$key."day"), GETPOSTINT("options_".$key."year"), 'tzuserrel'); } elseif (in_array($key_type, array('datetimegmt'))) { // Clean parameters - $value_key = dol_mktime(GETPOST("options_".$key."hour", 'int'), GETPOST("options_".$key."min", 'int'), GETPOST("options_".$key."sec", 'int'), GETPOST("options_".$key."month", 'int'), GETPOST("options_".$key."day", 'int'), GETPOST("options_".$key."year", 'int'), 'gmt'); + $value_key = dol_mktime(GETPOSTINT("options_".$key."hour"), GETPOSTINT("options_".$key."min"), GETPOSTINT("options_".$key."sec"), GETPOSTINT("options_".$key."month"), GETPOSTINT("options_".$key."day"), GETPOSTINT("options_".$key."year"), 'gmt'); } elseif (in_array($key_type, array('checkbox', 'chkbxlst'))) { $value_arr = GETPOST("options_".$key, 'array'); // check if an array if (!empty($value_arr)) { @@ -2304,14 +2304,14 @@ class ExtraFields $value_key = array(); // values provided as a component year, month, day, etc. if (GETPOST($dateparamname_start . 'year')) { - $value_key['start'] = dol_mktime(0, 0, 0, GETPOST($dateparamname_start . 'month', 'int'), GETPOST($dateparamname_start . 'day', 'int'), GETPOST($dateparamname_start . 'year', 'int')); + $value_key['start'] = dol_mktime(0, 0, 0, GETPOSTINT($dateparamname_start . 'month'), GETPOSTINT($dateparamname_start . 'day'), GETPOSTINT($dateparamname_start . 'year')); } if (GETPOST($dateparamname_start . 'year')) { - $value_key['end'] = dol_mktime(23, 59, 59, GETPOST($dateparamname_end . 'month', 'int'), GETPOST($dateparamname_end . 'day', 'int'), GETPOST($dateparamname_end . 'year', 'int')); + $value_key['end'] = dol_mktime(23, 59, 59, GETPOSTINT($dateparamname_end . 'month'), GETPOSTINT($dateparamname_end . 'day'), GETPOSTINT($dateparamname_end . 'year')); } } elseif (GETPOST($keysuffix."options_".$key.$keyprefix."year")) { // Clean parameters - $value_key = dol_mktime(12, 0, 0, GETPOST($keysuffix."options_".$key.$keyprefix."month", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."day", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."year", 'int')); + $value_key = dol_mktime(12, 0, 0, GETPOSTINT($keysuffix."options_".$key.$keyprefix."month"), GETPOSTINT($keysuffix."options_".$key.$keyprefix."day"), GETPOSTINT($keysuffix."options_".$key.$keyprefix."year")); } else { continue; // Value was not provided, we should not set it. } @@ -2320,26 +2320,26 @@ class ExtraFields $dateparamname_end = $keysuffix . 'options_' . $key . $keyprefix . '_end'; if (GETPOST($dateparamname_start . 'year') && GETPOST($dateparamname_end . 'year')) { // values provided as a date pair (start date + end date), each date being broken down as year, month, day, etc. - $dateparamname_end_hour = GETPOST($dateparamname_end . 'hour', 'int') != '-1' ? GETPOST($dateparamname_end . 'hour', 'int') : '23'; - $dateparamname_end_min = GETPOST($dateparamname_end . 'min', 'int') != '-1' ? GETPOST($dateparamname_end . 'min', 'int') : '59'; - $dateparamname_end_sec = GETPOST($dateparamname_end . 'sec', 'int') != '-1' ? GETPOST($dateparamname_end . 'sec', 'int') : '59'; + $dateparamname_end_hour = GETPOSTINT($dateparamname_end . 'hour') != '-1' ? GETPOSTINT($dateparamname_end . 'hour') : '23'; + $dateparamname_end_min = GETPOSTINT($dateparamname_end . 'min') != '-1' ? GETPOSTINT($dateparamname_end . 'min') : '59'; + $dateparamname_end_sec = GETPOSTINT($dateparamname_end . 'sec') != '-1' ? GETPOSTINT($dateparamname_end . 'sec') : '59'; if ($key_type == 'datetimegmt') { $value_key = array( - 'start' => dol_mktime(GETPOST($dateparamname_start . 'hour', 'int'), GETPOST($dateparamname_start . 'min', 'int'), GETPOST($dateparamname_start . 'sec', 'int'), GETPOST($dateparamname_start . 'month', 'int'), GETPOST($dateparamname_start . 'day', 'int'), GETPOST($dateparamname_start . 'year', 'int'), 'gmt'), - 'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOST($dateparamname_end . 'month', 'int'), GETPOST($dateparamname_end . 'day', 'int'), GETPOST($dateparamname_end . 'year', 'int'), 'gmt') + 'start' => dol_mktime(GETPOSTINT($dateparamname_start . 'hour'), GETPOSTINT($dateparamname_start . 'min'), GETPOSTINT($dateparamname_start . 'sec'), GETPOSTINT($dateparamname_start . 'month'), GETPOSTINT($dateparamname_start . 'day'), GETPOSTINT($dateparamname_start . 'year'), 'gmt'), + 'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOSTINT($dateparamname_end . 'month'), GETPOSTINT($dateparamname_end . 'day'), GETPOSTINT($dateparamname_end . 'year'), 'gmt') ); } else { $value_key = array( - 'start' => dol_mktime(GETPOST($dateparamname_start . 'hour', 'int'), GETPOST($dateparamname_start . 'min', 'int'), GETPOST($dateparamname_start . 'sec', 'int'), GETPOST($dateparamname_start . 'month', 'int'), GETPOST($dateparamname_start . 'day', 'int'), GETPOST($dateparamname_start . 'year', 'int'), 'tzuserrel'), - 'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOST($dateparamname_end . 'month', 'int'), GETPOST($dateparamname_end . 'day', 'int'), GETPOST($dateparamname_end . 'year', 'int'), 'tzuserrel') + 'start' => dol_mktime(GETPOSTINT($dateparamname_start . 'hour'), GETPOSTINT($dateparamname_start . 'min'), GETPOSTINT($dateparamname_start . 'sec'), GETPOSTINT($dateparamname_start . 'month'), GETPOSTINT($dateparamname_start . 'day'), GETPOSTINT($dateparamname_start . 'year'), 'tzuserrel'), + 'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOSTINT($dateparamname_end . 'month'), GETPOSTINT($dateparamname_end . 'day'), GETPOSTINT($dateparamname_end . 'year'), 'tzuserrel') ); } } elseif (GETPOST($keysuffix."options_".$key.$keyprefix."year")) { // Clean parameters if ($key_type == 'datetimegmt') { - $value_key = dol_mktime(GETPOST($keysuffix."options_".$key.$keyprefix."hour", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."min", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."sec", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."month", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."day", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."year", 'int'), 'gmt'); + $value_key = dol_mktime(GETPOSTINT($keysuffix."options_".$key.$keyprefix."hour"), GETPOSTINT($keysuffix."options_".$key.$keyprefix."min"), GETPOSTINT($keysuffix."options_".$key.$keyprefix."sec"), GETPOSTINT($keysuffix."options_".$key.$keyprefix."month"), GETPOSTINT($keysuffix."options_".$key.$keyprefix."day"), GETPOSTINT($keysuffix."options_".$key.$keyprefix."year"), 'gmt'); } else { - $value_key = dol_mktime(GETPOST($keysuffix."options_".$key.$keyprefix."hour", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."min", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."sec", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."month", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."day", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."year", 'int'), 'tzuserrel'); + $value_key = dol_mktime(GETPOSTINT($keysuffix."options_".$key.$keyprefix."hour"), GETPOSTINT($keysuffix."options_".$key.$keyprefix."min"), GETPOSTINT($keysuffix."options_".$key.$keyprefix."sec"), GETPOSTINT($keysuffix."options_".$key.$keyprefix."month"), GETPOSTINT($keysuffix."options_".$key.$keyprefix."day"), GETPOSTINT($keysuffix."options_".$key.$keyprefix."year"), 'tzuserrel'); } } else { continue; // Value was not provided, we should not set it. diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 78e5d7e0e9e..731b0514ef9 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -521,7 +521,7 @@ class FormMail extends Form // Zone to select email template if (count($modelmail_array) > 0) { - $model_mail_selected_id = GETPOSTISSET('modelmailselected') ? GETPOST('modelmailselected', 'int') : ($arraydefaultmessage->id > 0 ? $arraydefaultmessage->id : 0); + $model_mail_selected_id = GETPOSTISSET('modelmailselected') ? GETPOSTINT('modelmailselected') : ($arraydefaultmessage->id > 0 ? $arraydefaultmessage->id : 0); // If list of template is filled $out .= '
'."\n"; diff --git a/htdocs/core/class/html.formsetup.class.php b/htdocs/core/class/html.formsetup.class.php index 1852fc9f878..d6e0e56f688 100644 --- a/htdocs/core/class/html.formsetup.class.php +++ b/htdocs/core/class/html.formsetup.class.php @@ -774,10 +774,10 @@ class FormSetupItem // Modify constant only if key was posted (avoid resetting key to the null value) if ($this->type != 'title') { if (preg_match('/category:/', $this->type)) { - if (GETPOST($this->confKey, 'int') == '-1') { + if (GETPOSTINT($this->confKey) == '-1') { $val_const = ''; } else { - $val_const = GETPOST($this->confKey, 'int'); + $val_const = GETPOSTINT($this->confKey); } } elseif ($this->type == 'multiselect') { $val = GETPOST($this->confKey, 'array'); diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 06e42777894..b240c62cd7c 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -320,7 +320,7 @@ class FormTicket dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); $classname = ucfirst($subelement); $objectsrc = new $classname($this->db); - $objectsrc->fetch(GETPOST('originid', 'int')); + $objectsrc->fetch(GETPOSTINT('originid')); if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) { $objectsrc->fetch_lines(); @@ -639,7 +639,7 @@ class FormTicket print $langs->trans("AssignedTo"); print '
'; print ''; } @@ -648,7 +648,7 @@ class FormTicket if (isModEnabled('project') && !$this->ispublic) { $formproject = new FormProjets($this->db); print ''; } } @@ -658,7 +658,7 @@ class FormTicket $formcontract = new FormContract($this->db); print ''; } } @@ -1371,7 +1371,7 @@ class FormTicket print "\n\n"; - $send_email = GETPOST('send_email', 'int') ? GETPOST('send_email', 'int') : 0; + $send_email = GETPOSTINT('send_email') ? GETPOSTINT('send_email') : 0; // Example 1 : Adding jquery code print ''; } - $checked = (GETPOST('superadmin', 'int') ? ' checked' : ''); - $disabled = (GETPOST('superadmin', 'int') ? '' : ' disabled'); + $checked = (GETPOSTINT('superadmin') ? ' checked' : ''); + $disabled = (GETPOSTINT('superadmin') ? '' : ' disabled'); print '
'; print img_picto('', 'user', 'class="pictofixedwidth"'); - print $form->select_dolusers(GETPOST('fk_user_assign', 'int'), 'fk_user_assign', 1); + print $form->select_dolusers(GETPOSTINT('fk_user_assign'), 'fk_user_assign', 1); print '
'; - print img_picto('', 'project').$formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); + print img_picto('', 'project').$formproject->select_projects(-1, GETPOSTINT('projectid'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); print '
'; print img_picto('', 'contract'); - print $formcontract->select_contract(-1, GETPOST('contactid', 'int'), 'contractid', 0, 1, 1); + print $formcontract->select_contract(-1, GETPOSTINT('contactid'), 'contractid', 0, 1, 1); print '
'; } - $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, '/variants/tpl', ($permissiontoedit ? 1 : 0)); + $object->printObjectLines($action, $mysoc, null, GETPOSTINT('lineid'), 1, '/variants/tpl', ($permissiontoedit ? 1 : 0)); if (!empty($object->lines) || ($permissiontoedit && $action != 'selectlines' && $action != 'editline')) { print '
'; diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 83449b1fccb..e34cf104d40 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination2ValuePair.cla $langs->loadLangs(array("products", "other")); -$id = GETPOST('id', 'int'); -$valueid = GETPOST('valueid', 'int'); +$id = GETPOSTINT('id'); +$valueid = GETPOSTINT('valueid'); $ref = GETPOST('ref', 'alpha'); $weight_impact = price2num(GETPOST('weight_impact', 'alpha'), 2); $price_impact_percent = (bool) GETPOST('price_impact_percent'); @@ -47,7 +47,7 @@ $form = new Form($db); $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); -$show_files = GETPOST('show_files', 'int'); +$show_files = GETPOSTINT('show_files'); $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); $cancel = GETPOST('cancel', 'alpha'); @@ -115,8 +115,8 @@ if ($action == 'add') { } if ($action == 'create' && GETPOST('selectvariant', 'alpha')) { // We click on select combination $action = 'add'; - $attribute_id = GETPOST('attribute', 'int'); - $attribute_value_id = GETPOST('value', 'int'); + $attribute_id = GETPOSTINT('attribute'); + $attribute_value_id = GETPOSTINT('value'); if ($attribute_id> 0 && $attribute_value_id > 0) { $feature = $attribute_id . '-' . $attribute_value_id; $selectedvariant[$feature] = $feature; diff --git a/htdocs/variants/list.php b/htdocs/variants/list.php index a16e6677780..4115d3b4c8f 100644 --- a/htdocs/variants/list.php +++ b/htdocs/variants/list.php @@ -32,7 +32,7 @@ $langs->loadLangs(array("products", "other")); $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list @@ -41,13 +41,13 @@ $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -83,8 +83,8 @@ foreach ($object->fields as $key => $val) { $search[$key] = GETPOST('search_'.$key, 'alpha'); } if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { - $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); - $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOSTINT('search_'.$key.'_dtstartmonth'), GETPOSTINT('search_'.$key.'_dtstartday'), GETPOSTINT('search_'.$key.'_dtstartyear')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOSTINT('search_'.$key.'_dtendmonth'), GETPOSTINT('search_'.$key.'_dtendday'), GETPOSTINT('search_'.$key.'_dtendyear')); } } $search['nb_of_values'] = GETPOST('search_nb_of_values', 'alpha'); @@ -412,9 +412,9 @@ foreach ($search as $key => $val) { } } } elseif (preg_match('/(_dtstart|_dtend)$/', $key) && !empty($val)) { - $param .= '&search_'.$key.'month='.((int) GETPOST('search_'.$key.'month', 'int')); - $param .= '&search_'.$key.'day='.((int) GETPOST('search_'.$key.'day', 'int')); - $param .= '&search_'.$key.'year='.((int) GETPOST('search_'.$key.'year', 'int')); + $param .= '&search_'.$key.'month='.(GETPOSTINT('search_'.$key.'month')); + $param .= '&search_'.$key.'day='.(GETPOSTINT('search_'.$key.'day')); + $param .= '&search_'.$key.'year='.(GETPOSTINT('search_'.$key.'year')); } elseif ($search[$key] != '') { $param .= '&search_'.$key.'='.urlencode($search[$key]); } @@ -439,7 +439,7 @@ $arrayofmassactions = array( if (!empty($permissiontodelete)) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 0c22ac89a53..c5b582cc254 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -133,7 +133,7 @@ $original_file = GETPOST('file', 'alphanohtml'); // Do not use urldecode here ( $hashp = GETPOST('hashp', 'aZ09', 1); // Must be read only by GET $modulepart = GETPOST('modulepart', 'alpha', 1); // Must be read only by GET $urlsource = GETPOST('urlsource', 'alpha'); -$entity = (GETPOST('entity', 'int') ? GETPOST('entity', 'int') : $conf->entity); +$entity = (GETPOSTINT('entity') ? GETPOSTINT('entity') : $conf->entity); // Security check if (empty($modulepart) && empty($hashp)) { diff --git a/htdocs/webhook/target_card.php b/htdocs/webhook/target_card.php index 69cc920f1c5..f12b7ee8869 100644 --- a/htdocs/webhook/target_card.php +++ b/htdocs/webhook/target_card.php @@ -35,7 +35,7 @@ global $conf, $db, $hookmanager, $langs, $user; $langs->loadLangs(array('other')); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); @@ -43,7 +43,7 @@ $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'targetcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOSTINT('lineid'); // Initialize technical objects $object = new Target($db); @@ -148,10 +148,10 @@ if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; if ($action == 'set_thirdparty' && $permissiontoadd) { - $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, $triggermodname); + $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', '', 'date', '', $user, $triggermodname); } if ($action == 'classin' && $permissiontoadd) { - $object->setProject(GETPOST('projectid', 'int')); + $object->setProject(GETPOSTINT('projectid')); } // Actions to send emails @@ -408,7 +408,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Show object lines $result = $object->getLinesArray(); - print ' + print ' @@ -426,7 +426,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } if (!empty($object->lines)) { - $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); + $object->printObjectLines($action, $mysoc, null, GETPOSTINT('lineid'), 1); } // Form to add new line diff --git a/htdocs/webhook/target_list.php b/htdocs/webhook/target_list.php index ec84caa8e46..83deb784f41 100644 --- a/htdocs/webhook/target_list.php +++ b/htdocs/webhook/target_list.php @@ -39,7 +39,7 @@ $langs->loadLangs(array('other')); // Get Parameters $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list @@ -51,13 +51,13 @@ if (empty($mode)) { $mode = 'modulesetup'; } -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -95,8 +95,8 @@ foreach ($object->fields as $key => $val) { $search[$key] = GETPOST('search_'.$key, 'alpha'); } if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { - $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); - $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOSTINT('search_'.$key.'_dtstartmonth'), GETPOSTINT('search_'.$key.'_dtstartday'), GETPOSTINT('search_'.$key.'_dtstartyear')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOSTINT('search_'.$key.'_dtendmonth'), GETPOSTINT('search_'.$key.'_dtendday'), GETPOSTINT('search_'.$key.'_dtendyear')); } } @@ -447,7 +447,7 @@ $arrayofmassactions = array( if ($permissiontodelete) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/webportal/class/html.formcardwebportal.class.php b/htdocs/webportal/class/html.formcardwebportal.class.php index 1f4c31726ca..d0d9531436e 100644 --- a/htdocs/webportal/class/html.formcardwebportal.class.php +++ b/htdocs/webportal/class/html.formcardwebportal.class.php @@ -335,8 +335,8 @@ class FormCardWebPortal } $value = dol_mktime($timeHours, $timeMinutes, $timeSeconds, $dateMonth, $dateDay, $dateYear); } elseif ($object->fields[$key]['type'] == 'duration') { - if (GETPOST($key . 'hour', 'int') != '' || GETPOST($key . 'min', 'int') != '') { - $value = 60 * 60 * GETPOST($key . 'hour', 'int') + 60 * GETPOST($key . 'min', 'int'); + if (GETPOSTINT($key . 'hour') != '' || GETPOSTINT($key . 'min') != '') { + $value = 60 * 60 * GETPOSTINT($key . 'hour') + 60 * GETPOSTINT($key . 'min'); } else { $value = ''; } @@ -655,7 +655,7 @@ class FormCardWebPortal $html .= '
'; if (in_array($val['type'], array('int', 'integer'))) { - $value = GETPOSTISSET($key) ? GETPOST($key, 'int') : $object->$key; + $value = GETPOSTISSET($key) ? GETPOSTINT($key) : $object->$key; } elseif ($val['type'] == 'double') { $value = GETPOSTISSET($key) ? price2num(GETPOST($key, 'alphanohtml')) : $object->$key; } elseif (preg_match('/^text/', $val['type'])) { diff --git a/htdocs/webportal/class/html.formlistwebportal.class.php b/htdocs/webportal/class/html.formlistwebportal.class.php index 1ba917f382a..c850c424377 100644 --- a/htdocs/webportal/class/html.formlistwebportal.class.php +++ b/htdocs/webportal/class/html.formlistwebportal.class.php @@ -142,10 +142,10 @@ class FormListWebPortal // set form list $this->action = GETPOST('action', 'aZ09'); $this->object = $object; - $this->limit = GETPOSTISSET('limit') ? (int) GETPOST('limit', 'int') : -1; + $this->limit = GETPOSTISSET('limit') ? GETPOSTINT('limit') : -1; $this->sortfield = GETPOST('sortfield', 'aZ09comma'); $this->sortorder = GETPOST('sortorder', 'aZ09comma'); - $this->page = GETPOSTISSET('page') ? (int) GETPOST('page', 'int') : 1; + $this->page = GETPOSTISSET('page') ? GETPOSTINT('page') : 1; $this->titleKey = $objectclass . 'ListTitle'; // Initialize array of search criteria @@ -303,7 +303,7 @@ class FormListWebPortal $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; if ($object->ismultientitymanaged == 1) { - $sql .= " WHERE t.entity IN (" . getEntity($object->element, (GETPOST('search_current_entity', 'int') ? 0 : 1)) . ")"; + $sql .= " WHERE t.entity IN (" . getEntity($object->element, (GETPOSTINT('search_current_entity') ? 0 : 1)) . ")"; } else { $sql .= " WHERE 1 = 1"; } @@ -413,9 +413,9 @@ class FormListWebPortal } } } elseif (preg_match('/(_dtstart|_dtend)$/', $key) && !empty($val)) { - $param .= '&search_' . $key . 'month=' . ((int) GETPOST('search_' . $key . 'month', 'int')); - $param .= '&search_' . $key . 'day=' . ((int) GETPOST('search_' . $key . 'day', 'int')); - $param .= '&search_' . $key . 'year=' . ((int) GETPOST('search_' . $key . 'year', 'int')); + $param .= '&search_' . $key . 'month=' . (GETPOSTINT('search_' . $key . 'month')); + $param .= '&search_' . $key . 'day=' . (GETPOSTINT('search_' . $key . 'day')); + $param .= '&search_' . $key . 'year=' . (GETPOSTINT('search_' . $key . 'year')); } elseif ($search[$key] != '') { $param .= '&search_' . $key . '=' . urlencode($search[$key]); } diff --git a/htdocs/webportal/controllers/document.controller.class.php b/htdocs/webportal/controllers/document.controller.class.php index 9f5cd408867..d09b4dc5fb2 100644 --- a/htdocs/webportal/controllers/document.controller.class.php +++ b/htdocs/webportal/controllers/document.controller.class.php @@ -89,8 +89,8 @@ class DocumentController extends Controller $action = GETPOST('action', 'aZ09'); $original_file = GETPOST('file', 'alphanohtml'); // Do not use urldecode here ($_GET are already decoded by PHP). $modulepart = GETPOST('modulepart', 'alpha'); - $entity = GETPOST('entity', 'int') ? GETPOST('entity', 'int') : $conf->entity; - $socId = (int) GETPOST('soc_id', 'int'); + $entity = GETPOSTINT('entity') ? GETPOSTINT('entity') : $conf->entity; + $socId = GETPOSTINT('soc_id'); // Security check if (empty($modulepart)) { diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 0cf1abe101e..d55b81d1151 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -62,10 +62,10 @@ if (!$user->hasRight('website', 'read')) { $conf->dol_hide_leftmenu = 1; // Force hide of left menu. $error = 0; -$websiteid = GETPOST('websiteid', 'int'); +$websiteid = GETPOSTINT('websiteid'); $websitekey = GETPOST('website', 'alpha'); $page = GETPOST('page', 'alpha'); -$pageid = GETPOST('pageid', 'int'); +$pageid = GETPOSTINT('pageid'); $pageref = GETPOST('pageref', 'alphanohtml'); $action = GETPOST('action', 'aZ09'); @@ -76,8 +76,8 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'websitelist'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') -$dol_hide_topmenu = GETPOST('dol_hide_topmenu', 'int'); -$dol_hide_leftmenu = GETPOST('dol_hide_leftmenu', 'int'); +$dol_hide_topmenu = GETPOSTINT('dol_hide_topmenu'); +$dol_hide_leftmenu = GETPOSTINT('dol_hide_leftmenu'); $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09'); $type_container = GETPOST('WEBSITE_TYPE_CONTAINER', 'alpha'); @@ -142,10 +142,10 @@ if (GETPOST('refreshsite') || GETPOST('refreshsite_x') || GETPOST('refreshsite.x } // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -342,8 +342,8 @@ if ($action == 'replacesite' || $mode == 'replacesite') { $containertype = GETPOST('optioncontainertype', 'aZ09') != '-1' ? GETPOST('optioncontainertype', 'aZ09') : ''; $langcode = GETPOST('optionlanguage', 'aZ09'); $otherfilters = array(); - if (GETPOST('optioncategory', 'int') > 0) { - $otherfilters['category'] = GETPOST('optioncategory', 'int'); + if (GETPOSTINT('optioncategory') > 0) { + $otherfilters['category'] = GETPOSTINT('optioncategory'); } $listofpages = getPagesFromSearchCriterias($containertype, $algo, $searchkey, 1000, $sortfield, $sortorder, $langcode, $otherfilters, -1); @@ -430,36 +430,36 @@ if ($action == 'renamefile') { // Must be after include DOL_DOCUMENT_ROOT.'/core if ($action == 'setwebsiteonline' && $usercanedit) { $website->setStatut($website::STATUS_VALIDATED, null, '', 'WEBSITE_MODIFY', 'status'); - header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website', 'alphanohtml').'&pageid='.GETPOST('websitepage', 'int')); + header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOSTINT('website').'&pageid='.GETPOSTINT('websitepage')); exit; } if ($action == 'setwebsiteoffline' && $usercanedit) { $result = $website->setStatut($website::STATUS_DRAFT, null, '', 'WEBSITE_MODIFY', 'status'); - header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website', 'alphanohtml').'&pageid='.GETPOST('websitepage', 'int')); + header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOSTINT('website').'&pageid='.GETPOSTINT('websitepage')); exit; } if ($action == 'seteditinline') { // No need of write permission dolibarr_set_const($db, 'WEBSITE_EDITINLINE', 1); setEventMessages($langs->trans("FeatureNotYetAvailable"), null, 'warnings'); //dolibarr_set_const($db, 'WEBSITE_SUBCONTAINERSINLINE', 0); // Force disable of 'Include dynamic content' - header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website', 'alphanohtml').'&pageid='.GETPOST('pageid', 'int')); + header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOSTINT('website').'&pageid='.GETPOSTINT('pageid')); exit; } if ($action == 'unseteditinline') { // No need of write permission dolibarr_del_const($db, 'WEBSITE_EDITINLINE'); - header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website', 'alphanohtml').'&pageid='.GETPOST('pageid', 'int')); + header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOSTINT('website').'&pageid='.GETPOSTINT('pageid')); exit; } if ($action == 'setshowsubcontainers') { // No need of write permission dolibarr_set_const($db, 'WEBSITE_SUBCONTAINERSINLINE', 1); //dolibarr_set_const($db, 'WEBSITE_EDITINLINE', 0); // Force disable of edit inline - header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website', 'alphanohtml').'&pageid='.GETPOST('pageid', 'int')); + header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOSTINT('website').'&pageid='.GETPOSTINT('pageid')); exit; } if ($action == 'unsetshowsubcontainers') { // No need of write permission dolibarr_del_const($db, 'WEBSITE_SUBCONTAINERSINLINE'); - header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website', 'alphanohtml').'&pageid='.GETPOST('pageid', 'int')); + header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOSTINT('website').'&pageid='.GETPOSTINT('pageid')); exit; } @@ -505,7 +505,7 @@ if ($massaction == 'setcategory' && GETPOST('confirmmassaction', 'alpha') && $us $db->begin(); - $categoryid = GETPOST('setcategory', 'int'); + $categoryid = GETPOSTINT('setcategory'); if ($categoryid > 0) { $tmpwebsitepage = new WebsitePage($db); $category = new Categorie($db); @@ -544,7 +544,7 @@ if ($massaction == 'delcategory' && GETPOST('confirmmassaction', 'alpha') && $us $db->begin(); - $categoryid = GETPOST('setcategory', 'int'); + $categoryid = GETPOSTINT('setcategory'); if ($categoryid > 0) { $tmpwebsitepage = new WebsitePage($db); $category = new Categorie($db); @@ -648,8 +648,8 @@ if ($massaction == 'replace' && GETPOST('confirmmassaction', 'alpha') && $userca $containertype = GETPOST('optioncontainertype', 'aZ09') != '-1' ? GETPOST('optioncontainertype', 'aZ09') : ''; $langcode = GETPOST('optionlanguage', 'aZ09'); $otherfilters = array(); - if (GETPOST('optioncategory', 'int') > 0) { - $otherfilters['category'] = GETPOST('optioncategory', 'int'); + if (GETPOSTINT('optioncategory') > 0) { + $otherfilters['category'] = GETPOSTINT('optioncategory'); } // Now we reload list @@ -1152,7 +1152,7 @@ if ($action == 'addcontainer' && $usercanedit) { $substitutionarray['__WEBSITE_CREATE_BY__'] = $user->getFullName($langs); // Define id of page the new page is translation of - $pageidfortranslation = (GETPOST('pageidfortranslation', 'int') > 0 ? GETPOST('pageidfortranslation', 'int') : 0); + $pageidfortranslation = (GETPOSTINT('pageidfortranslation') > 0 ? GETPOSTINT('pageidfortranslation') : 0); if ($pageidfortranslation > 0) { // Check if the page we are translation of is already a translation of a source page. if yes, we will use source id instead $objectpagetmp = new WebsitePage($db); @@ -1353,7 +1353,7 @@ if ($action == 'confirm_deletesite' && $confirm == 'yes' && $permissiontodelete) $db->begin(); - $res = $object->fetch(GETPOST('id', 'int')); + $res = $object->fetch(GETPOSTINT('id')); $website = $object; if ($res > 0) { @@ -1468,8 +1468,8 @@ if (!GETPOSTISSET('pageid')) { $containertype = GETPOST('optioncontainertype', 'aZ09') != '-1' ? GETPOST('optioncontainertype', 'aZ09') : ''; $langcode = GETPOST('optionlanguage', 'aZ09'); $otherfilters = array(); - if (GETPOST('optioncategory', 'int') > 0) { - $otherfilters['category'] = GETPOST('optioncategory', 'int'); + if (GETPOSTINT('optioncategory') > 0) { + $otherfilters['category'] = GETPOSTINT('optioncategory'); } $listofpages = getPagesFromSearchCriterias($containertype, $algo, $searchkey, 1000, $sortfield, $sortorder, $langcode, $otherfilters); @@ -2009,12 +2009,12 @@ if ($action == 'updatemeta' && $usercanedit) { $objectpage->keywords = str_replace(array('<', '>'), '', GETPOST('WEBSITE_KEYWORDS', 'alphanohtml')); $objectpage->allowed_in_frames = GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09'); $objectpage->htmlheader = trim(GETPOST('htmlheader', 'none')); - $objectpage->fk_page = (GETPOST('pageidfortranslation', 'int') > 0 ? GETPOST('pageidfortranslation', 'int') : 0); + $objectpage->fk_page = (GETPOSTINT('pageidfortranslation') > 0 ? GETPOSTINT('pageidfortranslation') : 0); $objectpage->author_alias = trim(GETPOST('WEBSITE_AUTHORALIAS', 'alphanohtml')); $objectpage->object_type = GETPOST('WEBSITE_OBJECTCLASS', 'alpha'); $objectpage->fk_object = GETPOST('WEBSITE_OBJECTID', 'aZ09'); - $newdatecreation = dol_mktime(GETPOST('datecreationhour', 'int'), GETPOST('datecreationmin', 'int'), GETPOST('datecreationsec', 'int'), GETPOST('datecreationmonth', 'int'), GETPOST('datecreationday', 'int'), GETPOST('datecreationyear', 'int')); + $newdatecreation = dol_mktime(GETPOSTINT('datecreationhour'), GETPOSTINT('datecreationmin'), GETPOSTINT('datecreationsec'), GETPOSTINT('datecreationmonth'), GETPOSTINT('datecreationday'), GETPOSTINT('datecreationyear')); if ($newdatecreation) { $objectpage->date_creation = $newdatecreation; } @@ -2168,7 +2168,7 @@ if ($usercanedit && (($action == 'updatesource' || $action == 'updatecontent' || $db->begin(); $objectnew = new Website($db); - $result = $objectnew->createFromClone($user, GETPOST('id', 'int'), GETPOST('siteref', 'aZ09'), (GETPOST('newlang', 'aZ09') ? GETPOST('newlang', 'aZ09') : '')); + $result = $objectnew->createFromClone($user, GETPOSTINT('id'), GETPOSTINT('siteref'), (GETPOSTINT('newlang') ? GETPOSTINT('newlang') : '')); if ($result < 0) { $error++; @@ -2195,7 +2195,7 @@ if ($usercanedit && (($action == 'updatesource' || $action == 'updatecontent' || setEventMessages($langs->trans("LanguageMustNotBeSameThanClonedPage"), null, 'errors'); $action = 'preview'; } - if (GETPOST('newwebsite', 'int') != $object->id) { + if (GETPOSTINT('newwebsite') != $object->id) { $error++; setEventMessages($langs->trans("WebsiteMustBeSameThanClonedPageIfTranslation"), null, 'errors'); $action = 'preview'; @@ -2205,7 +2205,7 @@ if ($usercanedit && (($action == 'updatesource' || $action == 'updatecontent' || if (!$error) { $db->begin(); - $newwebsiteid = GETPOST('newwebsite', 'int'); + $newwebsiteid = GETPOSTINT('newwebsite'); $pathofwebsitenew = $pathofwebsite; $tmpwebsite = new Website($db); @@ -4751,7 +4751,7 @@ if ($mode == 'replacesite' || $massaction == 'replace') { if ($permissiontodelete) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } - if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } diff --git a/htdocs/website/samples/wrapper.php b/htdocs/website/samples/wrapper.php index 313dfd2c438..e6f78442c1e 100644 --- a/htdocs/website/samples/wrapper.php +++ b/htdocs/website/samples/wrapper.php @@ -15,10 +15,10 @@ $encoding = ''; // Parameters to download files $hashp = GETPOST('hashp', 'aZ09'); $modulepart = GETPOST('modulepart', 'aZ09'); -$entity = GETPOST('entity', 'int') ? GETPOST('entity', 'int') : $conf->entity; +$entity = GETPOSTINT('entity') ? GETPOSTINT('entity') : $conf->entity; $original_file = GETPOST("file", "alpha"); $l = GETPOST('l', 'aZ09'); -$limit = GETPOST('limit', 'int'); +$limit = GETPOSTINT('limit'); // Parameters for RSS $rss = GETPOST('rss', 'aZ09'); diff --git a/htdocs/website/websiteaccount_card.php b/htdocs/website/websiteaccount_card.php index 48123970e20..6194a540789 100644 --- a/htdocs/website/websiteaccount_card.php +++ b/htdocs/website/websiteaccount_card.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/website/lib/websiteaccount.lib.php'; $langs->loadLangs(array("website", "other")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); diff --git a/htdocs/workstation/workstation_agenda.php b/htdocs/workstation/workstation_agenda.php index 4825fc196b4..c5c998aef4f 100644 --- a/htdocs/workstation/workstation_agenda.php +++ b/htdocs/workstation/workstation_agenda.php @@ -37,7 +37,7 @@ global $conf, $db, $hookmanager, $langs, $user; $langs->loadLangs(array('mrp', 'other')); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); @@ -56,10 +56,10 @@ $search_rowid = GETPOST('search_rowid'); $search_agenda_label = GETPOST('search_agenda_label'); // Load variables for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/workstation/workstation_card.php b/htdocs/workstation/workstation_card.php index 3e5791f0108..0dc3d05c6d5 100644 --- a/htdocs/workstation/workstation_card.php +++ b/htdocs/workstation/workstation_card.php @@ -38,7 +38,7 @@ global $conf, $db, $hookmanager, $langs, $user; $langs->loadLangs(array('mrp', 'other')); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); diff --git a/htdocs/workstation/workstation_document.php b/htdocs/workstation/workstation_document.php index 5dba65f6776..2c5f77c6173 100644 --- a/htdocs/workstation/workstation_document.php +++ b/htdocs/workstation/workstation_document.php @@ -40,14 +40,14 @@ $langs->loadLangs(array('companies', 'mails', 'other', 'mrp')); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm'); -$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); +$id = (GETPOSTINT('socid') ? GETPOSTINT('socid') : GETPOSTINT('id')); $ref = GETPOST('ref', 'alpha'); // Get parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 diff --git a/htdocs/workstation/workstation_list.php b/htdocs/workstation/workstation_list.php index f573f6d1a27..1e6b89f4937 100644 --- a/htdocs/workstation/workstation_list.php +++ b/htdocs/workstation/workstation_list.php @@ -38,7 +38,7 @@ $langs->loadLangs(array('mrp', 'other')); $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list @@ -47,14 +47,14 @@ $backtopage = GETPOST('backtopage', 'alpha'); $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; @@ -93,8 +93,8 @@ foreach ($object->fields as $key => $val) { $search[$key] = GETPOST('search_'.$key, 'alpha'); } if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { - $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); - $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOSTINT('search_'.$key.'_dtstartmonth'), GETPOSTINT('search_'.$key.'_dtstartday'), GETPOSTINT('search_'.$key.'_dtstartyear')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOSTINT('search_'.$key.'_dtendmonth'), GETPOSTINT('search_'.$key.'_dtendday'), GETPOSTINT('search_'.$key.'_dtendyear')); } } @@ -255,7 +255,7 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; if ($object->ismultientitymanaged == 1) { - $sql .= " WHERE t.entity IN (".getEntity($object->element, (GETPOST('search_current_entity', 'int') ? 0 : 1)).")"; + $sql .= " WHERE t.entity IN (".getEntity($object->element, (GETPOSTINT('search_current_entity') ? 0 : 1)).")"; } else { $sql .= " WHERE 1 = 1"; } @@ -400,9 +400,9 @@ foreach ($search as $key => $val) { } } } elseif (preg_match('/(_dtstart|_dtend)$/', $key) && !empty($val)) { - $param .= '&search_'.$key.'month='.((int) GETPOST('search_'.$key.'month', 'int')); - $param .= '&search_'.$key.'day='.((int) GETPOST('search_'.$key.'day', 'int')); - $param .= '&search_'.$key.'year='.((int) GETPOST('search_'.$key.'year', 'int')); + $param .= '&search_'.$key.'month='.(GETPOSTINT('search_'.$key.'month')); + $param .= '&search_'.$key.'day='.(GETPOSTINT('search_'.$key.'day')); + $param .= '&search_'.$key.'year='.(GETPOSTINT('search_'.$key.'year')); } elseif ($search[$key] != '') { $param .= '&search_'.$key.'='.urlencode($search[$key]); } @@ -424,7 +424,7 @@ $arrayofmassactions = array( if (!empty($permissiontodelete)) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/workstation/workstation_note.php b/htdocs/workstation/workstation_note.php index 8f16aca5b3f..f2be1c32504 100644 --- a/htdocs/workstation/workstation_note.php +++ b/htdocs/workstation/workstation_note.php @@ -35,7 +35,7 @@ global $conf, $db, $hookmanager, $langs, $user; $langs->loadLangs(array('mrp', 'companies')); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09');