Mdy date validation fails for Sep instead of Sept

2010-08-04 Thread Brenda
I have event_date in my model, with this validation rule:

'event_date' => array(
'rule' => array(
'date', array('Mdy')
),
'required' => true,
'allowEmpty' => false,
'message' => 'Please enter a valid date.'
)


Entering Sept 1, 2010 validates, but Sep 1, 2010 does not. Is that
correct behavior?

Thank you.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: render a different element for different user groups

2010-05-18 Thread Brenda
You can read the info you set during Auth in the view. In my case, I
have a variable Auth.User.is_admin, which I then read like this at the
top of the default layout, default.ctp

$isAdmin = $session->read('Auth.User.is_admin');

Then later in the view, I determine whether or not to show the admin
elements or just the user elements:

if ($isAdmin) {
echo $this->element(... admin version ...);
} else {
echo $this->element(... user version ...);
}

...Brenda




On May 18, 8:10 am, Ernesto  wrote:
> Hello.
>
> i have 3 elements "standard_leftbar", "admin_leftbar" and
> "customer_leftbar".
>
> is there any smart way to render one of those elements in my view,
> based on User's group_id, provided by the Auth component?
>
> sry for my bad english
>
> bye
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: "At least one related record" condition

2010-05-04 Thread Brenda
In your beforeSave for order, you can check that at least one item
exists.

Brenda

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Need AJAX to terminate and reload entire page

2010-03-26 Thread Brenda
Thanks again, Pablo. That worked.

For a brief moment, it displays my response message, and then reloads
the page. I suspect maybe I need to tweak the jQuery to get that to go
faster. I'm using ajaxForm from the jQuery form library.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Need AJAX to terminate and reload entire page

2010-03-26 Thread Brenda
Thank you, Pablo. I'll give that a try.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Need AJAX to terminate and reload entire page

2010-03-26 Thread Brenda
I'm using AJAX to update part of a page. On occasion, however, the
user may make a change that necessitates reloading the entire page,
not just the elements that are used with the AJAX call.

If I do a redirect in the controller, it reloads the entire page into
the ajax element. Is there a way in the controller to either force a
reload of the entire page, or to send an AJAX response back that would
do so?

Thank you very much for your help.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Adding a new counter cache

2010-03-16 Thread Brenda
Oh, just for grins, decided to try and automate this. I have a
Configurations controller where I do some admin stuff for the site,
and I added this function:

function counterCheck( )
{

$counterTemplate =
   "UPDATE :atable AS :amodel
   SET :counter = (
   SELECT COUNT(:model.id)
   FROM :table AS :model
   WHERE :model.:foreignkey = :amodel.id
)";

$updates = array();

$models = Configure::listObjects('model') ;

foreach ($models as $model) {
$this->loadModel($model);
$mainTable = Inflector::tableize($model);
if (!empty($this->$model->belongsTo)) {
foreach ($this->$model->belongsTo as $assocModel =>
$def) {
if (isset($def['counterCache']) &&
$def['counterCache']) {
$assocTable =
Inflector::tableize($def['className']);
$assocClass = $def['className'];
$foreignKey = $def['foreignKey'];
$counter = strtolower($model) . '_count';
$query = String::insert($counterTemplate,
array(
'table' => $mainTable,
'model' => $model,
'atable' => $assocTable,
'amodel' => $assocModel,
'foreignkey' => $foreignKey,
'counter' => $counter
));
$result = $this->Configuration->query($query);
$affectedRows = $this->Configuration-
>getAffectedRows();
$updates[] = array(
'query' => $query,
'affected_rows' => $affectedRows
);
}
}
}
}

$this->set('updates', $updates);

} // end function Counter checks


The associated view just dumps the results in a table to display.

Seems to work to update the counters. The affectedRows lets me know
how many rows had their values changed, meaning something went wrong
somewhere in the database. Or, as is more likely the case since I'm
still developing this, I need to update the counters because I'm still
mucking around in the database some.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Adding a new counter cache

