# |
Oct 22nd 2009, 09:24 |
ionas |
like User HasMany Video HasMany Comment BelongsTo User |
# |
Oct 22nd 2009, 09:23 |
ionas |
you can have recursion if you mean that |
# |
Oct 22nd 2009, 09:22 |
t0nic |
the book says it can cause "unexpected behavior" so I'm not sure how to test for it |
# |
Oct 22nd 2009, 09:22 |
t0nic |
can Question->Answer->User also have "answer belongsTo "User", or must I make it "Answerer"? |
# |
Oct 22nd 2009, 09:21 |
t0nic |
do I need ALL associations (e.g. all relationships to user) named differently, or just those that are in the same "chain" (e.g. User<-Video->Comment->User) |
# |
Oct 22nd 2009, 09:20 |
NoReGreT |
Phally: isn't that close to this http://www.studiocanaria.com/articles/cakephp_auth_component_users_groups_permissions_revisited ? |
# |
Oct 22nd 2009, 09:18 |
Horror |
fastest solution i can think of for now |
# |
Oct 22nd 2009, 09:17 |
Horror |
jcrawford : i'm just gonna create a temporary table that will combine the 2 results into one |
# |
Oct 22nd 2009, 09:13 |
NoReGreT |
thanks |
# |
Oct 22nd 2009, 09:13 |
Phally |
NoReGreT: here is the concept: http://thechaw.com/bakery/wiki/spec/users/Group_permissions |
# |
Oct 22nd 2009, 09:13 |
jcrawford |
see this comment cake_newbie http://us2.php.net/manual/en/language.oop5.decon.php#94003 |
# |
Oct 22nd 2009, 09:12 |
jcrawford |
yes to make it work in php 4 you need to create a method with the same name as the class and have that call the __construct method. It is what you have to do in order to make applications backwards compatable with php 4 |
# |
Oct 22nd 2009, 09:12 |
Phally |
NoReGreT: yeah, you wish :p |
# |
Oct 22nd 2009, 09:12 |
NoReGreT |
Phally: let me take a peak at your awesome code :) |
# |
Oct 22nd 2009, 09:11 |
Phally |
NoReGreT: i pull out my awesome reusable code and make it happen :) |
# |
Oct 22nd 2009, 09:11 |
jcrawford |
cake_newbie: well yea __construct will not work in php 4 as it was introduced in php 5 |
# |
Oct 22nd 2009, 09:11 |
NoReGreT |
Phally: what you do if you have 3 groups and each group has certain permissions/things to do ? |
# |
Oct 22nd 2009, 09:08 |
cake_newbie |
this makes to work php4 |
# |
Oct 22nd 2009, 09:08 |
cake_newbie |
} |
# |
Oct 22nd 2009, 09:08 |
cake_newbie |
$this->__construct(); |
# |
Oct 22nd 2009, 09:08 |
cake_newbie |
function DATABASE_CONFIG() { |
# |
Oct 22nd 2009, 09:08 |
cake_newbie |
found a solution :) |
# |
Oct 22nd 2009, 09:01 |
cake_newbie |
__constructor doesnt works |
# |
Oct 22nd 2009, 09:00 |
cake_newbie |
i use __construct |
# |
Oct 22nd 2009, 09:00 |
Phally |
isn't it the other way around? |
# |
Oct 22nd 2009, 08:58 |
jcrawford |
__constructor is what should work |
# |
Oct 22nd 2009, 08:58 |
jcrawford |
cake_newbie do you have __construct or __constructor? |
# |
Oct 22nd 2009, 08:57 |
cake_newbie |
PhpNut: but it does not works |
# |
Oct 22nd 2009, 08:56 |
Horror |
maybe with some hacks to pagination or over-riding it would do |
# |
Oct 22nd 2009, 08:55 |
Horror |
yeah - i'm trying to figure it out |
# |
Oct 22nd 2009, 08:55 |
jcrawford |
Horror still no resolution eh? When you do find out please let me know I don't have the need currently but when I do it would be nice to know how :D |
# |
Oct 22nd 2009, 08:54 |
Horror |
need a little help on combining 2 models into pagination - they have no assoications with each other |
# |
Oct 22nd 2009, 08:54 |
PhpNut |
cake_newbie __constructor in cake should work php 4 or 5 |
# |
Oct 22nd 2009, 08:45 |
cake_newbie |
thanks anyway :) |
# |
Oct 22nd 2009, 08:45 |
markstory |
at least the same major version. |
# |
Oct 22nd 2009, 08:45 |
markstory |
cake_newbie: you are in for a world of pain. |
# |
Oct 22nd 2009, 08:44 |
Phally |
NoReGreT: you need prefix routing |
# |
Oct 22nd 2009, 08:44 |
NoReGreT |
Phally: ah.. I thought i could create _several_ admin routes... |
# |
Oct 22nd 2009, 08:43 |
Phally |
NoReGreT: duh, the second overwrites the first.. |
# |
Oct 22nd 2009, 08:41 |
cake_newbie |
i'm fucked up :) function _construct() works for php5 |
# |
Oct 22nd 2009, 08:40 |
liaogz82 |
that is what i need! thanks |