2.0 Testing Controllers documentation suggestion/correction

2011-10-28 Thread Thiago Campezzi
Hi everyone,

I was taking a look at the documentation for the test suite in CakePHP
2.0 - more specifically the part about testing controller code:

http://book.cakephp.org/2.0/en/development/testing.html#testing-controllers

The code example provided in this heading doesn't include the public
$fixtures line - if you just copy and paste that example, it will run
using the default database connection instead of the test one. This
might have been omitted to make the example simpler, but I think the
consequences of forgetting this line are potentially very dangerous
(you might delete or update live data accidentally!).

Here's a version of the same example that uses test fixtures, thus
causing the test suite to use the test database connection:

class ArticlesControllerTest extends ControllerTestCase {

public $fixtures = array('app.article');

function testIndex() {
$result = $this-testAction('/articles/index');
debug($result);
}

... and so on until the end of the class

I hope this saves someone some trouble when running and debugging
their tests :)

Cheers,
Thiago

-- 
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: How to extract the pots files?

2011-10-28 Thread AD7six


On Oct 27, 7:51 pm, santos dos.santos.char...@gmail.com wrote:
 Resolved! :)
 Thanks!

 My solution:
 I create /vendors/shells/myextract.php :

 class MyextractShell extends Shell {
         var $tasks = array('Extract', 'Myextract');

         function main() {
                 $this-Myextract-execute();
         }

 }

 I create vendors/shells/tasks/myextract.php :

 class MyextractTask extends ExtractTask {

         function __extractTokens() {
                 foreach ($this-__files as $file) {
                         $this-__file = $file;
                         $this-out(sprintf(__('Processing %s...', true), 
 $file));

                         $code = file_get_contents($file);
                         $allTokens = token_get_all($code);
                         $this-__tokens = array();
                         $lineNumber = 1;

                         foreach ($allTokens as $token) {
                                 if ((!is_array($token)) || (($token[0] != 
 T_WHITESPACE)  ($token[0] !=
 T_INLINE_HTML))) {
                                         if (is_array($token)) {
                                                 $token[] = $lineNumber;
                                         }
                                         $this-__tokens[] = $token;
                                 }

                                 if (is_array($token)) {
                                         $lineNumber += count(explode(\n, 
 $token[1])) - 1;
                                 } else {
                                         $lineNumber += count(explode(\n, 
 $token)) - 1;
                                 }
                         }
                         unset($allTokens);
                         $this-__parse('__', array('singular'));
                         $this-__parse('__n', array('singular', 'plural'));
                         $this-__parse('__d', array('domain', 'singular'));
                         $this-__parse('__c', array('singular'));
                         $this-__parse('__dc', array('domain', 'singular'));
                         $this-__parse('__dn', array('domain', 'singular', 
 'plural'));
                         $this-__parse('__dcn', array('domain', 'singular', 
 'plural'));

                         $this-__parse('__myd', array('domain', 'singular'));
                         $this-__parse('__mydn', array('domain', 'singular', 
 'plural'));
                 }
         }

 }

 and execute in terminal: cake myextract

Well done :)

AD

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


Slow reorder TreeBehaviour

2011-10-28 Thread Constantin.FF
I need my tree sorted by each post sort value. Here is the function
dealing with this. But it is executed extremely slow if some of the
parents has more than 20-30 children

function _sortPosts($newSort){
foreach ($newSort AS $id = $value) {
if(is_numeric($value['sort'])){

$this-Post-updateAll(array('Post.sort' = $value['sort']),
array('Post.id' = $id));
} else {

$this-Session-setFlash(__('Non-numeric value given.', true),
'default', array('class' = 'error'));
$this-redirect($this-referer());
}

}
foreach(array_keys($this-data['Post']) as $parent){
$this-Post-reorder(array('id' 
= $parent, 'field' =
'Post.sort', 'order' = 'ASC', 'verify' = true));
}
}

Example:
38 posts, 8 parents and 30 children
5518 queries took 6028 ms
Page rendered in 20032ms.

Is there some other way to do this reorder without such a delay?

-- 
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: Slow reorder TreeBehaviour

2011-10-28 Thread AD7six


On Oct 28, 10:09 am, Constantin.FF constantin...@gmail.com wrote:
 I need my tree sorted by each post sort value. Here is the function
 dealing with this. But it is executed extremely slow if some of the
 parents has more than 20-30 children

         function _sortPosts($newSort){
                         foreach ($newSort AS $id = $value) {
                                 if(is_numeric($value['sort'])){
                                         
 $this-Post-updateAll(array('Post.sort' = $value['sort']),
 array('Post.id' = $id));
                                 } else {
                                         
 $this-Session-setFlash(__('Non-numeric value given.', true),
 'default', array('class' = 'error'));
                                         $this-redirect($this-referer());
                                 }

                         }
                         foreach(array_keys($this-data['Post']) as $parent){
                                                 
 $this-Post-reorder(array('id' = $parent, 'field' =
 'Post.sort', 'order' = 'ASC', 'verify' = true));
                         }

why are you (still? Or do I just have deja vu) using another field to
store the sort order - that's what lft is. if you _just_ call moveDown
on each post in the order you want them to appear the tree will be in
the order you expect.

         }

 Example:
 38 posts, 8 parents and 30 children
 5518 queries took 6028 ms
 Page rendered in 20032ms.

 Is there some other way to do this reorder without such a delay?

The number of queries there most likely indicates an error in the tree
behavior (145 queries per post) - if you look at what those queries
are, you'll most likely be able to identify it and submit a pull
request.

AD

-- 
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: 2.0 Testing Controllers documentation suggestion/correction

2011-10-28 Thread AD7six


On Oct 28, 6:50 am, Thiago Campezzi campe...@gmail.com wrote:
 Hi everyone,

 I was taking a look at the documentation for the test suite in CakePHP
 2.0 - more specifically the part about testing controller code:

 http://book.cakephp.org/2.0/en/development/testing.html#testing-contr...

 The code example provided in this heading doesn't include the public
 $fixtures line - if you just copy and paste that example, it will run
 using the default database connection instead of the test one. This
 might have been omitted to make the example simpler, but I think the
 consequences of forgetting this line are potentially very dangerous
 (you might delete or update live data accidentally!).

 Here's a version of the same example that uses test fixtures, thus
 causing the test suite to use the test database connection:

 class ArticlesControllerTest extends ControllerTestCase {

     public $fixtures = array('app.article');

     function testIndex() {
         $result = $this-testAction('/articles/index');
         debug($result);
     }

 ... and so on until the end of the class

 I hope this saves someone some trouble when running and debugging
 their tests :)

Please click Edit this file 
https://github.com/cakephp/docs/blob/master/en/development/testing.rst

Go on... you know you want to.

AD

-- 
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: Slow reorder TreeBehaviour