2010-03-16 Thread Brenda
Thanks everyone. I'll go the SQL route. Just wanted to make sure I
wasn't missing something obvious!

...Brenda

On Mar 16, 4:28 am, WebbedIT  wrote:
> I would also run a SQl query direct on the database using phpMyAdmin
> or the CLI
>
> UPDATE model_a SET model_a.model_b_count = (SELECT COUNT(model_b.id)
> FROM model_b WHERE model_b.model_a_id = model_a.id)
>
> HTH
>
> Paul

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Adding a new counter cache

2010-03-15 Thread Brenda
I'm upgrading an existing model to include counters for some of the
hasMany relationships. They all start out as zero, even though there
are many hasMany records; each record gets updated once a save/delete
occurs.

Is there any way to tell Cake to go through and update all the
counters, so I can get correct initial values? Or should I just write
a SQL query to do it?

thanks...

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Containable not containing

2010-03-07 Thread Brenda
Cricket, you are absolutely brilliant! Sure enough, no task with id=2.
How I got an assignment in there without a valid task, I dunno, but
that's a problem for another day...

Thanks!

Brenda

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Containable not containing

2010-03-06 Thread Brenda
Hi Michael,

Thanks for looking at this. I've tried switching the order, to tasks
goes before events, but still no joy. I've even taken out all the
deeper contained data, and it still won't find anything. Maybe
something is going wrong with 'recursive', but I thought that wasn't
used with 'contain.'

BTW, I forgot to mention that tasks actsAs 'tree' as well as
'containable'.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Containable not containing

2010-03-06 Thread Brenda
I've been scratching my head for hours and can't figure out why this
doesn't work. Any help would be appreciated.

Projects hasMany Tasks
Projects hasMany Events

Projects belongsTo ProjectStatus

Tasks hasMany TaskVendors
Events hasMany EventVendors

TaskVendors belongsTo Vendors
EventVendors belongsTo Vendors

Tasks belongsTo TaskStatus
Events belongsTo EventStatus

I have two finds happening in the Vendor model:

   $events = $this->EventVendor->find('all', array(
'conditions' => array(
'EventVendor.vendor_id' => $vendorId
),
'contain' => array(
'Event' => array(
'id', 'event', 'project_id', 'event_date',
'Project' => array(
'project', 'ProjectStatus.project_status'
)
)
)
));

and

$tasks = $this->TaskVendor->find('all', array(
'conditions' => array(
'TaskVendor.vendor_id' => $vendorId
),
'contain' => array(
 'Task' => array(
 'id', 'task', 'project_id', 'due_date',
 'TaskStatus' => array(
 'task_status'
 ),
 'Project' => array(
 'project', 'ProjectStatus.project_status'
 )
 )
 )
 ));

The events one is working properly and returns something like

 [0] => Array
(
[EventVendor] => Array
(
[id] => 5
[event_id] => 11
[vendor_id] => 1
[label] => mover
[notes] =>
)

[Event] => Array
(
[id] => 11
[event] => Pack Day
[project_id] => 11
[event_date] => Feb 25, 2010
[Project] => Array
(
[project] => OakCrest-123
[project_status_id] => 1
[ProjectStatus] => Array
(
[project_status] => Active
)

)

)

)

[1] => Array
(
[EventVendor] => Array
(
[id] => 7
[event_id] => 12
[vendor_id] => 1
[label] => mover
[notes] =>
)

[Event] => Array
(
[id] => 12
[event] => Move (full day)
[project_id] => 11
[event_date] => Feb 26, 2010
[Project] => Array
(
[project] => OakCrest-123
[project_status_id] => 1
[ProjectStatus] => Array
(
[project_status] => Active
)

)

)

)

but the tasks one isn't returning the deeper associations:

 [0] => Array
