22 Commits

Author SHA1 Message Date
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -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
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
47fdf1e35a Move the Content-Length header into the main block, fix some formatting.
Follow-on to 5b969fd069 which is a fix for
#1802.
2011-11-24 11:21:32 -08:00
ffchung
5b969fd069 gzip stream problem on Google Chrome 2011-10-29 23:03:06 +08:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
b5ba61fc53 Create a way for controllers to exempty themselves from maintenance
mode and private gallery mode by setting the following constants in
the controller to true.

  ALLOW_MAINTENANCE_MODE
  ALLOW_PRIVATE_GALLERY

Fixes #1411 and the subsequent refactoring fixes #1551 as well.
2010-12-23 23:34:04 -08:00
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Bharat Mediratta
c050acf30a Fix lots of warnings that pop up when we're in E_STRICT mode. They're
mostly issues around uninitialized variables, calling non-static
functions in a static context, calling Session functions directly
instead of on its singleton, passing non-variables by reference, and
subclasses not using the same interface as the parent class.
2010-01-31 16:07:41 -08:00
Bharat Mediratta
60c20b0045 The html helpers no longer forces .js and .css suffixes to urls it generates (yay!) 2009-11-25 16:26:10 -08:00
Bharat Mediratta
4a417708f0 Kohana::show_404() -> throw new Kohana_404_Exception() 2009-11-25 13:51:33 -08:00
Tim Almdal
76f320ab3d In this patch, drag now works to the album tree, but the progress bar is not
showing. As well fixed a problem where selectable single clink no longer
worked when the album was reloaded.
2009-08-16 12:36:14 -07:00
Bharat Mediratta
e7c6861507 Don't send back the gzipped version if we're using
zlib.output_compression in PHP, since that means that the stream is
already compressed.  Fixes ticket 555.
2009-07-17 16:58:00 -07:00
Bharat Mediratta
c9e8ff8fcb Use the appropriate content-type for javascript (application/javascript). 2009-06-29 21:59:00 -07:00
Bharat Mediratta
02b46833d6 Pass back Cache-Control and Expires headers when we send back a 304,
otherwise some browsers (Firefox, at least) thinks that it needs to
revalidate.  At least in my case, it appears that my proxy tacks on
restrictive Cache-Control headers if they aren't there.
2009-06-29 21:52:42 -07:00
Bharat Mediratta
980c589e3d Fix a few more issues
1) Don't use $_SERVER, use Input::instance()->server().  This fixes the problem
   that when you use a browser that doesn't pass in an Accept-Encoding, we'd
   barf on a missing array key

2) Don't bother looking up the _gz key if we don't have gzencode, because we
   probably didn't store one.

3) Only emit the gzip Content-Encoding header if we're actually sending back
   gzipped data.
2009-06-29 21:38:04 -07:00
Bharat Mediratta
fa8ca2f7ad Refactor combine_xxx() functions together into combine_files() and use
html functions to generate the resulting elements.  Add phpdoc.
2009-06-29 18:12:53 -07:00
Bharat Mediratta
3080317d6e Refactor combined controller a bit
1) Create public javascript() and css() functions and turn __call()
   into a private function to protect us against having some random
   type show up in there.  Otherwise anything you put in the 2nd
   argument gets emitted in the header which is a security hole.

2) Fix a bug ("$key = $key[0]") which was breaking functionality.
   Eliminate the hex check, it's not really necessary in the majority
   case and doesn't hurt us in edge cases.

3) Convert some empty() calls to !, no need for a function call there.

4) Add phpDoc.
2009-06-29 17:44:02 -07:00
Tim Almdal
006b63030a Combine the Combined::javascript and Combined::css into a single method implemented
by the magic method __call. The first parameter is the content type for text/xxxx
and the 2nd parameter is the key of the combined file.
2009-06-29 15:38:55 -07:00
Tim Almdal
34c76c0906 A Combined javascript seems to work.
1) CSS files are added to the combined version by use of $theme->css() or $theme->css_theme() methods
2) url references in the css are converted to full paths as opposed to relative
3) @import statements in the css are resolved as well.
4) need to move the [if IE] statements into the css files so the will be honored in the browser. currently the ie fix css are always included.
2009-06-29 12:32:11 -07:00
Tim Almdal
6ec293dfe7 *Note* work in progress.
Implement the combined css functionality.  Local url references and replace with absolute urls instead of relative.
2009-06-29 08:24:42 -07:00
Tim Almdal
d90e30c378 Rename the combined javascript controller from javascript/combined to combined/javascript. 2009-06-28 17:07:12 -07:00