2011-10-28 Thread Constantin FF
Not a deja vu, just decided that will be much more comfortable to use a
field with an order number and just once to click Save order than
continuously clicking the moveDown or moveUp links until the desired
position.
Will check the queries

On Fri, Oct 28, 2011 at 11:46 AM, AD7six andydawso...@gmail.com wrote:



 On Oct 28, 10:09 am, Constantin.FF constantin...@gmail.com wrote:
  I need my tree sorted by each post sort value. Here is the function
  dealing with this. But it is executed extremely slow if some of the
  parents has more than 20-30 children
 
  function _sortPosts($newSort){
  foreach ($newSort AS $id = $value) {
  if(is_numeric($value['sort'])){
 
 $this-Post-updateAll(array('Post.sort' = $value['sort']),
  array('Post.id' = $id));
  } else {
 
 $this-Session-setFlash(__('Non-numeric value given.', true),
  'default', array('class' = 'error'));
 
 $this-redirect($this-referer());
  }
 
  }
  foreach(array_keys($this-data['Post']) as
 $parent){
 
 $this-Post-reorder(array('id' = $parent, 'field' =
  'Post.sort', 'order' = 'ASC', 'verify' = true));
  }

 why are you (still? Or do I just have deja vu) using another field to
 store the sort order - that's what lft is. if you _just_ call moveDown
 on each post in the order you want them to appear the tree will be in
 the order you expect.

  }
 
  Example:
  38 posts, 8 parents and 30 children
  5518 queries took 6028 ms
  Page rendered in 20032ms.
 
  Is there some other way to do this reorder without such a delay?

 The number of queries there most likely indicates an error in the tree
 behavior (145 queries per post) - if you look at what those queries
 are, you'll most likely be able to identify it and submit a pull
 request.

 AD

 --
 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: Going back to school: ACL

2011-10-28 Thread alaxos
Hi Jeremy,

As far as I know, the core ACL does not support multiple groups per
user.

Before using ACL, I used myself a home made component that allowed to
grant/deny access based on roles membership and action prefixes like
you do. It used to work :-) and it also supported many-to-many users-
groups. But since I have changed my habit, and I now use ACL. As
mentionned by zuha, I prefer the idea to have the possibility to grant/
deny specific permission to someone or some people without having to
update the code. Even if it now does not support many-to-many users-
groups anymore, I think it is more flexible. But I also have to admit
that I never developped an application with a lot of different
profiles (so far 4-5 max).

nIcO

On Oct 27, 6:48 pm, Jeremy Burns | Class Outfit
jeremybu...@classoutfit.com wrote:
 Thanks Richard.

 Your point about flexibility and extensibility is a good one. You'd define 
 specific views to do specific functions and then restrict them with 
 permissions rather than a prefix. That also means one view can be used by 
 more than one group (although I guess you could equally do that with 
 $this-render).

 My second question is the one that puzzles me most. I've designed some 
 systems where this is very typical; members of staff are department heads, 
 managers, subordinates, team members, committee members and so on. So one 
 person changes his role (group) throughout a single session. I'd be 
 interested to see what others have to say too.

 I have some SQL that could speed up the acl table reads if you are using 
 Innodb.

 Jeremy Burns
 Class Outfit

 http://www.classoutfit.com

 On 27 Oct 2011, at 17:32, zuha wrote:







  #1 : Would require a prefix for every role.   admin_index, manager_index, 
  user_index, guest_index, etc.   With ACL being database driven you can have 
  unlimited user roles and not be required to add new prefixes every time you 
  add a role.

  #2 : I don't know, interesting question.  It sounds kind of a-typical to me 
  though.  You would probably add a 3rd group in that rare case called 
  something like, board-teachers.  

  #3 : Yes and its not small.  It can be large and a major slow down.

  ACL is very flexible but the flexibility comes with the downside of speed 
  performance.  I'm quite sure there are caching solutions to get around it, 
  but I have not gotten that far yet (even after 2 years of using ACL 
  extensively).

  --
  Our newest site for the community: CakePHP Video 
  Tutorialshttp://tv.cakephp.org
  Check out the new CakePHP Questions sitehttp://ask.cakephp.organd 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 
  athttp://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: Slow reorder TreeBehaviour

2011-10-28 Thread AD7six


On Oct 28, 10:58 am, Constantin FF constantin...@gmail.com wrote:
 Not a deja vu, just decided that will be much more comfortable to use a
 field with an order number and just once to click Save order than
 continuously clicking the moveDown or moveUp links until the desired
 position.

Who suggested doing that?

-- 
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: Slow reorder TreeBehaviour

2011-10-28 Thread Constantin FF
Is there a better way for doing that? There is something similar in other
CSM like joomla

On Fri, Oct 28, 2011 at 12:11 PM, AD7six andydawso...@gmail.com wrote:



 On Oct 28, 10:58 am, Constantin FF constantin...@gmail.com wrote:
  Not a deja vu, just decided that will be much more comfortable to use a
  field with an order number and just once to click Save order than
  continuously clicking the moveDown or moveUp links until the desired
  position.

 Who suggested doing that?

 --
 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: Slow reorder TreeBehaviour

2011-10-28 Thread AD7six


On Oct 28, 11:16 am, Constantin FF constantin...@gmail.com wrote:
 Is there a better way for doing that? There is something similar in other

I haven't written anything that implied/suggested/required changing
your existing interface, only your php code.

function _sortPosts($newSort){
sort($newSort);
foreach ($newSort AS $id = $value) {
 $this-Post-id = $id;
 $this-Post-moveDown(true);
}

^That's what I suggested in your previous thread. if newSort is nested
- adjust appropriately.

AD

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


[Ask] Installer CMS like on CakePHP??

2011-10-28 Thread thom
I am curious about making my app to have a 'cms like' installer. I am using
cakephp 1.3.8 for now. Could anybody tell me any references for me to be
learned?

Thank you.

-- 
Regards,,,
thom
http://mynameisthom.blogspot.com

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


running tests from the command line

2011-10-28 Thread euromark
how can one run tests from the command line?
the core tests are listed with
cake testsuite core
so far so good

but the app tests do not show
especially tests in a plugin I cannot get to list or call
cake testsuite app Tools.AllCakeTests
does not work


-- 
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: running tests from the command line

2011-10-28 Thread Matteo Landi
Hi,

I don't know about plugins but on my machine I am able to run app
tests with `cake testsuite app AllController' (supposed you have a
test inside 'app/Test/Case/AllControllerTest'), or `cake testsuite app
Case/PostsController' (supposed you have
'app/Test/Case/Controller/PostsControllerTest').


Cheers,
Matteo

On Fri, Oct 28, 2011 at 11:56 AM, euromark dereurom...@googlemail.com wrote:
 how can one run tests from the command line?
 the core tests are listed with
    cake testsuite core
 so far so good

 but the app tests do not show
 especially tests in a plugin I cannot get to list or call
    cake testsuite app Tools.AllCakeTests
 does not work


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




