Re: Editing/Saving to another table, HABTM: belongsTo

2008-01-02 Thread Louie Miranda

Just to make things clearer, posted my code at:
http://bin.cakephp.org/saved/26686

On Dec 28 2007, 12:50 pm, "Louie Miranda" <[EMAIL PROTECTED]> wrote:
> I have two sql tables:
> 1. auth_users - primary_key: auth_user_id
> 2. profiles - association field: auth_user_id
>
> means of HABTM, belongsTo.
>
> I was able to view and display data on my view.
>
> But, editing and saving is a little different to me. I don't know how to
> proceed.
>
> Here's my edit function..
>
> function edit($id = null) {
>
>
>
> > if (!$id && empty($this->data)) {
> > $this->Session->setFlash('Invalid Profile');
> > $this->redirect(array('action'=>'index'), null, true);
> > }
> > if (!empty($this->data)) {
> > $this->cleanUpFields();
> > if ($this->Profile->save($this->data)) {
> > $this->Session->setFlash('The Profile has been saved');
> > $this->redirect($this->referer());
> > } else {
> > $this->Session->setFlash('The Profile could not be saved.
> > Please, try again.');
> > }
> > }
> > if (empty($this->data)) {
> > $this->data = $this->Profile->read(null, $id);
> > }
> > }
>
> Let say, on user table i have a password field and on the profile name.
>
> How could i save password and name on two different field?
>
> --
> Louie Miranda ([EMAIL PROTECTED])http://www.axishift.com
>
> Security Is A Series Of Well-Defined Steps
> chmod -R 0 / ; and smile :)
--~--~-~--~~~---~--~~
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: bug for find('All'

2008-01-02 Thread Adam Royle

$this->Tag->findAll( array('nombre' => 'LIKE
%'.strtolower($tag).'%') );

On Jan 3, 12:51 pm, stefano <[EMAIL PROTECTED]> wrote:
> i think that i found a bug en find('All'.
>
> i have this source
>
> echo $tag;
> $res = $this->Tag->find('All',array('conditions' => array('nombre' =>
> "%".strtolower($tag)))."%");
>
> and i get this error
>
> musica
>
> Query: SELECT `Tag`.`Array%` FROM `tags` AS `Tag` WHERE All LIMIT 1
>
> any idea ?
> how can help me is a bug or my mistake ?
>
> thanks :D
--~--~-~--~~~---~--~~
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: Require SSL for entire site?

2008-01-02 Thread Bryan Encina



On Dec 31 2007, 10:05 am, Robby Anderson <[EMAIL PROTECTED]>
wrote:
> In 1.2 at least (and quickly checking the 1.1 API, it is indeed a 1.2
> only feature), you can use the Security component's requireSecure()
> method to list controller methods that must be using SSL, and then use
> the blackHoleCallback property to set a method to call if the
> requireSecure() fails.
>
> function beforeFilter() {
>
>   // We could list specific methods instead by
>   // passing an array of the desired method names
>   $this->Security->requireSecure();
>
>   // If requireSecure() fails, call $this->_blackHole()
>   $this->Security->blackHoleCallback = '_blackHole';
>
> }
>
> I'm still trying to find a way to make the various link() and url()
> functions all explicitly https (with the full path) to correspond with
> using the requireSecure() method.

Thanks all for the replies.  I did not actually see any responses to
this thread as for some reason my gmail account was removed from
google groups and I just happened to search and saw my own thread.
This sounds exactly like what I need.
Regards,

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



Lyricsfly releases API to their database

2008-01-02 Thread rblask

In case anyone is interested:
http://lyricsfly.com/api/

--~--~-~--~~~---~--~~
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: 1.2 generateList replacement troubles...

2008-01-02 Thread Emmanuel



On 2 jan, 22:27, Baz <[EMAIL PROTECTED]> wrote:
> Register:https://trac.cakephp.org/register
>
> Login, then new ticket:https://trac.cakephp.org/newticket
>

great, thank you, reported as #3805
https://trac.cakephp.org/ticket/3805
(woah my first contribution in an opensource project ;-) )

--~--~-~--~~~---~--~~
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: Table already exist

2008-01-02 Thread [EMAIL PROTECTED]

Are you using alter_table instead of create_table in 002?

On Jan 2, 10:01 am, roryy <[EMAIL PROTECTED]> wrote:
> Hi i have a question about the migrate tool of Joel Moss.
>
> When I want to migrate (example 001_users.yml first and then 002_users.yml)
> then the script is migrating 001 succesfully but 002 gives a error: Table
> `users` already exists. Does someone know how I can avoid that problem?
>
> Thanks in advance :)
> --
> View this message in 
> context:http://www.nabble.com/-Migration--Table-already-exist-tp14579001p1457...
> Sent from the CakePHP mailing list archive at Nabble.com.

--~--~-~--~~~---~--~~
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: 1.2 generateList replacement troubles...

2008-01-02 Thread Baz
Ticket fixed:
https://trac.cakephp.org/ticket/3805

Now wasn't that easy?

On Jan 2, 2008 3:27 PM, Baz <[EMAIL PROTECTED]> wrote:

> Register:
> https://trac.cakephp.org/register
>
> Login, then new ticket:
> https://trac.cakephp.org/newticket
>
>
> On Jan 2, 2008 3:07 PM, Emmanuel <[EMAIL PROTECTED]> wrote:
>
> >
> > On 2 jan, 19:34, nate <[EMAIL PROTECTED]> wrote:
> > > No, it's not a bug.  I returned find('list') to the simple method that
> > > generateList() was originally.
> >
> > ok, I understand.
> >
> > > To get i18n working, you probably have
> > > to manually set the recursion level, i.e. find('list',
> > > array('recursive' => 1)).
> >
> > No, it does not work, and it can be called "a bug" :-) I don't know
> > exactly where  to report it or how to fix it, so I will explain here :
> >
> > I have a table of countries, with an id, and the name is in the table
> > i18n
> > this way of generating a list works:
> > $A1=$this->Country->findAll();
> > $A2=Set::combine($A1,"{n}.Country.id","{n}.Country.name");
> >
> > this way does not
> > $B=$this->Country->find('list');
> >
> > Why ?
> > I have checked the find function in /cake/libs/model/model.php
> > it is used for find ('list') and for find ('all').
> > find ('all') works because it use $this->__filterResults, and so $A1
> > contains a clean array (see just below) that can be used in
> > Set::combine with "{n}.Country.name"
> >
> > Array
> > (
> >[0] => Array
> >(
> >[Country] => Array
> >(
> >[id] => 1
> >[locale] => eng
> >[name] => France
> >)
> >
> >)
> > )
> >
> > In the second case, if you look *in* the find function, the "list"
> > case returns this:
> >  return Set::combine($results, $keyPath, $valuePath);
> >
> > BUT $results is not clean (see below, it's not filtered), while
> > $valuePath is generated automatically with $this->displayField and
> > contains "{n}.Country.name"
> > so the function does not return something
> >
> > Array
> > (
> >[0] => Array
> >(
> >[Country] => Array
> >(
> >[id] => 1
> >)
> >[I18n__name] => Array
> >(
> >[content] => France
> >)
> >
> >)
> > )
> >
> > I don't know how to fix this nicely, so if someone can work in the
> > svn, or tell me how to report this elsewhere ... thx :)
> > Manu
> >
> > > >
> >
>

--~--~-~--~~~---~--~~
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: bug for find('All'

2008-01-02 Thread Baz
Report all bugs to trac.cakephp.org

trust me, it's much better and faster. It goes straight to the developers.

On Jan 2, 2008 8:51 PM, stefano <[EMAIL PROTECTED]> wrote:

>
> i think that i found a bug en find('All'.
>
> i have this source
>
> echo $tag;
> $res = $this->Tag->find('All',array('conditions' => array('nombre' =>
> "%".strtolower($tag)))."%");
>
>
> and i get this error
>
> musica
>
> Query: SELECT `Tag`.`Array%` FROM `tags` AS `Tag` WHERE All LIMIT 1
>
> any idea ?
> how can help me is a bug or my mistake ?
>
> thanks :D
> >
>

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



bug for find('All'

2008-01-02 Thread stefano

i think that i found a bug en find('All'.

i have this source

echo $tag;
$res = $this->Tag->find('All',array('conditions' => array('nombre' =>
"%".strtolower($tag)))."%");


and i get this error

musica

Query: SELECT `Tag`.`Array%` FROM `tags` AS `Tag` WHERE All LIMIT 1

any idea ?
how can help me is a bug or my mistake ?

thanks :D
--~--~-~--~~~---~--~~
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: Is there a cache in cakephp?

2008-01-02 Thread Sam Sherlock
Hi
http://manual.cakephp.org/chapter/view_cache

though this might have changed in 1.2, that part of the tempdocs for 1.2 has
yet to be added (afaik)

- S

On 02/01/2008, Alfredo <[EMAIL PROTECTED]> wrote:
>
>
>
>
> I know cake uses caching for the DB, but is there a cache I can use
> like:
>
> if ($this->cache->notContains('something')){
>
>   $temp= onlyCallThisMethodOnce();
>   $this->cache->put('something', $temp);
>
> }else{
>   $temp=($this->cache->get('something');
> }
>
>
>
> In case there isn't one, can you recomend one that works fine with the
> framework pls?
>
> Thanks in advance!
>
> >
>

--~--~-~--~~~---~--~~
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: 1.2 generateList replacement troubles...

2008-01-02 Thread Baz
Register:
https://trac.cakephp.org/register

Login, then new ticket:
https://trac.cakephp.org/newticket

On Jan 2, 2008 3:07 PM, Emmanuel <[EMAIL PROTECTED]> wrote:

>
> On 2 jan, 19:34, nate <[EMAIL PROTECTED]> wrote:
> > No, it's not a bug.  I returned find('list') to the simple method that
> > generateList() was originally.
>
> ok, I understand.
>
> > To get i18n working, you probably have
> > to manually set the recursion level, i.e. find('list',
> > array('recursive' => 1)).
>
> No, it does not work, and it can be called "a bug" :-) I don't know
> exactly where  to report it or how to fix it, so I will explain here :
>
> I have a table of countries, with an id, and the name is in the table
> i18n
> this way of generating a list works:
> $A1=$this->Country->findAll();
> $A2=Set::combine($A1,"{n}.Country.id","{n}.Country.name");
>
> this way does not
> $B=$this->Country->find('list');
>
> Why ?
> I have checked the find function in /cake/libs/model/model.php
> it is used for find ('list') and for find ('all').
> find ('all') works because it use $this->__filterResults, and so $A1
> contains a clean array (see just below) that can be used in
> Set::combine with "{n}.Country.name"
>
> Array
> (
>[0] => Array
>(
>[Country] => Array
>(
>[id] => 1
>[locale] => eng
>[name] => France
>)
>
>)
> )
>
> In the second case, if you look *in* the find function, the "list"
> case returns this:
>  return Set::combine($results, $keyPath, $valuePath);
>
> BUT $results is not clean (see below, it's not filtered), while
> $valuePath is generated automatically with $this->displayField and
> contains "{n}.Country.name"
> so the function does not return something
>
> Array
> (
>[0] => Array
>(
>[Country] => Array
>(
>[id] => 1
>)
>[I18n__name] => Array
>(
>[content] => France
>)
>
>)
> )
>
> I don't know how to fix this nicely, so if someone can work in the
> svn, or tell me how to report this elsewhere ... thx :)
> Manu
>
> >
>

--~--~-~--~~~---~--~~
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: 1.2 generateList replacement troubles...

2008-01-02 Thread Emmanuel

On 2 jan, 19:34, nate <[EMAIL PROTECTED]> wrote:
> No, it's not a bug.  I returned find('list') to the simple method that
> generateList() was originally.

ok, I understand.

> To get i18n working, you probably have
> to manually set the recursion level, i.e. find('list',
> array('recursive' => 1)).

No, it does not work, and it can be called "a bug" :-) I don't know
exactly where  to report it or how to fix it, so I will explain here :

I have a table of countries, with an id, and the name is in the table
i18n
this way of generating a list works:
$A1=$this->Country->findAll();
$A2=Set::combine($A1,"{n}.Country.id","{n}.Country.name");

this way does not
$B=$this->Country->find('list');

Why ?
I have checked the find function in /cake/libs/model/model.php
it is used for find ('list') and for find ('all').
find ('all') works because it use $this->__filterResults, and so $A1
contains a clean array (see just below) that can be used in
Set::combine with "{n}.Country.name"

Array
(
[0] => Array
(
[Country] => Array
(
[id] => 1
[locale] => eng
[name] => France
)

)
)

In the second case, if you look *in* the find function, the "list"
case returns this:
  return Set::combine($results, $keyPath, $valuePath);

BUT $results is not clean (see below, it's not filtered), while
$valuePath is generated automatically with $this->displayField and
contains "{n}.Country.name"
so the function does not return something

Array
(
[0] => Array
(
[Country] => Array
(
[id] => 1
)
[I18n__name] => Array
(
[content] => France
)

)
)

I don't know how to fix this nicely, so if someone can work in the
svn, or tell me how to report this elsewhere ... thx :)
Manu

--~--~-~--~~~---~--~~
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: .htaccess password in CAKE

2008-01-02 Thread Mazgalici

Thanks adica Multumesc :D


On 26 Noi 2007, 21:39, Dragos Chiriac <[EMAIL PROTECTED]> wrote:
> Mazgalici wrote:
> > Does anybody know how to put a passoword on .htaccess file for a
> > direcory for examplehttp://localhost/admin?
>
> > Thanks
>
> Hi, though it seems a stupid question it is not, and you'll see why :
>
> Part one, preety straight forward :
>
> Put a .htaccess in the dir you want to protect
>
> AuthUserFile /my/passwd/file
> AuthName "Title"
> AuthType Basic
> Require valid-user
>
> /my/passwd/file is created with the following command :
> htpasswd -c /my/passwd/file bob
>
> PS: Does not really have much to do with cake.
>
> Part 2
>
> /admin (as cake uses rewrites) is not actually a directory. So then you have 
> a problem :)
> Solvable though , putting in the docroot a htaccess with something like :
>
> 
>   AuthType Basic
>   AuthName "Title"
>   AuthUserFile /my/passwd/file
>   Require valid-user
> 
>
> Of course if you need to match a regexp :
>
> 
>   AuthType Basic
>   AuthName "Title"
>   AuthUserFile /my/passwd/file
>   Require valid-user
> 
>
> Hopefully it works, most is from memory, I think I installed to many TRACs 
> lately.
>
> This part have something tangential with cake anyway.
>
> And if we are so offtopic, in my language Mazgalici means "the ones that 
> smears/scribbles" :).
>
> Kind regards,
> D
--~--~-~--~~~---~--~~
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: Cake 1.2 Console - Missing Shells

2008-01-02 Thread Cake Fan

This screencast helped me a lot: 
http://cakephp.org/screencasts/view/6?detectqt=false&;

I had two problems:

1) In my environment path (windows), I had a trailing slash (a big no
no).  I knew that wouldn't work, but didn't know the slash was in
there until I went and looked again.  Make sure to leave off trailing
slashes!

2) By navigating to the app folder I was wanting to use and calling
"cake" there, I was able to successfully execute my "Raw" script.  You
have to navigate to the app folder manually, then call cake as the
screencast shows.

I guess I solved my own problem didn't I?

- Cake Fan





On Jan 2, 11:43 am, Cake Fan <[EMAIL PROTECTED]> wrote:
> I also forgot to mention that if I place the "raw" shell script into
> my vendors folder above the app folder, it does show up... but my
> models are unavailable at that level.
>
> How can I place the raw shell script inside my app folder and actually
> have it show up when looking at the console.
>
> I truly think it has something to do with the -app specifier, but it's
> unclear to me how to use it properly.
>
> Thanks for any help in advance!
>
> - Cake Fan
--~--~-~--~~~---~--~~
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: 1.2 generateList replacement troubles...

2008-01-02 Thread camel

I suppose 'fields' shoud be an array if you're trying to get more of
them
like:

$subdivisions = $this->Listing->find('list', array('fields'=>
array( 'Listing.subdivision, Listing.subdivision'),
'order'=>'Listing.subdivision ASC')
);

I've just tried this:

 $this->UserGroup->find('list',
__ array(
___'fields' => array('UserGroup.id', 'UserGroup.name'),
___'order'=>'UserGroup.name ASC'
));


and it works fine.

--~--~-~--~~~---~--~~
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: 1.2 generateList replacement troubles...

2008-01-02 Thread nate

No, it's not a bug.  I returned find('list') to the simple method that
generateList() was originally.  To get i18n working, you probably have
to manually set the recursion level, i.e. find('list',
array('recursive' => 1)).

On Jan 2, 11:59 am, Emmanuel <[EMAIL PROTECTED]> wrote:
> On 2 jan, 16:54, chad <[EMAIL PROTECTED]> wrote:
>
> > //new way of doing the above (does not work... note: subdivision is
> > not a primaryKey)
> > $subdivisions = $this->Listing->find('list', array('fields'=>
> > 'Listing.subdivision, Listing.subdivision',
> > 'order'=>'Listing.subdivision ASC'));
>
> Hello
> i am right looking at the code, and I confirm this, it must be a bug.
> In the class (model.php), the Set::combine do not use the array
> "fields" passed in parameters.
>
> I found another bug, but i don't know how to report it. find('list')
> do not work with i18n!
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



