Possible security risk when saving data in forms - adding fields

2008-07-05 Thread phpjoy
When getting a form from a user, it should be double checked in the user's action logic. A user could easily manipulate a form field to submit a new field to the server, like id=4294967294, and stuck the users table. The user could guess, of course, other field names, or see other forms/views and

Re: Strict or Pretty? We're looking for a few good opinions

2008-06-08 Thread phpjoy
Point your heads up towards PHP6, leave standards but not too far. Sometimes very stupid things can be done in the quest for standards.. On Jun 7, 5:14 am, Nate [EMAIL PROTECTED] wrote: So, we all love the simplicity and magic that Cake gives us. It's wonderful that we've even been able to

Re: Different performance between 1.1 and 1.2

2008-05-31 Thread phpjoy
Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering. Not that I'm hinting anything :D On May 30, 12:13 am, Chris Hartjes [EMAIL PROTECTED] wrote: On Thu, May 29, 2008 at 4:56 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The problem is

Re: looking for a hosting company

2008-03-28 Thread phpjoy
any experience with godaddy anyone? i had some, wonder what was yours. On Mar 26, 3:53 pm, Zoltan [EMAIL PROTECTED] wrote: Just wondering if anyone has a hosting company they'd recommend. I've personally hosted a few sites on DreamHost, speed is ok, but getting Cake sites up and running is

Re: Suppressing UTF-8 BOM output

2008-03-25 Thread phpjoy
Use a normal editor.. http://www.scintilla.org is a good one. There's an encoding called UTF-Cookie, which doesn't save the BOM. On Mar 24, 4:37 pm, MonkeyGirl [EMAIL PROTECTED] wrote: Hi. I'm probably missing something simple here, but a few weeks ago, my Cake app seemed to spontaneously

Re: CakePHP guide

2008-02-06 Thread phpjoy
That attitude is the exact difference between ExtJS which is more community-driven and Zend, which is cold and company-driven. ExtJS succeeds because the community-force behind it drives it forward, because people make tons of plugins. Because they don't need a bakery, they have a simple forum

Re: Simple binding question.

2008-01-22 Thread phpjoy
hasMany Ticket, Deal belongsTo Item. HTH, - Dardo Sordi. On Jan 21, 2008 7:16 AM, phpjoy [EMAIL PROTECTED] wrote: for some kind of reason, this didn't work: $this-Ticket-bindModel(array('belongsTo' = array('Deal' =array('foreignKey' = 'deal_id'; $this-Ticket-Deal-bindModel(array

Re: Simple binding question.

