Commit Graph

37 Commits

Author SHA1 Message Date
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
Bharat Mediratta
e79e0d1980 Make ORM::__call() always return an ORM so that it's chainable. 2009-11-26 20:47:30 -08:00
Bharat Mediratta
9b6663f87a Update to Kohana r4684 which is now Kohana 2.4 and has substantial
changes.
2009-11-24 19:20:36 -08:00
Tim Almdal
808fd4d3a0 Update the modified with a local fix for Kohana ticket #2298 2009-11-01 09:32:42 -08:00
Tim Almdal
3643706a2e Apply local fix for Kohana ticket 2276. 2009-10-23 08:25:58 -07:00
Bharat Mediratta
ca1947a1ce Updated upstream to r4554 2009-09-04 20:15:21 -07:00
Andy Staudacher
94c201f265 XSS escape in form helper and forge where missing. 2009-09-01 01:17:39 -07:00
Andy Staudacher
b4b638be44 Undo url helper changes - url methods no longer return a SafeString.
Adding SafeString::of_safe_html() calls where urls are passed as parameters to t() and t2().
2009-08-29 16:28:30 -07:00
Andy Staudacher
c01ac42c46 Refactor all calls of p::clean() to SafeString::of() and p::purify() to SafeString::purify().
Removing any p::clean() calls for arguments to t() and t2() since their args are wrapped in a SafeString anyway.
2009-08-29 12:48:40 -07:00
Romain LE DISEZ
2282f9977e Improve PgSQL compatibility in Kohana
( see http://dev.kohanaphp.com/issues/1855 )
(cherry picked from commit 8cbf43ed2a)
2009-07-23 09:12:12 -07:00
Romain LE DISEZ
350c1b0267 Use BOOLEAN instead of integer to describe the permissions :
- DENY = false
 - ALLOW = true
 - UNKNOW = null  (for intent only)
 - INHERIT = null (for cache)

Upgrade is not included for now.
(cherry picked from commit 719c59e040)
2009-07-23 09:11:55 -07:00
Bharat Mediratta
2572e5810f Updated Kohana to r4468 2009-07-21 07:29:14 -07:00
Bharat Mediratta
4e46a6edf6 Updated Kohana to r4434 2009-06-30 20:48:16 -07:00
Bharat Mediratta
666c807fcc Revert "Add Session::abort_save() to Kohana."
Obsoleted by upstream fix.

This reverts commit 06f066164f.
2009-06-30 20:47:51 -07:00
Bharat Mediratta
06f066164f Add Session::abort_save() to Kohana.
Filed upstream as: http://dev.kohanaphp.com/issues/1801
2009-06-21 15:09:32 -07:00
Bharat Mediratta
b179b106c2 Update Kohana to r4409 2009-06-06 14:51:04 -07:00
Bharat Mediratta
b0cb3c7402 Update Kohana to r4374 2009-05-29 12:00:49 -07:00
Bharat Mediratta
d8f2c9f9f7 Revert "Change Kohana::include_path() to put APPPATH (core) at the end of the"
This reverts commit 7e37055408.

No longer necessary now that we're putting all the code into
modules/gallery, which we can force to be at the end of the module
path.
2009-05-28 17:42:06 -07:00
Bharat Mediratta
12fe58d997 Rename 'kohana' to 'system' to conform to the Kohana filesystem layout. I'm comfortable with us not clearly drawing the distinction about the fact that it's Kohana. 2009-05-27 15:11:53 -07:00