CakeFest website Launched

2008-01-02 Thread Mariano Iglesias
My fellow bakers,

 

The Cake team would like to announce that the CakeFest website (related to
the first official CakePHP gathering) is now available at:

 

http://www.cakefest.org  

 

Go there to find out about CakeFest and sign up for updates. You can also
become a sponsor or submit a speaker proposal.

 

See you at CakeFest!

 

-MI


--~--~-~--~~~---~--~~
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: Cake 1.2 Console - Missing Shells

2008-01-02 Thread Cake Fan

I also forgot to mention that if I place the "raw" shell script into
my vendors folder above the app folder, it does show up... but my
models are unavailable at that level.

How can I place the raw shell script inside my app folder and actually
have it show up when looking at the console.

I truly think it has something to do with the -app specifier, but it's
unclear to me how to use it properly.

Thanks for any help in advance!

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



UPDATED

2008-01-02 Thread Cake Fan

I also forgot to mention that if I place the "raw" shell script into
my vendors folder above the app folder, it does show up... but my
models are unavailable at that level.

How can I place the raw shell script inside my app folder and actually
have it show up when looking at the console.

I truly think it has something to do with the -app specifier, but it's
unclear to me how to use it properly.

Thanks for any help in advance!

- Cake Fan
--~--~-~--~~~---~--~~
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: bakery hates me