(
[TaskVendor] => Array
(
[id] => 10
[task_id] => 2
[vendor_id] => 1
[label] => Mover
[notes] =>
)

[Task] => Array
(
[id] =>
[task] =>
[project_id] =>
[due_date] =>
)

)

[1] => Array
(
[TaskVendor] => Array
(
[id] => 12
[task_id] => 1
[vendor_id] => 1
[label] => mover
[notes] =>
)

[Task] => Array
(
[id] =>
[task] =>
[project_id] =>
[due_date] =>
)

)


Any clue why, or where I should look?

Thank you very much.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Cookbook homepage hangs in FF on Mac

2009-11-15 Thread Brenda
Is anyone else having this problem? When I go to http://book.cakephp.org
using FF (currently 3.5.5 on Mac OS 10.5), it frequently hangs. I can
get to interior pages of the cookbook if I type the address directly
or follow a link. But the main page just sits there loading forever...

I've had this problem in my own applications sometimes where a header
("Location...") is not followed by an exit(). Perhaps that is the case
here?

It works fine in Safari and on my Windows browsers.

...Brenda

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=.




Re: CakeFest IV - America - Help us pick a location!

2009-11-13 Thread Brenda
USA East Coast ... Washington DC!

...Brenda

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=.




Re: What hosting service do you use?

2009-04-13 Thread Brenda Egeland

> Query: SELECT `Aco`.`id`, `Aco`.`parent_id`, `Aco`.`model`,
> `Aco`.`foreign_key`, `Aco`.`alias` FROM `acos` AS `Aco` LEFT JOIN `acos` AS
> `Aco0` ON (`Aco0`.`alias` = 'controllers').

I don't use ACL, so this may be just ignorant me, but that join looks
a little strange ... what are you joining to in the Aco table? Seems
like you only reference something from Aco0?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: What hosting service do you use?

2009-04-13 Thread Brenda Egeland

On Mar 9, 8:41 pm, "Dave Maharaj :: WidePixels.com"
 wrote:
> What has happened is I built the site on my local WAMP server setup, it runs
> perfect.

There are differences between WAMP and LAMP (assuming you're on Linux/
Apache hosting). The one that always gets me is case sensitivity.
Things that work fine in WAMP mysteriously don't in LAMP, and it turns
out to be a case issue. It can occur in both filenames and database
items (table names, field names).
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Help with website architecture...

2009-01-23 Thread Brenda

How about http://onsale.example.com rather than http://cake.example.com/onsale
? Would seem to make more sense.

I'm working on a new version of a site in cake, and I've put the new
cake stuff of http://beta.mysite.com.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Passing email elements to Email component

2009-01-10 Thread Brenda

 Yes. In views->elements->email->text->default.ctp I have








There's also an html version.

There's also a layout file in views->layouts->email->text->default.ctp
that contains $content_for_layout.

None of these have changed since 1.2RC3, when everything worked fine.

Thank you for you help.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Passing email elements to Email component

2009-01-09 Thread Brenda

I posted this problem in an earlier message but I don't think I
explained well, so let me try again:

I have an email template that uses the email element 'messageText'.
Usually, according to cookbook, you set this in the controller as:

$this->set('messageText',$messageText);

and then call the Email component to send the message.

I have written my own component that sets up alot of the boilerplate
in the email component since I use the same settings from several
controllers, so my controllers call my component, MyEmailComponent,
and then my component in turn calls the cakephp Email component.

This worked fine in 1.2 RC3.

I just upgraded to 1.2 final and it seems that the Email component
can't find 'messageText'. Is there a problem with a component calling
a component? Does that confuse what got set in the controller?

I tried re-writing so that my component would take $messageText as a
passed in value, but it didn't work to do $this->set('messageText',
$messageText) within my component, either.

Alternatively, is there a way to set the email elements other than
using $this->set?

thanks,

Brenda
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: File component?

2009-01-08 Thread Brenda

