possible to create a nested post with forms?

2010-12-15 Thread cake-learner
I am trying create a form so that when post that data this will still
keep the relationships with other element.
Say i have a category name and a subcategory name like shown in below.
How can i define the form so that the relationship between this
category and subcategory will be kept when submitted?

Category 1
-subcategory 1
Categ 2
-subcategory 1
-sbucategory 2

and this form is submited

Array{
   Category => Array{
  name => 'Category 1'
  subcategory => Array{
   'name' =>
'subcategory'
}
}

 input( 'Category.name', array( 'name' =>
'Category.name[]', 'label' => '', 'class' => 'category_title' ) ); ?>

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


Mobile balance transfer script

2010-12-15 Thread Yasir Arafat Hasib
Hi all,
I need a mobile balance transfer script. Please share with me if you have.
-- 
Thanks & regards.

Yasir Arafat (Hasib)
Software Engineer
Epsilon Consulting and Development Services (ECDS)
Contact Information:
Cell : +8801816536901
Web: http://arafats.info

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: how can i create a default selection

2010-12-15 Thread Amit Badkas
Hi,

For CakePHP-1.3, if you are using input() method then set 'empty' => 'Select
category' in 2nd parameter array, or do the same for 4th parameter of
select() method.

Amit Badkas

PHP Applications for E-Biz: http://www.sanisoft.com



On Thu, Dec 16, 2010 at 10:43 AM, cake-learner  wrote:

> how i can insert the a little text on top of select form so that it
> goes
> Select category, cat1, cat2, cat3
>
> 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.comFor
>  more options, visit this group at
> http://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: flash vs redirect

2010-12-15 Thread Amit Badkas
Hi,

You need to return the control after calling flash() method in action,
something like

function my_action()
{
if ($this->data) {
// some code here

$this->flash(...);
return;
}

// remaining code here
}

Hope this helps.

Amit Badkas

PHP Applications for E-Biz: http://www.sanisoft.com



On Thu, Dec 16, 2010 at 3:11 AM, bram  wrote:

> In the 1.3 book, the controller method flash is compared to the
> redirect method. It states that the only difference is the use of an
> intermediate page with your flash message, before the user gets
> redirected to a given url.
>
> When using the flash method, it looks like there is another
> significant difference in that it doesn't exit your script.
>
> Is this a documentation or an implementation bug? (or something else)
>
> B
>
> 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.comFor
>  more options, visit this group at
> http://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


how can i create a default selection

2010-12-15 Thread cake-learner
how i can insert the a little text on top of select form so that it
goes
Select category, cat1, cat2, cat3

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: Cakephp add to cart plugin

2010-12-15 Thread Yasir Arafat Hasib
I got it but integration problem. There is no clear integration steps.

On Wed, Dec 15, 2010 at 8:24 PM, j.blotus  wrote:

> Try this: https://github.com/mfriesen/kaching-php/wiki
>
> Hope it helps,
>
> James
> http://www.jblotus.com
>
> On Dec 14, 12:46 pm, Yasir Arafat Hasib  wrote:
> > Hi,
> > I need a add to cart plugin which is very easy to integrate in my app.
> >
> > --
> > Thanks & regards.
> > 
> > Yasir Arafat (Hasib)
> > Software Engineer
> > Epsilon Consulting and Development Services (ECDS)
> > Contact Information:
> > Cell : +8801816536901
> > Web:http://arafats.info
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Thanks & regards.

Yasir Arafat (Hasib)
Software Engineer
Epsilon Consulting and Development Services (ECDS)
Contact Information:
Cell : +8801816536901
Web: http://arafats.info

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


flash vs redirect

2010-12-15 Thread bram
In the 1.3 book, the controller method flash is compared to the
redirect method. It states that the only difference is the use of an
intermediate page with your flash message, before the user gets
redirected to a given url.

When using the flash method, it looks like there is another
significant difference in that it doesn't exit your script.

Is this a documentation or an implementation bug? (or something else)

B

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: Auth Component - string to lowercase

2010-12-15 Thread euromark
by the way
you should NEVER upper oder lowercase the password
leave it as it is or you lower the security of the the site in general
and compromise the security of the user passwords.
thats not how it is done

the hash will be lowercase anyway after sha1()

On 15 Dez., 21:11, AD7six  wrote:
> btw, slightly OT but I find it really irritating to register somewhere and
> have my username become ad7six :)
>
> AD

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: "Bug" with media.php CakePHP core file - HELP