2008-01-02 Thread Chris Hartjes

On Jan 2, 2008 12:27 PM, dr. Hannibal Lecter <[EMAIL PROTECTED]> wrote:
>
> I don't think posting links to Trac solves anything, it is a fact that
> bakery has many issues (some minor and some..not so minor).
>
> Some things should be seriously reconsidered and rewritten. But that's
> just my 2c.
>

I agree, but unless people post tickets to trac specifically outlining
the problems they were having, it remains unlikely that  the problem
will be addressed.  That's just the reality of how bugs are handled
for this project.

-- 
Chris Hartjes

My motto for 2007:  "Moving from herding elephants to handling snakes."

@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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: 1.2 generateList replacement troubles...

2008-01-02 Thread chad

find('list') only seems to work when using a primaryKey field. Is that
intended? either way, I used the work around above and it works fine.

On Jan 2, 12:09 pm, AD7six <[EMAIL PROTECTED]> wrote:
> On Jan 2, 5:59 pm, Emmanuel <[EMAIL PROTECTED]> wrote:
>
> > On 2 jan, 16:54, chad <[EMAIL PROTECTED]> wrote:
>
> > > //new way of doing the above (does not work... note: subdivision is
> > > not a primaryKey)
> > > $subdivisions = $this->Listing->find('list', array('fields'=>
> > > 'Listing.subdivision, Listing.subdivision',
> > > 'order'=>'Listing.subdivision ASC'));
>
> > Hello
> > i am right looking at the code, and I confirm this, it must be a bug.
> > In the class (model.php), the Set::combine do not use the array
> > "fields" passed in parameters.
>
> I very much doubt there is a bug there, there is an assumption that
> you can do everything that genreateList used to do via find('list'...
> which you can't.
>
> hth,
>
> AD
--~--~-~--~~~---~--~~
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 1.2 Console - Missing Shells

2008-01-02 Thread Cake Fan

I have created a shell in my vendors/shells/ folder called raw.php
(Cake 1.2).  The console shell stuff would be extremely  helpful to me
if I could get it working, but I can seem to access the shell I
created (just a small test one at this point).

The actual shell looks like this:
---
class RawShell extends Shell {
var $uses = array('Location');

function main() {
   $locations = $this->Location->findAll();
   foreach($locations as $location) {
$this->out($location['city'] . "\n");
   }
}
}
---

When I execute cake via command line (windows), I get the cake
standard response with the the paths shown.  However, under available
shells, it doesn't list the "Raw" shell I created.

I've tried executing Raw after changing my paths around and
experimented with various changes, but, I can never get my Raw shell
to show up or execute.  I'm using the docs at tempdocs.cake.org as a
reference.

Any troubleshooting help would be greatly appreciated!

- Cake Fan
--~--~-~--~~~---~--~~
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: bakery hates me

2008-01-02 Thread dr. Hannibal Lecter

I don't think posting links to Trac solves anything, it is a fact that
bakery has many issues (some minor and some..not so minor).

Some things should be seriously reconsidered and rewritten. But that's
just my 2c.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Fatal error in configure.php

2008-01-02 Thread Ldg27

Hi, I updated to the 1.2 beta release.
When I execute my code I get this error:

Fatal error: Call to a member function __buildPaths() on a non-object
in (...)/cake/libs/configure.php on line 631

Any help would be appreciated.
--~--~-~--~~~---~--~~
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: 1.2 generateList replacement troubles...

2008-01-02 Thread AD7six



On Jan 2, 5:59 pm, Emmanuel <[EMAIL PROTECTED]> wrote:
> On 2 jan, 16:54, chad <[EMAIL PROTECTED]> wrote:
>
> > //new way of doing the above (does not work... note: subdivision is
> > not a primaryKey)
> > $subdivisions = $this->Listing->find('list', array('fields'=>
> > 'Listing.subdivision, Listing.subdivision',
> > 'order'=>'Listing.subdivision ASC'));
>
> Hello
> i am right looking at the code, and I confirm this, it must be a bug.
> In the class (model.php), the Set::combine do not use the array
> "fields" passed in parameters.