Thanks, I got that to work by doing the App:import and then creating
instances of the file object for each file I needed to delete.

I wonder why file isn't included in the cookbook?


--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with email component after upgrade to 1.2 final

2009-01-08 Thread Brenda

H... I don't have any $controller to change to $this->controller.
I tried adding the code for startup, and that didn't seem to make a
difference. I'm not really clear on what that would do?

I've tracked this down a little bit more, and it seems the problem is
with the email elements. I set them in the controller, like this:

$this->set('messageText','A new message is waiting for you on the
MySite.com website. Log into the member area to view your
messages.');

The email template uses $messageText, but it seems not to exist and
that is what generates the error.

This worked fine in RC3... I wonder what changed?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problem with email component after upgrade to 1.2 final

2009-01-08 Thread Brenda

I just upgraded from RC3 to 1.2 final, and I'm getting errors when
sending email.

I have my own component:

class MyEmailComponent extends Object {

var $components = array ('Email');

function sendEmail($to,$subject=null) {
// The calling controller must first set:
// messageText
// messageHTML (if blank, messageText is used)
// msgTitle (optional)
// subtitle (optional)

if (!$subject) {
$subject = 'A Message from MySite.com';
}

$this->Email->to = $to;
$this->Email->subject = $subject;
// $this->Email->replyTo = 'webs...@mysite.com';
$this->Email->from = 'webs...@mysite.com';
$this->Email->layout = 'default';
$this->Email->template = 'default'; // note no '.ctp'
// Send as 'html', 'text' or 'both' (default is 'text')
$this->Email->sendAs = 'both'; // because we like to send pretty
mail

// Do not pass any args to send()
if ($this->Email->send()) {
return true;
} else {
return false;
}


}

}




It is called from a function inside a controller:

function _notify($message_id) {
// Send email notification of private message
$to = $this->PrivateMessage->getRecipientEmail($message_id);
$subject = 'You have a message on the MySite.com website';
$this->set('title','A New Private Message is waiting for you on 
the
MySite.com website');
$this->set('messageText','A new message is waiting for you on 
the
MySite.com website. Log into the member area to view your messages.');
$this->set('messageHTML','A new message is waiting for you 
on the
http://MySite.com/privateMessages/";>MySite.com
website.');


if ($this->MyEmail->sendEmail($to,$subject) ) {
return true;
} else {
return false;
}


}



It generates these messages:

Notice (8): Undefined property: EmailComponent::$Controller [CORE\cake
\libs\controller\components\email.php, line 352]

Notice (8): Trying to get property of non-object [CORE\cake\libs
\controller\components\email.php, line 352]

Notice (8): Undefined property: EmailComponent::$Controller [CORE\cake
\libs\controller\components\email.php, line 359]
Notice (8): Trying to get property of non-object [CORE\cake\libs
\controller\components\email.php, line 359]


Notice (8): Undefined property: View::$webroot [CORE\cake\libs\view
\view.php, line 751]

Warning (2): Cannot modify header information - headers already sent
by (output started at D:\cakephp\cake\libs\debugger.php:521) [CORE\cake
\libs\controller\controller.php, line 615]


The email is sent, but it has a error message rather than the message
text.


Any suggestions as to where to look for what went wrong?

Thank you so much for your help.

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



File component?

2009-01-07 Thread Brenda

In another post I saw this link to a File component:
http://api.cakephp.org/class_file.html

But I don't see it referenced in the cookbook or the main API
documentation.

Does it still exist? And if so, are there examples on how to use it?

Specifically, I need to delete a file.

thanks,

Brenda
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to upgrade to a new release?

2009-01-07 Thread Brenda

Oh my, now I'll really look stupid, but how do I 'run it against the
latest svn'?

...Brenda
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to upgrade to a new release?

2009-01-06 Thread Brenda

So just the cake folder... I don't have to update anything in my apps
folder, or docs, or vendors? (I'm haven't changed anything in docs or
vendors).

On Jan 6, 9:40 pm, teknoid  wrote:
> All you have to do is replace your 'cake' core dir.
> There aren't any major changes between RC3 and RC4.
> ... All that being said you should upgrade (again by simply replacing
> the cake dir) from RC3 directly to 1.2 Final, without any problems.
>

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to specify bind condition?

2009-01-06 Thread Brenda

Have you tried using containable? It makes it much easier than binding
and unbinding all over the place.

http://book.cakephp.org/view/474/Containable


--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How to upgrade to a new release?

2009-01-06 Thread Brenda

I'm working on my first Cake project. I started with 1.2 RC3, and now
I'd like to upgrade to 1.2 RC4. Can someone point me to some
instructions? I wasn't able to find anything in the cookbook, though
perhaps I wasn't looking in the right place.

Thank you for your help.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Can a webpage tell the source IP of a message? (no-ip.com like appliction)

2009-01-06 Thread Brenda

And some people use privacy software to block their IP, in which case
REMOTE_ADDR shows up blank. If I use it in an application, I also make
sure it is not a required piece of information.

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Difference between read and find

2008-11-06 Thread Brenda

I had a problem recently where my validation errors weren't showing up
in a form. Turns out I was using to read() to get some related data to
display, and that wiped out the validation results from the form
submission. Changing it to find() left the validation results in place.
--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Form validation errors not showing up

2008-11-05 Thread Brenda

Just in case it helps someone else...

Elsewhere in the reply function of my controller I was retrieving some
data that needed to be displayed in the form. I was using $this-
>PrivateMessage->read(...) when I should have been using a find.
Apparently the read function blanked out the error messages from the
form validation.
--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Form validation errors not showing up

2008-11-04 Thread Brenda

I have a form that won't save data because of a validation error, but
the validation errors are not appearing in the form. The flash message
that the data could not be saved appears, but not the individual error
messages. I think I've got everything set up the same way that I did
for another form that is working correctly, but obviously missing
something.

The Model:

class PrivateMessage extends AppModel {

var $name = 'PrivateMessage';

/* Validations */
   var $validate = array(
'subject' => array(
'rule' => array('minLength', '1'),
'required' => true,
'allowEmpty' => false,
'message' => 'Please provide a subject.'
),
'message' => array(
'rule' => array('minLength', '1'),
'required' => true,
'allowEmpty' => false,
'message' => 'Please write a message.'
)
);

Part of the controller:

function reply($to=null,$reply_to=null,$message_type='reply') {
// reply_to is the id of the message being replied to

// if $this->data is not empty, write the message to the 
database
and redirect
if (!empty($this->data)) {
$this->PrivateMessage->create();
// The message will be from the current member
$this->data['PrivateMessage']['from_member_id'] = 
$this->Session-
>read('Auth.Member.id');
if ($this->PrivateMessage->save($this->data)) {
$this->Session->setFlash(__('Your message has 
been sent.', true));
$this->redirect(array('action'=>'index'));
} else {
pr($this->data); // this is showing that the 
data has a blank
subject
$this->Session->setFlash(__('Your message could 
not be sent.
Please, try again.', true));
}
}



}


Part of the view (reply.ctp):



create('PrivateMessage', array('action' =>
'reply'));?>
flash(); ?>


hidden('to_member_id',array('value'=>$to));
echo $form->hidden('is_reply_to_message_id',array('value'=>
$reply_to));
echo $form->input('subject',array('value'=>$subject));
echo $form->input('message');

?>

end('Send message');?>



pr($form);
?>



The pr($form) in the view shows no validation errors, but the form
does not save (correctly) when I leave the subject or message blank.

Any help or suggestions on where to look for more help would be much
appreciated.

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



Model design question

2008-10-26 Thread Brenda

I'm working on designing a shop of sorts. It sells widgets and
gadgets. Widgets have different sizes and colors; gadgets have
different weights. The price varies on the attributes. There may be
many, many different widgets and gadgets, that are uploaded by a
variety of sellers, but the only thing that affects price is size/
color for the widgets and weight for the gadgets. The sellers do not
have a choice about price; it is solely determined by the attributes
at the time the item is uploaded. At some point in the future,
additional attributes may be added (perhaps gadgets will get a height
attribute).

I need a table that says what the price is based on the attributes. It
seems like a tree would be a good choice:

Widget
-- Large
-- -- Green : $6
-- -- Blue: $8
-- Small
-- -- Green: $2
-- -- Red: $3
Gadget
-- Heavy: $10
-- Light: $5

The shop administrator will have the ability to change the values in
the tree, and add new branches, but any items already uploaded will
retain the price they were assigned at the time they were uploaded.

I will also have a table for items, which will hold the information
about each item for sale that the seller uploads. I can see how I
could determine the price using the info from the tree. But I also
need to be able to search for items based on attributes. Should I
store those in the table somehow? Or create a HABTM table with the
various attributes? Or perhaps referencing the node in the price tree
could somehow yield the info I need to search?

Thank you so much for your help.
--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Model design question

2008-10-26 Thread Brenda

I'm working on designing a shop of sorts. It sells widgets and
gadgets. Widgets have different sizes and colors; gadgets have
different weights. The price varies on the attributes. There may be
many, many different widgets and gadgets, but the only thing that
affects price is size/color or weight. At some point in the future,
additional attributes may be added (perhaps gadgets will get a height
attribute).

I need a table that says what the price is based on the attributes. It
seems like a tree would be a good choice:
Widget


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



Re: BakeSale ... website gone?

2008-10-26 Thread Brenda

Thank you, all. I will look at phpShop as well.
--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



BakeSale ... website gone?

2008-10-26 Thread Brenda

I'm starting to explore some e-commerce apps to use with Cake.
Bakesale is frequently mentioned, but it seems their website has
disappeared, http://www.bakesalehq.com. Do you think that is
temporary, or is BakeSale going away?

Would you consider BakeSale a robust project that you could count on
to continue to evolve as Cake evolves?

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



Re: Is the cookbook broken, or is it just me?

2008-10-25 Thread Brenda

Thank you so much. Your efforts on a Saturday night are much
appreciated! May the rest of your evening be peaceful.

On Oct 25, 6:33 pm, Gwoo <[EMAIL PROTECTED]> wrote:
> We are working on fix. Should be back up soon.

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



Is the cookbook broken, or is it just me?

2008-10-25 Thread Brenda

I'm trying to access the cookbook at http://book.cakephp.org/, but all
I see is a bunch of 'This section is yet to be written.' It worked
fine last night. Perhaps someone is working on it, or is it just me?

Thank you for your help.

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



Re: php errors in cake/libs/model/model_php5.php

2006-04-23 Thread Brenda

On 24/04/06, nate <[EMAIL PROTECTED]> wrote:
>
> The model class should be "Microsite", not "microsite".  See here:
> http://manual.cakephp.org/pages/apb
>
> If it still doesn't work, there's probably a problem with your database
> connection, since it looks like Cake is unable to get the list of
> database tables.

I've traced to problem through to
cake/libs/model/dbo/dbo_postgres.php
(with Patrick Li's help)

there's a line:
 $sql = "SELECT table_name as name FROM information_schema.tables
WHERE table_schema = 'public';";

and when none are found, the function returns null;

I changed that to return an empty array, so as not to create php array
errors anymore.

And then... i dropped my database, and gave my cake postgresql user
permission to create databases, recreated the database, and then
revoked the permissions from the cake user..

that still leaves the cake user with more permissions than you'd want
a web application to have, but it gets past all them errors for now.
(i'm paranoid)

now, back to "rapid" development...

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---