Re: getLastInsertId or something similar

2009-01-19 Thread Jon Bennett
where do I grab the lastInsertId()? in the event_controller? and then how do I pass it to the user view? provided you've correctly set up your model associations, which I think are: User hasMany Event Event belongsTo User From your Users controller you can do: $event_id =

Re: Using CakePHP with XAMPP for Windows

2009-01-19 Thread leo
I often use Firebug with Firefox to deconfuse path issues like this. With Firebug you can inspect the image path written to HTML and edit it (in the instance of the page) to see what it should be - as soon as it points to the image correctly an image thumbnail will pop up in the Firebug window.

Re: AuthComponent usage

2009-01-19 Thread Martin Westin
Thanks for explaining. The reason I asked is that I have never developed anything that allows anonymous (un-authenticated) visitors to do anything much at all (except view public stuff). On Jan 18, 10:41 pm, Robert forpoc...@gmail.com wrote: Why do you like this approach? /Martin Thanks

About custom cache features

2009-01-19 Thread kiang
I submitted a ticket about adding tag feature to cache and it got deleted soon. https://trac.cakephp.org/ticket/5965 OK, somebody think it's bad idea to touch the great core of CakePHP. But how to add custom cache features in CakePHP besides modifying the core? It had been mentioned in this

Re: AuthComponent usage

2009-01-19 Thread Miles J
If you want public comments or something, just have the user_id in the database = 0. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To

Re: Using CakePHP with XAMPP for Windows

2009-01-19 Thread Miles J
If you need help enabling mod_rewrite: http://www.milesj.me/blog/read/12/enabling-modrewrite-in-xampp-windows --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: Multiple paginators

2009-01-19 Thread Penfold
Hi, I think this is what your after http://debuggable.com/posts/how-to-have-multiple-paginated-widgets-on-the-same-page-with-cakephp:48ad241e-b018-4532-a748-0ec74834cda3 On 18 Jan, 22:08, ml mlehmusko...@gmail.com wrote: This could be a common problem, but searching this group provided no

Re: About custom cache features

2009-01-19 Thread Adam Royle
Btw, it wasn't deleted, only the version and milestone metadata was deleted from the ticket. It is still an open ticket. Cheers, Adam On Jan 19, 6:26 pm, kiang kia...@gmail.com wrote: I submitted a ticket about adding tag feature to cache and it got deleted

Re: Counting Tags. What is the find() syntax?

2009-01-19 Thread RichardAtHome
@Webweave. That's the article I was struggling with. I'll drink a few more cups of coffee and have another look. I'll use your select field tip in the meantime. On Jan 18, 3:46 pm, Webweave webwe...@gmail.com wrote: Easiest way I've found is just to include a select field in the query like:

Re: Security Notice for 1.2.0.7962, Using AuthComponent without SecurityComponent

2009-01-19 Thread milx
Is there a link to the details of the security concern? I know it's fixed now but I'm interested if I should always use the Security Component and what the implication is if I don't. Tried googling and looking in Trac but I can't seem to find out what the problem was. On Jan 16, 10:14 pm, Gwoo

problem with the API?

2009-01-19 Thread leo
Is it me or is the API malfunctioning? If I search for 'find' it only comes back with Folder::find as a discrete method and a lot of other indirect matches. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP

Re: CakePHP for commercial use

2009-01-19 Thread mark_story
Oracle Apex is a very different type of solution from CakePHP. It seems that Apex is a web interface for building applications, while CakePHP is a programming framework. One requires no programming the other requires much more. If you are comparing these two solutions, I think you need to

Re: Testing a controller method

2009-01-19 Thread mark_story
You don't test private methods. You test your public interface, and by testing your public interface your implementation is also tested. As far as testing controllers I wrote a somewhat lenghty post on it http://mark-story.com/posts/view/testing-cakephp-controllers-the-hard-way As for testing

containable and (left/inner) JOINS

