Re: Any chance to get the $_SERVER variable or Configure::write Settings into a shell?

2011-02-05 Thread Bram
As of php 5.3, you can use the gethostname() function. Another option is running the hostname shell command. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP

flash vs redirect

2010-12-15 Thread bram
In the 1.3 book, the controller method flash is compared to the redirect method. It states that the only difference is the use of an intermediate page with your flash message, before the user gets redirected to a given url. When using the flash method, it looks like there is another significant

find('first') query cakephp1.2 vs 1.3

2010-06-02 Thread bram
of this query. Is this a wrong way of retreiving model data? Should I go for the long notation (including the conditions option that tells find to search for User.id = 4) ?? Or is it a cake bug? Bests, Bram Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP

Re: find('first') query cakephp1.2 vs 1.3

2010-06-02 Thread bram
The migration guide actually mentions this change in paragraph 11.1.2: Model::find(first) will no longer use the id property for default conditions if no conditions are supplied and id is not empty. Instead no conditions will be used Check out the new CakePHP Questions site http://cakeqs.org

debugger _outputformat

2010-03-11 Thread bram
structure, it looks like the value of _outputformat is ignored, since the first expression is 'default' followed by 'js'. All other cases will be ignored independent of the value of _outputformat. Is this a bug or a creative way to disable all but the 'js' option? Cheers, Bram ps: see also: http

Re: i18n partial translation

2010-01-31 Thread bram
I just found out that cake keeps a cache of the translations in /app/tmp/cache/persistent If you remove all files* in there, the translation should work fine again. Cheers, B. *If you only want to remove the lang cache, you can identify them as: cake_core_{lang domain}_{lang code} for

No download progress using media view

2010-01-15 Thread bram
] Connection[Keep-Alive] Content-Type[image/jpeg] Tested with FF 3.5.7 and Chrome 4.0.249.43. My media view variables: [name] = abcde [id] = abcde.jpg [extension] = jpg [path] = /home/bram/public_html/site/app/uploads/ [download] = 1 Does anyone have a clue what's going on here? What do

habtm limit

2009-09-28 Thread bram
returned. Is this a cake bug or do I have the wrong impression of the limit in a habtm association? Cheers, Bram --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake

Re: Log Errors when debug = 0?

2009-08-11 Thread bram
/05dfde6ad7ebfed2?hl=en Bram On Aug 10, 11:22 pm, David sirdavid...@gmail.com wrote: I would like to silently write errors to error.log when in production mode. It would be useful to catch anything going wrong that I hadn't previously noticed. --~--~-~--~~~---~--~~ You

Re: Notice (8): Undefined variable: title [APP/views/titles/view.ctp, line 6]

2009-08-07 Thread bram
$title is a special variabe and it is used to set the page title. This took me a long time to figure out. Also, if you set variables with underscored, they don't end up in your views (they are available in camelCased format). I hope that this will change soon! On Aug 6, 6:22 pm, jburns

Howto set the output format of debugger

2009-08-05 Thread bram
didn't make any php syntax errors. Since I use the log-files a lot*, I'd like to send all of debug's output to the debug.log file. The debugger has a private property _outputFormat that I'd like to set to 'log'. But how and where do I do that? Thanks, Bram ps: * it's possible to send queries

Re: Trouble integrating SWFUpload with cakephp project

2009-08-05 Thread bram
/project/fancyupload/3-0/showcase/photoqueue/ ? Keep us updated with your progress!! Bests, Bram On Aug 5, 10:11 pm, Robert mcway_web_des...@cox.net wrote: I've been trying to integrate SWFUpload 2.0.2 with my CakePHP 1.2 application, and have been stuck for a few days now...after endless searching

Structure of book.cakephp.org

2009-07-16 Thread bram
, Utility libaries have their own top-level entry. The fundamental parts like Models, Views, Controllers are missing here. In other words, the documentation structure does not reflect the way I use and 'think' Cake. I would like to know how you guys think about it. Cheers, Bram

Re: using invalidate

2009-05-27 Thread bram
Ok, although I'm not satisfied with Model::save() saving the non validating data, I've found a work-around. It seems to work quite nice for me so why not posting it here: Practically, what I'm trying to do is submitting agenda items through a form. The items have a date, whole_day (bool), start

using invalidate

2009-05-26 Thread bram
I'm trying to doo some custom validation in a controller. Code: if (!empty($this-data)) { check some things if check failed $this-Item-invalidate('field that failed'); if ($this-Item-save($this-data) { } } The Item gets saved regardless the check failes or not. While the

Re: using invalidate

2009-05-26 Thread bram
/410/Validating-Data-from-the-Controller I did not setup validation rules. The underlying problem is that I only want two fields to be validated if another field has a certain value. Is it possible to add validation rules 'on the fly'? Bram --~--~-~--~~~---~--~~ You

Re: trouble with Media view

2009-05-01 Thread bram
Did you try 'name' = 'test' (without extension)? I don't know why the parameters to the media view are that complicated... note that the extension should be lower case. In my application, the absolute path to the file is known. Even then, it's quite a hassle to get in properlly in the media

Ajax helper observeField, problem when updating multiple select boxes

2008-02-03 Thread Bram
change accordingly. When I set up an observer to change baz when foo gets updated and pass in the value of bar, baz gets updated, but with the old value of bar as a parameter. I think that the request is sent when bar isn't changed yet. How could I solve this problem? Bram

Re: Newby questions part 2: custom query for pagination

2007-12-02 Thread Bram Duvigneau
Dardo Sordi Bogado wrote: Implement paginate() and paginateCount() in the model with your custom querys OK, but which parameters should be accepted by this functions? It seems that these aren't even in the api... Bram --~--~-~--~~~---~--~~ You received

Newby questions part 2: custom query for pagination

2007-11-30 Thread Bram
this at the moment. Bram --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 options

Some newbie questions part 1: showing form for a habtm relation

2007-11-30 Thread Bram
to select which specialties are applicable for a company. I would prefer checkboxes, but I saw somewhere that a select is used by default, that will also be fine for now. Anyway, Could someone explain how to create a form for an habtm relation in CakePHP 1.2.? Bram