# |
Aug 7th 2008, 10:23 |
gwoo |
ammadsaleem: i know what it is, what i dont know is the name and what it does |
# |
Aug 7th 2008, 10:22 |
gwoo |
ammadsaleem: what does it do? |
# |
Aug 7th 2008, 10:22 |
ammadsaleem |
its my user defined function |
# |
Aug 7th 2008, 10:21 |
gwoo |
what does it do? |
# |
Aug 7th 2008, 10:21 |
gwoo |
ammadsaleem: testFunction? |
# |
Aug 7th 2008, 10:21 |
flzz |
is there a reason 1.2 defaults to allowing browsers to cache pages? and is Controller::disableCache() the appropriate way to deal with this? |
# |
Aug 7th 2008, 10:21 |
ammadsaleem |
testFunction($str1, $str2) |
# |
Aug 7th 2008, 10:21 |
jonathan_ |
^_^ |
# |
Aug 7th 2008, 10:20 |
jonathan_ |
i agree, just trying to be a smart arse |
# |
Aug 7th 2008, 10:20 |
jonathan_ |
good practice |
# |
Aug 7th 2008, 10:20 |
gwoo |
we make people work for them |
# |
Aug 7th 2008, 10:20 |
gwoo |
jonathan_: we dont just give away answers around here :) |
# |
Aug 7th 2008, 10:20 |
gwoo |
ammadsaleem: what is the name of your funciton? what does it do? |
# |
Aug 7th 2008, 10:20 |
jonathan_ |
i'll let the wise man answer the question |
# |
Aug 7th 2008, 10:19 |
gwoo |
would not be available "everywher" |
# |
Aug 7th 2008, 10:19 |
ammadsaleem |
then how to call it |
# |
Aug 7th 2008, 10:19 |
jonathan_ |
is |
# |
Aug 7th 2008, 10:19 |
jonathan_ |
well depending on what it |
# |
Aug 7th 2008, 10:19 |
gwoo |
that would only be available to controllers |
# |
Aug 7th 2008, 10:19 |
gwoo |
it wouldnt be |
# |
Aug 7th 2008, 10:19 |
gwoo |
jonathan_: no |
# |
Aug 7th 2008, 10:19 |
jonathan_ |
but that is bad practice (i think) |
# |
Aug 7th 2008, 10:18 |
jonathan_ |
@ammadsaleem: declare it in the appcontroller class |
# |
Aug 7th 2008, 10:18 |
gwoo |
ammadsaleem: what is the name of this function? |
# |
Aug 7th 2008, 10:18 |
gwoo |
after the first run its cached so its a lot faster |
# |
Aug 7th 2008, 10:18 |
ammadsaleem |
? |
# |
Aug 7th 2008, 10:18 |
ammadsaleem |
is it possible to create a function once and call it everywhere |
# |
Aug 7th 2008, 10:18 |
gwoo |
Lemon|work: all the directories are search for classes, and object map and file map is built |
# |
Aug 7th 2008, 10:17 |
gwoo |
Lemon|work: yeah that shoudl be the case since all the paths are cache on the first run |
# |
Aug 7th 2008, 10:16 |
jonathan_ |
cool |
# |
Aug 7th 2008, 10:16 |
TommyO |
otherwise, all queries only apply to rows marked 'active', which I use frequently |
# |
Aug 7th 2008, 10:15 |
TommyO |
well, merged with that as a defualt. yep. so if I want otherwise I can ask for 'active' => array(0, 1) say for my admin methods |
# |
Aug 7th 2008, 10:14 |
jonathan_ |
so you queries are append with that condition |
# |
Aug 7th 2008, 10:14 |
TommyO |
like I just added this line: $queryData['conditions'] = array_merge(array($this->alias . '.active' => 1), $queryData['conditions']); |
# |
Aug 7th 2008, 10:14 |
jonathan_ |
ok |
# |
Aug 7th 2008, 10:13 |
TommyO |
right |
# |
Aug 7th 2008, 10:13 |
TommyO |
jonathan_: it doesn't. it can help in controlling your query logic |
# |
Aug 7th 2008, 10:13 |
jonathan_ |
i see |
# |
Aug 7th 2008, 10:13 |
Lemon|work |
for optmizing |
# |
Aug 7th 2008, 10:13 |
Lemon|work |
he meant that beforeFilters help in the development time |
# |
Aug 7th 2008, 10:13 |
Lemon|work |
nothing |