68 Commits

Author SHA1 Message Date
Stian Lund
4ba1bfc11c Revert change in Database_Mysqli_Result.php causing empty Next/Prev links 2024-03-24 13:43:55 +01:00
Brad Dutton
61ab7a33e2 fix tab 2022-06-04 13:06:23 -07:00
Brad Dutton
01f4ed7781 remove mixed type from current(), add #[\ReturnTypeWillChange] 2022-06-04 11:56:10 -07:00
Brad Dutton
c2a70520f2 more php 8.1 updates 2022-05-13 18:44:19 -07:00
Brad Dutton
7b71247e03 add webp image support 2022-05-13 14:24:45 -07:00
Brad Dutton
3ee59350a1 php 8.1 updates 2022-01-08 20:33:23 -08:00
Brad Dutton
b3c5e880d5 update create_function calls, I'm not sure these are even used 2021-04-23 12:31:07 -07:00
Brad Dutton
33d109b1d0 make some PHP CS recommended changes 2021-04-01 20:05:06 -07:00
Brad Dutton
630454adb1 site_domain can be a full_url, handle that case better if no site_protocol is set 2021-02-15 13:33:42 -08:00
Bradley W Dutton
1f45094241 read protocol from the config file 2020-11-13 20:43:25 -08:00
bwdutton
b7074b590c Redis sessions not fully working 2020-06-03 21:39:16 -07:00
bwdutton
02800944cf add redis support for sessions 2020-05-29 15:34:40 -07:00
bwdutton
967d8387a8 remove magic function setting checks, PHP 7.4 drops these settings 2020-05-24 14:31:33 -07:00
Bradley W. Dutton
6a7384c1c1 remove the last of the each() calls 2020-03-01 14:23:06 -08:00
Bradley W. Dutton
cbd75bc72e remove each() as it's deprecated 2020-03-01 13:39:52 -08:00
Bradley W. Dutton
b8b6ac9d6b fix php 7.3 errors 2020-02-01 20:21:58 -08:00
Rasmus Lerdorf
0c2d2b25fa How did this ever work? :) 2013-05-05 08:49:44 -07:00
Rasmus Lerdorf
f2def7778d valid::url() only takes 1 arg 2013-05-05 08:46:46 -07:00
shadlaws
63e5dd76d9 #2049 - Fix issues with ports other than http/80 or https/443.
- get SERVER_PORT and add to SERVER_NAME if it's not http/80 or https/443
2013-03-11 18:44:45 +01:00
Bharat Mediratta
8c5d5525d0 Reset db_applied after find(). Fixes #1998. 2013-02-09 14:53:07 -05:00
Bharat Mediratta
cc91159bee Follow-on to 8e954cf5f0 - use HTTP_HOST if there's no SERVER_NAME 2013-01-25 14:28:24 -05:00
Bharat Mediratta
8e954cf5f0 Use SERVER_NAME instead of HTTP_HOST. Fixes #1963. 2013-01-25 14:19:35 -05:00
Gerhard Schlager
a62e1aaf9d the HTTP header Cache-Control must contain "public" in order to allow caching of resources when HTTPS is used 2012-08-11 18:09:03 +02:00
Bharat Mediratta
d095022c60 Filter out all style attributes - we don't want them. Further fix for #1849. 2012-05-19 11:47:27 -07:00
Bharat Mediratta
0d5187eadf Revert "Verify that where() clauses are well formed. Fixes #1865."
This reverts commit 6a6b3f90f3.
2012-05-15 09:33:43 -07:00
Bharat Mediratta
6a6b3f90f3 Verify that where() clauses are well formed. Fixes #1865. 2012-05-14 21:54:41 -07:00
Bharat Mediratta
41962c0916 Wrap the loop around all regexes for better efficiency. Fixes #1849. 2012-05-05 20:54:15 -07:00
Bharat Mediratta
6b306cddc1 Don't call ob_end_clean() if PHP >= 5.4. Fixes #1839. Thanks to
Christopher Kunz and Avuton Olrich for the info.
2012-04-23 20:31:36 -07:00
Bharat Mediratta
dca9b5f3fc Fix a bug in ORM where calling reload() on an unloaded instance returns the
first instance in the database, which is super bad.