2009-01-19 Thread Mark (Germany)
i was wondering why the containable beh. as well as many other queries are done in that very complicated way of - getting the results of the first table - use these ids for the result of the other tables with IN(x,y,z,...) instead of just using LEFT JOIN? it really gave me headache yesterday

Re: Security Notice for 1.2.0.7962, Using AuthComponent without SecurityComponent

2009-01-19 Thread Pyrite
Is there a way to test this CVE without Firefox? I do not have the option of Firefox at work. Only IE7. On Jan 16, 4:14 pm, Gwoo gwoo.cake...@gmail.com wrote: After the release of 1.2 Final, we received a lot of attention. Some of this came in the form of a security concern. The issue could

[Looking 4 good practice] HABTM - fields in jointable

2009-01-19 Thread Ernesto
Hello. i have 2 models: Customer and Order, linked together by a HABTM relationship that's working fine. the Join table (orders_customers) has the following structure: order_customer_id customer_id order_id field_A field_B field_A and field_B must be *100 everytime the data is loaded. How can

Re: CakePHP for commercial use

2009-01-19 Thread leo
I've used Cake commercially for about two years now. Support may be an issue, but I have found this forum has answered most of my questions rapidly. The unanswered questions were usually about out-on-a-limb problems. Two things are certain, though: 1. Using Cake dramatically improved

Re: get method validation

2009-01-19 Thread oliver.pra...@googlemail.com
It should be noted that the GET Request is not designed for this ;-) Hypertext Transfer Protocol (HTTP) Request methods GET Requests a representation of the specified resource. Note that GET should not be used for operations that cause side-effects, such as using it for taking actions in web

Re: baking cakephp on MAC OS

2009-01-19 Thread leo
I used to use MAMP. It used a non-standard port for the DB. Check which port you're using and add it as shown in the database.php comments: * host = * the host you connect to the database. To add a socket or port number, use 'port' = # * --~--~-~--~~~---~--~~

Re: HABTM - fields in jointable