-- 
http://www.matteolandi.net/

-- 
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: Returning new value from private function

2011-10-28 Thread euromark
you probably mean protected
in a framework environment there is no reason to use private classes
or private variables.

tip:
look at 2.0
it does not have any private stuff (anymore).

protected _myMethod()

lg mark


On 28 Okt., 07:23, Jeremy Burns | Class Outfit
jeremybu...@classoutfit.com wrote:
 Calling a private function from app_controller into another controller ought 
 to work. The only thing I can see from your pasted code is that all you are 
 doing is calling the function (which is returning a value) but not collecting 
 it. Try die(debug($this-__utfConvertChar($tempurl))); to see if it is indeed 
 running.

 Jeremy Burns
 Class Outfit

 http://www.classoutfit.com

 On 28 Oct 2011, at 03:49, MetZ wrote:







  Hi all..

  I am not sure if I am doing this correct, but I am trying to return a
  private function from my app_controller.php to posts_controller.php

  App_controller.php

  function __utfConvertChar($tempurl) {
             $j = mb_strlen($tempurl);
             for ($k = 0; $k  mb_strlen($tempurl); $k++) {
             $char = mb_substr($tempurl, $k, 1);
                             if($this-__utfCharToNumber($char) == '195184' 
  || $this-
  __utfCharToNumber($char) == '195152')
                             {
                             $newurl = str_replace($char,'o',$tempurl);
                             }
                             if($this-__utfCharToNumber($char) == '195165' 
  || $this-
  __utfCharToNumber($char) == '195133' || $this-
  __utfCharToNumber($char) == '195164' || $this-
  __utfCharToNumber($char) == '195132')
                             {
                             $newurl = str_replace($char,'aa',$tempurl);
                             }
                             if($this-__utfCharToNumber($char) == '195188' 
  || $this-
  __utfCharToNumber($char) == '195156')
                             {
                             $newurl = str_replace($char,'u',$tempurl);
                             }
             }
             return $newurl;
     }
     function __utfCharToNumber($char) {
             $i = 0;
             $number = '';
             while (isset($char{$i})) {
             $number.= ord($char{$i});
             ++$i;
             }
             return $number;
     }

  Post_controller.php
  $this-__utfConvertChar($tempurl);

  Am I doing something wrong here? I can not see what.. Please assist
  me, and/or let me know that this is not the best practice to do this.

  Thanks all for any help
  Regards!
  -Tom

  I am unable to retrieve the $newurl to my posts_controller.php

  --
  Our newest site for the community: CakePHP Video 
  Tutorialshttp://tv.cakephp.org
  Check out the new CakePHP Questions sitehttp://ask.cakephp.organd 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 
  athttp://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: running tests from the command line

2011-10-28 Thread euromark
ah ok
and plugins are

cake testsuite Tools AllCakeTests

i found it here:
https://github.com/cakephp/docs/blob/master/en/development/testing.rst


On 28 Okt., 12:04, Matteo Landi landima...@gmail.com wrote:
 Hi,

 I don't know about plugins but on my machine I am able to run app
 tests with `cake testsuite app AllController' (supposed you have a
 test inside 'app/Test/Case/AllControllerTest'), or `cake testsuite app
 Case/PostsController' (supposed you have
 'app/Test/Case/Controller/PostsControllerTest').

 Cheers,
 Matteo









 On Fri, Oct 28, 2011 at 11:56 AM, euromark dereurom...@googlemail.com wrote:
  how can one run tests from the command line?
  the core tests are listed with
     cake testsuite core
  so far so good

  but the app tests do not show
  especially tests in a plugin I cannot get to list or call
     cake testsuite app Tools.AllCakeTests
  does not work

  --
  Our newest site for the community: CakePHP Video 
  Tutorialshttp://tv.cakephp.org
  Check out the new CakePHP Questions sitehttp://ask.cakephp.organd 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 
  athttp://groups.google.com/group/cake-php

 --http://www.matteolandi.net/

-- 
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: Slow reorder TreeBehaviour

2011-10-28 Thread Constantin.FF
Probably this could work but will be almost impossible to calculate
the step for moveDown of each post also in this action are involved
parents and children so in the $newSort each post is as post_id =
order number. So if I do it like you suggested, first I will have to
separate posts with same parent_id and then to moveDown each of them.

On Oct 28, 12:23 pm, AD7six andydawso...@gmail.com wrote:
 On Oct 28, 11:16 am, Constantin FF constantin...@gmail.com wrote:

  Is there a better way for doing that? There is something similar in other

 I haven't written anything that implied/suggested/required changing
 your existing interface, only your php code.

         function _sortPosts($newSort){
                         sort($newSort);
                         foreach ($newSort AS $id = $value) {
                                  $this-Post-id = $id;
                                  $this-Post-moveDown(true);
                         }

 ^That's what I suggested in your previous thread. if newSort is nested
 - adjust appropriately.

 AD

-- 
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: [Ask] Installer CMS like on CakePHP??

2011-10-28 Thread Simon Males
Croogo has an installer, and its an open source CMS.

http://croogo.org/

Haven't only looked at it briefly the installer seems to be a plugin.

On Fri, Oct 28, 2011 at 8:49 PM, thom cyber.phanto...@gmail.com wrote:
 I am curious about making my app to have a 'cms like' installer. I am using
 cakephp 1.3.8 for now. Could anybody tell me any references for me to be
 learned?
 Thank you.

 --
 Regards,,,
 thom
 http://mynameisthom.blogspot.com

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




-- 
Simon Males

-- 
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: Slow reorder TreeBehaviour

2011-10-28 Thread AD7six


On Oct 28, 12:37 pm, Constantin.FF constantin...@gmail.com wrote:
 Probably this could work but will be almost impossible to calculate
 the step for moveDown

_WHY_ would you need to calculate that? The suspicion arises that you
aren't reading much of what I write.

  of each post also in this action are involved
 parents and children so in the $newSort each post is as post_id =
 order number. So if I do it like you suggested, first I will have to
 separate posts with same parent_id and then to moveDown each of them.

Well I don't know what your interface is, but whatever it is the code
you're writing, and the extra sort field, is not necessary to achieve
what you're doing. Visually I'd implement what you're doing as 1) move
everything on the screen 2) click the save button. It's not that hard.

You might also just want to use a materialized path (add a field
called position, store 1.1.1, 1.1.2, 1.1.3 in it and sort by this
whenever you render your data). But I kind of give up trying to
explain how to use the tree behavior... have fun.

AD

-- 
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: Slow reorder TreeBehaviour

2011-10-28 Thread Constantin FF
Thanks for the time and ideas. I continue working on both methods.

