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 re

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 di

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.

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

2010-06-02 Thread bram
rt and readable notation 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

debugger _outputformat

2010-03-11 Thread bram
27;log'. Mmmm when carefully inspecting the switch 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 cre

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 examp

No download progress using media view

2010-01-15 Thread bram
Keep-Alive[timeout=15, max=94] 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] =&g

Re: habtm limit

2009-09-29 Thread bram
; Have a look at the query it generates (set debug to 2) , I'm sure this will > shine a bright light on the problem ... > > On Mon, Sep 28, 2009 at 9:48 PM, bram wrote: > > > In my app, I have a User model that has a habtm association with > > 'Event'. In one o

habtm limit

2009-09-28 Thread bram
them has an associated event. When increasing the limit, it does show associated events, but when some user don't have events associated, some other users will have multiple events returned. Is this a cake bug or do I have the wrong impression of the limit in a habtm association? Cheers,

Re: Log Errors when debug = 0?

2009-08-11 Thread bram
up/cake-php/msg/05dfde6ad7ebfed2?hl=en Bram On Aug 10, 11:22 pm, David 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. --~--~-~--~~~---~--~--

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 wrote: >

Re: Trouble integrating SWFUpload with cakephp project

2009-08-05 Thread bram
", post_params: {"PHPSESSID" : "' . session_id() . '"}, ...etc '; $javascript->codeBlock($js, array('inline' => false)); Anyway, just some snippets, I don't have a working isolated example. Again, if you use the (messy)

Howto set the output format of debugger

2009-08-05 Thread bram
ill want to know you 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? Tha

Structure of book.cakephp.org

2009-07-16 Thread bram
aviors, Console, 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

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 a

Re: using invalidate

2009-05-26 Thread bram
er you should check this > link:http://book.cakephp.org/view/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

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. Whil

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 temp

Ajax helper observeField, problem when updating multiple select boxes

2008-02-03 Thread Bram
hange in foo, baz doesn't 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. Ho

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 recei

Newby questions part 2: custom query for pagination

2007-11-30 Thread Bram
do 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 [

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

2007-11-30 Thread Bram
to give users the possibility 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 r