2008-01-21 Thread phpjoy
' = array('Item' =array('foreignKey' = 'deal_id'; Ticket belongsTo Deal, Ticket belongsTo Item ? On Jan 19, 2008 6:43 PM, phpjoy [EMAIL PROTECTED] wrote: No, there isn't such a key Ticket.item_id Warning (512): SQL Error: 1054: Unknown column 'Ticket.item_id' in 'on clause' [CORE

Re: Simple binding question.

2008-01-19 Thread phpjoy
-bindModel(array('belongsTo' = array('Item' = array('foreignKey' = 'deal_id'; instead of : $this-Ticket-bindModel(array('belongsTo' = array('Item' = array('foreignKey' = 'item_id'; it's a copy and paste error. HTH, - Dardo Sordi. On Jan 18, 2008 9:39 PM, phpjoy [EMAIL PROTECTED] wrote

Re: Auth Component encrypting password before validation.

2008-01-18 Thread phpjoy
nate, someone could want to use other hashing methods and not the default one. i vote for enabling :) and adding the last crypt component to cake :D On Jan 18, 6:18 am, nate [EMAIL PROTECTED] wrote: No. Disabling password hashing is Evil with a capital E. That's why I don't let you do it.

Simple binding question.

2008-01-18 Thread phpjoy
I wonder how I could make a simple query to work through bind(), and not use a custom query. I'm binding two models for a model: $this-Ticket-bindModel(array('belongsTo' = array('Deal' = array('foreignKey' = 'deal_id'; $this-Ticket-bindModel(array('belongsTo' = array('Item' =

Ok, I nailed it.. It's a unicode problem!

2008-01-15 Thread phpjoy
http://groups.google.com/group/cake-php/browse_thread/thread/610bc62336c1cb4b/2724fab26d98b9af?lnk=gstq=validation+between#2724fab26d98b9af working on a solution :) phpjoy wrote: Hey all, I'm having some (probably stupid) validation error. The 'address' field always invalidates, regardless

Validation error, what am I missing?

2008-01-14 Thread phpjoy
Hey all, I'm having some (probably stupid) validation error. The 'address' field always invalidates, regardless of the number of chars. I ought to add that it happens *only* on update (edit), the adding works perfectly! var $validate = array( 'firstname' = array('rule' =

Re: XHR calls and an Auth problem - [security risk?]

2007-11-30 Thread phpjoy
('Routing.admin'))); My old file was without the 'prefix' key. That fixed the problem. Any ideas why? On Nov 30, 12:59 pm, AD7six [EMAIL PROTECTED] wrote: On Nov 30, 11:46 am, phpjoy [EMAIL PROTECTED] wrote: I'm experiencing a VERY weird auth problem, which is a very big security risk for my

XHR calls and an Auth problem - [security risk?]

2007-11-30 Thread phpjoy
I'm experiencing a VERY weird auth problem, which is a very big security risk for my application. When I try to access a page in the admin section directly, I'm being redirected to the login page. When I try to do the same via an XHR call, the page is loaded! Example: When I try to access the

Admin Routing, problem upgrading (using )

2007-11-09 Thread phpjoy
Hey, I upgraded from CakePHP 1.2alpha to 1.2pre-beta 1. My admin routing stopped working: My old routing is: (in routes.php) Router::connect('/admin/', array('controller' = 'backend_home', 'action'= 'home', 'admin'=1)); core.php: Configure::write('Routing.admin', 'admin'); inside the

Re: Admin Routing, problem upgrading (using )

2007-11-09 Thread phpjoy
i overlooked that one, thank you On Nov 9, 1:20 pm, AD7six [EMAIL PROTECTED] wrote: On Nov 9, 9:46 am, phpjoy [EMAIL PROTECTED] wrote: Hey, I upgraded from CakePHP 1.2alpha to 1.2pre-beta 1. My admin routing stopped working: My old routing is: (in routes.php) Router::connect

Using the Paginator helper with 2 models in a view.

2007-09-02 Thread phpjoy
in my index.ctp I have the following code: th?php echo $paginator-sort('Title', 'title');?/th th?php echo $paginator-sort('Layout Name', 'LayoutWidget.name');? /th When I try to sort the table in the column 'title' it works like a charm. When I try to sort the Layout Name column, it works just

Weird slowness problem.

2007-08-31 Thread phpjoy
Hey, I have a weird slowness problem on my machine. I use MySQL 5, PHP 5.2x. It's the xampp server installation. I have a very weird problem, my cake page loads up super-slow. I have a new computer, E6750 2g mem. 1 page takes about 3 seconds to load. On my old machine (2 ghz p4), everytime I

Advanced pagination problem. (Calling another controller by request handler)

2007-08-23 Thread phpjoy
I have a URL calling a controller, and that controller is calling ANOTHER controller by requestAction. This is the URL I have: http://localhost/admin/sections/view/175/page:1/sort:file/direction:asc I send the parameters to the new controller, and everything but the direction works fine. When

Re: Advanced pagination problem. (Calling another controller by request handler)

2007-08-23 Thread phpjoy
['options'][]=$this-params['pass']['section']; } On Aug 24, 6:12 am, phpjoy [EMAIL PROTECTED] wrote: I have a URL calling a controller, and that controller is calling ANOTHER controller by requestAction. This is the URL I have:http://localhost/admin/sections/view/175/page:1/sort:file/direction:asc

Removing the auto-loaded helpers.

2007-08-20 Thread phpjoy
I remember I read somewhere that the HTML helper (and maybe pagination one) are automatically loaded when CakePHP starts unless it's being specifically told not to. How can I remove the auto-loaded helpers? Are there more stuff that are auto-loaded I should know about? :+)

Re: wrong find usage, or a bug when binding a model to a model?

2007-08-14 Thread phpjoy
Alrights, here are my errors: 1) I tried associating two models instead of 1. 2) Your remark on building web applications fast really helped me. I waste about 5-10% of my time now optimizing these things, and now I realize I shouldn't [maybe far later]. Again optimization..: LoadModel takes more

wrong find usage, or a bug when binding a model to a model?

2007-08-13 Thread phpjoy
I call for a model with bindmodel. Then I bind another model to that model. $this-controller-$model-Section-Layout-bindModel Section binds Layout, and Layout binds TemplateLayout. With recursive is set to 2 on the model Section, I get all the results I need. The problem Is that I get extra

Security on high/medium

2007-08-11 Thread phpjoy
Where can I find the differences between medium/high security in 1.2? Auth started acting crazy with external links until I set the security to medium instead of high.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Auth1.2 component not showing methods.

2007-08-10 Thread phpjoy
everything. i tried: $this-Auth-authorize = '*'; and: $this-Auth-authorize = 'controller'; both in the users controller and in the production controller. On Aug 10, 7:18 am, Dr. Tarique Sani [EMAIL PROTECTED] wrote: On 8/10/07, phpjoy [EMAIL PROTECTED] wrote: $this-Auth-userModel

Re: CAKE_SESSION_STRING - what it's behavior?

2007-08-10 Thread phpjoy
() and the like to improve security. Geoff --http://lemoncake.wordpress.com On Aug 10, 2:39 pm, phpjoy [EMAIL PROTECTED] wrote: After messing around a bit with the Auth component, I got to CAKE_SESSION_STRING for security usages. I wonder which value it should hold. I just put in random

Re: Auth1.2 component not showing methods.

2007-08-10 Thread phpjoy
that no sessionKey was set.. So I set the session's key. $this-Auth-sessionKey = 'AdminUser'; Now it works. I thought Cake does that for me. :-) thanks a lot for your precious help! On Aug 10, 1:53 pm, Dr. Tarique Sani [EMAIL PROTECTED] wrote: On 8/10/07, phpjoy [EMAIL PROTECTED] wrote: everything. i

Re: CAKE_SESSION_STRING - what it's behavior?

2007-08-10 Thread phpjoy
Just making sure.. :-) Thank you. By the way, I really enjoy your blog. It's a great piece of work. On Aug 10, 2:05 pm, Geoff Ford [EMAIL PROTECTED] wrote: Nope size is not an issue here :) Geoff On 8/10/07, phpjoy [EMAIL PROTECTED] wrote: so it's size doesn't matter.. means each

Re: host free for cake

2007-08-10 Thread phpjoy
i'd go for a 4$ host (CHEAP) or install mysql/apache on your own computer with the xampp server. free hosts i saw are crap.. On Aug 10, 4:24 pm, tuiBR [EMAIL PROTECTED] wrote: Please, somebody knows webserver free that run cakephp ? tranks!

CAKE_SESSION_STRING - what it's behavior?

2007-08-09 Thread phpjoy
After messing around a bit with the Auth component, I got to CAKE_SESSION_STRING for security usages. I wonder which value it should hold. I just put in random chars? is it an md5 value? other type of hashed value? Should it have a number of chars?

Auth1.2 component not showing methods.

2007-08-09 Thread phpjoy
I setup the Auth component, and it's working great for the validation stage. If no session is found, it redirects to /admin/login/ just as it should. $this-Auth-userModel = 'AdminUser'; $this-Auth-loginAction='/' .CAKE_ADMIN .'/login/'; After I get validated (Goes to Users controller and Login

Error Handling for big sites.

2007-08-08 Thread phpjoy
Let's say I have a big site application, should I do these kind of error checking after component/model loading: loadComponent('AdminSiteTree'); if(!class_exists('AdminSiteTreeComponent')) $this-cakeError('internalError', null); What do you say? What do you do in your projects?

edit skipping to add if no id is sent.

2007-08-07 Thread phpjoy
i have a table in my database that doesn't need an id, it's only 1 row stored in the DB. i want to edit that row, and whenever i try to edit it - i get thrown to add. http://localhost/admin/config/edit redirects to http://localhost/admin/config/add and gives me this error: Missing Method in

Re: edit skipping to add if no id is sent.

2007-08-07 Thread phpjoy
i also wonder, where does this redirect happen in cake? dispatcher? before? class/method would be great :) On Aug 7, 8:51 am, phpjoy [EMAIL PROTECTED] wrote: i have a table in my database that doesn't need an id, it's only 1 row stored in the DB. i want to edit that row, and whenever i try

Re: edit skipping to add if no id is sent.

2007-08-07 Thread phpjoy
PROTECTED] wrote: Put an id in - cake needs it to write the update statement. It doesn't have to be 'id', just use var $primaryKey = 'some field'; Geoff --http://lemoncake.wordpress.com On Aug 7, 12:21 am, phpjoy [EMAIL PROTECTED] wrote: i also wonder, where does this redirect happen in cake