On Fri, Oct 28, 2011 at 1:47 PM, AD7six andydawso...@gmail.com wrote:



 On Oct 28, 12:37 pm, Constantin.FF constantin...@gmail.com wrote:
  Probably this could work but will be almost impossible to calculate
  the step for moveDown

 _WHY_ would you need to calculate that? The suspicion arises that you
 aren't reading much of what I write.

   of each post also in this action are involved
  parents and children so in the $newSort each post is as post_id =
  order number. So if I do it like you suggested, first I will have to
  separate posts with same parent_id and then to moveDown each of them.

 Well I don't know what your interface is, but whatever it is the code
 you're writing, and the extra sort field, is not necessary to achieve
 what you're doing. Visually I'd implement what you're doing as 1) move
 everything on the screen 2) click the save button. It's not that hard.

 You might also just want to use a materialized path (add a field
 called position, store 1.1.1, 1.1.2, 1.1.3 in it and sort by this
 whenever you render your data). But I kind of give up trying to
 explain how to use the tree behavior... have fun.

 AD

 --
 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: IE8 activate another windows

2011-10-28 Thread WebbedIT
should only happen if target=_blank have you got a link to the page
so we can test it?

On Oct 28, 3:46 am, iphone5 sk.koiz...@gmail.com wrote:
 I am developing web app with cakephp. Recently I noticed that whenever
 I click on the link on a page it activate another window for some
 reason.
 It looks ok but when I have multiple windows open ( like browsers or
 Zend Studio or photoshop ) and click submit or links on a page it just
 enable another window active and
 the IE goes behind. Is this wel-kown issue? I tried 3 different PCs
 and seeing the same thing happen.

-- 
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: Multiply foreign keys in one table.

2011-10-28 Thread WebbedIT
I don't know if this can be done with HABTM (doubt it as HABTM is an
automagic feature meant to join two tables only) but I for one would
modelise the join and have something like:

Staff hasMany PositionSchoolStaff
School hasMany PositionSchoolStaff
Position hasMany PositionSchoolStaff
PositionSchoolStaff belongsTo Staff, School, Position

This way you can do a heck of a lot more in a more understandable way
with your join table and add extra fields such as starts and ends to
give more detail about the position held.

HTH, Paul

On Oct 27, 4:35 pm, Richard Neil Roque roquerichardn...@gmail.com
wrote:
 Ah. sorry, i didn't post my question.

 I would like to ask on how would i implement HABTM relationship in the
 four tables?

 Looking like

 Staffs
      School #1 - Science Teacher 1
      School #1 - Science Teacger 2
      School #2 - Physic Professor

 Thanks

 On Oct 27, 1:53 pm, Richard Neil Roque roquerichardn...@gmail.com
 wrote:







  My program is consist of

  tables:
       staff
       schools
       positions
       positions_schools_staffs

  1 staff can be in in different school
  1 staff can have different position in every school.

  I do it using HABTM to hospital,

  So one staff can have many hospital
  But i dont know how to retrieve the positions.

  positions_schools_staffs structure:

  id                         int
  staff_id                 int
  school_id              int
  position_id            int
  created                date
  modified               date

  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


Re: [Ask] Installer CMS like on CakePHP??

2011-10-28 Thread thom
On Fri, Oct 28, 2011 at 5:39 PM, Simon Males s...@sime.net.au wrote:

 Croogo has an installer, and its an open source CMS.

 http://croogo.org/

 Haven't only looked at it briefly the installer seems to be a plugin.


Hmm.. looks like complex enough in croogo. Are there any 'easy' (simple) way
to do it? I mean without YAML (Croogo has it) ..

-- 
Regards,,,
thom
http://mynameisthom.blogspot.com

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


2.0 Cookbook's Simple Acl controlled app not working

2011-10-28 Thread fly2279
I'm having trouble with the cookbook's acl app. I followed the
tutorial EXACTLY and after assigning permissions, I can't access any
of the acl protected (not explicitly allowed in beforeFilter) actions
when logged in with a user that belongs to group 1 in the initDB
method.

Is there a piece missing from the cookbook to make it work? I have the
following code below in my AppController:

[code]

public $components = array(

'Acl',

'Auth' = array('authorize' = array('Actions')),

'Session'

);

public $helpers = array('Html', 'Form', 'Session');

function beforeFilter() {

//Configure AuthComponent

$this-Auth-loginAction = array('controller' = 'users', 'action' =
'login');

$this-Auth-logoutRedirect = array('controller' = 'users', 'action'
= 'login');

$this-Auth-loginRedirect = array('controller' = 'posts', 'action'
= 'add');

$this-Auth-allow('display');

}[/code]

-- 
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: [Ask] Installer CMS like on CakePHP??

2011-10-28 Thread Andras Kende
http://cakebaker.42dh.com/2007/04/16/writing-an-installer-for-your-cakephp-application/

Andras Kende

On Oct 28, 2011, at 8:59 AM, thom wrote:

 On Fri, Oct 28, 2011 at 5:39 PM, Simon Males s...@sime.net.au wrote:
 Croogo has an installer, and its an open source CMS.
 
 http://croogo.org/
 
 Haven't only looked at it briefly the installer seems to be a plugin.
 
 
 Hmm.. looks like complex enough in croogo. Are there any 'easy' (simple) way 
 to do it? I mean without YAML (Croogo has it) ..
 
 -- 
 Regards,,,
 thom
 http://mynameisthom.blogspot.com
 
 
 -- 
 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


Having a hard time with getting overwrite to work

2011-10-28 Thread Yves S. Garret
Ok, so I'm trying to setup cake on a linux machine (Ubuntu 11.04).  I got
the database connection to work fine, tmp is readable/writable, etc.

But there is still no CSS in the default cake page.  I looked at what the
book said and I'm pretty sure that I set the correct settings, but no go.
Here is my httpd.conf:
http://bin.cakephp.org/view/914367831

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


Cache FileEngine

2011-10-28 Thread Sandreu
Hello,

I made an increment for file engine system.
My problem was that in APC cache, the cache is not shared between CLI
and the web app... then I did that with fileEngine using flock... it's
not workink on windows.




?php

/**
 * FileEngine with inc/dec
 *
 * @author Sandreu
 *
 * @property SplFileObject $_File
 */

App::import('Cache/Engine', 'FileEngine');

