# |
Jan 29th 2014, 10:39 |
haris |
Does that work? |
# |
Jan 29th 2014, 10:39 |
haris |
I am currently using Router::connect('/browse/*',array('controller' => 'posts', 'action' => 'view'));. I want the action to be different If there is 2 parameters i.e. /browse/** |
# |
Jan 29th 2014, 10:37 |
Neon1024 |
!ask |
# |
Jan 29th 2014, 10:36 |
haris |
can someone help me with routes |
# |
Jan 29th 2014, 10:36 |
haris |
hello |
# |
Jan 29th 2014, 10:36 |
Dustinbvh |
I have a small question which i cannot find on the book site |
# |
Jan 29th 2014, 10:36 |
Dustinbvh |
Good morning everyone |
# |
Jan 29th 2014, 09:55 |
halim |
if you think that the key 'role' should be existing in that array, i'd print the contents of that array (using pr() or debug()) and look at the code that sets or modifies that array |
# |
Jan 29th 2014, 09:54 |
dan023 |
ok thanks...i'll have a look |
# |
Jan 29th 2014, 09:54 |
halim |
dan023, the error says it all. it means that the key 'role' in $current_user doesn't exist. try something like this: (isset($current_user['role']) andand $current_user['role'] == 'admin') |
# |
Jan 29th 2014, 09:52 |
dan023 |
btw this is my snippet: http://bin.cakephp.org/view/1845267223 |
# |
Jan 29th 2014, 09:52 |
halim |
any ideas on how to check the value of max_execution_time? |
# |
Jan 29th 2014, 09:52 |
halim |
hello, i'm trying to configure php's max_execution_time and set it to 300. i've tried the following three things: setting it using .htaccess, setting it directly in the php.ini and setting it using the set_time_limit() function but ini_get('max_execution_time') always returns 0 |
# |
Jan 29th 2014, 09:50 |
dan023 |
i get an Undefined index: role [APP/View/Users/index.ctp |
# |
Jan 29th 2014, 09:50 |
dan023 |
http://bin.cakephp.org/view/1978808080 |
# |
Jan 29th 2014, 09:16 |
hekep |
CakeEventManager::instance()->listners('Event.key') ; umm should extend CakeEventManager and update ->attach() to avoid doubles. |
# |
Jan 29th 2014, 09:12 |
Neon1024 |
If they are registered, you should be able to query the thing that they are registered to |
# |
Jan 29th 2014, 09:12 |
hekep |
suppose bootsrep.php is loaded only once , so it suppose to be safe there. |
# |
Jan 29th 2014, 09:11 |
Neon1024 |
Have a read about event listeners in the book |
# |
Jan 29th 2014, 09:11 |
Neon1024 |
No idea |
# |
Jan 29th 2014, 09:11 |
hekep |
um how's that ... |
# |
Jan 29th 2014, 09:10 |
Neon1024 |
So check if the listener already exists before attaching a new one |
# |
Jan 29th 2014, 08:57 |
hekep |
what's the best place to register global event listeners ? app/Config/bootstrap.php , I suppose . Want avoid double listner registrations. |
# |
Jan 29th 2014, 06:40 |
daVinciWanaB1 |
having 10+ translation fields in my translations table causes the query to create a lot of INNER JOINs, which makes a query on a 20-row table last over 2 minutes... any ideas whta I can do? |
# |
Jan 29th 2014, 06:10 |
BackEndCoder |
hello |
# |
Jan 29th 2014, 06:10 |
Junior |
yello ;) |
# |
Jan 29th 2014, 06:10 |
BackEndCoder |
i'm going to get some sleep, best of luck mate |
# |
Jan 29th 2014, 06:03 |
BackEndCoder |
or indeed 'werid' |
# |
Jan 29th 2014, 06:03 |
BackEndCoder |
that would make sence why $this is null |
# |
Jan 29th 2014, 06:03 |
BackEndCoder |
i'm guessing now tho, cause i don't have the code infront of me |
# |
Jan 29th 2014, 06:03 |
BackEndCoder |
you never know |
# |
Jan 29th 2014, 06:03 |
BackEndCoder |
try something like $this->Cms->render( array('view' => 'cms_index')); at the bottom of your cms_index action just to see if it works |
# |
Jan 29th 2014, 06:02 |
BackEndCoder |
this is why you are having problems using forms |
# |
Jan 29th 2014, 06:02 |
BackEndCoder |
so your cms_index your trying to load doesn't use the same controller |
# |
Jan 29th 2014, 06:01 |
BackEndCoder |
it would seem your cms thing has overridden rendering |
# |
Jan 29th 2014, 06:01 |
BackEndCoder |
and with the comments from the login area just above |
# |
Jan 29th 2014, 06:01 |
BackEndCoder |
$this->Cms->render( array('view' => 'index')); |
# |
Jan 29th 2014, 06:01 |
BackEndCoder |
the only difference i can see is this line |
# |
Jan 29th 2014, 06:01 |
BackEndCoder |
ok so |
# |
Jan 29th 2014, 05:56 |
Starcraftmazter |
one is overview action the other is cms_index action |
# |
Jan 29th 2014, 05:56 |
Starcraftmazter |
yes |