Skip to content
This repository has been archived by the owner on Apr 1, 2019. It is now read-only.

Changed from Request::instance() to Request::current() #26

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

gjcourtney
Copy link

Updated the static calls to the Request object so that they now use the Kohana 3.3 APIs.

Updated the static calls to the Request object so that they now use the Kohana 3.3 APIs.
Request::current()->headers['Content-Type'] = 'image/'.$this->image_type;
Request::current()->headers['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0';
Request::current()->headers['Pragma'] = 'no-cache';
Request::current()->headers['Connection'] = 'close';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe like this?

// Send the correct HTTP header
Request::current()->response()
    ->headers('Content-Type', 'image/'.$this->image_type)
    ->headers('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0')
    ->headers('Pragma', 'no-cache')
    ->headers('Connection', 'close');

gjcourtney added 11 commits July 23, 2013 17:09
Now a single chained call rather than 4 separate calls.
Previous commit didn't actually work - Request::current()->headers() now used rather than Request::current()->response()->headers
Updated to use UTF8:: rather than utf8:: static calls.
File now starts with uppercase letter for Kohana 3.3
First letter now uppercase for Captcha
@sergeyklay
Copy link

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants