RE: Application specific configuration

2007-05-05 Thread Mariano Iglesias

Or create a file called app/config/config.php like the following:

 'value1',
'setting2' => 'value2'
);
?>

Then on app/config/bootstrap.php add the following:

Configure::load('config');

Then whenever you need to get these settings do:

$setting1 = Configure::read('app.setting1');
$setting1 = Configure::read('app.setting2');

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de John David Anderson (_psychic_)
Enviado el: Domingo, 06 de Mayo de 2007 01:18 a.m.
Para: cake-php@googlegroups.com
Asunto: Re: Application specific configuration

/app/config/bootstrap.php

or

Class vars in your AppController, defined at /app/app_controller.php


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Accessing model functions from view?

2007-05-05 Thread Stacey

Hi All,

I'm having a problem trying to access 'hasField' in a view. I have a
calculated field that is only created if there is a value to put in
the field. So, I need to first check if the field is available before
I do something with it in my view. Is this possible?


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Application specific configuration

2007-05-05 Thread Devraj Mukherjee

Thanks!

On 5/6/07, John David Anderson (_psychic_) <[EMAIL PROTECTED]> wrote:
>
>
> On May 5, 2007, at 9:36 PM, Devraj Mukherjee wrote:
>
> >
> > Hi everyone,
> >
> > I wish to define a few application specific configuration variables
> > like
> >
> > - SMTP server in use
> > - Path to store image files
> >
> > Does Cake allow programmers to do that?
>
> /app/config/bootstrap.php
>
> or
>
> Class vars in your AppController, defined at /app/app_controller.php
>
> -- John
>
> >
>


-- 
"I never look back darling, it distracts from the now", Edna Mode (The
Incredibles)

--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Application specific configuration

2007-05-05 Thread John David Anderson (_psychic_)


On May 5, 2007, at 9:36 PM, Devraj Mukherjee wrote:

>
> Hi everyone,
>
> I wish to define a few application specific configuration variables  
> like
>
> - SMTP server in use
> - Path to store image files
>
> Does Cake allow programmers to do that?

/app/config/bootstrap.php

or

Class vars in your AppController, defined at /app/app_controller.php

-- John

--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Simple SQL 'OR' Clause

2007-05-05 Thread Langdon Stevenson

Hi daareck

Check out the Cake manual (http://manual.cakephp.org/chapter/models) and 
look for the section titled: Complex Find Conditions (using arrays)

It has a good description of how to compose an array of conditions that 
will do what you want.

Regards,
Langdon


daareck wrote:
> Hello
> 
> I need some help in making an OR clause in $criteria array. I'd like
> to have two conditions on one field. It should look like:
> ... WHERE((AuctionShippers.shipper_id='5' OR
> AuctionShippers.shipper_id='-1') AND(..[some other conditions]..))
> 
> $criteria['Auction.created'] = $this->data['Auction']['created'];
> $criteria['Shipping.name'] = 'LIKE %'.$this->data['Shipping']
> ['name'].'%';
> $criteria +=
> array('AuctionsShipper.shipper_id'=>'-1','AuctionsShipper.shipper_id'=>
> $shipper[0]['Shipper']['id']);
> 
> this code doesn't work :(
> 
> 
> > 

-- 
--
Linden Row Pty Ltd

NSW  : +61 2 8215 0570
Victoria : +61 3 9013 9423
Fax  : +61 2 8215 0571

Mobile   : +61 416 118 037

http://www.lindenrow.com.au

---
Buy fine chocolate online
http://www.chocolatereview.com.au

--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Application specific configuration

2007-05-05 Thread Devraj Mukherjee

Hi everyone,

I wish to define a few application specific configuration variables like

- SMTP server in use
- Path to store image files

Does Cake allow programmers to do that?

-- 
"I never look back darling, it distracts from the now", Edna Mode (The
Incredibles)

--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How do I use i18n and l10n in CakePHP 1.2?

2007-05-05 Thread Aaron Shafovaloff

I have $_SESSION['Config']['language'] set to my desired language but
i18n::translate doesn't even seem to have access to $_SESSION?. I've
done a pr($_SESSION) at line 114 of i18n.php and it returns blank. If
I do a pr($_SESSION) in a view it works fine. Any ideas?

On May 5, 6:08 am, CraZyLeGs <[EMAIL PROTECTED]> wrote:
> you probably mean $_SESSION['Config']['language']
>
> On May 4, 2:08 pm, misho <[EMAIL PROTECTED]> wrote:
>
> > Well Yes,
> > I do some checks on allowed languages, but I don't have a separate
> > controller to deal with this.
> > Just scan URL into function (in app_controller.php) and then redirect.
>
> > And thank you I do not know that Configure::write('Config.language',
> > 'en') and $_SESSION['Config.language'] are actually the same.
>
> > On May 4, 2:35 pm, jitka <[EMAIL PROTECTED]> wrote:
>
> > > - if You will store selected language in session, route url '/language/
> > > *' to some controller->action and do 
> > > $this->Session->write('Config.language', $arg); in it (probably with 
> > > check if this
>
> > > lng is allowed) - then redirect to referer
>
> > > - if You will save Config.language in session, You don't have to use
> > > Configure class (session takes precedency)
>
> > > - /app/locale//LC_MESSAGES should be /app/locale//
> > > LC_MESSAGES - see L10n::$__l10nMap (locale != language)


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Simple SQL 'OR' Clause

2007-05-05 Thread daareck

Hello

I need some help in making an OR clause in $criteria array. I'd like
to have two conditions on one field. It should look like:
... WHERE((AuctionShippers.shipper_id='5' OR
AuctionShippers.shipper_id='-1') AND(..[some other conditions]..))

$criteria['Auction.created'] = $this->data['Auction']['created'];
$criteria['Shipping.name'] = 'LIKE %'.$this->data['Shipping']
['name'].'%';
$criteria +=
array('AuctionsShipper.shipper_id'=>'-1','AuctionsShipper.shipper_id'=>
$shipper[0]['Shipper']['id']);

this code doesn't work :(


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Custom URLs

2007-05-05 Thread pierre.k

Hi,

I am looking for a solution to the following problem: basically, I
want urls in form "/controller/action/params" as well as "/en/
controller/action/params". The idea behind this is to allow for
multiple languages ("/en/..." might as well be replaced with "/cs/..."
and alike) and in ideal case, I would like the language identifier to
be available as a global variable. This would allow me to use the
variable in model (and also controller & view) classes, in the
following fashion, for example:

class Hotel extends AppModel {
  var $hasOne = array("HotelTxt" => array("conditions" =>
"lang={lang}"));
}

In other words, whenever an url like "/cs/*" or "/en/*" is
encountered, I need to store the "cs"/"en" part into a global var and
effectively go to url "*" instead. Can this be achieved via cakephp
routing? Or should I approach to the problem in a completely different
manner?

Thanks for your ideas,
Petr K.


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Update to latest version and I got Fatal Error

2007-05-05 Thread eveloper

It has been a while I have not been using CakePHP because the project
I am working on now wasn't built on using CakePHP. Not even with a
proper frameworks...

Currently I am back using CakePHP and tried to update my version of
CakePHP from 1.1.8.3544 to 1.1.14.4797.
I know it is a huge leap... I ended up getting Fatal error: Class
'AppModel' not found in /srv/www/htdocs/myweb/vendors/
authentication.php on line 2

When I switched it back to the old version, everything works fine. Any
idea? Thanks.


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Trouble trying to print this array.

2007-05-05 Thread Stacey

I'm a newbie, but I just ran into this same issue.

I believe it should be:



instead of:




On May 5, 12:10 pm, rockit <[EMAIL PROTECTED]> wrote:
> I'm having troubles trying to print this array in the format i need.
> let me explain that yes i know how to loop through a basic array.
>
> As you can see there are 2 models here, Inventory & Photo.  The
> association is Inventory hasMany Photo and Photo belongs to Inventory.
>
> When i print_r($inventories), this is what is generated.
>
> Array
>( [0] => Array
>( [Inventory] => Array
>  (
> [id] => 38 [title] => Komatsu - 2001 [description] =>
> Great Value Excavator. [cost] => $75,000 [ispublish] => 1 [created] =>
> 2007-05-04 13:37:13 [modified] => 2007-05-04 13:37:13
>  )
> [Photo] => Array
> (
>   [0] => Array ( [id] => 24 [img] => gary_dunham_ver2.gif
> [inventory_id] => 38 )
>   [1] => Array ( [id] => 25 [img] => gary_dunham_ver3.gif
> [inventory_id] => 38 )
>   [2] => Array ( [id] => 23 [img] => gary_dunham_ver1.gif
> [inventory_id] => 38 )
> )
>)
>  )
>
> here's my attempt to print out the array.
>
> 
> 
> 
> 
> 
> 
> 
> 
>
> prints out title, description and cost no problem, but what i need to
> be able to do is have just 1 of the Photo array listed (a default or
> profile image) and have the rest of the images displayed on a view
> details page.
>
> the desired format would be something like:
>
> [image][make/model][description][cost]  [view details]
>
> based on the data in the array, this would be the desired result.
> now, in the current array there is only 1 inventory, so there would
> need to be multiple inventories.
>
> When the details view is opened, then you can see all photos.  but on
> that original list, i need just 1 image displayed.
>
> how can this be done?  or is my table design flawed?


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: wrong with class.paths.php

2007-05-05 Thread Samuel DeVore

usually it means that your tmp folder doesn't have the right structure
and that it has incorrect permissions.  Very often ftp and or
decompression utilities do not create empty folders, and often they do
not have the right permissions.

On 5/5/07, davyke <[EMAIL PROTECTED]> wrote:
>
> Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /
> home/www/chinoisdici/www/crystal/app/tmp/cache/persistent/
> class.paths.php on line 12
>
> sometimes, i have this problem, do someone know where is the problem
>
>
> >
>


-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/

--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Trouble trying to print this array.

2007-05-05 Thread rockit

I'm having troubles trying to print this array in the format i need.
let me explain that yes i know how to loop through a basic array.

As you can see there are 2 models here, Inventory & Photo.  The
association is Inventory hasMany Photo and Photo belongs to Inventory.

When i print_r($inventories), this is what is generated.

Array
   ( [0] => Array
   ( [Inventory] => Array
 (
[id] => 38 [title] => Komatsu - 2001 [description] =>
Great Value Excavator. [cost] => $75,000 [ispublish] => 1 [created] =>
2007-05-04 13:37:13 [modified] => 2007-05-04 13:37:13
 )
[Photo] => Array
(
  [0] => Array ( [id] => 24 [img] => gary_dunham_ver2.gif
[inventory_id] => 38 )
  [1] => Array ( [id] => 25 [img] => gary_dunham_ver3.gif
[inventory_id] => 38 )
  [2] => Array ( [id] => 23 [img] => gary_dunham_ver1.gif
[inventory_id] => 38 )
)
   )
 )

here's my attempt to print out the array.










prints out title, description and cost no problem, but what i need to
be able to do is have just 1 of the Photo array listed (a default or
profile image) and have the rest of the images displayed on a view
details page.

the desired format would be something like:

[image][make/model][description][cost]  [view details]

based on the data in the array, this would be the desired result.
now, in the current array there is only 1 inventory, so there would
need to be multiple inventories.

When the details view is opened, then you can see all photos.  but on
that original list, i need just 1 image displayed.

how can this be done?  or is my table design flawed?


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Cake set up problem

2007-05-05 Thread cakedude

Please help. I'm trying to get cake running in an online environment
but i just want cake to run in on directory and leave the rest of the
site like it is. So my cake dir is www.mysite.com/cake/. However, when
i do so i'm seeing the source code of my index.php file in the app/
webroot/ dir in my browser.

Does someone have any idea on this? Is this a .htacces problem?

Thanx allot!


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Newbie, database and model relations?

2007-05-05 Thread rockit

what helped me to figure out my associations and everything was to
simple bake the app.  there's a screencast on how to bake apps, it
saves you a lot of time in the beginning trying to figure out how to
model your associations.  if it doesn't work, bake it again with
different settings.

On May 5, 10:33 am, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> http://manual.cakephp.org/chapter/models
>
> There for a reason.
>
> -MI
>
> ---
>
> Remember, smart coders answer ten questions for every question they ask.
> So be smart, be cool, and share your knowledge.
>
> BAKE ON!
>
> blog:http://www.MarianoIglesias.com.ar
>
> -Mensaje original-
> De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> de Stacey
> Enviado el: Sábado, 05 de Mayo de 2007 09:33 a.m.
> Para: Cake PHP
> Asunto: Newbie, database and model relations?
>
> I'm having a bit of trouble figuring out how to set up my models &
> controllers with respect to my database. Here is a general overview of
> what I'm trying to accomplish.


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: About the cakephp ajax's problem, work well at firefox, but not at IE7

2007-05-05 Thread Marcus T. Jaschen

seedme wrote:
> Hi, Bernardo,
> Thanks for your reply.
> 
> I set the debugging level to 0, but I cannot get any warning messages.
> I don't know how to debug this problem at IE7.0.
> This works as expected when I use Firefox. but not use IE7.0

Try to debug it at the client side with Fiddler HTTP Proxy. It's an IE 
extension (google for it) and allows you to inspect HTTP requests and 
responses.

M.


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



wrong with class.paths.php

2007-05-05 Thread davyke

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /
home/www/chinoisdici/www/crystal/app/tmp/cache/persistent/
class.paths.php on line 12

sometimes, i have this problem, do someone know where is the problem


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Newbie, database and model relations?

2007-05-05 Thread Mariano Iglesias

http://manual.cakephp.org/chapter/models

There for a reason.

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Stacey
Enviado el: Sábado, 05 de Mayo de 2007 09:33 a.m.
Para: Cake PHP
Asunto: Newbie, database and model relations?

I'm having a bit of trouble figuring out how to set up my models &
controllers with respect to my database. Here is a general overview of
what I'm trying to accomplish.


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Newbie, database and model relations?

2007-05-05 Thread Stacey

Hi All,

I'm having a bit of trouble figuring out how to set up my models &
controllers with respect to my database. Here is a general overview of
what I'm trying to accomplish.

I have 2 main tables: conditions & remedies. remedies can belong to
several conditions, so i set up another table called
remedies_to_conditions. (Not sure if that's the best way to do it...I
saw an example like this online and it made sense)

My question is, how do I set up the relations in the models? Can I use
a $hasMany in my conditions model to point to remedies_to_conditions?
If so, do I need a controller & model for remedies_to_conditions even
though there is no actual view for this table? Basically, when my
users view a condition, I would like a list of the remedies associated
with that condition to show up.

Thanks in advance for any suggestions.

This is what the tables look like:

CREATE TABLE `conditions` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(64) NOT NULL,
  `description` text NOT NULL,
  `viewed` int(5) default '0',
  `created` datetime default NULL,
  `modified` datetime default NULL,
  PRIMARY KEY  (`id`),
  KEY `conditions_name` (`name`)
)

CREATE TABLE `remedies` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(64) NOT NULL,
  `description` text NOT NULL,
  `viewed` int(11) default '0',
  `created` datetime default NULL,
  `modified` datetime default NULL,
  PRIMARY KEY  (`id`),
  KEY `remedies_name` (`name`)
)

CREATE TABLE `remedies_to_condtions` (
  `remedy_id` int(11) NOT NULL,
  `condition_id` int(11) NOT NULL,
  PRIMARY KEY  (`remedy_id`,`condition_id`)
)


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New to cakePHP

2007-05-05 Thread whidbey

Hi,I have the same problem ,I use the lasted version of bakesale
,and the backend admin operation such as category have the same
problem.
I think there 2 reason ,database table not very well support such
as we put '' into int type.
the other is the last version of stable 's cakephp's problem.
did it support mysql5 in windows?
if you resolve it,mail me,thx.

[EMAIL PROTECTED] 写道:
> I've tried the same blog tutorial using both the stable and unstable
> version of CakePHP.  There has to be something I can do to figure out
> what the problem is.  I'm pretty sure I followed the tutorial step by
> step, but perhaps I need to run through it once more.


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How do I use i18n and l10n in CakePHP 1.2?

2007-05-05 Thread CraZyLeGs

you probably mean $_SESSION['Config']['language']

On May 4, 2:08 pm, misho <[EMAIL PROTECTED]> wrote:
> Well Yes,
> I do some checks on allowed languages, but I don't have a separate
> controller to deal with this.
> Just scan URL into function (in app_controller.php) and then redirect.
>
> And thank you I do not know that Configure::write('Config.language',
> 'en') and $_SESSION['Config.language'] are actually the same.
>
> On May 4, 2:35 pm, jitka <[EMAIL PROTECTED]> wrote:
>
> > - if You will store selected language in session, route url '/language/
> > *' to some controller->action and do 
> > $this->Session->write('Config.language', $arg); in it (probably with check 
> > if this
>
> > lng is allowed) - then redirect to referer
>
> > - if You will save Config.language in session, You don't have to use
> > Configure class (session takes precedency)
>
> > - /app/locale//LC_MESSAGES should be /app/locale//
> > LC_MESSAGES - see L10n::$__l10nMap (locale != language)


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: multi-page forms

2007-05-05 Thread CraZyLeGs

It's a bug in the component:
initWizard has default prefix set to _Wiz
function initWizard(& $ways, $prefix = "_Wiz")
While clearWizard ( and the methods it calls ) has _Wizard.
function clearWizard($prefix = "_Wizard")
function clearStep($prefix = "_Wizard")
function clearData($prefix = "_Wizard")

Change one of them.


On May 4, 1:41 pm, halebs <[EMAIL PROTECTED]> wrote:
> Anyone using the FormWizard component every have trouble with the
> wizard session vars NOT being cleared in the last step? I am doing a
> pr($SESSION) on pages after the form submission and I still see the
> _Wizard array set. I am clearing the related session vars manually by
> using $this->Session->delete(_WizData); in the last step, but not sure
> if that is necessary or a good practice.
>
> function recap()
> {
> // Save data to database
> if 
> ($this->SurveyPtsd->save($this->FormWizard->getWizardVars()))
> {
> $this->Session->delete(_WizData);
> $this->flash('Thank you for completing the 
> survey',"/surveys/");
> exit();
> }
> else
> {
> return false;
> }
> }
>
> Any assistance would be much appreciated.
>
> On Apr 21, 8:04 pm, Chris Lamb <[EMAIL PROTECTED]> wrote:
>
> > keymaster wrote:
> > > One has to first do a proper search for the solution.
>
> > One does not simply search into Mordor.
>
> > --
> >  Chris Lamb, Leamington Spa, UK  GPG: 0x634F9A20
>
> >  signature.asc
> > 1KDownload


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Strange behaviour when saving data

2007-05-05 Thread ifcanduela

Thanks Cheeze, I'll try that... on Monday :)

-If


--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---