I very much doubt there is a bug there, there is an assumption that
you can do everything that genreateList used to do via find('list'...
which you can't.

hth,

AD


--~--~-~--~~~---~--~~
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: 1.2 generateList replacement troubles...

2008-01-02 Thread Emmanuel

On 2 jan, 16:54, chad <[EMAIL PROTECTED]> wrote:
> //new way of doing the above (does not work... note: subdivision is
> not a primaryKey)
> $subdivisions = $this->Listing->find('list', array('fields'=>
> 'Listing.subdivision, Listing.subdivision',
> 'order'=>'Listing.subdivision ASC'));


Hello
i am right looking at the code, and I confirm this, it must be a bug.
In the class (model.php), the Set::combine do not use the array
"fields" passed in parameters.

I found another bug, but i don't know how to report it. find('list')
do not work with i18n!

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



Route::Connect and Plugins

2008-01-02 Thread foxmask

Hello

In the routes.php i cant know what is the default route to the default
plugins at this moment.
At the startup of my app i read the database to find which is the
default plugin to point to but when i write this in my main
app_controller.php :

public function beforeFilter() {
#defining const
$this->appInit->startup($this);
#use the const to point to the default plugins
#here echo pt_default_module  display 'news' !
Router::connect('/',array('plugin'=>pt_default_module ,'controller'
=> pt_default_module, 'action' => 'index'));
}