2009-01-19 Thread Ernesto
ok i found the solution ?php class Recipe extends AppModel { var $name = 'Recipe'; var $hasAndBelongsToMany = array( 'Tag' = array( 'className' = 'Tag', 'joinTable' = 'recipes_tags', 'with'

Re: HABTM - fields in jointable

2009-01-19 Thread Ernesto
uhm... i -partially- found the solution... if i load data from Customers_Controller the order_customer::afterFind doesn't work... On 19 Gen, 15:29, Ernesto e.fanz...@gmail.com wrote: ok i found the solution ?php class Recipe extends AppModel {     var $name = 'Recipe';     var

Re: 'default' option of checkbox does not work :(

2009-01-19 Thread Smelly_Eddie
checked = 1 On Jan 19, 1:05 am, kizuki kurakur...@gmail.com wrote: After looking deeply at the source code in helper.php and form.php, I understood that the form helper is not designed to accept the 'default' value for checkboxes and radio buttons. (I also understood that my code change 2

Just a hint: CakePHP master slave

2009-01-19 Thread olav
In post http://groups.google.com/group/cake-php/browse_thread/thread/58ea010f930fab6c an approach is described which does not work, unfortunately. For a viable solution, please have a look at http://bakery.cakephp.org/articles/view/load-balancing-and-mysql-master-and-slaves-2 though. -- Olav

How do I limit the choice for time input to 30 minutes leaps?

2009-01-19 Thread ChristineA
Hi there, I've been giving the user the option to insert the time into a form like this: ?php echo $form-input('time');? Now the user has a choice of 60 minutes. I've been trying to limit the choice to 30 minutes leaps. So it should only be possible to choose 5:30, 6:00, 6:30 and so on. Is

Re: core dot php

2009-01-19 Thread aku.haibar
I have change a few character... but i still get the same message... On Jan 19, 1:05 pm, brian bally.z...@gmail.com wrote: Cake comes with a default value for Security.salt but will nag you to change it. The point is that it should be a value that only you know. Just change it to something

My Sql Query

2009-01-19 Thread somu
Hello, Please tell me how we can hide the mysql query showing at bottom of the page, when we run a query. Its displays the no. of records founds etc. Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Multiple paginators

2009-01-19 Thread ml
That's right, you can set the page size etc. individually and the paginators render perfectly. However, the $paginator-next and $paginator-prev update both of the paginators, which is obviously not desired. On Jan 19, 6:51 am, Amit Badkas amitrb...@gmail.com wrote: You can provide model's name

Defining website structure with CakePHP

2009-01-19 Thread Stuart
I've been reading about the MVC approach, and am considering moving to cakePHP as I think it would speed up my development in the long term. One thing I can't quite fathom - how does one structure their website with CakePHP? Is the normal approach to store the page hierarchy as a Tree? (http://

Re: My Sql Query

2009-01-19 Thread leo
In app/config/core.php set Configure::write('debug', 1); (or 0, which will suppress php errors as well) On Jan 19, 12:03 pm, somu somna...@gmail.com wrote: Hello, Please tell me how we can hide the mysql query showing at bottom of the page, when we run a query. Its displays the no. of

Re: How do I limit the choice for time input to 30 minutes leaps?

2009-01-19 Thread leo
It really depends on the design of your form. You could use an HTML select element as a time chooser and only specify the half hours as options. You could round up (or down) automatically. You could do it by validation (php or javascript). On Jan 19, 12:39 pm, ChristineA dins...@gmx.net wrote:

Re: Defining website structure with CakePHP

2009-01-19 Thread Bernardo Vieira
Take a look at wildflower cms, it's a cakephp based cms that does that. Stuart wrote: I've been reading about the MVC approach, and am considering moving to cakePHP as I think it would speed up my development in the long term. One thing I can't quite fathom - how does one structure their

Relationships - HABTM

2009-01-19 Thread rhythmicde...@gmail.com
I have been making some pretty good headway on defining the relationships for my models. However I am not getting some data that I expect to get. This may be due to my relationship definitions or a misunderstanding of what CakePHP will do for me. I am hoping one you can point me in the right

Re: HABTM - fields in jointable

2009-01-19 Thread Webweave
What do you mean it doesn't work? Is it not firing, or are you getting an error ? On Jan 19, 7:05 am, Ernesto e.fanz...@gmail.com wrote: uhm... i -partially- found the solution... if i load data from Customers_Controller the order_customer::afterFind doesn't work... On 19 Gen, 15:29,

Re: Counting Tags. What is the find() syntax?

2009-01-19 Thread leo
I couldn't see the point in a separate tags table, so I have a tags column on the table that requires it. To retrieve the tags and tag count, I do this: function getTagsWithCounts($conditions = array()) { // Return assoc_array(tags) for all records in database.

Re: __mergeHasMany causing EXTREMELY slow data retrieval

2009-01-19 Thread Dan
On Jan 16, 4:57 pm, Miles J mileswjohn...@gmail.com wrote: Why do you even need to grab 2800? I need to load them to generate order statistics. Another reason would be for a CSV export. 2800 is very small. We're in the process of developing an app that could have hundreds of thousands of rows

Master / Slave Support

2009-01-19 Thread Andreas Hofmann
Hi all, we have discovered a way how to realize master/slave support with cake (also with multiple slaves). This old post is completely depricated: http://groups.google.com/group/cake-php/browse_thread/thread/58ea010f930fab6c Because Model::find() and Model::save() create the $db-handle lines

Re: Relationships - HABTM

2009-01-19 Thread brian
On Mon, Jan 19, 2009 at 10:57 AM, rhythmicde...@gmail.com rhythmicde...@gmail.com wrote: I have been making some pretty good headway on defining the relationships for my models. However I am not getting some data that I expect to get. This may be due to my relationship definitions or a

Re: How do I limit the choice for time input to 30 minutes leaps?

2009-01-19 Thread Martin Westin
This will give you a MySQL compatible time for each half hour. for ($i=0; $i 24; $i++) { $hour = str_pad($i, 2, '0', STR_PAD_LEFT); $time_options[$hour.':00:00'] = $hour.'\'00'; $time_options[$hour.':30:00'] = $hour.'\'30'; }

RE: Relationships - HABTM

2009-01-19 Thread Steven Wright
Hi Brian thanks for writing back. The ingredient_lists table is where the ingredient, amount and ingredient level instructions are stored. I suppose it's really a join table for recipes, ingredients and measurement_types. So from your reply I should actually rename this to ingredients_recipes.

Re: containable and (left/inner) JOINS

2009-01-19 Thread rtconner
I think you misunderstand what the containable does. Your complaint is with model bindings in general, and not with this behavior. In any case, I'll leave you to expiriment and learn, but I wanted to tell you, to do an inner join in cake you use the config.. 'type'='INNER' in your binding

Re: Master / Slave Support

2009-01-19 Thread Aaron Shafovaloff
Thanks much. I didn't realize the old (and easy) method of doing this was deprecated. On Jan 19, 10:04 am, Andreas Hofmann andreas.hofman...@googlemail.com wrote: Hi all, we have discovered a way how to realize master/slave support with cake (also with multiple slaves). This old post is

Re: Security Notice for 1.2.0.7962, Using AuthComponent without SecurityComponent

2009-01-19 Thread Gwoo
@mlix changeset 7979 fixed the issue. Security prevents CSRF and ensures that form inputs properly match the values being submitted. @Pyrite im so sorry. I don't really have a way around your IE7 problem, short of storming the castle and demanding your work installs FF.

Re: Relationships - HABTM

2009-01-19 Thread brian
Both Recipe and Ingredient should be HABTM with each other. You can have many recipes which share ingredients. The join table for both would be: ingredients_recipes ingredient_id, recipe_id You could add an id primary key in there, also, as it might come in handy. It's not required, though. As

Re: Rails 2 CakePHP

2009-01-19 Thread Gwoo
I don't think there are any pure guides for rails-cake, but it sounds like a good idea if someone wanted to take on the task. As for cheatsheets, we have one for 1.2, http://cakephp.org/downloads/Resources Comparing the blog tutorials might be helpful too, http://book.cakephp.org/view/219/Blog

Re: Rails 2 CakePHP

2009-01-19 Thread Gwoo
I don't think there are any pure guides for rails-cake, but it sounds like a good idea if someone wanted to take on the task. As for cheatsheets, we have one for 1.2, http://cakephp.org/downloads/Resources Comparing the blog tutorials might be helpful too, http://book.cakephp.org/view/219/Blog

RE: Relationships - HABTM

2009-01-19 Thread Steven Wright
Ok I get it. Thanks man I really appreciate your time. Steve -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of brian Sent: Monday, January 19, 2009 1:13 PM To: cake-php@googlegroups.com Subject: Re: Relationships - HABTM Both Recipe

Re: problem with the API?

2009-01-19 Thread rtconner
Yeah, I agree. 'beforeFind' does not come up with any results of the method beforeFind. It's a bit strange, especially given that it's worked well for so long. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP

Re: problem with the API?

2009-01-19 Thread Gwoo
Doxygen is not helping us anymore. We are working on the issues, but it's not pretty. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To

Multiple Check Box Styles

2009-01-19 Thread WidePixels
Does anyone know how to add a CSS style to the Checkbox? My controller code: $programs = $this-Software-Program-find('list', array('fields' = 'program', 'order' = 'program ASC')); which works as I want. But in the view: echo $form-input('Program',array('multiple'='checkbox')); it just outputs:

Route a /pages url to a controller

2009-01-19 Thread aapljack
I am having trouble writing a route to direct an old /pages url to a newer controller url. The old pages url looks like this.. www.url.com/pages/tech_tips The url I want to route this to looks like this.. www.url.com/techtips I have tried different ways of writing the route and one of my

Re: How do I limit the choice for time input to 30 minutes leaps?

2009-01-19 Thread leo
Christine, You might try this (I haven't tried it as I don't have time,but a quick look at the API found the attribute ' minuteInterval'): echo $form-input('date', array( 'minuteInterval' = 30)); Also look at the API

Re: baking cakephp on MAC OS

2009-01-19 Thread bookme
Thanks for your solution...but still not working. I tried both above solution but not working. I am using xampp on MAC OS.. ERROR : Can't connect to local MySQL server through Socket '/var/ mysql/mysql.sock ? I also set envornment variable using echo 'export

Re: baking cakephp on MAC OS

2009-01-19 Thread mark_story
It has less to do with your path and more to do with your PHP is knocking on a door, and nobody is home. You need to find out where your mysql.sock is, and configure PHP to knock on that door instead. -Mark On Jan 19, 2:46 pm, bookme rarockthewo...@gmail.com wrote: Thanks for your

App::import fail to load Component for imported controller

2009-01-19 Thread gerhardsletten
Writing an app where I was planing to move all email delivering in one controller. When I try to load this Utility controller in a function from another controller. App::import fail to load Email component in this controller Controller 1: code function send_message() { ...

Re: Solution for static page with no pages in URL

2009-01-19 Thread Jesse
Thanks both of you for your input. All my mod_rewrite stuff is working properly. I was looking for a way to circumvent putting a Router::connect for each static page I have. Some of my sites have 100-150 static pages. I'm looking for a way to dynamically build the routes for all the pages.

Re: baking cakephp on MAC OS

2009-01-19 Thread leo
If you're using XAMPP, I don't think it's a php/mysql config problem. that is precisely the problem these *AMP stacks are designed to avoid. However, you might want to try the following. Incidentally, that should be Applications PLURAL in your path. Open a terminal, and type: ps -af | grep

Re: Solution for static page with no pages in URL

2009-01-19 Thread Gonzalo Servat
On Mon, Jan 19, 2009 at 6:09 PM, Jesse jesseainsk...@gmail.com wrote: Thanks both of you for your input. All my mod_rewrite stuff is working properly. I was looking for a way to circumvent putting a Router::connect for each static page I have. Some of my sites have 100-150 static

Re: Solution for static page with no pages in URL

2009-01-19 Thread leo
Are your static pages html or PHP? Either way, why can't you just put them in webroot? They only need to be inside the cake structure if they're cake files. Jesse wrote: I know this comes up a lot. I've always fixed this before (1.1) with a core hack. I thought that as I moved my sites to 1.2

Re: Solution for static page with no pages in URL

2009-01-19 Thread Gonzalo Servat
On Mon, Jan 19, 2009 at 6:48 PM, leo ponton@gmail.com wrote: Are your static pages html or PHP? Either way, why can't you just put them in webroot? They only need to be inside the cake structure if they're cake files. That means I can't take advantage of the CakePHP helpers and such ...

Re: Solution for static page with no pages in URL

2009-01-19 Thread Jon Bennett
hi Jesse, I was looking for a way to circumvent putting a Router::connect for each static page I have. Some of my sites have 100-150 static pages. I'm looking for a way to dynamically build the routes for all the pages. My script I wrote does work, I was just looking for input

Re: core dot php

2009-01-19 Thread Miles J
I dont think thats possible. Just put any word or characters for the value and save it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To

Re: Anyone built a forum system yet?

2009-01-19 Thread Miles J
Bump over weekend. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to

Re: Anyone built a forum system yet?

2009-01-19 Thread Kyle Decot
I'd like to know if anyone has done this also. I want to build a forum into my current website but the sheer vastness of it is intimidating. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to

Re: Solution for static page with no pages in URL

2009-01-19 Thread Jon Bennett
hi Jesse, I was looking for a way to circumvent putting a Router::connect for each static page I have. Some of my sites have 100-150 static pages. I'm looking for a way to dynamically build the routes for all the pages. My script I wrote does work, I was just looking for input

Re: Counting Tags. What is the find() syntax?

2009-01-19 Thread RichardAtHome
I couldn't see the point in a separate tags table What about 2 articles that share the same tags? You run the risk of tagging either with one or 1 (for example) or CakePHP, cakephp, Cakephp, cakePHP... There's an awful lot of processing happening in your foreach loop. What happens when you get

Issue with Securty component

2009-01-19 Thread volka
Hi there, I found out that using debug($variable) in a view leads to missing Token Keys in the forms rendered in that view. Does someone knows why? Kind regards, Volka --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Solution for static page with no pages in URL

2009-01-19 Thread leo
Ahh..you didn't say that. Seems to me all you need to do is put the pages in ..er.. pages and make sure that the pages route is last in the routes.php file. That way everything that has a home will find it and the rest falls through to pages. No lookup for page names needed. You might even be

Re: Anyone built a forum system yet?

2009-01-19 Thread Miles J
Ive built my own forum from scratch. It works flawlessly, but the one thing I never understood is the read/unread of topics. Because storing that information in the database would be huge. --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Anyone built a forum system yet?

2009-01-19 Thread Kyle Decot
That's pretty cool. Since you said you did it from scratch, I'm guessing you didn't use cake? Could you give me a link to your forum so I could check it out? Thanks On Jan 19, 4:28 pm, Miles J mileswjohn...@gmail.com wrote: Ive built my own forum from scratch. It works flawlessly, but the one

RE: Relationships - HABTM

2009-01-19 Thread Steven Wright
Hi Brian one more thing for clarification. My expectation is that if I define the relationships correctly and my DB table are keyed correctly when I call for a read all from the Recipe model I should all related information from all tables no matter how deep the relationship. Is that correct?

Re: Solution for static page with no pages in URL

2009-01-19 Thread Gonzalo Servat
On Mon, Jan 19, 2009 at 7:21 PM, leo ponton@gmail.com wrote: Ahh..you didn't say that. Seems to me all you need to do is put the pages in ..er.. pages and make sure that the pages route is last in the routes.php file. That way everything that has a home will find it and the rest falls

MVC Desing tips

2009-01-19 Thread Mirthis
Hi guys! I'm pretty new to Cake PHP and what I find really hard, being used to develop PHP without following any rule or schema, is to get used to the MVC design.model. In this moment I'm creating stuff without any particular purpose in mind, but just to get confident with the framework and to

Re: Counting Tags. What is the find() syntax?

2009-01-19 Thread leo
All the tags are lowercased. Sure you can have 1 or One but how does a separate table avoid that? What about spelling mistakes? How are you going to handle your tags? A mother of all drop down lists? Will you create christian name and surname tables in case there are two Johns? There are

Re: Anyone built a forum system yet?

2009-01-19 Thread Miles J
www.sc2armory.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to

Re: Issue with Securty component

2009-01-19 Thread volka
Sorry, that was a canard. It has nothing to do with debug(). The reason was: I didn't had 'Security' in my app_controller, and when displaying the element loginbox.ctp on home, it didn't recognize 'Security' as i used it in my users_controller only.. On 19 Jan., 22:11, volka

Re: Anyone built a forum system yet?

2009-01-19 Thread Graham Weldon
Have you released / are you planning to release source for this? Cheers, Graham On Mon, 19 Jan 2009 13:43:05 -0800 (PST), Miles J mileswjohn...@gmail.com wrote: www.sc2armory.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Anyone built a forum system yet?

2009-01-19 Thread Miles J
Well its not built with Cake if thats what your asking. Im planning to port hte current (my custom code) over to Cake because it has more security, cache, etc. And no ill probably not release the code, its pretty basic. --~--~-~--~~~---~--~~ You received this

The Manual»Example Applications»Blog»Deleting Posts - a security issue

2009-01-19 Thread Delirium tremens
http://localhost/CakePHP/cakeBlog/posts/delete/1 1 can be anything What if a cracker visits http://localhost/CakePHP/cakeBlog/posts/delete/'all' or something like that? How are you protecting your site? What would an explanation look like in the manual about denying any argument like 'all'

Cron Job Hostgator

2009-01-19 Thread Kyle Decot
I'm attempting to implement cron jobs into my website but I'm having a little trouble. I created the cron_dispatcher file I found at http://bakery.cakephp.org/articles/view/calling-controller-actions-from-cron-and-the-command-line I then entered the following in my hostgator cron job page under

Re: The Manual»Example Applications»Blog»Deleting Posts - a security issue

2009-01-19 Thread Kyle Decot
You could just do something like: function delete($id=null) { if(is_numeric($id)) { $this-Post-del($id); // etc. } } On Jan 19, 5:29 pm, Delirium tremens pedbe...@gmail.com wrote: http://localhost/CakePHP/cakeBlog/posts/delete/1 1 can

Re: The Manual»Example Applications»Blog»Deleting Posts - a security issue

2009-01-19 Thread AD7six
On Jan 19, 11:29 pm, Delirium tremens pedbe...@gmail.com wrote: http://localhost/CakePHP/cakeBlog/posts/delete/1 1 can be anything What if a cracker visitshttp://localhost/CakePHP/cakeBlog/posts/delete/'all' if you accessed that url and deleted all of your posts - you've done something

Saving Multiple Records

2009-01-19 Thread royce178
Hey everyone, So, I've googled everything in regards to adding multiple records in a single form and I have not had any beginners luck. My cakephp project consist of creating an online business survey for future clients who need a web site developed. The survey has three key tables related to

access the name of the active model in the view

2009-01-19 Thread FranktheTank
Short of performing surgery on the URI, how can I determine the model which has called the current view? I'd like to add it to my default layout so I can automate some tabs. Thanks. Frank --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: getLastInsertId or something similar

2009-01-19 Thread mike
eeerrr, this is not working. I have this in the User model: var $hasMany = array ('Event'); this in the event model: var $belongsTo = array ( 'User' = array( 'className'= 'User', 'foreignKey'= 'creator_id', ) );

Re: baking cakephp on MAC OS

2009-01-19 Thread mark_story
Also since you are on macos check which php you are using. I bet you are using the stock Apple PHP which php Should give you the path to the PHP that is the cli default. -Mark On Jan 19, 3:36 pm, leo ponton@gmail.com wrote: If you're using XAMPP, I don't think it's a php/mysql config

Yet Another HABTM Save Question

2009-01-19 Thread Rob Wilkerson
Hey all - I see a lot of questions about this, but nothing I've found references the error I'm seeing so I thought I'd post here and see whether anyone else recognizes what I'm doing wrong. I have an Event model that habtm Attraction: class Event extends AppModel { public $name

Re: About custom cache features

2009-01-19 Thread kiang
Sorry, I misunderstand the message. Thanks, Adam. --- kiang On 1月19日, 下午6時30分, Adam Royle a...@sleekgeek.com.au wrote: Btw, it wasn't deleted, only the version and milestone metadata was deleted from the ticket. It is still an open ticket. Cheers, Adam On Jan 19, 6:26 pm, kiang

mercado cakephp (era- Re: abnormal flash)

2009-01-19 Thread Marcelo Andrade
On Sun, Jan 18, 2009 at 1:03 PM, Delirium tremens pedbe...@gmail.com wrote: Existe mercado de trabalho para programador de CakePHP no Brasil??? Tenho que sair logo. Cara, essa é uma boa pergunta. Eu também sou muito entusiasmado com o Cake e gostaria muitíssimo de trabalhar profissionalmente

Re: mercado cakephp (era- Re: abnormal flash)

2009-01-19 Thread Henrique Machado
mais um =) 2009/1/19 Marcelo Andrade mfandr...@gmail.com On Sun, Jan 18, 2009 at 1:03 PM, Delirium tremens pedbe...@gmail.com wrote: Existe mercado de trabalho para programador de CakePHP no Brasil??? Tenho que sair logo. Cara, essa é uma boa pergunta. Eu também sou muito entusiasmado

Re: mercado cakephp (era- Re: abnormal flash)

2009-01-19 Thread Everton Yoshitani
Ae galera tenho encontrado alguns freelas através desses dois sites: http://www.odesk.com/ http://www.elance.com/ Boa sorte! 2009/1/20 Henrique Machado henri@gmail.com: mais um =) 2009/1/19 Marcelo Andrade mfandr...@gmail.com On Sun, Jan 18, 2009 at 1:03 PM, Delirium tremens

Re: XAMMP for Windows with cakePHP

2009-01-19 Thread Jorge Horacio Cué Cantú
Hello, Depending on your operating system, for example for Linux: sudo mkdir /opt/lampp/htdocs/myproject sudo cp -r ~/myproject/* /opt/lampp/htdocs/myproject sudo chown -R nobody:nobody /opt/lampp/htdocs/myproject Where myproject is the directory for your project. Do not copy cake directly

form errors for HABTM model

2009-01-19 Thread brian
I'm using a tip I saw recently somewhere (Teknoid?) to validate HABTM on save: $this-MainModel-OtherModel-set($this-data); if (!$this-MainModel-OtherModel-validates()) { $this-MainModel-OtherModel-invalidate('OtherModel'); } else if ($this-MainModel-save($this-data)) { ...

Re: Yet Another HABTM Save Question

2009-01-19 Thread brian
What does the output look like when you have this: if (!empty($this-data)) { die(debug($this-data)); On Mon, Jan 19, 2009 at 7:05 PM, Rob Wilkerson r...@robwilkerson.org wrote: Hey all - I see a lot of questions about this, but nothing I've found references the error I'm seeing so I

Re: access the name of the active model in the view

2009-01-19 Thread brian
$this-model http://api.cakephp.org/class_view.html On Mon, Jan 19, 2009 at 6:13 PM, FranktheTank frankbirchstu...@gmail.com wrote: Short of performing surgery on the URI, how can I determine the model which has called the current view? I'd like to add it to my default layout so I can

Re: Relationships - HABTM

2009-01-19 Thread brian
That depends on what $this-Recipe-recursive is set to. On Mon, Jan 19, 2009 at 4:34 PM, Steven Wright rhythmicde...@gmail.com wrote: Hi Brian one more thing for clarification. My expectation is that if I define the relationships correctly and my DB table are keyed correctly when I call for a

Re: Multiple Check Box Styles

2009-01-19 Thread brian
Well, that all depends on your CSS. The first thing you need to do is check the HTML Cake is creating. In my case, where my form has div class=CheckboxGroup $form-select('...', ..., null, array('multiple' = 'checkbox')) /div the result is: div class=CheckboxGroup div class=checkbox

Re: Multiple Check Box Styles

2009-01-19 Thread WidePixels
Still no go. I used echo $form-select('Artists', ..., null, array('multiple' = 'checkbox')); New to this. I am using 1.2 stable. Thanks for your help Dave On Jan 20, 12:56 am, brian bally.z...@gmail.com wrote: Well, that all depends on your CSS. The first thing you need to do is check the

Re: App::import fail to load Component for imported controller

2009-01-19 Thread _k10_
I think you are getting a little confused between controller and components. Your simplemail function could be placed inside the 'Email' component. And you could use the simplemail function in other controllers by importing the component (and not the controller) App::import('Component','Email')

Re: Multiple Check Box Styles

2009-01-19 Thread brian
The ellipses in my example were just where I left out implementation details. You need to replace that with the variable holding your list. form-select('Artists', $your_list, null, array('multiple' = 'checkbox')) Also, I just noticed that your controller has: $programs =

RE: Relationships - HABTM

2009-01-19 Thread Steven Wright
Ok thanks I will look into the recursive option. -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of brian Sent: Monday, January 19, 2009 10:50 PM To: cake-php@googlegroups.com Subject: Re: Relationships - HABTM That depends on what

  1   2   >