Using ODBC Data Source in Cake 2.4

2014-04-04 Thread Comrade Raj
Hi, I am newbie to Cake. I have a DSN pointing to Teradata.
How can I configure database.php to use that ODBC DSN. I am currently uing 
Cake 2.4.6

Thanks alot.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Redirect to json extension

2014-04-04 Thread Jeremy Burns
In our continued head long plunge into iOS app integration we have now got 
the iOS app talking nicely with the Cake controller code using json, 
Router::parseExtensions(); and json views. The next challenge is 
redirecting.

For example, the Auth component's loginRedirect is set to a non json view 
(e.g. /users/profile) as that is where the web site expects to go after a 
successful login. When the login comes from the iOS app (via 
/users/login.json) I really need it to redirect to the json equivalent 
(e.g. /users/profile.json) else the iOS receives the fully rendered HTML 
(which is bad).

What's the recommended way of dealing with this? Hard coding json specific 
redirects, or is there something clever available within the RequestHandler 
component that can detect that the current action is a json action and any 
redirect should also be to a json action?

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Redirect to json extension

2014-04-04 Thread Jeremy Burns
So this seems to work...

In AppController-beforeFilter():

if ($this-request-isMobile()) {
$this-RequestHandler-renderAs($this, 'json');
}

Now all mobile requests (including redirections) se the json equivalent 
view (e.g. /Views/Users/json/login.ctp instead of /Views/Users/login.ctp) 
even if the mobile app posts to the non json extension.

On Friday, 4 April 2014 11:50:00 UTC+1, Jeremy Burns wrote:

 In our continued head long plunge into iOS app integration we have now got 
 the iOS app talking nicely with the Cake controller code using json, 
 Router::parseExtensions(); and json views. The next challenge is 
 redirecting.

 For example, the Auth component's loginRedirect is set to a non json view 
 (e.g. /users/profile) as that is where the web site expects to go after a 
 successful login. When the login comes from the iOS app (via 
 /users/login.json) I really need it to redirect to the json equivalent 
 (e.g. /users/profile.json) else the iOS receives the fully rendered HTML 
 (which is bad).

 What's the recommended way of dealing with this? Hard coding json specific 
 redirects, or is there something clever available within the RequestHandler 
 component that can detect that the current action is a json action and any 
 redirect should also be to a json action?


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: iOS app development

2014-04-04 Thread Domingos Coelho
I'll try to answer some of your questions

*.*

 *- When I do a check for $this-request-isMobile() the result is false; 
 is that because we are using the simulator?*

I don't know, but I think yes.

*- What part does the RequestHandler component play in this? I have 
 included it in AppController.*

yes, I would put in the AppController, in beforeFilter() or beforeRender()

*- The CakePHP app contains al the correct redirects and logic flow. Does 
 the iOS app need to replicate these (in other words, the logic is stored in 
 two places) or can the CakePHP code drive the redirect equivalent 
 statements for iOS?*

I think you can use the same controller, but create other views for iOS 
requests. For example, if you have a Post controller and a Index 
action, you will have app/View/Posts/index.ctp for web requests and 
app/View/Posts/Mobile/index.ctp (or app/View/Posts/Ios/index.ctp) for 
ios requests. In the AppController you will redirect the view for the 
mobile paste if it is a mobile request.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


CakePHP 2.4.7 Released

2014-04-04 Thread mark_story
The CakePHP core team is proud to announce the immediate availability of 
CakePHP 2.4.7. 2.4.7 is a bugfix release for the 2.4 release branch. A 
short list of the changes you can expect is:

* Core fixtures are now included in PEAR packages.
* Limburgish locale was added to L10n.
* MailTransport now includes the last error in the exception raised when 
mail() fails.
* HtmlHelper::getCrumbList() supports the escape parameter now.
* Describing tables in specific SQLserver schemas now works correctly.
* Improved API docs for several classes.
* URLs are correctly generated when two routing keys start with the same 
substring.
* Model::deleteAll() works correctly when using MySQL views.
* CakeEmail sets theme on helpers now.
* Hidden inputs generated in radio(), select() and checkbox() have the 
'form' attribute set when provided.
* Inflection for words ending in 'aves' was improved.
* CakeTestCase::assertTags() now runs much faster.
* CakeTestCase::assertTags() requires all attributes to be verified now.
* AclShell::delete now removes all matching records.
* CakeEmail now correctly renders messages when the template and layout are 
in different plugins.

You can view the full changelog on cakephp.org[1]. I'd like to thank the 
people who have contributed to this release. Your bug tickets, 
documentation edits, and patches/pull requests are a big part of what keeps 
CakePHP alive and ticking. Download a packaged release on github[2].

### Links

* [1] http://cakephp.org/changelogs/2.4.7
* [2] https://github.com/cakephp/cakephp/releases/2.4.7

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.