Re: Controller question

2008-07-06 Thread simonb
You can use $this-requestAction('/controller/action') from within a view is this what you mean. On Jul 6, 12:48 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi again. Is there anyway to detect from what view a controller action was called? Thanks.

pagination / custom query question

2008-07-06 Thread .
I have 2 models Venue and Event. I want to do a search page that returns both Venue and Event on 1 page and trying to get the ajax pagination feature in cake rc2 to work. However, the first parameter for $this-paginate(...) is the 'type' (model). Is it possible for my controller to have both

Problem with setFlash

2008-07-06 Thread angel333
Hello, I have a problem with SessionComponent::setFlash(). When I save something in flash, it should be shown on next page and it should expire when user go to another page. But it doesn't expire immediatelly, but after a long while (probably session expiration). When I turn cookies off, it

Re: Subversion merge causing syntax errors - why?

2008-07-06 Thread keymaster
I actually didn't change anything in the cake core, just that I have these SVN properties for keyword substitution, which I (stupidly) added to the cake files. So, SVN is doing it's substitution magic on the cake core file with my parameters, and that is causing differences/ conflicts which

Issues with upgrading Cake releases in SVN

2008-07-06 Thread keymaster
Are you saying you do not store cakephp in SVN as a separare vendor, ie. you aren't using vendor branching? How do you handle cake upgrades? Do just replace the latest cake core folder into each project and recommit to SVN? (I don't change the cake core either. I think the reason svn is

Re: Subversion merge causing syntax errors - why?

2008-07-06 Thread keymaster
Are you saying you do not store cakephp in SVN as a separare vendor, ie. you aren't using vendor branching? How do you handle cake upgrades? Do just replace the latest cake core folder into each project and recommit to SVN? I actually didn't change the cake core either. (I believe I had

Best Practices for managing cake in your SVN

2008-07-06 Thread keymaster
I actually didn't change anything in the cake core, just that I have these SVN properties for keyword substitution, which I (stupidly) added to the cake files. So, SVN is doing it's substitution magic on the cake core file with my parameters, and that is causing differences/ conflicts which

SVN, Vendor Branching and cake upgrades

2008-07-06 Thread keymaster
Are you saying you do not store cakephp in SVN as a separare vendor, ie. you aren't using vendor branching? How do you handle cake upgrades? Do just replace the latest cake core folder into each project and recommit to SVN? Am now wondering whether vendor branching is overkill, since I don't

Re: blog tutorial error - cakePHP 1.1

2008-07-06 Thread Dardo Sordi Bogado
1) i don't know what's wrong in the SQL statement, what it is? From: http://dev.mysql.com/doc/refman/5.0/en/create-table.html column_definition: data_type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT] [UNIQUE [KEY] | [PRIMARY] KEY] [COMMENT 'string']

Re: Dispatcher::start - Controller::$beforeFilter property usage is deprecated and will no longer be supported. Use Controller::beforeFilter()

