If you need to do this for every controller in your application put it
in the AppController::beforeFilter() in app/app_controller.php (creat
this file if it does not exist).
Geoff
--
http://lemoncake.wordpress.com
On Jul 16, 3:24 pm, Walker Hamilton <[EMAIL PROTECTED]> wrote:
> Look into the bef
On Jul 16, 1:51 am, Nick <[EMAIL PROTECTED]> wrote:
> This is presumably a bug or weakness in the current DB implementation.
I presume you didn't search (the group) before drawing that
conclusion ;)
AD
--~--~-~--~~~---~--~~
You received this message because yo
Use the ID, so if you have a textarea with ID of ModelField, then
access using:
document.getElementById('ModelField').value = 'whatever value you wish
to assign';
Winston
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gr
I have implemented it in my application, mail me I can send you the
files.
On Jul 16, 5:21 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> the domain ros-soft.net isn't valid now, therefore those classes
> mentioned in the blog aren't available for download.
>
> On Jul 13, 5:39 pm, francky06
Look into the beforeFilter function.
You can do a redirect in it if the person is trying to access a
controller they should not be.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this
The problem is that blog contains an old link to a class named
web_services_controller.php from an external expired domain :(
On Jul 13, 5:39 pm, francky06l <[EMAIL PROTECTED]> wrote:
> The Rossoft blog
>
> http://rossoft.wordpress.com/2006/02/17/web-services-in-cakephp-compl...
>
> On Jul 13, 4:
the domain ros-soft.net isn't valid now, therefore those classes
mentioned in the blog aren't available for download.
On Jul 13, 5:39 pm, francky06l <[EMAIL PROTECTED]> wrote:
> The Rossoft blog
>
> http://rossoft.wordpress.com/2006/02/17/web-services-in-cakephp-compl...
>
> On Jul 13, 4:16 pm, p
I need to have a common function which checks the access permission
of a visitor before loading a page in a site.The page call would be
proceeded only if this access check function return true.If I write
this function as a part of controller,I found that ,it is only
possible to get the view of th
I would go with an id field that is an auto-increment and a code field
for storing your code numbers.
Winston
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to ca
Looking through the source the options are generated with
case 'month':
01343 for ($i = 1; $i <= 12; $i++) {
01344 $data[sprintf("%02s", $i)] = strftime("%B",
mktime(1,1,1,$i,1,1999));
01345 }
So look slike you are out
@Ketan
Aah.. so you did, but I think that anything on ACL in 1.2 should
emphasis the behavior as it is so much easier and cleaner,
although some may debate that it is too much magic.
Geoff
--
http://lemoncake.wordpress.com
On Jul 16, 11:33 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On
How can i get $form->dateTime() to use a number instead of english
month names!?
I don't get it :(
And i have this dateTime('Event/enddate','DMY',
24,null,array(),true)?> and when i submit the form and theres a
validation error (in another field), the date fields do not stay
empty, why!? The
The showParents creates optgroup tags not additional select tags.
I'm not sure if cake supports herachical selects out of the box.
Seems like a good candidate for a component/helper though, either with
ajax callbacks or preload all options (or both with a config option).
Geoff
--
http://lemoncak
On 7/15/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
> You have seen that sometimes I get grumpier than you, so...
>
Classes start tomorrow morning! Welcome aboard! ;)
--
Chris Hartjes
Senior Developer
Cake Development Corporation
My motto for 2007: "Just build it, damnit!"
@TheBallpar
You have seen that sometimes I get grumpier than you, so...
-MI
---
Remember, smart coders answer ten questions for every question they ask.
So be smart, be cool, and share your knowledge.
BAKE ON!
blog: http://www.Mari
On 7/15/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
> Chris has a school? That's a new one ;)
>
> -MI
The school has exclusive membership...because I'm usually too grumpy
to admit anyone!
--
Chris Hartjes
Senior Developer
Cake Development Corporation
My motto for 2007: "Just build it, d
Chris has a school? That's a new one ;)
-MI
---
Remember, smart coders answer ten questions for every question they ask.
So be smart, be cool, and share your knowledge.
BAKE ON!
blog: http://www.MarianoIglesias.com.ar
Hi Geoff,
If you read the full article, I have covered Acl Behavior as well. I
gave user two options, use manual Acl way to handle things and another
is to use Acl Behavior. Because there are times when you want to use
manual method to create Aros & Acos. However, most of the time Acl
Behavior co
Just to correct the query results as that was after modifying the
schema. The full depth queries are:
SELECT `AThing`.`id`, `AThing`.`b_thing_id`, `BThing`.`id`,
`BThing`.`c_thing_id` FROM `a_things` AS `AThing` LEFT JOIN `b_things`
AS `BThing` ON (`AThing`.`b_thing_id` = `BThing`.`id`) WHERE
`
I have a number of Categories each of which is parent to a number of
sub-categories.
You choose a category from a select and the associated sub categories
(who have a foreign key of category_id) are made available.
I'm trying to generate what you probably recognise as a hierarchical
select menu.
@Ketan
The article is quite good, pretty easy to read if you understand the
basic concepts of ACL. However, I would recommend reading about the
AclBehavior as it will reduce the logic in your controller. I am a fan
of Chris Hartjes's Fat Model, Skinny Controller school of thought.
@Dan
Cakephp
To deal with CSRF, I think we could use Cake's Security component -
the requirePost function.
On Jul 16, 2:52 am, keymaster <[EMAIL PROTECTED]> wrote:
> Would be nice to get a quick cheatsheet together with two columns:
>
> column A: Security Risk
> column B: Best Practise (using cake).
>
> I'll
Oops, typo, it's
if(!isset($this->data['Bloodbank']['gender'])) { ...
Sorry ; )
On Jul 14, 6:10 pm, housebolt <[EMAIL PROTECTED]> wrote:
> You'll want to put this tag before your $html->radio tag:
>
> hidden('Bloodbank/gender', array('value'=>'')); ?>
>
> Gender:
> radio('Bloodbank/gender',arra
I highly recommend "Essential PHP Security" by Chris Shiflet,
published by O'reilly. He talks alot about "filter input/escape
output" and gives some good examples.
You can read it at http://www.oreilly.com if you get a safari account
(in my opinion something essential to all php programmers).
Do you use requestAction ? :)
---
Christian "Jippi" Winther
http://docs.cakephp.nu (Unofficial CakePHP API)
http://logs.cakephp.nu (Unofficial CakePHP IRC log)
-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Grzegorz Pawlik
Sent: 15. juli 2007 1
>
> Does anybody know an issue with ff that could explain that?
Yes. I'm making a predication:
* You have linked elements (images, js, css, ...) in your page that
do not exist in /app/webroot/
* Your additional beforeFilter executions come from CakePHP handling
those missing fi
Yes, it's better :D
Thank's
I turned on scaffold and checked my model. After that change It seems
to work better.
I checked my controller again and rebuild It.
It's almost working properly (in my app is ok).
I don't understand this error (bottom) when / $this->Kategoria-
>recursive = 3; /
For e
Using the latest 1.2 release (and earlier ones), I'm finding that
queries that could be performed with a JOIN are breaking into multiple
single row queries at $recursive = 2 or more. In fact worse, there is
a JOIN and some single queries that duplicate part of the JOIN for one
of the tables. I ma
Hey All,
I thought I would post this here since it caused me so much grief.
I am using a java jar file to allow uploading of multiple files using
drag and drop (http://www.radinks.com/upload/). This is an awsome file
uploader and I highly recommend it.
Anyway, my application ran fine (I am usin
Hi, i found this strange behaviour. When accesing page via firefox 1.5
it acts like it has been reloaded few times (3 exactly).
Prove:
I've put this code in beforeFilter in /app/app_controller.php :
$count = $this->Session->read('count');
$count[] = time();
$this->Session->write('count', $count);
Would be nice to get a quick cheatsheet together with two columns:
column A: Security Risk
column B: Best Practise (using cake).
I'll offer a tentative start (humbly, but realistically, admitting I
am not expert enough to rely on).
Security risks (column A):
1. SQL injection
2. XSS
3. CSRF (cr
On 7/16/07, Chris Hartjes <[EMAIL PROTECTED]> wrote:
> The big issues are usually to deal with input from users that contains
> malicious code (like javascript or attempts to manipulate database
> queries by packing things onto the end of a URL) so you need to be
> aware of the proper techniques
On 7/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Yes, I know this rule. It's for Drupal system.
> I tryed to write rules to nginx, but it's failure
Actually, that's exactly what i use for my WordPress installs...and
CakePHP seems to use a similar type of setup: run all requests
throu
On 7/16/07, Mech7 <[EMAIL PROTECTED]> wrote:
>
> Usually SQL injection.. but you need to look out to if you allow users
> to do anything for example post html / javascript.. Also beware of
> some things for example this compenent :
> http://bakery.cakephp.org/articles/view/autocomplete
> watch th
Yes, I know this rule. It's for Drupal system.
I tryed to write rules to nginx, but it's failure
On Jul 14, 10:22 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On 7/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > Does somebody has written mod_rewrite rules to nginx http server (m
On 7/15/07, Feris Thia <[EMAIL PROTECTED]> wrote:
>
> Wow, 99% is a great number. So, I can concluded there is no much
> security concerns for CakePHP if we follow conventions as you said.
> That will relieve me much.
The big issues are usually to deal with input from users that contains
malicio
Usually SQL injection.. but you need to look out to if you allow users
to do anything for example post html / javascript.. Also beware of
some things for example this compenent :
http://bakery.cakephp.org/articles/view/autocomplete
watch the bottom comments.
On Jul 15, 7:02 pm, "Feris Thia" <[EM
On 7/15/07, Chris Hartjes <[EMAIL PROTECTED]> wrote:
>
> Filter input. Escape output. That pretty much covers 99% of PHP
> security problems. Luckily CakePHP handles a lot of that stuff already
> for you as long as you follow the conventions.
>
> --
> Chris Hartjes
> Senior Developer
> Cake Deve
On 7/15/07, Feris Thia <[EMAIL PROTECTED]> wrote:
>
> Hi Everyone,
>
> Any article recommendation that refer to php/cakephp security best practice ?
>
> Regards,
>
> Feris
Filter input. Escape output. That pretty much covers 99% of PHP
security problems. Luckily CakePHP handles a lot of that st
On Jul 13, 3:17 pm, cakeFreak <[EMAIL PROTECTED]> wrote:
> Great Article!
>
> I was just wondering whether instead of building the aros for every
> single user, it is possible to build the aros (and then acos) for
> user groups instead.
>
> You get the usergroup from the Auth->user session data,
Ignore that - its just appeared in the Bakery (http://
bakery.cakephp.org/articles/view/haml-markup-haiku). Still like to
know what others think though,
On Jul 15, 12:44 pm, ianh <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I just came across the Haml parser snippets on CakeForge from Adeel
> Khan:
>
Hello,
I have just been getting more acquainted with Cake in the last couple
of weeks - it is quite a difference to being used to code everything
by foot. I am looking for a workaround to be able to use Image-Submit-
Buttons to initiate AJAX calls.
In the API Description (1.2.x Alpha) it mentions
$form->input and $form->select will always insert the $model of the form.
But you always can use this field for your own use, it does not have to belong
to the $model.
2007/7/15, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> How can I create a select list with name 'justaname', not 'data[Model]
> [
Hi Everyone,
Any article recommendation that refer to php/cakephp security best practice ?
Regards,
Feris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake
Hi all,
I just came across the Haml parser snippets on CakeForge from Adeel
Khan:
http://cakeforge.org/snippet/detail.php?type=snippet&id=196
http://cakeforge.org/snippet/detail.php?type=snippet&id=197
I'd love to try these out as haml looks like such a good idea (not
trying to ignite any sort
I have one user table like:
users (id, username, etc)
sample:
1, MA-foo
2, MA-bar
3, AA-foo
The username represents the group in which they're in (in this case,
MA and AA). Saving the group name in another table might not be the
right way as the system isn't represented so. So, I have tried to
cr
Good points, opening a ticket on trac will probably be most effective
n resolving the issues:
https://trac.cakephp.org/report
Best,
Tijs
On 14-jul-2007, at 22:20, JTTACJ1 wrote:
>
> I have found thee sources of CakePHP conventions:
>
> The Bakery: http://bakery.cakephp.org/articles/view/cake
hi i am currently designing, as i can see tables should have a primary
key called id, in my case i have a table of university modules
uniquely identified by their code number, could i make code the
primary key, or should i still use id and put the code number into the
id field?
--~--~-~-
Opps.
$belongsTo = array('Zdjecia' => array('className' =>
'Zdjecie',
'foreignKey' => 'zdjecie_id'
of course
On 15, 13:15, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> You need to change hasOne association in Produkt to belongsTo one.
>
> class Produkt extends AppModel
You need to change hasOne association in Produkt to belongsTo one.
class Produkt extends AppModel
{
var $name = 'Produkt';
var $belongsTo = array('Zdjecia' =>
array('className' =>
'Zdjecie',
'foreignKey' => 'zd_id'
))
Don't forget to set $primaryKey
I look at the helper section in the manual and find that there is a
file called tags.ini.php. I'm using version 1.1.16.5421 and find none
of that file.
Is it deprecated ? What is the replacement for html template then ?
Regards,
Feris
--~--~-~--~~~---~--~~
You r
Right after I posted this I re-read the Model section, and found the
way to solve the problem.
$this->Item->ItemList->save($this->data);
$itemListId = $this->Item->ItemList->getLastInsertId();
$this->data['Item']['item_list_id'] = $itemListId;
Thi
I have a model called Item (model, views, controller) in my add method
reached by localhost/item/add, I would like to give the user the
ability to create a new ItemList db record from the Item add form. I
currently am using the following form code (add.thtml):
List:
inputTag('ItemList/name', arr
In the 'Item' model add this:
var $hasMany = array('List');
OPTIONAL:
In the 'List' model add this:
var $belongsTo = array('Item');
In your ITEM table, make sure each item has a unique id, i.e. give
each row a key field called "id" and make sure that auto_increment is
set. In your LIST table,
I have the same problem, please help!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [E
I believe you can just use the php function session_id()
http://www.php.net/session_id
I haven't tested it in cake-created sessions mode, but I believe this
will work with that as well.
On Jul 14, 8:31 pm, r557 <[EMAIL PROTECTED]> wrote:
> after debugging the session object, it outputted the fo
I think this should work:
class Page extends AppModel
{
var $hasMany =
array( 'ChildPages'=>array('className'=>'Page','foreignKey'=>'parend_id'));
var $belongsTo = array('ParentPage'=>array('className'=>'Page',
'foreignKey'=>'parent_id'));
}
Don't forget to use recursive option, unbindMod
You'll want to put this tag before your $html->radio tag:
hidden('Bloodbank/gender', array('value'=>'')); ?>
Gender:
radio('Bloodbank/gender',array('Male','Female')) ?>
tagErrorMsg('Bloodbank/gender', 'gender is
required') ?>
The reason for this is that if a radio button is not selected, the
va
Hello,
I am a newbie to Cake. I am developing my first app.
Sorry for my badly english.
I have problem with config my Model. I don't now why / 'foreignKey' =>
'zdjecie_id' / not working.
Zdjecie = ang. Photo
Produkt = ang. Product
I want keep some photos in my table /Zdjecia/. This photos may
How can I create a select list with name 'justaname', not 'data[Model]
[justaname]' using FormHelper?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@g
60 matches
Mail list logo