Re: edit skipping to add if no id is sent.

2007-08-07 Thread phpjoy
[EMAIL PROTECTED] wrote: Dear phpjoy, What do you mean with id=1? better use an autoincrement field. And please sign your messages (at least a nickname) -- Pablo Viojo [EMAIL PROTECTED]://pviojo.net On 8/7/07, phpjoy [EMAIL PROTECTED] wrote: well, figuring out how it works, i decided

Re: Check mod_rewite through programming

2007-08-03 Thread phpjoy
no need to work hard: google.com: php.net modules apache http://il.php.net/apache [this was the first sub-result] (PHP: Apache- specific Functions - Manual) http://il.php.net/manual/en/function.apache-get-modules.php (after reading the page..) On Aug 2, 5:00 pm, Sascha Fröhlich [EMAIL

Re: Cake PHP Book

2007-08-02 Thread phpjoy
Are you sure summer 2008 is good for 1.2? I assume that in summer 2008 there will be 2.0 alpha.. Which leads to a beta soon after! Which means you might want to release a the book for the 2.0 beta? Not that I have any idea of the CakePHP timeline dates.. but you might wanna consult the

Re: Cake PHP running dead slow !-- 60.6669s --

2007-07-30 Thread phpjoy
i think that he ment to use the bindmodel() instead of loading a new model.. user-profile-func(); instead of loadModel('user'); loadModel('profile'); i wondered what's the performance difference. On Jul 30, 1:30 am, Grant Cox [EMAIL PROTECTED] wrote: On Jul 29, 4:45 pm, housebolt [EMAIL