2008-07-06 Thread Dardo Sordi Bogado
class FoosController extends AppController { function beforeFilter() { parent::beforeFilter(); // do your own beforeFlter stuff here } } On Sat, Jul 5, 2008 at 11:46 PM, rhrn [EMAIL PROTECTED] wrote: Dispatcher::start - Controller::$beforeFilter property usage is

Re: Best Practices for managing cake in your SVN

2008-07-06 Thread Samuel DeVore
On Sun, Jul 6, 2008 at 3:26 AM, keymaster [EMAIL PROTECTED] wrote: Anyways, are you saying you do not put cakephp into SVN as a separare vendor, and you don't do vendor branching? How do you handle cake upgrades? Do just replace the latest cake core folder with each project and recommit?

model validation rules order ?

2008-07-06 Thread Dia
Hi I noticed a strange behaviour and wanted to know if it's there's a order on executing validation rules the example : case 1 : var $validate = array( 'word' = array( array( 'required' = true,

Re: model validation rules order ?

2008-07-06 Thread Dia
PS: using 1.2 RC2 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more

Filter on a field with two conditions.

2008-07-06 Thread JuniorCMS
Hi to all, I have to translate this logic code to a CakePHP condition: SELECT (all) WHERE field isNull or field LIKE %val;% Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this

$this-Auth-loginRedirect is overridden after successfullly login

2008-07-06 Thread Alessandro Daducci
I noticed that if I set $this-Auth-loginRedirect to a certain url (i.e. /posts/index) it is not considered after a successfully login operation. Instead, it redirects to '/' location. The strange thing is that I noticed that if you call twice the login action (logging in twice one after the

Re: Filter on a field with two conditions.

2008-07-06 Thread Mech7
There are 2 solutions posted here: http://groups.google.com/group/cake-php/web/faq look under tricky habtm... Personally I don't really like the solutions and prefer to use my own query where i would do a normal join.. On Jul 6, 6:57 pm, JuniorCMS [EMAIL PROTECTED] wrote: Hi to all, I have

Re: SVN, Vendor Branching and cake upgrades

2008-07-06 Thread aranworld
I don't store the Cake core code in my project's SVN repository either. To upgrade, I just do an svn update on the cake directory I am using for my project. If something in the upgrade doesn't work I can either: -- backtrack the cake core -- fix my project's code to work with the new core --

1.2.0.7296 RC2 zip download vs. exporting revision 7296 ?

2008-07-06 Thread keymaster
Anyone know why the 1.2.0.7296 RC2 zip file download from the cake site yields a different set of source files than a direct export of revision 7296 from cake's svn? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Auth login redirect unreliable?

2008-07-06 Thread Chez17
Using Eric's post, I created a very simple way to get the Auth component to redirect to the referring page no matter what. I think its userful: ?php class UsersController extends AppController { var $name = Users; var $components = array(Auth); function beforeFilter() {

Re: Controller question

2008-07-06 Thread [EMAIL PROTECTED]
I was trying to figure out from what page a came from to render a diferent view uppon the decision. Example (in pseudo code) if(came_from_view_A) { render_view_B; } else { render_view_C } I've solved the problem with Controller::referer() :) On 6 Jul, 02:14, Chris Hartjes [EMAIL

ayuda en autocomplete no me funciona alguien puede ayudarme

2008-07-06 Thread osm
class EnvoicesController extends AppController { var $name='Envoices'; var $helpers= array('Form','Html','Ajax','Javascript','Time', 'Paginator'); var $scaffold; function index(){ $this-render('autocomplete');

links and images on static pages

2008-07-06 Thread CM
Hi, I am new to cakePHP and I read some posts on creating static pages by adding the pages to the apps/views/pages/ and using the pages controller. However, my links and images in the default.thml layout do not work anymore. I have been adding my links using img and a tags because for some

Re: display var from view in layout

2008-07-06 Thread Grant Cox
For anyone else wondering, just have a $this-set('layout_var', 'content') in your view, then in the layout file you can use $layout_var . On Jul 6, 6:15 am, bmgz [EMAIL PROTECTED] wrote: I managed to figure this out, however it wasnt as elegant or simple as it could be..

Re: Controller question

2008-07-06 Thread the_woodsman
It might be nicer to just call slightly different URLs from the views! An extra param, perhaps? On Jul 6, 7:58 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I was trying to figure out from what page a came from to render a diferent view uppon the decision. Example (in pseudo code)

Re: Problem with setFlash

2008-07-06 Thread the_woodsman
This sounds like caching to me. What debug level are you on? Do you use view caching? What browser do you use? etc! On Jul 6, 7:35 am, angel333 [EMAIL PROTECTED] wrote: Hello, I have a problem with SessionComponent::setFlash(). When I save something in flash, it should be shown on next page

Re: links and images on static pages

2008-07-06 Thread byBartus
Set the Html helper in your app/app_controller.php: class AppController extends Controller { var $helpers = array('Html', etc.., etc..) } T+ On Jul 6, 4:13 pm, CM [EMAIL PROTECTED] wrote: Hi, I am new to cakePHP and I read some posts on creating static pages by adding the pages to