HWFord
7f24787b42
fixes #2322 set to 0 if null
...
some values being used in $result are null
2025-02-18 10:24:33 +01:00
Matthieu Leproux
f7e44cc14e
related to #1767 changed the way 9d5cba0 is done
2022-10-26 12:53:35 +02:00
Patrick Cronin
8f5cac9266
( Fix #359 ) mysqli docs use empty string for no db name
...
PHP docs for mysqli's constructor
(https://www.php.net/manual/en/mysqli.construct.php ) show that the
default value for $dbname is an empty string. So, if we want to use
parameters after $dbname in the call without specifying a database
name, we should be using an empty string instead of a NULL.
2022-07-29 19:50:23 +02:00
plegall
1ec5a2933c
fixes #1343 remove auto-escape of reserved keywords on MySQL 8
...
ie no more adding backticks around "rank" and "groups". Too many collateral damages.
2021-08-03 19:27:31 +02:00
plegall
86d212f4f1
fixes #1292 ability to avoid the reserved words escape in pwg_query
...
Useful for conf_update_param because we don't want any modification in the config.value and we know we won't use the reserved words in the SQL.
2021-01-21 16:10:36 +01:00
Zacharie
fd8394df07
Bug fixes on statistic page
...
* Statistic page is now more clean with 0 or 1 values (for new Piwigos)
* Rectification of a mistake in functions_mysqli.inc.php (replace 'groups' by 'rank')
2020-06-17 14:31:15 +02:00
Zacharie
2e70ebf777
Several bug fixes
...
* Batch Manager no longer have a php error
* Intro Graph display the actual week when it's monday
* fix the "groups" reserved word
* History is now summarize on the stats pag access
* New piwigo no longer have PHP error due to stats.php
2020-06-16 12:20:04 +02:00
Trond Schertel
24e256da52
Fixes #1155
2020-03-25 15:00:36 +01:00
plegall
5b65fca36c
fixes #1068 escape the rank new MySQL 8 reserved word
...
This time, we do it right before sending the query to MySQL, in the pwg_query
function. This is not optimal, because we add extra processing, useless most
of the time. This solution has less impact on code, and automatically work for
all core and plugins SQL queries.
2019-08-30 12:11:47 +02:00
plegall
63bbba8e36
fixes #1060 always escape table/column names in advanced database functions
...
which are single_insert, single_update, mass_inserts and mass_updates. The new function
protect_column_name simply surrounds the name with backticks, if needed.
2019-08-13 16:44:54 +02:00
plegall
551457f2b6
fixes #1051 ability to insert ignore on single_insert
2019-07-17 11:15:59 +02:00
plegall
c1eecab364
fixes #996 escape word "groups" in SQL queries, new reserved word with MySQL 8
2019-06-28 18:07:53 +02:00
plegall
fc193f7474
issue #830 simplify PHP files header, remove copyright/license info
2019-06-04 17:13:51 +02:00
plegall
063711240a
Squashed commit of the following:
...
commit 7190866ccf15033f27095d635546e46dacbb755e
Author: plegall <plg@piwigo.org >
Date: Thu Jul 12 10:52:33 2018 +0200
Revert "Replace not maintained cssmin with fork from github https://github.com/natxet/CssMin "
This reverts commit c8b12a2ed0 .
commit 1dac11ecb6783d0d5353c3d250388f018c30fc5c
Author: plegall <plg@piwigo.org >
Date: Thu Jul 12 10:52:24 2018 +0200
Revert "Update Smarty to 3.1.3"
This reverts commit db684f6151 .
commit 3ac752dc93912ba5701d22dadd9bb3b81e5bb383
Merge: d1c2e71 8d58256
Author: plegall <plg@piwigo.org >
Date: Thu Jul 12 10:50:43 2018 +0200
Merge branch 'php72' of https://github.com/Infern1/Piwigo into Infern1-php72
commit 8d58256c45
Author: Rob Lensen <rob@bsdfreaks.nl >
Date: Wed Mar 21 23:40:36 2018 +0100
new feedcreator version for PHP7
commit bb0fcc3a30
Author: Rob Lensen <rob@bsdfreaks.nl >
Date: Wed Mar 21 23:26:27 2018 +0100
php72 fixes, replaces each() function
commit 3db22c0d33
Author: Rob Lensen <rob@bsdfreaks.nl >
Date: Wed Mar 21 23:02:46 2018 +0100
More fixes for PHP7.2
commit 50d8aafc77
Author: Rob Lensen <rob@bsdfreaks.nl >
Date: Mon Mar 19 23:55:21 2018 +0100
Some more replacements of create_function
commit 8263335c42
Author: Rob Lensen <rob@bsdfreaks.nl >
Date: Mon Mar 19 22:54:54 2018 +0100
Fixed indents
commit 8d58b637c6
Merge: c8b12a2 8a57d77
Author: Rob Lensen <rob@bsdfreaks.nl >
Date: Tue Feb 27 13:51:32 2018 +0100
Merge remote-tracking branch 'upstream/master' into php72
commit c8b12a2ed0
Author: Rob Lensen <rob@bsdfreaks.nl >
Date: Thu Jan 18 00:32:46 2018 +0100
Replace not maintained cssmin with fork from github https://github.com/natxet/CssMin
commit db684f6151
Author: Rob Lensen <rob@bsdfreaks.nl >
Date: Thu Jan 18 00:23:24 2018 +0100
Update Smarty to 3.1.3
commit 6a3f8f3e76
Author: Rob Lensen <rob@bsdfreaks.nl >
Date: Wed Jan 17 23:40:27 2018 +0100
Initial work to support PHP 7.2
2018-07-12 10:52:55 +02:00
Marc Poulhiès
9b9ec600ea
fix single_insert when a field is null ( #477 )
...
fix #449
Signed-off-by: Marc Poulhiès <dkm@kataplop.net >
2016-11-17 14:20:50 +01:00
plegall
78bf53f45a
typo fixed in comment
2016-07-26 16:02:01 +02:00
plegall
b87094ac2f
fixes #376 , remove option ONLY_FULL_GROUP_BY in sql_mode
...
based on solution provided by Mercury_LABBS on piwigo.org forums
2016-07-26 15:54:22 +02:00
plegall
c789347c51
happy new year 2016, all headers updated
2016-01-14 12:17:58 +01:00
plegall
16f6a54fa7
fixes #384 use built-in functions to set charset
2015-12-08 13:39:09 +01:00
mistic100
7146581f86
feature 2999: (incomplete) doc of mysqli functions
...
git-svn-id: http://piwigo.org/svn/trunk@27337 68402e56-0260-453c-a942-63ccdbb3a9ee
2014-02-11 22:12:57 +00:00
rvelices
2d9887993c
arrayfromquery optimizations: move double if from inside loop to outside + use directly mysqli calls to avoid function call overhead for every row retrieved from db
...
git-svn-id: http://piwigo.org/svn/trunk@27336 68402e56-0260-453c-a942-63ccdbb3a9ee
2014-02-11 21:47:44 +00:00
mistic100
636650309a
Update headers to 2014. Happy new year!!
...
git-svn-id: http://piwigo.org/svn/trunk@26461 68402e56-0260-453c-a942-63ccdbb3a9ee
2014-01-05 00:19:25 +00:00
mistic100
e01b40c529
move array_from_query to functions.inc.php
...
git-svn-id: http://piwigo.org/svn/trunk@25427 68402e56-0260-453c-a942-63ccdbb3a9ee
2013-11-10 17:03:25 +00:00
mistic100
ae707279a1
remove all array_push (50% slower than []) + some changes missing for feature:2978
...
git-svn-id: http://piwigo.org/svn/trunk@25018 68402e56-0260-453c-a942-63ccdbb3a9ee
2013-10-19 17:43:04 +00:00
mistic100
12707a70f2
bug 2865: correct handle of sockets for mysqli
...
git-svn-id: http://piwigo.org/svn/trunk@24346 68402e56-0260-453c-a942-63ccdbb3a9ee
2013-09-05 08:06:31 +00:00
plegall
e8020eb4cc
merge r22183 from branch 2.5 to trunk
...
typo fixed in code comment
git-svn-id: http://piwigo.org/svn/trunk@22184 68402e56-0260-453c-a942-63ccdbb3a9ee
2013-04-12 22:00:59 +00:00
plegall
fc8b781ddd
merge r22181 from branch 2.5 to trunk
...
bug 2865: mysqli can now handle socket and specific port number
git-svn-id: http://piwigo.org/svn/trunk@22182 68402e56-0260-453c-a942-63ccdbb3a9ee
2013-04-12 21:59:42 +00:00
mistic100
d441783ca3
feature:65 add pwg_db_errno and pwg_db_error
...
git-svn-id: http://piwigo.org/svn/trunk@21088 68402e56-0260-453c-a942-63ccdbb3a9ee
2013-03-02 12:19:06 +00:00
mistic100
9722255086
feature:65 fix fatal error at the end of the install process, remove unused file and function
...
git-svn-id: http://piwigo.org/svn/trunk@20721 68402e56-0260-453c-a942-63ccdbb3a9ee
2013-02-12 11:37:34 +00:00
mistic100
21c97f3858
feature:65 add fetch_array SQL functions
...
git-svn-id: http://piwigo.org/svn/trunk@20510 68402e56-0260-453c-a942-63ccdbb3a9ee
2013-02-01 12:18:00 +00:00
mistic100
6f04aba061
feature:65 Add support for PHP mysqli extension, activated by default, remove returns of link_identifier
...
git-svn-id: http://piwigo.org/svn/trunk@20462 68402e56-0260-453c-a942-63ccdbb3a9ee
2013-01-30 11:12:22 +00:00
plegall
4bc775e479
update Piwigo headers to 2013 (the end of the world didn't occur as expected on r12922)
...
git-svn-id: http://piwigo.org/svn/trunk@19703 68402e56-0260-453c-a942-63ccdbb3a9ee
2013-01-01 12:35:02 +00:00
mistic100
cb11878233
feature 2773: add pwg_db_close() method
...
git-svn-id: http://piwigo.org/svn/trunk@18634 68402e56-0260-453c-a942-63ccdbb3a9ee
2012-10-13 09:05:58 +00:00
rvelices
05671cf18c
batch manager - remove unused code, less sql queries and avoid 4 calls to same display_select function
...
git-svn-id: http://piwigo.org/svn/trunk@18573 68402e56-0260-453c-a942-63ccdbb3a9ee
2012-10-09 04:58:57 +00:00
plegall
2ec7183adb
feature 2604: support rotation on derivatives
...
git-svn-id: http://piwigo.org/svn/trunk@13843 68402e56-0260-453c-a942-63ccdbb3a9ee
2012-04-01 00:02:36 +00:00
plegall
a7114b00c2
remove files related to database engines other than MySQL
...
git-svn-id: http://piwigo.org/svn/trunk@13465 68402e56-0260-453c-a942-63ccdbb3a9ee
2012-03-02 21:44:53 +00:00
rvelices
0d277219fc
multisize - added the coi (still to affine the admin ui + language)
...
multisize - derivatives can be revuild from a larger derviative instead of the original
git-svn-id: http://piwigo.org/svn/trunk@13038 68402e56-0260-453c-a942-63ccdbb3a9ee
2012-02-06 20:59:20 +00:00
mistic100
112d730f3a
update Piwigo headers to 2012, last change before the expected (or not) apocalypse
...
git-svn-id: http://piwigo.org/svn/trunk@12922 68402e56-0260-453c-a942-63ccdbb3a9ee
2012-01-17 22:48:36 +00:00
rvelices
1e1b71c6f6
fetaure 2542 replace $conf['local_data_dir'] with $conf['data_location'] and move combined files and image derivatives from local to _data
...
git-svn-id: http://piwigo.org/svn/trunk@12802 68402e56-0260-453c-a942-63ccdbb3a9ee
2011-12-29 05:48:16 +00:00
plegall
1c84017d23
better get_boolean function: able to detect "0" as false, (bool)false as false
...
and (int)0 as false.
git-svn-id: http://piwigo.org/svn/trunk@12752 68402e56-0260-453c-a942-63ccdbb3a9ee
2011-12-16 20:57:55 +00:00
plegall
d827eacab4
merge r12747 from branch 2.3 to trunk
...
bug 2534 fixed: clean (as clean as possible with MySQL+MyISAM) handle of
concurrency on user cache refresh. No more error when regenerating several
thumbnails at once.
git-svn-id: http://piwigo.org/svn/trunk@12748 68402e56-0260-453c-a942-63ccdbb3a9ee
2011-12-16 13:53:24 +00:00
plegall
9983af7336
merge r12009 from branch 2.2 to trunk
...
bug 2416 fixed: the CAST function in MySQL seems to return unexpected results,
depending on MySQL version. As a consequence it was producing virtual years in
calendar display.
git-svn-id: http://piwigo.org/svn/trunk@12010 68402e56-0260-453c-a942-63ccdbb3a9ee
2011-08-30 08:48:12 +00:00
plegall
c1d7fbebdd
feature 2359: simpler function single_update and single_insert
...
git-svn-id: http://piwigo.org/svn/trunk@11991 68402e56-0260-453c-a942-63ccdbb3a9ee
2011-08-24 19:50:54 +00:00
flop25
aa3a908634
bug:2383
...
/!\ corrected but not checked
git-svn-id: http://piwigo.org/svn/trunk@11925 68402e56-0260-453c-a942-63ccdbb3a9ee
2011-08-09 14:29:19 +00:00
mistic100
029688227b
feature:2359 add single_update and single_insert functions
...
git-svn-id: http://piwigo.org/svn/trunk@11485 68402e56-0260-453c-a942-63ccdbb3a9ee
2011-06-22 15:56:19 +00:00
plegall
2a95460f36
merge r11363 from branch 2.2 to trunk
...
bug 2342 fixed: with MySQL 5.5, "set level = NULL" fails because images.level
is a NOT NULL field. The same test is performed in the same function
(mass_updates) but for array bigger than 10 rows.
git-svn-id: http://piwigo.org/svn/trunk@11364 68402e56-0260-453c-a942-63ccdbb3a9ee
2011-06-14 12:03:08 +00:00
plegall
562f391c70
merge r10430 from branch 2.2 to trunk
...
bug 1818 fixed: fix "select distinct" queries for PostgreSQL. Patch by leloupv
git-svn-id: http://piwigo.org/svn/trunk@10431 68402e56-0260-453c-a942-63ccdbb3a9ee
2011-04-16 21:22:39 +00:00
rvelices
13b9118f41
- fix icon display on index page (calendar by post date)
...
- remove unnecessary include_once
- mysql functions simplification
git-svn-id: http://piwigo.org/svn/trunk@8844 68402e56-0260-453c-a942-63ccdbb3a9ee
2011-01-22 21:12:48 +00:00
plegall
6db359c622
Happy new year 2011
...
Change "Piwigo - a PHP based picture gallery" into "Piwigo - a PHP based photo gallery"
git-svn-id: http://piwigo.org/svn/trunk@8728 68402e56-0260-453c-a942-63ccdbb3a9ee
2011-01-18 00:02:52 +00:00
nikrou
804d79a625
Bug 1766 fixed : [PostgreSQL] unkown database function UNIX_TIMESTAMP()
...
Add a new function pwg_db_date_to_ts() to calculate a timestamp from a date
git-svn-id: http://piwigo.org/svn/trunk@6666 68402e56-0260-453c-a942-63ccdbb3a9ee
2010-07-06 12:14:17 +00:00