Re: Cake PHP running dead slow !-- 60.6669s --

2007-07-29 Thread phpjoy
housebolt, how slow is $uses? i should treat 'loadModel()' with the same care ['stay away as much as you can']? how slow does it make the production software? On Jul 29, 8:45 am, housebolt [EMAIL PROTECTED] wrote: It probably is your server. I ran a couple of apps on a godaddy shared server

Re: bindmodel and the paginator not working / trac ticket 2201

2007-07-26 Thread phpjoy
slap me and call me silly! i actually left this and got back to the ticket a few days ago. my mind DELETED the =true.. i actually looked at the API before, twice. silly me :) thanks for pointing me! On Jul 25, 4:29 pm, AD7six [EMAIL PROTECTED] wrote: On Jul 25, 12:21 pm, phpjoy [EMAIL

Re: bindmodel and the paginator not working / trac ticket 2201

2007-07-25 Thread phpjoy
it's the 'true' after the array..). On Jul 19, 8:29 am, AD7six [EMAIL PROTECTED] wrote: On Jul 19, 6:17 am, phpjoy [EMAIL PROTECTED] wrote: nobody has an idea how to make the pagination work with bindmodel instead of static models? You use the second parameter in bindModel to make the new

Re: bindmodel and the paginator not working / trac ticket 2201

2007-07-18 Thread phpjoy
nobody has an idea how to make the pagination work with bindmodel instead of static models? On Jul 18, 12:06 am, phpjoy [EMAIL PROTECTED] wrote: https://trac.cakephp.org/ticket/2201 regarding this trac ticket: Controller::paginate() bug with un/binding [patch included] it's not a bug, so

Re: $this-cakeError refuses to load a custom layout.

2007-07-17 Thread phpjoy
that's great to know, errors always use the default layouts. :) didn't see it in the manual.. thanks a tons for the solution. On Jul 16, 7:52 pm, rtconner [EMAIL PROTECTED] wrote: Ah.. phpjoy, I had the same problem. There is no easy solution so far as I could find. No good solution that I

bindmodel and the paginator not working / trac ticket 2201

2007-07-17 Thread phpjoy
https://trac.cakephp.org/ticket/2201 regarding this trac ticket: Controller::paginate() bug with un/binding [patch included] it's not a bug, so how can i get the paginator to work with bindmodel (or that's not possible?) it works great if i use var $belongsTo in the model instead of bindmodel.

Re: $this-cakeError refuses to load a custom layout.

2007-07-16 Thread phpjoy
no ideas? it's a bug? the normal behavior is loading a default layout? On Jul 14, 6:32 pm, phpjoy [EMAIL PROTECTED] wrote: it seems like it won't load a custom layout for me. at first, i didn't have in app/views/layouts the file default.ctp, and it loaded the default cakephp layout. so i

$this-cakeError refuses to load a custom layout.

2007-07-14 Thread phpjoy
it seems like it won't load a custom layout for me. at first, i didn't have in app/views/layouts the file default.ctp, and it loaded the default cakephp layout. so i added default.ctp to my layouts directory, and it loaded it. however i want a custom layout for my errors [from default.ctp], and

Re: Corrupted Image [file stored in filesystem, thumbnail ok!]

2007-07-07 Thread phpjoy
i figured out it's either apache or cakephp.. so wanted to make sure it's not cake. i'll setup a DB on a linux machine in the next few days to test it out.. thanks On Jul 7, 2:18 am, Grant Cox [EMAIL PROTECTED] wrote: Felix had a similar issue last year

Corrupted Image [file stored in filesystem, thumbnail ok!]

2007-07-06 Thread phpjoy
i have a problem with an image i use. i upload the image, and it's alright on the file system. perfect. when i load up the image from the server, it's corrupted. the file on the DISK is perfectly fine. it's just displayed wrong through apache.. it's completely weird! for example, after the

Validation in 1.2 when field isn't in database.

2007-07-02 Thread phpjoy
when i try to validate a form's field that doesn't exist in the database i get this error. the validation works for fields that are in the database. var $validate = array( 'imagedata' = array('No image uploaded.' = VALID_NOT_EMPTY), ); that's the validation line.

Re: Paginate define columns to use (1.2)

2007-07-02 Thread phpjoy
did you try: $this-ModelName-recursive = 0; in the model? On Jul 1, 5:13 pm, Mech7 [EMAIL PROTECTED] wrote: UnbindModel does also not seem to work :( // Remove HABTM on tags and categories $this-Article-unbindModel(array('hasAndBelongsToMany' = array('Tag',

cakeError - using international chars

2007-06-29 Thread phpjoy
hey, if i try to use cakeError with an international char, it simply ignores the information. for example: $this-cakeError('error', array(array('name' = 'PageNotFound', 'code'='404', 'message'='displayedmessage', 'base'=$this-base))); works like a charm.. while.. $this-cakeError('error',

Re: cakeError - using international chars

2007-06-29 Thread phpjoy
Sanitize(); $messages = $clean-paranoid($messages, $allow); that means no international chars can be put inside a message.. On Jun 29, 10:56 am, phpjoy [EMAIL PROTECTED] wrote: hey, if i try to use cakeError with an international char, it simply ignores the information. for example

cake1.2 model validation

2007-06-27 Thread phpjoy
ahoy, i have the following validation in a model: var $validate = array( 'directory' = array('rule' = 'ValidFunc', 'message'='message') ); function ValidFunc($value) { $newvalue = 'new' .$value; $value = $newvalue; case 1: /*message=1*/ return false;

Re: cake1.2 model validation

2007-06-27 Thread phpjoy
interact with it. On Jun 27, 9:11 pm, phpjoy [EMAIL PROTECTED] wrote: ahoy, i have the following validation in a model: var $validate = array( 'directory' = array('rule' = 'ValidFunc', 'message'='message

Re: checking if a controller exists

2007-06-21 Thread phpjoy
is faster than loading a function through requestAction? On Jun 19, 12:03 pm, kabturek [EMAIL PROTECTED] wrote: yo can always try class_exists() ;)http://php.net/class_exists greets, On Jun 19, 11:22 am, phpjoy [EMAIL PROTECTED] wrote: thanks a lot, that pretty much sums it up.. i see

Re: checking if a controller exists

2007-06-19 Thread phpjoy
de phpjoy Enviado el: Lunes, 18 de Junio de 2007 11:06 a.m. Para: Cake PHP Asunto: Re: checking if a controller exists you gave an intresting idea.. maybe i'll simply loadcontroller and then run the action and then call the view render myself from the function

getting 2 rows from a table with 2 foreign keys

2007-06-19 Thread phpjoy
hey, i have a table with 2 fields in it: muser and cuser. cuser is the user that created the object, and muser is the user that modified the object in the last time. both should be loaded for the same object, for example: $object['mAdminUser']['username'] $object['cAdminUser']['username'] or

Re: getting 2 rows from a table with 2 foreign keys

2007-06-19 Thread phpjoy
yep, that's exactly what i was asking. thanks a lot! so easy that i missed that. :-) On Jun 19, 12:55 pm, Grant Cox [EMAIL PROTECTED] wrote: Are you asking how you can have multiple assocations to the same foreign model? In that case just use unique association keys, ie: var $belongsTo =

checking if a controller exists

2007-06-18 Thread phpjoy
what's the cakephp way to check whether a controller exists or not? $this-set('product', $this-requestAction('/admin/product/', array('return'))); if the controller isn't there, it shows an error message. i haven't tried taking it to debug 0, i thought of using a function to check. thanks

Re: checking if a controller exists

2007-06-18 Thread phpjoy
you gave an intresting idea.. maybe i'll simply loadcontroller and then run the action and then call the view render myself from the function. i'll try and report back! if that doesn't work i'll goto the router itself [something i try avoid doing]. On Jun 18, 1:51 pm, Grant Cox [EMAIL

cake1.2: form options

2007-06-15 Thread phpjoy
hey, i recently migrated to cake1.2, and i baked a project. in the edit form, i had the following line: $form-input('published', array('options' = $s)); the problem is that it doesn't work. it doesn't recognize $s. Notice (8): Undefined variable: s [CORE\app\views\sections \admin_edit.ctp,

Re: cake1.2: form options

2007-06-15 Thread phpjoy
yeah, that's obvious. i read the api and setup the select to work, i just wonder why the bake didn't do that on his own.. thanks for youur answer. On Jun 15, 4:12 pm, Dr. Tarique Sani [EMAIL PROTECTED] wrote: You have to set the $s from your controller T On 6/15/07, phpjoy [EMAIL PROTECTED

bakery GUI suggestion

2007-06-03 Thread phpjoy
hey all! i have a little bakery GUI suggestion. for months i enter the bakery and think gee! that's quite annoying finding everything in the bakery!, so i decided to share that now. i really liked the old wiki gui, it was quite simple and easy to access all of the tutorials there. now when i

Re: bakery GUI suggestion

2007-06-03 Thread phpjoy
great to hear! i'd love to see a better gui for the bakery.. slimmer gui, that is. what's a mock up? :) On Jun 3, 7:42 pm, gwoo [EMAIL PROTECTED] wrote: Suggestions are more than welcome. If you have an idea for better gui, put together a mock up and submit it as an enhancement to

accessing a controller from a component.

2007-01-10 Thread phpjoy
i think i'm missing something in my component, .. i can't seem to access the controller from the component. here's the component's code: class PlacesComponent extends Object { var $controller = true; function startup($controller) { $this-controller =

Re: accessing a controller from a component.

2007-01-10 Thread phpjoy
i'm working with php5. and nope, it still doesn't work.. function startup($controller) { $this-controller = $controller; } and in the component's function: var_dump($this-controller); either shows a bool TRUE if i set it up, or a null if i don't set it up. if

Re: Reusable code, components and controllers.

2006-12-26 Thread phpjoy
great, gonna use this one! for some kinda reason, i didn't take into consideration that you can use var $components = array( 'Session' ); in a component.. sigh! :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Table associations the CakePHP way

2006-12-26 Thread phpjoy
I have a controller, and I want to fetch information from tables. With scaffold, it works wonderfully.. However I wanna load the information smartly for my app. These are my tables: section: id name field1 field2 layout_id category_id category: id name field3 field4 field5 field6 layout: id

Re: Table associations the CakePHP way

2006-12-26 Thread phpjoy
category.name and layout.name is just an array away from the main result. Still having problem? Print out to us the result of the steps above... On 12/26/06, phpjoy [EMAIL PROTECTED] wrote: I have a controller, and I want to fetch information from tables. With scaffold, it works wonderfully.. However

The right way to check a field in of another model in a controller.

2006-12-25 Thread phpjoy
hey guys, i need to check whether an ID exists in another model or not. i wonder which is the correct way to do that: 1) calling a request action, or 2) loading the model itself and making the operation. 1) if($this-requestAction('/admin/sections/exists/' .$_GET['section'])) { echo

Reusable code, components and controllers.

2006-12-25 Thread phpjoy
I have this code for my app, and I need to put it in a few controllers. I wonder where I can put it, so I could call it from the controllers. loadModel('Section'); $Section = new Section; $this-Section = new Section; $this-Section-id = $this-params['url']['section']; $section =

Re: Updating a date field after form submission

2006-12-22 Thread phpjoy
if i have a created field and a modified field, will both of them be updated everytime? for example: add()/edit() - DB fields modified and created will be changed. or: add() - only the field created will be changed. edit() - only the field modified will be changed. and can you control it

Re: Textarea limit

2006-12-16 Thread phpjoy
i know you have to use something in addition for the native HTML, but i wondered whether cakephp provides that or not.. i thought of adding an onclick, and javascript at the start of the file - as i normally do. --~--~-~--~~~---~--~~ You received this message

Textarea limit

2006-12-15 Thread phpjoy
hey guys, how do you limit and check the textareas? do you make javascripts for that? kinda new to cakephp. yossi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send