class FileIncEngine extends FileEngine {

public function increment($key, $offset = 1) {
if ($this-settings['isWindows']) throw new
CacheException(__d('cake_dev', 'Files cannot be atomically decremented
on windows.'));
if (!$this-_init || $this-_setKey($key) === false) {
if (!$this-write($key, $offset, $this-
settings['duration'])) return false;
return $offset;
}

$lock = $this-settings['lock'];
$this-settings['lock'] = false;

$this-_File-flock(LOCK_EX);

$val = $this-read($key);
if (!is_integer($val)) {
$this-_File-flock(LOCK_UN);
return false;
} else {
$val += $offset;
}

$this-_File-rewind();
if (!$this-write($key, $val, $this-settings['duration']))
{echo 'error'; return false; }

$this-_File-flock(LOCK_UN);

$this-settings['lock'] = $lock;
return $val;
}

public function decrement($key, $offset = 1) {
return $this-increment($key, 0-$offset);
}
}

?

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


Html::scriptStart can't use when requestAction in 2.0

2011-10-28 Thread Điển vũ
Html::scriptStart can't use when requestAction in 2.0

-- 
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: FormHelper field names for related model

2011-10-28 Thread handsofaten
I went ahead and submitted a ticket for this, I guess I'll stop using
FormHelper for these fields until I get some resolution on this issue.

http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/2180-formhelper-not-creating-sequential-associated-model-fields

On Oct 21, 11:27 am, handsofaten b...@saharagray.com wrote:
 In Cake 1.3, it would generate fields like this:

 input name=data[Author][0][name] type=text value=John Steinbeck
 id=Author0Name

 But in Cake 2.0, I'm getting:

 input name=data[Author][Author] type=text value=John Steinbeck
 id=AuthorAuthor

 Which doesn't handle multiple fields properly. Anyone know what might
 be going on here?

-- 
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: Meio Image Upload in CakePhp 2.0 fail plz help

2011-10-28 Thread driss
thanks it works now just fine thank you

-- 
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: Overriding form helper error messages in CakePHP 2.0

2011-10-28 Thread Richard@Home
Shamless bump!

On Oct 24, 3:44 pm, Richard@Home richardath...@gmail.com wrote:
 Hi all.

 I have the following $validate in my User model:

         var $validate = array(
                 'email'=array(
                         'required'=array(
                                 'rule'='notEmpty',
                                 'message'='cannot be blank'
                         ),
                         'email'=array(
                                 'rule'='email',
                                 'message'='must be a valid email address'
                         ),
                         'unique'=array(
                                 'rule'='isUnique',
                                 'message'='that email is already in use'
                         )
                 ),
                 'password'=array(
                         'required'=array(
                                 'rule'='notEmpty',
                                 'message'='cannot be blank'
                         ),
                         'length'=array(
                                 'rule'=array('minLength', 6),
                                 'message'='must be at least 6 letters, 
 numbers or symbols'
                         ),
                         'matches'=array(
                                 'rule'='passwordsMatch',
                                 'message'='passwords do not match'
                         )
                 )
         );

 And I'm trying to override the 'unique' email address message in my
 form with:

 echo $this-Form-input('User.email', array(
         'error'=array(
                 'unique' = 'That email is already in use. Have you ' . 
 $this-Html-link('forgotten your password',

 array('action'='forgotten_password')) . '?'
         )
 ));

 But it's still displaying the default validate message, not the custom
 one.

 What am I doing wrong?

 Thanks in advance.

-- 
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: Having a hard time with getting overwrite to work

2011-10-28 Thread Stephen Latham
Have you installed and enabled mod_rewrite ?


On 28 Oct 2011, at 15:42, Yves S. Garret yoursurrogate...@gmail.com wrote:

 Ok, so I'm trying to setup cake on a linux machine (Ubuntu 11.04).  I got the 
 database connection to work fine, tmp is readable/writable, etc.
 
 But there is still no CSS in the default cake page.  I looked at what the 
 book said and I'm pretty sure that I set the correct settings, but no go.  
 Here is my httpd.conf:
 http://bin.cakephp.org/view/914367831
 
 -- 
 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: FormHelper field names for related model

2011-10-28 Thread handsofaten
This was a bug that is resolved in the latest version on github. See
the ticket for more information.

On Oct 28, 10:22 am, handsofaten b...@saharagray.com wrote:
 I went ahead and submitted a ticket for this, I guess I'll stop using
 FormHelper for these fields until I get some resolution on this issue.

 http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/2180-...

 On Oct 21, 11:27 am, handsofaten b...@saharagray.com wrote:







  In Cake 1.3, it would generate fields like this:

  input name=data[Author][0][name] type=text value=John Steinbeck
  id=Author0Name

  But in Cake 2.0, I'm getting:

  input name=data[Author][Author] type=text value=John Steinbeck
  id=AuthorAuthor

  Which doesn't handle multiple fields properly. Anyone know what might
  be going on here?

-- 
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: Having a hard time with getting overwrite to work

2011-10-28 Thread Yves S. Garret
If you look at line #120 in my post of httpd.conf, it's displayed there.
And here is the contents of my /opt/lampp/modules directory:

http://bin.cakephp.org/view/1838304409   - on line 64

On Fri, Oct 28, 2011 at 10:42 AM, Yves S. Garret yoursurrogate...@gmail.com
 wrote:

 Ok, so I'm trying to setup cake on a linux machine (Ubuntu 11.04).  I got
 the database connection to work fine, tmp is readable/writable, etc.

 But there is still no CSS in the default cake page.  I looked at what the
 book said and I'm pretty sure that I set the correct settings, but no go.
 Here is my httpd.conf:
 http://bin.cakephp.org/view/914367831



-- 
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: Having a hard time with getting overwrite to work

2011-10-28 Thread Thiago Belem
Maybe your

AllowOverride None

?
--
***Thiago Belem*
Desenvolvedor
Rio de Janeiro - RJ - Brasil

+55 (21) 8865.9250
thiagobelem.net
cont...@thiagobelem.net

*Skype / gTalk **»* thiago.belem.web
*LinkedIn* *»* br.linkedin.com/in/thiagobelem/pt*
Assando Sites*, curso de CakePHP *»* assando-sites.com.br


On Fri, Oct 28, 2011 at 14:37, Yves S. Garret yoursurrogate...@gmail.comwrote:

 If you look at line #120 in my post of httpd.conf, it's displayed there.
 And here is the contents of my /opt/lampp/modules directory:

 http://bin.cakephp.org/view/1838304409   - on line 64


 On Fri, Oct 28, 2011 at 10:42 AM, Yves S. Garret 
 yoursurrogate...@gmail.com wrote:

 Ok, so I'm trying to setup cake on a linux machine (Ubuntu 11.04).  I got
 the database connection to work fine, tmp is readable/writable, etc.

 But there is still no CSS in the default cake page.  I looked at what the
 book said and I'm pretty sure that I set the correct settings, but no go.
 Here is my httpd.conf:
 http://bin.cakephp.org/view/914367831


  --
 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: Having a hard time with getting overwrite to work

2011-10-28 Thread Yves S. Garret
Was that on line 350?  If so, I just tried that and it didn't work.  Yes, I
restarted apache after making the change.

On Fri, Oct 28, 2011 at 12:39 PM, Thiago Belem cont...@thiagobelem.netwrote:

 Maybe your

 AllowOverride None

 ?
 --
 ***Thiago Belem*
 Desenvolvedor
 Rio de Janeiro - RJ - Brasil

 +55 (21) 8865.9250
 thiagobelem.net
 cont...@thiagobelem.net

 *Skype / gTalk **»* thiago.belem.web
 *LinkedIn* *»* br.linkedin.com/in/thiagobelem/pt*
 Assando Sites*, curso de CakePHP *»* assando-sites.com.br


 On Fri, Oct 28, 2011 at 14:37, Yves S. Garret 
 yoursurrogate...@gmail.comwrote:

 If you look at line #120 in my post of httpd.conf, it's displayed there.
 And here is the contents of my /opt/lampp/modules directory:

 http://bin.cakephp.org/view/1838304409   - on line 64


 On Fri, Oct 28, 2011 at 10:42 AM, Yves S. Garret 
 yoursurrogate...@gmail.com wrote:

 Ok, so I'm trying to setup cake on a linux machine (Ubuntu 11.04).  I got
 the database connection to work fine, tmp is readable/writable, etc.

 But there is still no CSS in the default cake page.  I looked at what the
 book said and I'm pretty sure that I set the correct settings, but no go.
 Here is my httpd.conf:
 http://bin.cakephp.org/view/914367831


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


-- 
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: Overriding form helper error messages in CakePHP 2.0

2011-10-28 Thread Jeremy Burns | Class Outfit
Just did some testing. It worked for a rule 'notempty' but is ignored for the 
rule 'unique' (or isUnique).

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 28 Oct 2011, at 16:43, Richard@Home wrote:

 Shamless bump!
 
 On Oct 24, 3:44 pm, Richard@Home richardath...@gmail.com wrote:
 Hi all.
 
 I have the following $validate in my User model:
 
 var $validate = array(
 'email'=array(
 'required'=array(
 'rule'='notEmpty',
 'message'='cannot be blank'
 ),
 'email'=array(
 'rule'='email',
 'message'='must be a valid email address'
 ),
 'unique'=array(
 'rule'='isUnique',
 'message'='that email is already in use'
 )
 ),
 'password'=array(
 'required'=array(
 'rule'='notEmpty',
 'message'='cannot be blank'
 ),
 'length'=array(
 'rule'=array('minLength', 6),
 'message'='must be at least 6 letters, 
 numbers or symbols'
 ),
 'matches'=array(
 'rule'='passwordsMatch',
 'message'='passwords do not match'
 )
 )
 );
 
 And I'm trying to override the 'unique' email address message in my
 form with:
 
 echo $this-Form-input('User.email', array(
 'error'=array(
 'unique' = 'That email is already in use. Have you ' . 
 $this-Html-link('forgotten your password',
 
 array('action'='forgotten_password')) . '?'
 )
 ));
 
 But it's still displaying the default validate message, not the custom
 one.
 
 What am I doing wrong?
 
 Thanks in advance.
 
 -- 
 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: Installer CMS like on CakePHP??

2011-10-28 Thread Miles J
I wrote many installers for Cake and I would highly suggest doing a
shell script.

https://github.com/milesj/cake-forum/blob/master/vendors/shells/install.php

On Oct 28, 7:31 am, Andras Kende and...@kende.com wrote:
 http://cakebaker.42dh.com/2007/04/16/writing-an-installer-for-your-ca...

 Andras Kende

 On Oct 28, 2011, at 8:59 AM, thom wrote:







  On Fri, Oct 28, 2011 at 5:39 PM, Simon Males s...@sime.net.au wrote:
  Croogo has an installer, and its an open source CMS.

 http://croogo.org/

  Haven't only looked at it briefly the installer seems to be a plugin.

  Hmm.. looks like complex enough in croogo. Are there any 'easy' (simple) 
  way to do it? I mean without YAML (Croogo has it) ..

  --
  Regards,,,
  thom
 http://mynameisthom.blogspot.com

  --
  Our newest site for the community: CakePHP Video 
  Tutorialshttp://tv.cakephp.org
  Check out the new CakePHP Questions sitehttp://ask.cakephp.organd 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 
  athttp://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: Having a hard time with getting overwrite to work

2011-10-28 Thread Yves S. Garret
Yeah, I'm using XAMPP.  The only command in that sequence that I didn't run
was:

sudo a2enmod rewrite


Still doesn't work...


2011/10/28 Stephen Latham ste.lat...@gmail.com

 I have just done this about 2 days ago only ubuntu 11.10 I followed this: -



 http://komunitasweb.com/2009/02/cakephp-tutorial-installing-cakephp-on-ubuntu/

 Worked No problems.



 On 28 Oct 2011, at 18:11, Yves S. Garret yoursurrogate...@gmail.com
 wrote:

 I was mucking around with httpd.conf, trying to get it to work, so it's
 likely some of the info has changed and I'll repost the file.

 http://bin.cakephp.org/view/620838662
 http://bin.cakephp.org/view/620838662

 On Fri, Oct 28, 2011 at 1:10 PM, Yves S. Garret yoursurrogate...@gmail.com
 yoursurrogate...@gmail.com wrote:

 I have Ubuntu 11.04.  I don't have SELinux installed.  And since I have
 yet to see that as an issue in the past, I'm inclined to believe that this
 is not the problem at this moment.


 2011/10/28 Roberto Carlos Rubio Rodríguez  robertorubiorg...@gmail.com
 robertorubiorg...@gmail.com

 Try to disable SELinux.


 Roberto




  *---Mensaje original---*

  *De:* Yves S. Garret yoursurrogate...@gmail.com
 *Fecha:* 28/10/2011 11:37:41 a.m.
 *Para:* CakePHP cake-php@googlegroups.com
 *Asunto:* Re: Having a hard time with getting overwrite to work

 If you look at line #120 in my post of httpd.conf, it's displayed there.
 And here is the contents of my /opt/lampp/modules directory:

 http://bin.cakephp.org/view/1838304409
 http://bin.cakephp.org/view/1838304409   - on line 64

 On Fri, Oct 28, 2011 at 10:42 AM, Yves S. Garret 
 yoursurrogate...@gmail.com
 yoursurrogate...@gmail.com wrote:
 Ok, so I'm trying to setup cake on a linux machine (Ubuntu 11.04).  I got
 the database connection to work fine, tmp is readable/writable, etc.

 But there is still no CSS in the default cake page.  I looked at what the
 book said and I'm pretty sure that I set the correct settings, but no go.
 Here is my httpd.conf:
  http://bin.cakephp.org/view/914367831
 http://bin.cakephp.org/view/914367831


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


 To unsubscribe from this group, send email to
 cake-php%2bunsubscr...@googlegroups.com
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php
 http://groups.google.com/group/cake-php


 http://www.incredimail.com/?did=10500id=619282ppd=2694,201107041713,10,1,603981457404293626rui=128454911sd=20111028


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


 http://www.incredimail.com/?did=10500id=619282ppd=2694,201107041713,10,1,603981457404293626rui=128454911sd=20111028

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


 To unsubscribe from this group, send email to
  cake-php%2bunsubscr...@googlegroups.com
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php
 http://groups.google.com/group/cake-php



  --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.orghttp://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org
 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
 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: Having a hard time with getting overwrite to work

2011-10-28 Thread Justin Edwards
My advice, make sure the first Directory tag has AllowOveride ALL.   Also
make sure the correct user (maybe www-data, apache, or nobody) has ownership
of your cake directory.  You may need to do a chown -R
username:groupname /home/ats/Documents/Development/CakePHP . If your user
ats is not the apache httpd user, then you will want to add yourself to the
group of that user using sudo adduser ats www-data(or correct group), and
make sure you give group permissions using chmod -R
g+swX /home/ats/Documents/Development/CakePHP .  Then restart everything and
cross your fingers.

You may want to clear your browser cache too.

On Fri, Oct 28, 2011 at 12:46 PM, Yves S. Garret yoursurrogate...@gmail.com
 wrote:

 Yeah, I'm using XAMPP.  The only command in that sequence that I didn't run
 was:

 sudo a2enmod rewrite


 Still doesn't work...



 2011/10/28 Stephen Latham ste.lat...@gmail.com

 I have just done this about 2 days ago only ubuntu 11.10 I followed this:
 -


 http://komunitasweb.com/2009/02/cakephp-tutorial-installing-cakephp-on-ubuntu/

 Worked No problems.



 On 28 Oct 2011, at 18:11, Yves S. Garret yoursurrogate...@gmail.com
 wrote:

 I was mucking around with httpd.conf, trying to get it to work, so it's
 likely some of the info has changed and I'll repost the file.

 http://bin.cakephp.org/view/620838662
 http://bin.cakephp.org/view/620838662

 On Fri, Oct 28, 2011 at 1:10 PM, Yves S. Garret yoursurrogate...@gmail.com
 yoursurrogate...@gmail.com wrote:

 I have Ubuntu 11.04.  I don't have SELinux installed.  And since I have
 yet to see that as an issue in the past, I'm inclined to believe that this
 is not the problem at this moment.


 2011/10/28 Roberto Carlos Rubio Rodríguez robertorubiorg...@gmail.com
 robertorubiorg...@gmail.com

 Try to disable SELinux.


 Roberto




  *---Mensaje original---*

  *De:* Yves S. Garret yoursurrogate...@gmail.com
 *Fecha:* 28/10/2011 11:37:41 a.m.
 *Para:* CakePHP cake-php@googlegroups.com
 *Asunto:* Re: Having a hard time with getting overwrite to work

 If you look at line #120 in my post of httpd.conf, it's displayed
 there.  And here is the contents of my /opt/lampp/modules directory:

 http://bin.cakephp.org/view/1838304409
 http://bin.cakephp.org/view/1838304409   - on line 64

 On Fri, Oct 28, 2011 at 10:42 AM, Yves S. Garret 
 yoursurrogate...@gmail.com
 yoursurrogate...@gmail.com wrote:
 Ok, so I'm trying to setup cake on a linux machine (Ubuntu 11.04).  I
 got the database connection to work fine, tmp is readable/writable, etc.

 But there is still no CSS in the default cake page.  I looked at what
 the book said and I'm pretty sure that I set the correct settings, but no
 go.  Here is my httpd.conf:
  http://bin.cakephp.org/view/914367831
 http://bin.cakephp.org/view/914367831


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


 To unsubscribe from this group, send email to
 cake-php%2bunsubscr...@googlegroups.com
 cake-php+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/cake-php
 http://groups.google.com/group/cake-php


 http://www.incredimail.com/?did=10500id=619282ppd=2694,201107041713,10,1,603981457404293626rui=128454911sd=20111028


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

 http://www.incredimail.com/?did=10500id=619282ppd=2694,201107041713,10,1,603981457404293626rui=128454911sd=20111028

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


 To unsubscribe from this group, send email to
  cake-php%2bunsubscr...@googlegroups.com
 cake-php+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/cake-php
 http://groups.google.com/group/cake-php



  --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.orghttp://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org
 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
 http://groups.google.com/group/cake-php



  --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new

Re: Having a hard time with getting overwrite to work

2011-10-28 Thread Yves S. Garret
Ok, so nuking CakePHP from htdocs in XAMPP and putting in a new one made
everything work...  I have no idea why, but it's good now.

On Fri, Oct 28, 2011 at 2:49 PM, Justin Edwards justinledwa...@gmail.comwrote:

 My advice, make sure the first Directory tag has AllowOveride ALL.   Also
 make sure the correct user (maybe www-data, apache, or nobody) has ownership
 of your cake directory.  You may need to do a chown -R
 username:groupname /home/ats/Documents/Development/CakePHP . If your user
 ats is not the apache httpd user, then you will want to add yourself to the
 group of that user using sudo adduser ats www-data(or correct group), and
 make sure you give group permissions using chmod -R
 g+swX /home/ats/Documents/Development/CakePHP .  Then restart everything and
 cross your fingers.

 You may want to clear your browser cache too.


 On Fri, Oct 28, 2011 at 12:46 PM, Yves S. Garret 
 yoursurrogate...@gmail.com wrote:

 Yeah, I'm using XAMPP.  The only command in that sequence that I didn't
 run was:

 sudo a2enmod rewrite


 Still doesn't work...



 2011/10/28 Stephen Latham ste.lat...@gmail.com

 I have just done this about 2 days ago only ubuntu 11.10 I followed this:
 -


 http://komunitasweb.com/2009/02/cakephp-tutorial-installing-cakephp-on-ubuntu/

 Worked No problems.



 On 28 Oct 2011, at 18:11, Yves S. Garret yoursurrogate...@gmail.com
 wrote:

 I was mucking around with httpd.conf, trying to get it to work, so it's
 likely some of the info has changed and I'll repost the file.

 http://bin.cakephp.org/view/620838662
 http://bin.cakephp.org/view/620838662

 On Fri, Oct 28, 2011 at 1:10 PM, Yves S. Garret 
 yoursurrogate...@gmail.com
 yoursurrogate...@gmail.com wrote:

 I have Ubuntu 11.04.  I don't have SELinux installed.  And since I have
 yet to see that as an issue in the past, I'm inclined to believe that this
 is not the problem at this moment.


 2011/10/28 Roberto Carlos Rubio Rodríguez robertorubiorg...@gmail.com
 robertorubiorg...@gmail.com

 Try to disable SELinux.


 Roberto




  *---Mensaje original---*

  *De:* Yves S. Garret yoursurrogate...@gmail.com
 *Fecha:* 28/10/2011 11:37:41 a.m.
 *Para:* CakePHP cake-php@googlegroups.com
 *Asunto:* Re: Having a hard time with getting overwrite to work

 If you look at line #120 in my post of httpd.conf, it's displayed
 there.  And here is the contents of my /opt/lampp/modules directory:

 http://bin.cakephp.org/view/1838304409
 http://bin.cakephp.org/view/1838304409   - on line 64

 On Fri, Oct 28, 2011 at 10:42 AM, Yves S. Garret 
 yoursurrogate...@gmail.com
 yoursurrogate...@gmail.com wrote:
 Ok, so I'm trying to setup cake on a linux machine (Ubuntu 11.04).  I
 got the database connection to work fine, tmp is readable/writable, etc.

 But there is still no CSS in the default cake page.  I looked at what
 the book said and I'm pretty sure that I set the correct settings, but no
 go.  Here is my httpd.conf:
  http://bin.cakephp.org/view/914367831
 http://bin.cakephp.org/view/914367831


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


 To unsubscribe from this group, send email to
 cake-php%2bunsubscr...@googlegroups.com
 cake-php+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/cake-php
 http://groups.google.com/group/cake-php


 http://www.incredimail.com/?did=10500id=619282ppd=2694,201107041713,10,1,603981457404293626rui=128454911sd=20111028


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

 http://www.incredimail.com/?did=10500id=619282ppd=2694,201107041713,10,1,603981457404293626rui=128454911sd=20111028

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


 To unsubscribe from this group, send email to
  cake-php%2bunsubscr...@googlegroups.com
 cake-php+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/cake-php
 http://groups.google.com/group/cake-php



  --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.orghttp://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org
 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

FYI: manually logging in a user and acl in cakephp 2.0

2011-10-28 Thread fly2279
If anyone else has problems with getting an Aro node lookup error
after manually logging in a user you might check the array that you
use to login with.

As in the example in the cookbook, the user gets logged in with the
array of submitted data from the login form in the format:

$this-request-data['User'] = array(
 'username' = 'johndoe',
 'password' = 'secretpassword'
);

If you login the user and then debug this-Auth-user() or use the
static method AuthComponent::user(), you'll see that it returns an
array without the 'User' key. Even though you submitted the data with
the 'User' key, it is being used and returned to you without it.

You can manually set user information to an array (maybe by running a
find on a specific user) and then use that data, with the 'User' key
to log a user in. Then Acl will give you an error about node lookup
because it's using an array formatted like so:

'User' = array(
 'User' = array(
  'username' = 'johndoe',
  'password' = 'secretpassword'
 )
)

To avoid errors you can manually log in a user by adding the user key
to the array variable that you use. i.e. $this-Auth-
login($user['User']):

$user['User'] = array(
 'username' = 'johndoe',
 'password' = 'secretpassword'
);



To log in a user from posted form data use: $this-Auth-login($user);
To log in a user from other methods such as a find use: $this-Auth-
login($user['User']);

-- 
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: Cache FileEngine

2011-10-28 Thread 0x20h
Hi Sebastien,

please read
http://book.cakephp.org/2.0/en/contributing/code.html
to find out how you can contribute patches.


Am 28.10.2011 15:30, schrieb Sandreu:
 Hello,

 I made an increment for file engine system.
 My problem was that in APC cache, the cache is not shared between CLI
 and the web app... then I did that with fileEngine using flock... it's
 not workink on windows.
why would it not work on windows? I didn't find such a hint on the
flock() docs.

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


plugins for uploading images/ files in cakephp v2.0

2011-10-28 Thread Anand Ramamurthy
Hello,

I was curious if there are any recommendations for CakePHP v2.0
plugins for uploading, resizing images to the server. I looked at some
of the implementations like Uploader and Media Plugins but encountered
problems with them. It could be that they were written for v1.3
It would be great if somebody could suggest a plugin for v2.0

Thanks,

Anand

-- 
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: plugins for uploading images/ files in cakephp v2.0

2011-10-28 Thread Điển vũ
https://github.com/jrbasso/MeioUpload

-- 
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: plugins for uploading images/ files in cakephp v2.0

2011-10-28 Thread Điển vũ
https://github.com/jrbasso/MeioUpload

All plugin for 2.0 seems not stable .. You try to fix it.

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


find with fields and conditions

2011-10-28 Thread Ricardo
Hello All,

I'm getting a weird error here, see I have the following find
statement

$cond1 = $this-Company-find('all',
 'conditions' =
array('Company.Departement_dactivite_limitrophes' = $department),
 'fields' = $fields
 )
  );

$fields is an array with the field names, and $department comes from
user info

when it runs I get the following error:

Warning (512): SQL Error: 1054: Field 'Company' unknown in WHERE
clause [CORE / cake / libs / model / datasources / dbo_source.php,
line 684]

and the related generated query is:

Query: SELECT COUNT(*) AS `count` FROM `companies` AS `Company`
WHERE Company IN ([loads of fields]) AND Company IN ([loads of correct
values]) AND Company IN... and so on for the rest of the search
resutls

Query: SELECT `Company`.`id`, `Company`.`nom_raison_sociale`,
`Company`.`label`, `Company`.`type_de_prestataire`,
`Company`.`code_postale`, `Company`.`email` FROM `companies` AS
`Company`   WHERE Company IN ([loads of values]) AND Company IN ...
and so on for the rest of the search resutls

according to the stack trace, this error comes from the paginate
function, where I send data like this:

$data_table = $this-paginate($cond1);

-- 
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: Installer CMS like on CakePHP??

2011-10-28 Thread thom
On Sat, Oct 29, 2011 at 12:13 AM, Miles J mileswjohn...@gmail.com wrote:

