1 controller 2 models

2013-06-25 Thread Carlos Antonio
Tenho 2 models (cautela E acesso) e 1 controller (cautela). Como informar ao controller aqueles models? A ideia é a seguinte: Model 'acesso': funções de login (vai pra cautela) e de logout (sai de cautela); Model 'cautela': toda a funcionalidade do sistema necessário (esta parte tá ok)!!!

Re: 1 controller 2 models

2013-06-25 Thread hdogan
You can use $uses property of your controller to use multiple models or ClassRegistry::init() method to load your model where you use it. class YourController extends AppController { public $uses = array('Model1', 'Model2'); } or public function one() { $results1 =

Re: requestAction and Auth issues

2013-06-25 Thread hdogan
You can allow unauthorized access to action if your action is requested with requestAction method. For example: public function beforeFilter() { parent::beforeFilter(); if ($this-request-is('requested') $this-request-params['action'] == 'index') {

Problem related to save multiple models in one controller

2013-06-25 Thread Malintha Adikari
Hi, I am a student who is participating GSOC 2013. I am doing project with cakephp. I want to save two models in same controller but I am stucked in the middle of that. Could you please help me to solve that problem. I have two tables 1. Task- id, name, description, cost 2. Connect- id,

Naviagation in a CakePHP application

2013-06-25 Thread Saiful Islam
I am new in CakePHP, trying to make an application. In this application, I have a navigation bar, whose Menus I want to be changed according to login status of a user. I think I can't explain clearly, please have a look at this code snippet : This is my header part's(an element) navigation

HABTM and forms

2013-06-25 Thread Gabriele Carioli
Hi everybody, I'm struggling with a particular hasAndBelongsToMany form data problem and need some help. Quickly: 1. A recipe can have many ingredients. 2. An ingredient can be in many recipes. 2. An ingredient in a recipe can be mandatory or optional (or not present). 4. an ingredient in a

Favicon.ico Error in Logs

2013-06-25 Thread 라이더제이슨
My CakePHP error.log (/app/tmp/logs/error.log is full of errors (well, Favicon.ico) 2013-06-24 11:12:54 Error: [MissingControllerException] Controller class Favicon.icoController could not be found. Exception Attributes: array ( 'class' = 'Favicon.icoController', 'plugin' = NULL, )

Cakephp 1.3 - Session timeout

2013-06-25 Thread Jefferson Dias
I am using Cakephp 1.3 and having a lot of troubles with session timeouts. So, here's my core.php file. Configure::write('Session.save', 'cake'); Configure::write('Session.cookie', 'TESTING'); Configure::write('Session.timeout', '0.01'); Configure::write('Session.start', true);

CakePHP 1.3 Session Timeout

2013-06-25 Thread Jefferson Dias
Hi, I need to test what happens on my page when the session is gone. for that test I have changed some values on my core.php. session.timeout = 1 security.level = low Session Lifetime = 1 * 300 = 300 seconds (5 minutes) then a guy showed me that the calc for cookie lifetime is diferent,

Cakephp - Session Timeout

2013-06-25 Thread Jefferson Dias
I am using Cakephp 1.3 and having a lot of troubles with session timeouts. So, here's my core.php file. Configure::write('Session.save', 'cake'); Configure::write('Session.cookie', 'TESTING'); Configure::write('Session.timeout', '0.01'); Configure::write('Session.start', true);

Re: Favicon.ico Error in Logs

2013-06-25 Thread AD7six
On Monday, 24 June 2013 20:26:49 UTC+2, 라이더제이슨 wrote: My CakePHP error.log (/app/tmp/logs/error.log is full of errors (well, Favicon.ico) 2013-06-24 11:12:54 Error: [MissingControllerException] Controller class Favicon.icoController could not be found. Exception Attributes: array (

Model::AfterFind $results format, associations

2013-06-25 Thread Vanja Dizdarević
As many have failed before me, I am trying to massage some data in the afterFind callback in CakePHP 2.3.6. public function afterFind($results, $primary = false) { $results = parent::afterFind($results, $primary); foreach ($results as $key = $val) { //... do stuff

Re: Cake CLI no longer works

2013-06-25 Thread Ribamar FS
Try to upgrade to Ubuntu 12.10. The version of PHP is the problem. Em domingo, 5 de maio de 2013 05h29min50s UTC-3, CrotchFrog escreveu: I've been running Cake on Ubuntu Server 12.04 for quite some time now and never a problem. I don't necessarily have a problem with CakePHP itself, but