Kohana ticket:
  http://dev.kohanaframework.org/issues/3397

Related G3 ticket:
  http://sourceforge.net/apps/trac/gallery/ticket/1489
2010-11-18 09:48:50 -08:00
Bharat Mediratta
c1bc59fbb5 Force the new geometry in the ImageMagick crop() function.
Fixes http://dev.kohanaframework.org/issues/3384
2010-11-07 15:38:45 -08:00
Bharat Mediratta
5d4b683752 Fix for http://dev.kohanaframework.org/issues/3317 -- don't try to implicitly convert a string into an array. 2010-10-09 16:19:45 -07:00
Bharat Mediratta
941a350691 Put the having clause after the group by clause to resolve this upstream issue:
http://dev.kohanaframework.org/issues/2923
2010-07-28 23:58:02 -07:00
Bharat Mediratta
ab6025f71a Replace … with …
UTF-8 symbols are much more tractable with filters like HTML escaping.

Follow-on fix to ticket #1184.
2010-07-10 14:31:29 -07:00
Andy Staudacher
fd94f4bec2 Fix Kohana's internal cache for Gallery's usage pattern. Instead of deleting the whole find_files cache when ever include_paths (=core.modules) change, keep a separate find_files cache for each set of include_paths.
Benefits for Gallery:
 - There are about 3000 is_file() invocations for a photo / album page in a vanilla Gallery installation. These are mostly triggered by Kohana::find_file().
 - Enabling internal_cache doesn't help at all (see explanation below). The number of is_file() invocations is about the same with or without this cache.
 - With this patch, more than 95% of these invocations are gone. The cache works as intended.

Kohana's internal_cache for find_file wasn't working in Gallery because
the cache would be emptied on each request after reading it from disk and
before most lookups would run.
 1. Bootstrap sets initial core.modules (= include path): forge, kohana23_compat, gallery.
 2. Kohana::setup() loads find_file cache from disk.
 3. Gallery loads list of active modules and themes, and updates the core.modules value (=include path), which forces the internal find_file cache to be empties (which makes sense).
 4. Request processing starts, and thus 80+% of all Kohana::find_file() triggered  is_file() invocations start off with an empty find_file cache.

The patch doesn't have a significant impact on performance for Kohana applications which don't change their include paths at runtime (after Kohana::setup). And the patch should benefit all Kohana applications which have modules / extensions, i.e. which first need to bootstrap Kohana before they can load a list of all active modules from the database.
2010-02-28 13:51:18 -08:00
Andy Staudacher
ff9129c598 Revert "Fix Kohana's internal cache for Gallery's usage pattern."
Waiting for feedback from Kohana devevelopers before applying the patch to Gallery 3.

This reverts commit 336c3bd264.
2010-02-21 23:57:29 -08:00
Andy Staudacher
336c3bd264 Fix Kohana's internal cache for Gallery's usage pattern. Instead of deleting the whole find_files cache when ever include_paths (=core.modules) change, keep a separate find_files cache for each set of include_paths.
Benefits for Gallery:
 - There are about 3000 is_file() invocations for a photo / album page in a vanilla Gallery installation. These are mostly triggered by Kohana::find_file().
 - Enabling internal_cache doesn't help at all (see explanation below). The number of is_file() invocations is about the same with or without this cache.
 - With this patch, more than 95% of these invocations are gone. The cache works as intended.

Kohana's internal_cache for find_file wasn't working in Gallery because
the cache would be emptied on each request after reading it from disk and
before most lookups would run.
 1. Bootstrap sets initial core.modules (= include path): forge, kohana23_compat, gallery.
 2. Kohana::setup() loads find_file cache from disk.
 3. Gallery loads list of active modules and themes, and updates the core.modules value (=include path), which forces the internal find_file cache to be empties (which makes sense).
 4. Request processing starts, and thus 80+% of all Kohana::find_file() triggered  is_file() invocations start off with an empty find_file cache.