i got the error :

Missing controller
You are seeing this error because controller Controller could not be
found.
Notice: If you want to customize this error message, create app\views
\errors\missing_controller.ctp
Fatal: Create the class below in file: app\controllers\controller.php



which means that cakePHP does not know the default plugin i'm trying
to route to.

instead, i waited :



any tips to be able to define the default route "at this moment" ?
--~--~-~--~~~---~--~~
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: 1.2 generateList replacement troubles...

2008-01-02 Thread chad

oops fixed my own problem..

the following worked:

$subdivisions = $this->Listing->find('all', array('fields'=>
'Listing.subdivision', 'order'=>'Listing.subdivision ASC'));
$subs = Set::combine($subdivisions, '{n}.Listing.subdivision',
'{n}.Listing.subdivision');
$this->set('subdivisions', $subs);

On Jan 2, 10:54 am, chad <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Just upgraded to the newest 1.2 beta and i'm having troubles
> converting a generateList to the new find('list')...
>
> //worked before upgrade.. and still works but deprecated
> $subdivisions = $this->Listing->generateList(null,'Listing.subdivision
> asc',null,'{n}.Listing.subdivision','{n}.Listing.subdivision');
>
> //new way of doing the above (does not work... note: subdivision is
> not a primaryKey)
> $subdivisions = $this->Listing->find('list', array('fields'=>
> 'Listing.subdivision, Listing.subdivision',
> 'order'=>'Listing.subdivision ASC'));
> debug($subdivisions);
>
> debug outputs:
> Array
> (
> [] =>
> )
>
> 7   SELECT `Listing`.`subdivision` FROM `listings` AS `Listing` WHERE 1
> = 1 ORDER BY `Listing`.`subdivision` ASC626 626 6
> 
>
> Any help would be appreciated
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Is there a cache in cakephp?

2008-01-02 Thread Alfredo



I know cake uses caching for the DB, but is there a cache I can use
like:

if ($this->cache->notContains('something')){

  $temp= onlyCallThisMethodOnce();
  $this->cache->put('something', $temp);

}else{
  $temp=($this->cache->get('something');
}



In case there isn't one, can you recomend one that works fine with the
framework pls?

Thanks in advance!

--~--~-~--~~~---~--~~
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 Year, New Beta

2008-01-02 Thread Baz
One thing which has helped me a LOT with my upgrades is SVN.

About a month ago I started working from the SVN branch rather than the
pre-beta release, since a LOT of stuff has been fixed (eg. no more
CleanUpFields).

The CakePHP developers have been excellent in putting in very relevant
comments when checking files in. Most times all you have to do is pull up
the log messages and do a simple search. A search for generateList brings
the following comments:

rev: 6295 - nate - 1/1/08
Implemented 'counterCache' and 'counterScope' for belongsTo associations
Exempted 'created', 'updated' and 'modified' fields from whitelist when
saving, closes #3720
Updated Model::bind(), closes #2355
Adding Model::saveAll() to save multiple records and associated records,
closes #3615
Replacing Model::generateList() with Model::find('list'), deprecates
Model::generateList()

Happy Baking!
--
Baz L
Web Development 2.0
http://WebDevelopment2.com/

On Jan 2, 2008 8:40 AM, Emmanuel <[EMAIL PROTECTED]> wrote:

>
> On 2 jan, 11:54, Sergei <[EMAIL PROTECTED]> wrote:
> > Thank you.
> >
> > But, findAllThreaded() model function is broken in 1.1.19 :-( It just
> > doesn't fetch some child records.
>
>
> hum i also found that the generateList function will be deprecated, is
> there any reason ?
> I must use now something like :
>  Set::combine($this->myModel->findAll(),"{n}.myModel.id",
> "{n}.myModel.displayname");
>
> >
> > On Jan 2, 3:37 pm, "Larry E. Masters aka PhpNut" <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Beta: 1.2.0.6311http://cakeforge.org/frs/?group_id=23&release_id=372
> > > 1.2.0.6311 Change log:https://trac.cakephp.org/wiki/changelog/1.2.x.x
> >
> > > Stable: 1.1.19.630
> 5http://cakeforge.org/frs/?group_id=23&release_id=371
> > > 1.1.19.6305 Change log:https://trac.cakephp.org/wiki/changelog/1.1.x.x
>
> >
>

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



1.2 generateList replacement troubles...

2008-01-02 Thread chad

Hi,

Just upgraded to the newest 1.2 beta and i'm having troubles
converting a generateList to the new find('list')...

//worked before upgrade.. and still works but deprecated
$subdivisions = $this->Listing->generateList(null,'Listing.subdivision
asc',null,'{n}.Listing.subdivision','{n}.Listing.subdivision');

//new way of doing the above (does not work... note: subdivision is
not a primaryKey)
$subdivisions = $this->Listing->find('list', array('fields'=>
'Listing.subdivision, Listing.subdivision',
'order'=>'Listing.subdivision ASC'));
debug($subdivisions);

debug outputs:
Array
(
[] =>
)

7   SELECT `Listing`.`subdivision` FROM `listings` AS `Listing` WHERE 1
= 1 ORDER BY `Listing`.`subdivision` ASC626 626 6


Any help would be appreciated
--~--~-~--~~~---~--~~
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 Year, New Beta

2008-01-02 Thread Emmanuel

On 2 jan, 11:54, Sergei <[EMAIL PROTECTED]> wrote:
> Thank you.
>
> But, findAllThreaded() model function is broken in 1.1.19 :-( It just
> doesn't fetch some child records.


hum i also found that the generateList function will be deprecated, is
there any reason ?
I must use now something like :
 Set::combine($this->myModel->findAll(),"{n}.myModel.id",
"{n}.myModel.displayname");

>
> On Jan 2, 3:37 pm, "Larry E. Masters aka PhpNut" <[EMAIL PROTECTED]>
> wrote:
>
> > Beta: 1.2.0.6311http://cakeforge.org/frs/?group_id=23&release_id=372
> > 1.2.0.6311 Change log:https://trac.cakephp.org/wiki/changelog/1.2.x.x
>
> > Stable: 1.1.19.6305http://cakeforge.org/frs/?group_id=23&release_id=371
> > 1.1.19.6305 Change log:https://trac.cakephp.org/wiki/changelog/1.1.x.x

--~--~-~--~~~---~--~~
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: Protected File Download

2008-01-02 Thread Christophe Cholot

Hello,

I would suggest you to store your uploaded files on your filesystem,
ex : /home/yourappname/uploads/

- Use app/config/core.php or bootstrap.php to write your file storage
path :

Configure::write('Music.uploadPath',  '/home/yourappname/uploads/
music/'); or define('MUSIC_UPLOAD_PATH', 'yourpath');

- Then in your controller just add a download method :

class MusicController extends AppController{

function download($song){
if(!isset($song))
$this->redirect('/');
if($this->isAuthenticatedUser()){
$file = MUSIC_UPLOAD_PATH . $song;
$data = file_get_contents($file);
$size = filesize($file);
if(isset($_SERVER['HTTP_USER_AGENT']) &&
strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE'))
header('Content-Type: 
application/force-download');
else
header('Content-Type: 
application/get-the-correct-mime-type');
header('Content-Length: '. $size);
header('Content-disposition: attachment; 
filename="' . $song ."');
echo $data;
}else{
$this->redirect($this->referer(), 403);
}
} // download
}

Now link to your files with :

$html->link(__('Download this file', true), '/music/download/your-
song');



Bart wrote:
> Hi!
> (i'm a newbe)
> I want my site-visitors to be able after login to download an (audio/
> image)file that is only for them.
> I have two options:
> uploading the files into the database  or  uploading the files onto
> the server in a folder with filedata in the DB.
>
> The first has the advantage of security but I have some problems with
> displaying the image after download (corrupted/characters are
> displayed instead of a pretty picture)
> The second has the advantage of transparancy/no corruption so far, but
> how do I secure files? Placing them in the webroot makes them publicly
> accessible.
>
> Which structure do you advice?
> Can you give me a direction/some keywords I should look into?
>
> Cheers,
> Bart

--~--~-~--~~~---~--~~
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 Year, New Beta

2008-01-02 Thread Emmanuel

On 2 jan, 08:37, "Larry E. Masters aka PhpNut" <[EMAIL PROTECTED]>
wrote:
> > For this year, we would like to share CakePHP 1.2 Beta.

BTW, great job, i'm using CakePHP since october, and it's a great
tool!

--
Manu

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



[Migration] Table already exist

2008-01-02 Thread roryy


Hi i have a question about the migrate tool of Joel Moss.

When I want to migrate (example 001_users.yml first and then 002_users.yml)
then the script is migrating 001 succesfully but 002 gives a error: Table
`users` already exists. Does someone know how I can avoid that problem?

Thanks in advance :)
-- 
View this message in context: 
http://www.nabble.com/-Migration--Table-already-exist-tp14579001p14579001.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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: PHP Fatal error: Class 'Shell' not found in .../cake/console/libs/bake.php on line 37

2008-01-02 Thread Ron Chaplin
Amen to that Brother!
And don't forget to eat our CakePHP Vitamins Kiddies!
Oh Yeah!
On Sun, 2007-12-30 at 02:25 -0800, AD7six wrote:

> 
> 
> On Dec 30, 4:14 am, labour <[EMAIL PROTECTED]> wrote:
> > i need some practical knowldge in php. so send me many programming
> > examples in php. help me  please
> 
> here's the only tool you need to get going: http://www.google.com
> > 

Thanks,

Ronald Chaplin
Owner - T73 Software and Designs




  http://t73-softdesign.com/

  We'll Make All Of Your Wildest

e-Commerce Dreams Come True!

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



Diese Seite anzeigen: " Groups in other languages"

2008-01-02 Thread powtac

Rechanged the relative URLs to absolutes...
--~--~-~--~~~---~--~~
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: Search by relevence

2008-01-02 Thread Dr. Tarique Sani

You mean fulltext search?

Read thru http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html

HTH

Tarique

On Jan 2, 2008 6:57 PM, Nil <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
>  I am trying to search the records which is exactly same as the word
> which I put into the input box.
>
> I want to search the records using Relevance search.
> Please help me.
>
> Thanks
>
> >
>



-- 
=
Cheesecake-Photoblog: http://cheesecake-photoblog.org
PHP for E-Biz: http://sanisoft.com
=

--~--~-~--~~~---~--~~
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: Protected File Download

2008-01-02 Thread Dr. Tarique Sani

Place the meta data of the file in a database, and the files outside
the webroot then use a combination of proper headers and a call to
readfile() in your code to allow for download.

http://php.net/readfile <- have not looked there but this should have
some sample code in the notes


HTH
Tarique



On Jan 2, 2008 6:24 PM, Bart <[EMAIL PROTECTED]> wrote:
>
> Hi!
> (i'm a newbe)
> I want my site-visitors to be able after login to download an (audio/
> image)file that is only for them.
> I have two options:
> uploading the files into the database  or  uploading the files onto
> the server in a folder with filedata in the DB.
>
> The first has the advantage of security but I have some problems with
> displaying the image after download (corrupted/characters are
> displayed instead of a pretty picture)
> The second has the advantage of transparancy/no corruption so far, but
> how do I secure files? Placing them in the webroot makes them publicly
> accessible.
>
> Which structure do you advice?
> Can you give me a direction/some keywords I should look into?
>
> Cheers,
> Bart
>
> >
>



-- 
=
Cheesecake-Photoblog: http://cheesecake-photoblog.org
PHP for E-Biz: http://sanisoft.com
=

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



Protected File Download

2008-01-02 Thread Bart

Hi!
(i'm a newbe)
I want my site-visitors to be able after login to download an (audio/
image)file that is only for them.
I have two options:
uploading the files into the database  or  uploading the files onto
the server in a folder with filedata in the DB.

The first has the advantage of security but I have some problems with
displaying the image after download (corrupted/characters are
displayed instead of a pretty picture)
The second has the advantage of transparancy/no corruption so far, but
how do I secure files? Placing them in the webroot makes them publicly
accessible.

Which structure do you advice?
Can you give me a direction/some keywords I should look into?

Cheers,
Bart

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



Search by relevence

2008-01-02 Thread Nil

Hi,

 I am trying to search the records which is exactly same as the word
which I put into the input box.

I want to search the records using Relevance search.
Please help me.

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: bakery hates me

2008-01-02 Thread Mariano Iglesias
  https://trac.cakephp.org

-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

  _  

De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Adam Royle
Enviado el: Miércoles, 02 de Enero de 2008 08:34 a.m.
Para: cake-php@googlegroups.com
Asunto: bakery hates me

 

Maybe it's just me, but I tried to add a comment to an article on the
bakery, and it wouldn't show up, and didn't show a error message. So I am
going to add it here. I am also going to scour the bakery source to find the
root of the issue.

 



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



bakery hates me

2008-01-02 Thread Adam Royle
Maybe it's just me, but I tried to add a comment to an article on the bakery, 
and it wouldn't show up, and didn't show a error message. So I am going to add 
it here. I am also going to scour the bakery source to find the root of the 
issue.

The article: http://bakery.cakephp.org/articles/view/want-to-order-your-sql

The comment:


 Who approved this??
 
  Sorry if this seems harsh but I think the above code is a terrible example to 
put on the bakery.
  
  A better solution for "mock stored procedures" already exists. Just create a 
method in your model like so.
  
  function getSomething($param1, $param2 = 0) {
   return $this->findAll( array('blah' => $param1) );
  }
  
  or if you need custom sql:
  
  function getSomething($param1, $param2 = 0) {
   return $this->query("SELECT ... ");
  }
  
  If it's something that is application specific, chuck it in your AppModel.
 

--~--~-~--~~~---~--~~
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 code a edit view with a list

2008-01-02 Thread bibi

Or
[code]
foreach ($params['data']['Basketline'] as $Basketline) {
 echo $html->input("Backet/Basketline[$i]/quantite",
array('size'=>'4'));

[/code]

Doesn't work too ...

--~--~-~--~~~---~--~~
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: Help with application

2008-01-02 Thread Bill

Thanks Victor,
I shall check them out.

Bill

On Jan 2, 2:21 am, vtitarchuk <[EMAIL PROTECTED]> wrote:
> Hi Bill,
>
> I am working on localization of several open source projects into
> Russian and Ukrainian. I am using several offline and online tools for
> that. Check out WordForge and their online app called 
> Pootle.http://www.wordforge.org/drupal/http://www.wordforge.org/drupal/projects/wordforge/tools/pootle
>
> Perhaps you may focus on the task of localizing rather than spend time
> developing a tool that will help you. I have a few other apps that
> maybe of interest to you. However, Pootle is a good start.
>
> Victor
>
> On Jan 1, 5:19 pm, Bill <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> > I am trying to create an application that uploads files, keeps track
> > of them, sends emails and provides upload and download links.
> > I want to upload a file, have it assigned to someone for translation
> > into another language (send an email that file was uploaded, with ftp
> > link(?)), upload file after translation, and create a download link
> > for the client. All this needs to be tracked by an admin (uploads,
> > file size in word count, ftp links, ...etc.). Does anyone know of
> > something like this that exists already, or can you get me started in
> > the right direction myself?
> > I would prefer to do this myself, since I am learning PHP and very new
> > to cakePHP. 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: include a login form in the header - viewed on all pages

2008-01-02 Thread the_woodsman

You need to put the results of the user->login action into your
layout.

There are numerous approaches, all thoroughly covered in this group,
involving requestAction, so I'll just outline them, starting with
'quick and dirty':

- call requestAction directly from your layout

- make sure the output of user->login is always available to the
layout,
perhaps by setting it in all controllers via AppController-
>beforeFilter, or somesuch

- BEST PRACTICE: See the Bakery article related to wrapping calls to
requestAction in an Element.



On Jan 1, 1:05 am, matches <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I want to include my login controller in my header so that it is
> accessible on all pages. I have followed the IBM tutorial to get my
> login controller working. If I take the code straight out of the views/
> users/login.thtml file then I get an error on every page except for
> the login view. Which I expected but I still can't figure out how to
> get this to work.
>
> Hope I am being clear enough. 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: New Year, New Beta

2008-01-02 Thread Sergei

Thank you.

But, findAllThreaded() model function is broken in 1.1.19 :-( It just
doesn't fetch some child records.



On Jan 2, 3:37 pm, "Larry E. Masters aka PhpNut" <[EMAIL PROTECTED]>
wrote:
> Beta: 1.2.0.6311http://cakeforge.org/frs/?group_id=23&release_id=372
> 1.2.0.6311 Change log:https://trac.cakephp.org/wiki/changelog/1.2.x.x
>
> Stable: 1.1.19.6305http://cakeforge.org/frs/?group_id=23&release_id=371
> 1.1.19.6305 Change log:https://trac.cakephp.org/wiki/changelog/1.1.x.x

--~--~-~--~~~---~--~~
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: Problem with first cake form input name=data[....

2008-01-02 Thread the_woodsman

No, you're seeing correct behaviour.

the data prefix means the posted data gets into $this->data, for handy
access.

The Account prefix is your model, so that you can easily get the
fields for a particular model, and pass them to save, i.e:

$this->Account->save($this->data['Account']);

Embrace the Cake convention, it'll let you use all the nice features.


On Jan 2, 12:18 am, lirc201 <[EMAIL PROTECTED]> wrote:
> I'm having some trouble with my login form.  In my thtml file:
>
> input('Account/email',array("id" => "email",
> "class"=>"input"));?>
>
> but when I view source:
>
> 
> I was assuming cake would fill in name=email to correspond to the
> field name in my model.
>
> Thanks,
> Brian
--~--~-~--~~~---~--~~
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: Help with application

2008-01-02 Thread vtitarchuk

Hi Bill,

I am working on localization of several open source projects into
Russian and Ukrainian. I am using several offline and online tools for
that. Check out WordForge and their online app called Pootle.
http://www.wordforge.org/drupal/
http://www.wordforge.org/drupal/projects/wordforge/tools/pootle

Perhaps you may focus on the task of localizing rather than spend time
developing a tool that will help you. I have a few other apps that
maybe of interest to you. However, Pootle is a good start.

Victor


On Jan 1, 5:19 pm, Bill <[EMAIL PROTECTED]> wrote:
> Hi,
> I am trying to create an application that uploads files, keeps track
> of them, sends emails and provides upload and download links.
> I want to upload a file, have it assigned to someone for translation
> into another language (send an email that file was uploaded, with ftp
> link(?)), upload file after translation, and create a download link
> for the client. All this needs to be tracked by an admin (uploads,
> file size in word count, ftp links, ...etc.). Does anyone know of
> something like this that exists already, or can you get me started in
> the right direction myself?
> I would prefer to do this myself, since I am learning PHP and very new
> to cakePHP. 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
-~--~~~~--~~--~--~---