2010-12-15 Thread euromark
i had my log files filled up with that crap as well
just comment those lines out - worked for me :)

On 15 Dez., 18:18, BrendonKoz  wrote:
> I would like to trace down the issue I'm about to explain, but I
> unfortunately am not sure where to look. Any advice or help would be
> appreciated.
>
> I am continually getting NOTICE level error messages reported to
> debug.log from media.php:
> 2010-12-15 11:04:50 Notice: Notice (8): ob_flush() [ href='ref.outcontrol'>ref.outcontrol]: failed to flush buffer. No
> buffer to flush. in [/home/sspl/cake/libs/view/media.php, line 283]
>
>  ACTUAL LINES 
> function _flushBuffer() {
>         @flush();
>         @ob_flush();    // <-- error here}
>
> 
>
> Due to execution time looping (depending on the size of the file being
> served and the buffer), this notice can be (and is) repeated multiple
> times. This causes the debug.log file (on default core.php logging
> settings) to increase in size *very* rapidly. (I have since modified
> my core.php file to use E_ALL ^ E_NOTICE to prevent the file growth,
> but this is only a band-aid solution.)
>
> I have found two other CakePHP users that have mentioned the problem:
> 1.http://groups.google.com/group/cake-php/browse_thread/thread/65f03d0c...
> 2.http://groups.google.com/group/cake-php/browse_thread/thread/7b6ec1c1...
>
> There was a Lighthouse ticket for the 1.2.7 and 1.3.3 branches which
> has supposedly fixed the issue for 
> some:http://cakephp.lighthouseapp.com/projects/42648/tickets/882-regressio...
>
> ...but not all.
>
> It may be related to server configuration and (PHP?) server settings.
>
> Two questions:
> 1. Any ideas of where to start looking, and what to look at?
> 2. Should the debug.log still log errors of code that had used the
> suppression character (@) ?

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: cakephp requirements question

2010-12-15 Thread Jefferson Souza - PHP Rio
Check your apache config for Mod Rewrite...

Cake needs this configuration

2010/12/15 Ryan Schmidt 

> On Dec 15, 2010, at 07:40, avesh upadhyay wrote:
>
> > problem come
> > in windows 7 home basic
> > with wamp server for the php
> > the error come 404.4
> > what is the solution
>
> It means the resource you requested was not found. You'll need to provide a
> lot more information if you want more help than that -- for example, what
> URL did you request? what is your web server configuration? where on disk
> are your files? etc.
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
__

"As pessoas que vencem neste mundo são as que procuram as circunstâncias de
que precisam e, quando não as encontram, as criam."

"O progresso é impossível sem mudança. Aqueles que não conseguem mudar as
suas mentes não conseguem mudar nada. "

George Bernard Shaw
__

Att.
Jefferson Souza - Desenvolvedor Web

Íparos Design Studio (http://www.iparos.com.br)
(21) 8286-6123 / (21) 2282-5381
Twitter: www.twitter.com/jeffersonsouza
__

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: cakephp requirements question

2010-12-15 Thread Carlos Eduardo Sotelo Pinto
I will recommends to use xampp, I has similar problems with wamp`and
appserver, then since I have using xampp on windows I didnt has any problem
on cakwphp, however I prefer a gnu linux flavor instead windows os

kind regards

On Wed, Dec 15, 2010 at 8:40 AM, avesh upadhyay  wrote:

> problem come
> in windows 7 home basic
> with wamp server for the php
> the error come 404.4
> what is the solution
>
> On 12/15/10, mario2027  wrote:
> > Try the new PHP resource download site: http://www.phpkode.com  you will
> > find
> > the exact framework you want! > Hi, try setting the Apache settings for
> your
> > webroot  to allowOverride All in /etc/apache2/sites-available/000-
> > default, by default or you virtual host file if present.
> > Using mod rewrite from the built in htaccess files in Cake requires
> > this.
> >
> >
> >
> >
> >
> > 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.comFor
> >  more options, visit this group at
> > http://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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Carlos Eduardo Sotelo Pinto a.k.a. krlos
PHP Senior Web Developer
Cell (preferred): +51, 959980794
Skype: csotelop
Yahoo: csotelop
MSN: carlos.sotelo.pi...@gmail.com
GTalk: carlos.sotelo.pi...@gmail.com
pgp.rediris.es 0xF8554F6B
GPG FP:697E FAB8 8E83 1D60 BBFB 2264 9E3D 5761 F855 4F6B
GNULinux RU #379182 || GNULinux RM #277661

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: Auth Component - string to lowercase

2010-12-15 Thread AD7six
btw, slightly OT but I find it really irritating to register somewhere and 
have my username become ad7six :)

AD

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

2010-12-15 Thread Tilen Majerle
em...then you can do what Amit said...you can't do in other way :D
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2010/12/15 lvdb 

> Hello Tillen,
>
> Version: 1.3.5
>
> Regards,
>
> Leo
>
> On 15 dec, 00:50, Tilen Majerle  wrote:
> > which version are u using?...
> > --
> > Tilen Majerlehttp://majerle.eu
> >
> > 2010/12/14 lvdb 
> >
> >
> >
> > > Hello,
> >
> > > I'am new to Cakephp. I have been doing the blog tutorial. In this
> > > tutorial there is a setFlash message after
> > > adding a new record. Is it possible to hide this message after 3
> > > seconds?
> >
> > > thank ou in advance for your answer.
> >
> > > Regards,
> >
> > > Leo
> >
> > > 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 at
> > >http://groups.google.com/group/cake-php?hl=en- Tekst uit oorspronkelijk
> bericht niet weergeven -
> >
> > - Tekst uit oorspronkelijk bericht weergeven -
>
> 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.comFor
>  more options, visit this group at
> http://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: Cakephp add to cart plugin

2010-12-15 Thread j.blotus
Try this: https://github.com/mfriesen/kaching-php/wiki

Hope it helps,

James
http://www.jblotus.com

On Dec 14, 12:46 pm, Yasir Arafat Hasib  wrote:
> Hi,
> I need a add to cart plugin which is very easy to integrate in my app.
>
> --
> Thanks & regards.
> 
> Yasir Arafat (Hasib)
> Software Engineer
> Epsilon Consulting and Development Services (ECDS)
> Contact Information:
> Cell : +8801816536901
> Web:http://arafats.info

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: cakephp requirements question

2010-12-15 Thread Ryan Schmidt
On Dec 15, 2010, at 07:40, avesh upadhyay wrote:

> problem come
> in windows 7 home basic
> with wamp server for the php
> the error come 404.4
> what is the solution

It means the resource you requested was not found. You'll need to provide a lot 
more information if you want more help than that -- for example, what URL did 
you request? what is your web server configuration? where on disk are your 
files? etc.

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

2010-12-15 Thread lvdb
Hello Tillen,

Version: 1.3.5

Regards,

Leo

On 15 dec, 00:50, Tilen Majerle  wrote:
> which version are u using?...
> --
> Tilen Majerlehttp://majerle.eu
>
> 2010/12/14 lvdb 
>
>
>
> > Hello,
>
> > I'am new to Cakephp. I have been doing the blog tutorial. In this
> > tutorial there is a setFlash message after
> > adding a new record. Is it possible to hide this message after 3
> > seconds?
>
> > thank ou in advance for your answer.
>
> > Regards,
>
> > Leo
>
> > 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.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en- Tekst uit oorspronkelijk 
> >bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

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: Auth Component - string to lowercase

2010-12-15 Thread Stephen
Ah, makes sense, I didn't think of that.

Thanks AD7six

On 15 December 2010 17:43, AD7six  wrote:

> you can access the unmodified $this->data in your beforeFilter
>
> hth,
>
> AD
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

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: Form is not defined

2010-12-15 Thread Rishi
I have added "prototype.js" to the page. Its works now.

On Dec 11, 10:48 pm, Rishi  wrote:
> I have toForm& Ajax helper in the controller
>
> On Dec 11, 6:39 pm, cricket  wrote:
>
>
>
>
>
>
>
> > On Sat, Dec 11, 2010 at 6:29 PM, Rishi  wrote:
> > > Hi
>
> > > I am trying to send a ajax call to an action when ever there is a
> > > change in selection.
>
> > > create(''); ?>
>
> > >                input('selected',array('label'=>'Select
> > > Category','id'=>'selected','type'=>'select','options'=>$select));?>
>
> > >                observeField('selected',
> > >                                
> > > array('with'=>'Form.Element.serialize(\'selected\')','url' =>
> > > 'display','update'=>'codes',
> > >                                
> > > 'complete'=>"Effect.Appear('selected');",'onChange'=>true));?>
>
> > >                end(); ?>
>
> > > When I check the consle.
>
> > >Formisnotdefined
> > >http://localhost/index.php/codes/code
> > > Line 46
>
> > You need to have 'Form' in your $helpers array for this controller (or
> > AppController).

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: input field masks

2010-12-15 Thread cricket
On Tue, Dec 14, 2010 at 11:33 PM, eldorado2768
 wrote:
> I am a newbie at cakephp and so far I like it a lot. My question
> relates to data validation. Jquery has some really nice data
> validation features that include input masks for dates or phone
> numbers, etc. Is there a way to implement a mask on an input field in
> cakephp and if someone out there knows, I would appreciate a snippet
> of sample code. Thanks!

Masking is something done client-side. As you mentioned, JQuery can do
this for you. On the server side, look at the validation rules in the
manual. If none of the built-in rules do what you want, you can create
your own using RegExps.

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: Incorrect behavior of delete() method

2010-12-15 Thread cricket
2010/12/15 Andrew Hodirevski :
> Bump. Anyone can help me?
>
> On 13 дек, 12:41, Andrew Hodirevski  wrote:
>> Hello!
>> I have three models:
>>
>> Project
>> User
>> ProjectsUser
>>
>> The ProjectsUser table is used for HABTM relations between Project and
>> User.
>> This is remove() method of Project model:
>>
>>     function remove($project_id, $user_id)
>>     {
>>         /*
>>          * Проверяем, относится ли выбранный проект к пользователю
>>          */
>> //        $data = $this->read('', $project_id);
>> //
>> //        if($data['User'][0]['id'] != $user_id)
>> //        {
>> //            return false;
>> //        }
>>
>>         /*
>>          * Если проект принадлежит пользователю, то удалить его
>>          */
>>         $result = $this->delete($project_id);
>>
>>         if(!$result)
>>         {
>>             return false;
>>         }
>>
>>         return true;
>>     }
>>
>> And remove() method of Projects controller:
>>
>>         function remove($project_id)
>>         {
>>             /*
>>              * Пробуем удалить проект
>>              */
>>             $user_id = $this->Session->read('Auth.User.id');
>>
>>             $result = $this->Project->remove($project_id, $user_id);
>>
>>             /*
>>              * Если возникли ошибки, то отправить их в буфер сообщений
>> о результате операций
>>              */
>>             if(!$result)
>>             {
>>                 $this->Session->setFlash('Возникли проблемы при
>> удалении проекта, попробуйте позже');
>>                 $this->redirect(array(
>>                     'controller' => 'projects',
>>                     'action' => 'index',
>>                 ));
>>             }
>>
>>             $this->Session->setFlash('Проект успешно удален');
>> //            $this->redirect(array(
>> //                'controller' => 'projects',
>> //                'action' => 'index',
>> //            ));
>>         }
>>
>> So, while debugging I found that Cake makes two queries for delete()
>> method: deleting project by project_id from projects table and the
>> next:
>>
>> DELETE FROM `projects_users` WHERE `projects_users`.`user_id` = 4
>>
>> It means that if User have two Project then after query all relations
>> in projects_users table for user_id would be deleted.
>> How can I fix this and why Cake deletes from projects_users by user_id
>> not by project_id?

Can you confirm that the integer in the 2nd query (the 4 in your
example) is the user_id and not the project_id? Please post the HABTM
arrays for these two models.

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: Losing Session variables

2010-12-15 Thread Rishi
Hey All,

I have made changes you have listed above and now it works. I have no
idea what I was doing wrong.

Thanks for all the help

On Dec 13, 11:56 am, Rishi  wrote:
> Hi All
>
> Thanks for all the help. Here is what I have.
>
> 1. I am not using any Auth helper or component. I am simply trying to
> query the database for the  "username" & "password" and allowing the
> user to login. Once I find the user. I am having the following code :
>
>                         if(!empty($user)){
>                                 $this->Session->write('user',$user);
>                                 $this->redirect(array('controller' => 
> 'users', 'action' =>
> 'action'));
>                         }
>
> 2. Once I redirect the user to the "action", I am trying to read the
> session variable.
>
>                    $this->Session->read('user');
>   I can read the session variable in the next immediately called
> action. ( First action "Login"  and second Action "Action").
>
> 3. When I try to read the variable in the another action, I am losing
> the variable. So when I read the session variable in action "
> Preview" ( which is down the line not the immediate) I am losing the
> "user" session variable..
>
> 4. Thanks for the debug tool. I was able to track the session
> variable. I can see session variable when I set it, but lost it the
> consecutive actions (like the "Preview"). I am not using a shares
> server, I am testing it on my local machine. I am using production
> environment setting. I did try
>
>                  ini_set("session.cookie_domain", "yourdomain.com");
> But not use.
>
> 5. I have tried debug($this->Session) before and after reading the
> session variable in the "action" action.
>
>  Before Reading
> 
> SessionComponent Object
> (
>     [__active] => 1
>     [__bare] => 0
>     [__started] => 1
>     [valid] =>
>     [error] => Array
>         (
>             [2] => Config.userAgent doesn't exist
>         )
>
>     [_userAgent] =>
>     [path] => /
>     [lastError] => 2
>     [security] => low
>     [time] => 1292259231
>     [sessionTime] => 1292295231
>     [cookieLifeTime] =>
>     [watchKeys] => Array
>         (
>         )
>
>     [id] =>
>     [host] => localhost
>     [timeout] =>
>     [enabled] => 1
> )
>
> ---
> $this->Session->read('user');
> - After
> ---
>  SessionComponent Object
> (
>     [__active] => 1
>     [__bare] => 0
>     [__started] => 1
>     [valid] =>
>     [error] => Array
>         (
>             [2] => Config.userAgent doesn't exist
>         )
>
>     [_userAgent] =>
>     [path] => /
>     [lastError] => 2
>     [security] => low
>     [time] => 1292259231
>     [sessionTime] => 1292295231
>     [cookieLifeTime] =>
>     [watchKeys] => Array
>         (
>         )
>
>     [id] =>
>     [host] => localhost
>     [timeout] =>
>     [enabled] => 1
> )
> 
>
> 6. I can see my session varibale in the debug console.
>
> Thanks for all the help. !!!
>
> On Dec 13, 6:03 am, Renato de Freitas Freire 
> wrote:
>
>
>
>
>
>
>
> > Try to put this code into your bootstrap.php file:
>
> > ini_set("session.cookie_domain", "yourdomain.com");
>
> > You might be using a shared server...
>
> > --
> > Renato de Freitas Freire
> > ren...@morfer.org
>
> > On Mon, Dec 13, 2010 at 6:37 AM, Jeremy Burns | Class Outfit <
>
> > jeremybu...@classoutfit.com> wrote:
> > > 1) Install the Debug Kit (https://github.com/cakephp/debug_kit) and
> > > examine the contents of your session
> > > 2) Are you loading both the Session component and the Session helper?
> > > 3) How are you writing to and reading from the session (please show code)?
> > > 4) What do you see when you die(debug($this->Session)); immediately before
> > > and then immediately after writing to the session?
> > > 5) What do you see when you die(debug($this->Session)); immediately before
> > > and then immediately after reading from the session?
>
> > > Jeremy Burns
> > > Class Outfit
>
> > > jeremybu...@classoutfit.com
> > >http://www.classoutfit.com
>
> > > On 13 Dec 2010, at 08:25, dtemes wrote:
>
> > > Without looking at your code nor knowing more about your environment I
> > > guess it will not be easy to help you.
>
> > > Are you sure the code in your login action is being executed? (if
> > > using auth check the autoRedirect variable)
>
> > > On 12 dic, 16:37, Rishi  wrote:
>
> > > Does anyone have any idea of what is going on ! .. its dealing
>
> > > with sessions. I really need some wayout. Please help !!!
>
> > > On Dec 10, 10:42 am, Rishi  wrote:
>
> > > Hi,
>
> > > No. I am not trying to switch between protocols.
>
> > > On Dec 8, 11:47 pm, Jeremy Burns | Class Outfit
>
> > >  wrote:
>
> > > Are yo switching between http and https

Re: Auth Component - string to lowercase

2010-12-15 Thread AD7six
you can access the unmodified $this->data in your beforeFilter

hth,

AD

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


"Bug" with media.php CakePHP core file - HELP

2010-12-15 Thread BrendonKoz
I would like to trace down the issue I'm about to explain, but I
unfortunately am not sure where to look. Any advice or help would be
appreciated.

I am continually getting NOTICE level error messages reported to
debug.log from media.php:
2010-12-15 11:04:50 Notice: Notice (8): ob_flush() [ref.outcontrol]: failed to flush buffer. No
buffer to flush. in [/home/sspl/cake/libs/view/media.php, line 283]

 ACTUAL LINES 
function _flushBuffer() {
@flush();
@ob_flush();// <-- error here
}


Due to execution time looping (depending on the size of the file being
served and the buffer), this notice can be (and is) repeated multiple
times. This causes the debug.log file (on default core.php logging
settings) to increase in size *very* rapidly. (I have since modified
my core.php file to use E_ALL ^ E_NOTICE to prevent the file growth,
but this is only a band-aid solution.)

I have found two other CakePHP users that have mentioned the problem:
1.
http://groups.google.com/group/cake-php/browse_thread/thread/65f03d0c43fd4edf/c86ff38f94fa2ea5?lnk=gst&q=failed+to+flush+buffer#c86ff38f94fa2ea5
2.
http://groups.google.com/group/cake-php/browse_thread/thread/7b6ec1c1f27f6c57/44767d055582552c?lnk=gst&q=failed+to+flush+buffer#44767d055582552c

There was a Lighthouse ticket for the 1.2.7 and 1.3.3 branches which
has supposedly fixed the issue for some:
http://cakephp.lighthouseapp.com/projects/42648/tickets/882-regression-for-plugins-assets-with-assetcompress-disabled-introduced-in-fix-for-864

...but not all.

It may be related to server configuration and (PHP?) server settings.

Two questions:
1. Any ideas of where to start looking, and what to look at?
2. Should the debug.log still log errors of code that had used the
suppression character (@) ?

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: Auth Component - string to lowercase

2010-12-15 Thread euromark
if you use utf8_unicode_ci you dont have to
ci stands for case insensitive^^


On 15 Dez., 16:59, Stephen  wrote:
> Hey
>
> I like to convert my username and password strings to lowercase on any
> submit (to prevent case-sensitive data). The problem I have is that the Auth
> Component automatically hashes the password field before I get the
> opportunity to manipulate the string. I'm wondering if the only way to
> achieve this result is to use fields such as "password_original" and then
> convert that to a hashed password field afterwards?
>
> It would be nicer to do some model magic and reduce the code required in the
> controller.
>
> Look forward to your feedback.
>
> --
> Kind Regards
>  Stephen @ NinjaCoderMonkey
>
>  www.ninjacodermonkey.co.uk

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: CakePHP 2.0 status

2010-12-15 Thread Larry E. Masters
:)

I will say nothing more

-- 
Larry E. Masters


On Wed, Dec 15, 2010 at 3:34 AM, 100rk  wrote:

> I asked the same question in IRC channel 2 weeks ago, and Mark Story
> told me:
>
> "I wouldn't use 2.0 for anything other than toy projects for now."
>
> My situation is the same - I can live with 'unstable' codebase for
> long term project, I'm capable to fix bugs on my own, and if I was
> told "yes, dev release - the one's before pre-alpha - is coming in 6
> months or so", I would have good excuse (for myself) to start using
> 2.0 for one or two projects and therefore help with its development/
> bugfixes/etc. I don't complain about that, because cake's development
> strategy and habit about pre-announcing release dates ;) was proven
> right/useful/smart in past. So, for now, I'm waiting to hear few
> people saying "I am using 2.0 in production" - just like people were
> using 1.2 (and were proud/brave enough to say aloud), when it was
> 'stable enough' - and it was long time before pre-alpha Christmas
> release 4 years ago.
>
> Joshua Muheim: right side of this page
> http://cakephp.lighthouseapp.com/projects/42648-cakephp
>
> 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.comFor
>  more options, visit this group at
> http://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


Auth Component - string to lowercase

2010-12-15 Thread Stephen
Hey

I like to convert my username and password strings to lowercase on any
submit (to prevent case-sensitive data). The problem I have is that the Auth
Component automatically hashes the password field before I get the
opportunity to manipulate the string. I'm wondering if the only way to
achieve this result is to use fields such as "password_original" and then
convert that to a hashed password field afterwards?

It would be nicer to do some model magic and reduce the code required in the
controller.

Look forward to your feedback.

-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

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: Auth Component - string to lowercase

2010-12-15 Thread AD7six
how is that going to magically make the hash of password the same as 
PASSWORD?

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: cakephp requirements question

2010-12-15 Thread avesh upadhyay
problem come
in windows 7 home basic
with wamp server for the php
the error come 404.4
what is the solution

On 12/15/10, mario2027  wrote:
> Try the new PHP resource download site: http://www.phpkode.com  you will
> find
> the exact framework you want! > Hi, try setting the Apache settings for your
> webroot  to allowOverride All in /etc/apache2/sites-available/000-
> default, by default or you virtual host file if present.
> Using mod rewrite from the built in htaccess files in Cake requires
> this.
>
>
>
>
>
> 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
>

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


input field masks

2010-12-15 Thread eldorado2768
I am a newbie at cakephp and so far I like it a lot. My question
relates to data validation. Jquery has some really nice data
validation features that include input masks for dates or phone
numbers, etc. Is there a way to implement a mask on an input field in
cakephp and if someone out there knows, I would appreciate a snippet
of sample code. 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: Incorrect behavior of delete() method

2010-12-15 Thread Andrew Hodirevski
Bump. Anyone can help me?

On 13 дек, 12:41, Andrew Hodirevski  wrote:
> Hello!
> I have three models:
>
> Project
> User
> ProjectsUser
>
> The ProjectsUser table is used for HABTM relations between Project and
> User.
> This is remove() method of Project model:
>
>     function remove($project_id, $user_id)
>     {
>         /*
>          * Проверяем, относится ли выбранный проект к пользователю
>          */
> //        $data = $this->read('', $project_id);
> //
> //        if($data['User'][0]['id'] != $user_id)
> //        {
> //            return false;
> //        }
>
>         /*
>          * Если проект принадлежит пользователю, то удалить его
>          */
>         $result = $this->delete($project_id);
>
>         if(!$result)
>         {
>             return false;
>         }
>
>         return true;
>     }
>
> And remove() method of Projects controller:
>
>         function remove($project_id)
>         {
>             /*
>              * Пробуем удалить проект
>              */
>             $user_id = $this->Session->read('Auth.User.id');
>
>             $result = $this->Project->remove($project_id, $user_id);
>
>             /*
>              * Если возникли ошибки, то отправить их в буфер сообщений
> о результате операций
>              */
>             if(!$result)
>             {
>                 $this->Session->setFlash('Возникли проблемы при
> удалении проекта, попробуйте позже');
>                 $this->redirect(array(
>                     'controller' => 'projects',
>                     'action' => 'index',
>                 ));
>             }
>
>             $this->Session->setFlash('Проект успешно удален');
> //            $this->redirect(array(
> //                'controller' => 'projects',
> //                'action' => 'index',
> //            ));
>         }
>
> So, while debugging I found that Cake makes two queries for delete()
> method: deleting project by project_id from projects table and the
> next:
>
> DELETE FROM `projects_users` WHERE `projects_users`.`user_id` = 4
>
> It means that if User have two Project then after query all relations
> in projects_users table for user_id would be deleted.
> How can I fix this and why Cake deletes from projects_users by user_id
> not by project_id?

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: Incorrect behavior of delete() method

2010-12-15 Thread Andrew Hodirevski
Bump. Anyone can help me?

On 13 дек, 12:41, Andrew Hodirevski  wrote:
> Hello!
> I have three models:
>
> Project
> User
> ProjectsUser
>
> The ProjectsUser table is used for HABTM relations between Project and
> User.
> This is remove() method of Project model:
>
>     function remove($project_id, $user_id)
>     {
>         /*
>          * Проверяем, относится ли выбранный проект к пользователю
>          */
> //        $data = $this->read('', $project_id);
> //
> //        if($data['User'][0]['id'] != $user_id)
> //        {
> //            return false;
> //        }
>
>         /*
>          * Если проект принадлежит пользователю, то удалить его
>          */
>         $result = $this->delete($project_id);
>
>         if(!$result)
>         {
>             return false;
>         }
>
>         return true;
>     }
>
> And remove() method of Projects controller:
>
>         function remove($project_id)
>         {
>             /*
>              * Пробуем удалить проект
>              */
>             $user_id = $this->Session->read('Auth.User.id');
>
>             $result = $this->Project->remove($project_id, $user_id);
>
>             /*
>              * Если возникли ошибки, то отправить их в буфер сообщений
> о результате операций
>              */
>             if(!$result)
>             {
>                 $this->Session->setFlash('Возникли проблемы при
> удалении проекта, попробуйте позже');
>                 $this->redirect(array(
>                     'controller' => 'projects',
>                     'action' => 'index',
>                 ));
>             }
>
>             $this->Session->setFlash('Проект успешно удален');
> //            $this->redirect(array(
> //                'controller' => 'projects',
> //                'action' => 'index',
> //            ));
>         }
>
> So, while debugging I found that Cake makes two queries for delete()
> method: deleting project by project_id from projects table and the
> next:
>
> DELETE FROM `projects_users` WHERE `projects_users`.`user_id` = 4
>
> It means that if User have two Project then after query all relations
> in projects_users table for user_id would be deleted.
> How can I fix this and why Cake deletes from projects_users by user_id
> not by project_id?

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: Prefix routing and different user types

2010-12-15 Thread Dave Maharaj
I guess you never read what I wrote?

-Original Message-
From: chris [mailto:chris@internetlogistics.com] 
Sent: December-15-10 6:39 AM
To: CakePHP
Subject: Re: Prefix routing and different user types

I'm planning on replacing these with a constant at some point. Is
there a cake way of defining things like this?

Are there any other issues with the cake side of things in my code?

On Dec 14, 9:30 pm, Ryan Schmidt  wrote:
> On Dec 14, 2010, at 08:45, chris wrote:
>
> > if($this->Auth->User('accounttype_id')==3)
>
> Using magic numbers (here, 3) is probably a bad idea.
>
> http://en.wikipedia.org/wiki/Magic_number_(programming)#Unnamed_numer...

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

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: Prefix routing and different user types

2010-12-15 Thread chris
As an addition regarding the definition of constants to replace my
magic numbers.

The accountype model stores an id and name, e.g. 3 - admin. So is
there a way I can either use this to define my constants, or some
better cake way of doing this?

Didn't want to get to far into this bit, as my real issue at the
moment is still the account / routing thing.

On Dec 15, 10:09 am, chris  wrote:
> I'm planning on replacing these with a constant at some point. Is
> there a cake way of defining things like this?
>
> Are there any other issues with the cake side of things in my code?
>
> On Dec 14, 9:30 pm, Ryan Schmidt  wrote:
>
> > On Dec 14, 2010, at 08:45, chris wrote:
>
> > > if($this->Auth->User('accounttype_id')==3)
>
> > Using magic numbers (here, 3) is probably a bad idea.
>
> >http://en.wikipedia.org/wiki/Magic_number_(programming)#Unnamed_numer...

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: Prefix routing and different user types

2010-12-15 Thread chris
I'm planning on replacing these with a constant at some point. Is
there a cake way of defining things like this?

Are there any other issues with the cake side of things in my code?

On Dec 14, 9:30 pm, Ryan Schmidt  wrote:
> On Dec 14, 2010, at 08:45, chris wrote:
>
> > if($this->Auth->User('accounttype_id')==3)
>
> Using magic numbers (here, 3) is probably a bad idea.
>
> http://en.wikipedia.org/wiki/Magic_number_(programming)#Unnamed_numer...

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: CakePHP 2.0 status

2010-12-15 Thread 100rk
I asked the same question in IRC channel 2 weeks ago, and Mark Story
told me:

"I wouldn't use 2.0 for anything other than toy projects for now."

My situation is the same - I can live with 'unstable' codebase for
long term project, I'm capable to fix bugs on my own, and if I was
told "yes, dev release - the one's before pre-alpha - is coming in 6
months or so", I would have good excuse (for myself) to start using
2.0 for one or two projects and therefore help with its development/
bugfixes/etc. I don't complain about that, because cake's development
strategy and habit about pre-announcing release dates ;) was proven
right/useful/smart in past. So, for now, I'm waiting to hear few
people saying "I am using 2.0 in production" - just like people were
using 1.2 (and were proud/brave enough to say aloud), when it was
'stable enough' - and it was long time before pre-alpha Christmas
release 4 years ago.

Joshua Muheim: right side of this page 
http://cakephp.lighthouseapp.com/projects/42648-cakephp

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