virtualfields + description cache

2011-12-19 Thread Janos Csikos
Hi All,

I have a problem with the description caching in datasource (CakePHP
1.3.12). Or maybe with my solution.

My problem:
I need to count a value based on other fields in the same table.

My solution:
I used the virtual fields for this. So let MySQL to work rather than
count it in PHP. It is working and fine. I love the clean results.

One of a new feature should give an option to the users to choose
between the columns that used in the virtual fields.
I've sorted this out, but later realised the description caching doesn't helps.

So decided to turn of the description cache in the datasource
(DataSource::__cacheDescription()), which dependent on the
DataSource::cacheSources property (should be false).

I expected the following code to do that in my actual model:

function __construct($id=false,$table=null,$ds=null) {
parent::__construct($id,$table,$ds);
$dbo = $this->getDataSource();
$dbo->cacheSources = false;
$dbo->cacheMethods = false;
}

Actually this is not working. What I did wrong? Any comment could be
helpful! Any other way to solve my problem?

Many thanks,

Janos

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Very strange behaviour of CAKEPHP on login

2011-09-15 Thread Janos Csikos
Hi,

not sure, but it looks like for me if the password ($this->Auth-
>password('demo')) is already encoded, and when it checks then encode it again.

Is that true?

Thanks,
Janos

On Thu, Sep 15, 2011 at 12:11 PM, byqsri  wrote:
> Hi
> I have my CAKEPHP application ... I have create a demo user and an
> action in users controller called "demo" to allow access like demo
> user:
>
> function demo {
>        $this->Auth->logout();
>        $this->data[$this->Auth->fields['username']] = 'demo';
>        $this->data[$this->Auth->fields['password']] = $this->Auth-
>>password('demo');
>        if (!($this->Auth->login($data))) {
>                $this->redirect($this->Auth->loginAction);
>        } else {
>                $this->Session->delete('Auth.redirect');
>                //print_r($this->Session->read('Auth.User.username'));die();
>                $this->Auth->loginRedirect = array('admin' => 
> false,'controller' =>
> 'demo', 'action' => 'index');
>        }
> }
>
> Now in a page of another site I have add a link that redirect to  /
> users/demo of my cake application.
>
> But If I click on this link I don't login in cakephp application and I
> redirect to login page instead that on /demo/index
>
> But If i uncomment the line print_r($this->Session-
>>read('Auth.User.username'));die(); and the I reclick on link I can
> see that it show the correct username "demo".
>
> Can someone help me about this problem?
>
> Many Thanks
>
> --
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Se Ya Cake..bake a dick cake frosting on your face...............

2011-09-15 Thread Janos Csikos
Hi Guys,

I'm Cake fan since 2006 and excited about the coming 2.0, but I have
to say this "CLASSIC trolling" means something.

I mean thats true there is no CakePHP jobs posted.
That's true there is not the latest cake sites are listed in the "just
baked" box on cakephp.org.
And also true the drupal (and ror, zend, ) much more popular than cake:
http://www.google.com/trends?q=cakephp%2C+django%2C+ruby+on+rails%2C+zend+framework&ctab=0&geo=all&date=all&sort=0

Only we (cake community) can change on these:
1. The framework getting better so more developer will like it, but it
still can not be part of the enterprise targets until:
  - there is no developing platform behind that ... I hate saying
that but I'm still developing in textmate rather than "cakeified"
Eclipse or "CloudIDE" (Zend has)
  - there is no centralised Certification System just like Zend
has. (does the community need it?)
2. Why we don't send our last built site to the cake community as
"just baked" (should we?). Actually I don't do that, so who could able
to say that million $$ site is written in cake or not?
3. If that is the tendency, then why we don't publish a very easy
configurable/usable off-self CMS/shop/anything? I'm sure you are also
done some nice idea in cake, not just me. Worth to share?

What do you think? This "seo optimized question strategy" is helps or
just damage prestige of cake?

Please let me know if you agree or disagree with me or you have any comment.

Thanks,
Janos

ps: sorry about my english

On Mon, Sep 12, 2011 at 8:28 AM, rchavik  wrote:
> His style is writing is different compared to previous postings.  Perhaps
> his account was compromised
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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