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
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
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.
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
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
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
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
; 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
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,
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.
--~--~-~--~~~---~--~--
$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:
>
",
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)
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
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
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
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
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
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
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
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
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 [
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
22 matches
Mail list logo