 I wrote many installers for Cake and I would highly suggest doing a
 shell script.

 https://github.com/milesj/cake-forum/blob/master/vendors/shells/install.php


On Oct 28, 7:31 am, Andras Kende and...@kende.com wrote:
  http://cakebaker.42dh.com/2007/04/16/writing-an-installer-for-your-ca...
 
  Andras Kende
 


OK,, many thanks for the help. I'll give it a try first. I'll adjust the
most suitable with my application :)

-- 
Regards,,,
thom
http://mynameisthom.blogspot.com

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


Bakery SPAM?

2011-10-28 Thread Thiago Belem
There's something wrong with this post:
http://bakery.cakephp.org/articles/peterms/2011/08/11/validation_is_match_cakephp

Or it's just me?
--
***Thiago Belem*
Desenvolvedor
Rio de Janeiro - RJ - Brasil

+55 (21) 8865.9250
thiagobelem.net
cont...@thiagobelem.net

*Skype / gTalk **»* thiago.belem.web
*LinkedIn* *»* br.linkedin.com/in/thiagobelem/pt*
Assando Sites*, curso de CakePHP *»* assando-sites.com.br

-- 
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: Daylight Saving Time (DST) in cakephp

2011-10-28 Thread Ryan Schmidt

On Oct 26, 2011, at 01:25, Shanaka wrote:

 I'm creating a web application using cakephp 1.2.6. 

Why would you use 1.2.x to create a new web app, and not 2.0? Even using 1.3.x 
would be better but I don't see why you wouldn't start with the latest and 
greatest. Converting your app later to use a newer version of CakePHP will 
involve non-zero effort, so I'd think you'd want to spare yourself that work.


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