The patch doesn't have a significant impact on performance for Kohana applications which don't change their include paths at runtime (after Kohana::setup). And the patch should benefit all Kohana applications which have modules / extensions, i.e. which first need to bootstrap Kohana before they can load a list of all active modules from the database.
2010-02-21 21:29:24 -08:00
Andy Staudacher
6cbe0f78aa Revert "Fix Kohana's internal cache for Gallery's usage pattern."
This reverts commit 5ddd7c9677.
2010-02-21 21:07:55 -08:00
Andy Staudacher
5ddd7c9677 Fix Kohana's internal cache for Gallery's usage pattern.
Adds a core.internal_cache_read_only config variable to Kohana's internals.

Kohana's internal_cache for find_file wasn't working in Gallery because the cache would be emptied on each request after reading it from disk and before most lookups would run.
 1. Bootstrap sets initial core.modules (= include path): forge, kohana23_compat, gallery.
 2. Kohana::setup() loads find_file cache from disk.
 3. Gallery loads list of active modules and themes, and updates the core.modules value (=include path), which forces the internal find_file cache to be empties (which makes sense).
 4. Request processing starts, and thus 80% of all Kohana::find_file() triggered  is_file() invocations start off with an empty find_file cache.

In the case of my small Gallery installation, we're talking about 3100 is_file() invocations per request with or without internal_cache enabled. With this fix, this number is down to 800 invocations.

The basic idea is that we treat the cache as read only and don't write any (possibly dirty) values to it in memory until we're sure that the include path won't change later on in the request processing. Once we know the list of active modules and themes, we can update core.modules and finally flip the read-only state of the cache and start writing to it.
2010-02-21 20:04:06 -08:00
Andy Staudacher
cb57c3912a Fix random queries (such as for the random image block) for locales that don't use a period as decimal separator of floating point numbers (such as de_DE).
(Integrating a fix Kohana's SQL generation for floating point numbers. See http://dev.kohanaframework.org/issues/2636.)
2010-02-21 13:05:48 -08:00
Bharat Mediratta
64357b3a2e Updated Kohana to r4742 2010-01-18 12:04:54 -08:00
Tim Almdal
72793a547e remove unused calculation of max-age 2010-01-07 10:53:54 -08:00
Tim Almdal
ded8fc593c Typo when reapply the patch for Kohana ticket #2477 2010-01-06 13:06:19 -08:00
Tim Almdal
a74fd27e5f Updated Kohana to r4737 2010-01-06 11:35:01 -08:00
Tim Almdal
6c5bb43629 Apply patch for Kohana ticket #2477 2010-01-04 09:09:21 -08:00
Bharat Mediratta
32d25dafd5 Prevent form::dropdown from overzealously escaping ampersands by applying this diff:
http://dev.kohanaframework.org/attachments/1490/form.diff

Upstream ticket: http://dev.kohanaframework.org/issues/2463
2009-12-25 21:05:39 -08:00
Bharat Mediratta
3e8e13bd25 Updated Kohana to r4728 2009-12-23 12:42:57 -08:00
Bharat Mediratta
05c50a0523 Revert "Fix preamble issues. Upstream tickets:"
This reverts commit b2291a0e34.
2009-12-23 12:29:40 -08:00
Bharat Mediratta
b79e0c9d57 Back out my temporary fix for http://dev.kohanaframework.org/issues/2384
now that the real fix is in.
2009-12-22 22:15:13 -08:00
Bharat Mediratta
b2291a0e34 Fix preamble issues. Upstream tickets:
http://dev.kohanaframework.org/issues/2457
http://dev.kohanaframework.org/issues/2458
2009-12-22 15:13:36 -08:00
Bharat Mediratta
9285c8c66c Updated Kohana to r4724 2009-12-21 20:05:27 -08:00