How to trap DB errors and show a msg?

2009-05-04 Thread K3
when i try to delete wrong row from DB able i get "SQL Error: 1451: Cannot delete or update a parent row: a foreign key constraint fails", but if debug=0 it shows PAGE NOT FOUND error. How can i trap this error and show some user friendly msg? --~--~-~--~~~---~--~~

Re: overloading model::saveAll from a behavior

2009-05-04 Thread Ernesto
oh sry u're right :P i meant model::beforeValidate On 4 Mag, 19:08, brian wrote: > It gets folded into $options in save(). > > But it's a moot point because validation occurs ahead of the > beforeSave() callback. > > > > On Mon, May 4, 2009 at 12:20 PM, Ernesto wrote: > > > uhm... > > > becaus

Re: $time->timeAgoInWords() not displaying plural times

2009-05-04 Thread John Andersen
The TimeHelper code looks fine at first glance, so please show us how you use the TimeHelper (code in view) and the .po definitions. That way we can help you point out any issues in either code, .po definitions or somewhere else :) Enjoy, John On May 5, 1:45 am, Miles J wrote: > The $time->ti

index view values showing as id value and not string value

2009-05-04 Thread programguru
does anyone know why the values being pulled into my index view are id values as opposed to the literal string value of the field? -- View this message in context: http://www.nabble.com/index-view-values-showing-as-id-value-and-not-string-value-tp23381141p23381141.html Sent from the CakePHP mai

Re: Removing an item from a set using Set::Remove.

2009-05-04 Thread Krist van Besien
On Sat, May 2, 2009 at 5:47 PM, brian wrote: > For your purposes, why don't you simply use the conditions to keep > certain rows from being selected at all? Either that, or re-think how > you're storing this data. Why do you need to remove this or other > rows? Perhaps there's a more elegant solu

HABTM question

2009-05-04 Thread Dave Maharaj :: WidePixels.com
I have a question about if this is possible or if it even make sense to do. I have 4 HABTM tables that are for a USER to select options from. The options are only for choosing and user has no control over any of the actual options (edit delete add none of that) Now the tables look like this: Tabl

Re: 404 Not Found

2009-05-04 Thread japaniel
Where does cake log the errors? I've kinda poked around for them but in anything that seemed like where logs would be kept there were files that were named empty and as you could imagine, were empty. While I would like to know what type of errors are being thrown, as it should help me trouble sho

Scaffolding :: Select Box Relationship :: Issues :: (for prototype app)

2009-05-04 Thread programguru
Hello, I'll keep this short and sweet for the sake of sanity. But I would appreciate any tips on where I am going wrong. Been banging my head for some hours now with no resolution. I have 4 tables: assignee company priority task ISSUE: I can only get a select-box to auto generate with scaff

Re: Search hasMany Associated Model

2009-05-04 Thread releod
I think I follow what you are trying to do, here is my solution.. User hasMany Friends Friend belongsTo User So you would want something like this: === # do the normal User stuff here $conditions = array('User.name' => 'Tom'); # find IDs of friends here $friends = $this->User->Friend->find

Re: PEAR Spreadsheet_Excel_Writer

2009-05-04 Thread shird
I have updated mine and it now works. Here is what I had to do: Downloaded the PEAR libraries PEAR (core) OLE Spreadsheet_Excel_Writer The vendors directory (the top level vendors directory) looks like this: /vendors /css /js /Pear <--- Look at this, case sensitive based on those pat

Re: Release: 1.2.3.8166

2009-05-04 Thread jperras
On May 4, 6:20 pm, Brett Wilton wrote: > Thanks gwoo and all the dev. > > To find out about the 1.3 features and to keep up with progress on 1.3 > is thehttp://thechaw.com/cakephp/wiki/1.3wiki the best place to > follow this ? yep. That and the aggregate timeline of the master (as well as the

Re: Release: 1.2.3.8166

2009-05-04 Thread Mariano Iglesias
Come to Berlin: http://cakefest.org And buy beers for the whole team. How's that? Miles J wrote: > I love you guys, seriously. > I just wish there was somehow to help or give back! > > > > -- -MI *Coding Ninja* @ CRICAVA Technologies *Blog*: http://www.ma

Re: quick tip: html helper - verbose linking + named anchor

2009-05-04 Thread brian
You can also pass '#' as an extra param: $html->link( 'View More Photos', array( 'controller'=>'listings', 'action'=>'view', $id '#' => 'anchor' ) ); On Mon, May 4, 2009 at 5:55 PM, JamesF wrote: > > hey the

Re: After baked a MVC for "keywords", how to view only "keywords" filtered by user?

2009-05-04 Thread brian
On Mon, May 4, 2009 at 4:14 PM, AGD wrote: > > One followup question i had on this was that, after putting my user_id > into work on the index (list keywords), i immediatly noticed that > edit, view, remove, are now "hackable" by passing a different id > in the url. IE for now i can access o

Re: Release: 1.2.3.8166

2009-05-04 Thread Marcelo Andrade
On Mon, May 4, 2009 at 6:58 PM, Gwoo wrote: > > I am happy to announce another release of CakePHP 1.2. CakePHP > 1.2.3.8166 > (..) > Happy Baking. Good job! Thanks you so much, CakePHP Team! -- MARCELO DE F. ANDRADE Belem, PA, Amazonia, Brazil Linux User #221105 http://mfandrade.wordpress.com

Re: I Keep getting logged out

2009-05-04 Thread Kyle Decot
I've tried setting Session.save to cake and database but am still having the issue. It's hard to track as it is unpredictable and happens randomly. Any other suggestions? Thanks! On Apr 20, 4:35 am, "Dr. Loboto" wrote: > If Session.save = 'php' it may be caused by other sites on same server >

Re: How to define a relationship where you use the same table more than once?

2009-05-04 Thread Nancy
Thanks Miles. I did figure it out. I decided to use whatever defaults "cake bake" came up with and tweaked the model slightly. That helped me figure out how to reference the data in the controller and views too, later on. Boy, cake bake sure is useful! Here's what I ended up with: [code]

Re: How to define a relationship where you use the same table more than once?

2009-05-04 Thread Miles J
It would be a belongsTo I believe, I do this all the time (example, a category has a parent category (parent_id). var $belongsTo = array( 'Layer1' => array( 'className' => 'Layer', 'foreignKey' => 'layer1_id' ), 'Layer2' => array( 'className' => 'Layer',

Re: Release: 1.2.3.8166

2009-05-04 Thread Miles J
I love you guys, seriously. I just wish there was somehow to help or give back! --~--~-~--~~~---~--~~ 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 unsubs

Is cakephp what I need?

2009-05-04 Thread Hrmo
I'm quite new to cakephp, I made a few sample apps and I was really impressed by the quality of the framework. Therefore I decided to use it on a real application: a blog with a voting system. Really simple... I tried to make a list of posts, with the number of votes and rank of each one, and I fo

How to define a relationship where you use the same table more than once?

2009-05-04 Thread Nancy
I am wondering the proper cake-ified way of doing this. I have "layers" and they're related to other layers and also a thing called a "relationship". So here's the layer table (simplified): Layers = id name Relationships id name Now I need to define how two layers relate to o

$time->timeAgoInWords() not displaying plural times

2009-05-04 Thread Miles J
The $time->timeAgoInWords() is working correctly, its just that the times are never plural, only singular. You can see it in action here: http://www.gamesync.com/players 18 hour, 1 minute ago SHOULD BE 18 hours, 1 minute ago I have all the required singular and plural strings within the default

Re: Sort paginated results by aggregate field

2009-05-04 Thread Hrmo
I don't know how $paginator->sort('AssocModel',AssocModel.field') can help in the topic we are discussing (aggregate fields, like SUM, MIN, MAX or AVG). It only seems to work on the 1 part of N to 1 relationships, and I don't find how to indicate the aggregate function to be used... Furher informa

Re: Release: 1.2.3.8166

2009-05-04 Thread Brett Wilton
Thanks gwoo and all the dev. To find out about the 1.3 features and to keep up with progress on 1.3 is the http://thechaw.com/cakephp/wiki/1.3 wiki the best place to follow this ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Re: Newbie to CakePhP a quick question

2009-05-04 Thread Braydenstyles
this tut is seems good as well as the link above Setting up the CakePHP Baking Console for MAMP on OS X http://www.scrogginmedia.com/ B On May 4, 2:38 pm, Braydenstyles wrote: > Cool i will give that a read.. > > what does bake or baking actually do? > > B > > On May 4, 2:11 pm, Sam S

Release: 1.2.3.8166

2009-05-04 Thread Gwoo
I am happy to announce another release of CakePHP 1.2. CakePHP 1.2.3.8166[1] includes several bug fixes and most importantly a security fix. To understand the security issue please have a look at Ticket #6336[2]. While this may not affect every installation of Cake, we do recommend that everyone t

quick tip: html helper - verbose linking + named anchor

2009-05-04 Thread JamesF
hey there i'm a big fan of verbose linking but i was having a problem linking to a named anchor in the target page figured it out before i posted my question so figured i would share. code sans named anchor link: echo $html->link('View More Photos', array('controller'=>'listings', 'action'=>'vie

Re: htacces issue

2009-05-04 Thread Miguel Rojas
Error 500 :( Why this isn't consistent...same version of apache...one server gets it right away, and this other server keep crashing. 2009/5/1 Benedikt R. > > Hey! > > Got the same problem... Try Options FollowSymLinks: > > >Options FollowSymLinks >RewriteEngine on >Rew

Re: Newbie to CakePhP a quick question

2009-05-04 Thread Braydenstyles
Cool i will give that a read.. what does bake or baking actually do? B On May 4, 2:11 pm, Sam Sherlock wrote: > Sounds like you want to bake > appshttp://lemoncake.wordpress.com/2007/06/14/bake-with-mamp-on-os-x/ > > - S > > 2009/5/4 Braydenstyles > > > > > Hi, > >     I'm new to Cak

Re: Network Solutions :: 200 OK :: Output HTML Randomly

2009-05-04 Thread programguru
Keep in mind this is for a CakePHP app of course. -- View this message in context: http://n2.nabble.com/Network-Solutions-%3A%3A-200-OK-%3A%3A-Output-HTML-Randomly-tp2788696p2789607.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~

Re: Newbie to CakePhP a quick question

2009-05-04 Thread Sam Sherlock
Sounds like you want to bake apps http://lemoncake.wordpress.com/2007/06/14/bake-with-mamp-on-os-x/ - S 2009/5/4 Braydenstyles > > Hi, > I'm new to CakePhP and i managed to get my CakePHP running thanks > to a great guide CakePhp tutotial for a newbie: > > http://www.scribd.com/doc/117031

Re: Timesheet app

2009-05-04 Thread Me
My first suggestion is to do all the pre-development steps you would normally do regardless which framework or language you use. It sounds obvious, but I've seen too many Cake-rookies dive in thinking they could just scaffold-up something and run without thinking it through. Cake is great, but it

Is it possible to set the index of a select box after populating it with find('list')?

2009-05-04 Thread qwanta
In the controller I do a find('list') to get an array ready for populating a select box. I am quite stumped as to how I would set the selected index of the select box in the view. This is a case where the automagic situation (editing a record) is not applicable - it is a log entry form and a new r

REST Authentication

2009-05-04 Thread Daniel Mark
Are there any established best practices for authenticating XML based clients via REST? I've searched for information about this with no results. Any recommendations about how to handle authentication and REST are appreciated. Thanks! --~--~-~--~~~---~--~~ You r

Newbie to CakePhP a quick question

2009-05-04 Thread Braydenstyles
Hi, I'm new to CakePhP and i managed to get my CakePHP running thanks to a great guide CakePhp tutotial for a newbie: http://www.scribd.com/doc/11703150/Cakephp-tutorial-for-Newbie- i'm got the cake http://localhost/cake/ to be all green and i'm running MAMP Pro in the past i had a webs

Add additional field in a hasandbelongstomany association

2009-05-04 Thread Jason T.
Hello-- I am building a site where there will be customers and products. I built a customers_products table and set up all the hasandbelongstomany associations correctly. My table is: * id * customer_id * product_id Very simple, and it works fine. I want to have the notion of a large or sm

CakePHP Themes and PHP Security

2009-05-04 Thread BeroFX
I want to enable my users to upload customized versions of the index/ view templates. Is there a way I can restrict them to use only PHP variables and object methods? I'm asking, because if a user uploads a customized template (.ctp) I don't want it to include malicious code (e.g. listing direct

Re: hasOne relationship problem

2009-05-04 Thread paulos nikolo
Hi Robin.I am not an expert coz i am trying to build a similar app of yours so i ll tell you my opinion.As i saw your tables format i think you should set depentent=true in user model and the exslusive field in profile model true.The 1st one will delete the associated profile if the user has been d

Re: After baked a MVC for "keywords", how to view only "keywords" filtered by user?

2009-05-04 Thread AGD
Yep and it works great :) Thanks a lot I am too newbie in Cake to go after HABTM yet... i see your point tough and will put it into my todo list, specially since the performance will be improved immensely if this scales, and i better start by thinking performant from early days. One followup qu

Re: After baked a MVC for "keywords", how to view only "keywords" filtered by user?

2009-05-04 Thread brian
That looks like it should work with what I posted earlier. Did you try it? Although I think it'd be better practice to use a HABTM association between these models so that Users can share Keywords. That would make your pagination a bit more complicated but there is a way to do that, also. Search

Re: After baked a MVC for "keywords", how to view only "keywords" filtered by user?

2009-05-04 Thread AGD
Brian, thanks for your reply. The idea is that an user will defined several keywords. Keywords model has this defined: var $belongsTo = array( 'User' => array( 'className' => 'User', 'foreignKey' => 'user_id',

hasOne relationship problem

2009-05-04 Thread Robin
Hello, i'm new both to php and cake, so please excuse me if this is another obvious noob question. I was trying to understand how associations work by building up the example in the manual section of cakephp.org, i was able to build it up using bake with no much effort. The thing is, i have a us

Re: Sort paginated results by aggregate field

2009-05-04 Thread starkey
Like this: sort('AssocModel',AssocModel.field');?> Otherwise, use a stored procedure and Cake should handle the return set like a query return and sort the aggregate field as if it were a column. On May 4, 9:59 am, Hrmo wrote: > I can't figure out how to sort paginated results by an aggregate

Network Solutions :: 200 OK :: Output HTML Randomly

2009-05-04 Thread programguru
Hello, Can anyone shed some light as to why, completely sporadically (meaning sometimes the page loads perfectly fine), html source is being printed to the page requested as example. The only time we've had this issue is with Network Solutions, but we've been unable to pinpoint the issue. A

Re: Timesheet app

2009-05-04 Thread Mohsin Kabir
Hello, Yes, cake is a very very nice framework to work . I am very happy with cake 1.2 . So, you can get help from http://book.cakephp.org/. It is nice documentation. For further clarification or any help , you can mail to me Thanks , Mohsin On Mon, May 4, 2009 at 11:18 PM, Jetrois wrote: > > D

Re: Timesheet app

2009-05-04 Thread Stu
I think Cake wouldn't be to bad for what you have to do. A small App is easily done with cake, even with "rudimentary" PHP skills (Although I must say that a healthy PHP background helps you a lot). --~--~-~--~~~---~--~~ You received this message because you are su

Re: Create a banned word list?

2009-05-04 Thread Stu
I think an "illegal table" would be the cleanest way to do it as you suggested. --~--~-~--~~~---~--~~ 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 unsubs

Timesheet app

2009-05-04 Thread Jetrois
Does anybody have any hints on how to get started on this I'm brainstorming and cake is the fraimwork that I've picked but I only know rudimentary php. This is a project to help increase my skills and for a nonprofit to track volenteers and there time that they input. --~--~-~--~~

Re: overloading model::saveAll from a behavior

2009-05-04 Thread brian
It gets folded into $options in save(). But it's a moot point because validation occurs ahead of the beforeSave() callback. On Mon, May 4, 2009 at 12:20 PM, Ernesto wrote: > > uhm... > > because > > $options["validate"] > > is used only by saveAll > > On 4 Mag, 18:17, brian wrote: >> > if (!is

Re: Validation messages and redirect issue

2009-05-04 Thread Eric Martin
Thanks brian! I've decided to either just send the user to the user/ register page if an error occurs (which will maintain the messages) or do as you suggested. On May 4, 9:05 am, brian wrote: > Yes, the redirect is the problem because it forces a new request to > the server. Validation message

best place to code this??

2009-05-04 Thread Ernesto
Hello. i have a view that returns a data array like this Array( [Order] => array( [Code] => XXX [Customer] => 5 ) [Items] => array( [0] => array( [Code] => Item1 [Quantity] =>

Create a banned word list?

2009-05-04 Thread Dave Maharaj :: WidePixels.com
Is there or what is the easiest way to create a list of banned words? I am using custom slugs for URLS but in the app the user can create their own slug when they sign up. But I would like to block some names from being used obviously i don't want people using swear words, objectionable or ones tha

Re: overloading model::saveAll from a behavior

2009-05-04 Thread Ernesto
uhm... because $options["validate"] is used only by saveAll On 4 Mag, 18:17, brian wrote: > > if (!isset($options["validate"])) $options["validate"] = "first"; > > Why don't you do that in Model::beforeSave()? > > > > On Mon, May 4, 2009 at 12:10 PM, Ernesto wrote: > > > Hello. > > > is it p

Re: overloading model::saveAll from a behavior

2009-05-04 Thread brian
> if (!isset($options["validate"])) $options["validate"] = "first"; Why don't you do that in Model::beforeSave()? On Mon, May 4, 2009 at 12:10 PM, Ernesto wrote: > > Hello. > > is it possible to overload model::saveAll from a behavior? > > i tried this code > > >        class DefaultSettingsBe

Re: How Force Paginator to Use AJAX by default?

2009-05-04 Thread brian
I can't tell you anything specific because I use jQuery (and so avoid Cake's AjaxHelper) buthave you looked at these? http://book.cakephp.org/view/167/AJAX-Pagination http://bakery.cakephp.org/articles/view/advanced-pagination-1-2 And if you prefer jQuery over Prototype: http://bakery.cakephp.or

overloading model::saveAll from a behavior

2009-05-04 Thread Ernesto
Hello. is it possible to overload model::saveAll from a behavior? i tried this code saveAll($data, $options); } } ?> but it doesn't seems to work --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Validation messages and redirect issue

2009-05-04 Thread brian
Yes, the redirect is the problem because it forces a new request to the server. Validation messages are not the same as Session flash() messages in that they're not saved in the session and available at a later time. If you consider a typical action involving a form submission, if there's no save

Re: CakePHP Pagination and custom URLs

2009-05-04 Thread brian
I use a separate file for my pagination links (previous, next, etc) that I include as an element where needed. At the top of that element, I have: $paginator->options( array('url' => $this->passedArgs) ); On Mon, May 4, 2009 at 6:02 AM, Roman wrote: > > I have a problem with custom URL

Translate array with special chars

2009-05-04 Thread Stu
Hello everyone, I have an array used for populating a select (drop down list). I'm filling this array with provinces names. Now I'd like a clean way to translate that array with special chars (e.g. 'Quebec' becomes 'Québec') This is what I have so far: --- add.ctp: ---

Re: benefit over Joomla

2009-05-04 Thread Eber Freitas Dias
The answer is simple. If you need a CMS, go with Joomla or Wordpress. If you need a framework, try CakePHP. Of course you can always write your own CMS with Cake. You need to define your needs. Check out the differences here: CMS - http://en.wikipedia.org/wiki/Content_management_system Framewor

benefit over Joomla

2009-05-04 Thread shinokada
Could anyone tell me what are the benefits using cakephp over Joomla or Wordpress please? I have used Joomla over a couple of years and found cakephp and reading a book. I want to know what I can do better if I use cakephp. Thanks in advance. --~--~-~--~~~---~--~

Re: Translate array with special chars

2009-05-04 Thread Stu
Alright, I was missing a little something... When building the array, do this: $form->select('province', array( 'Ontario'=>__('Ontario', true), 'Quebec'=>__('Quebec', true), I was forgetting to put the " ,true " after the field. Also after the array I forgot to put this: , null, array('esca

Re: Trying to Understand the Containable Behavior

2009-05-04 Thread jmcneese
wow, you guys are all making this way more difficult than it needs to be. KISS! rob's problem isn't really all that complex. there's a polymorphic alerts model that attaches to multiple models that are all interrelated. so far so good. rob, the best place to learn about the syntax is http://bo

Sort paginated results by aggregate field

2009-05-04 Thread Hrmo
I can't figure out how to sort paginated results by an aggregate field (like sorting posts by number of comments). The only solution I found (https://trac.cakephp.org/ticket/5220) involves changing the core of cakePHP, and I prefer not to do that. Any solution? --~--~-~--~~

Re: 404 Not Found

2009-05-04 Thread DuncanBrown
It sounds like it is an error in your code. If you set Configure::write('debug', 2); in config/core.php to1 or 2 cake will give you the error that is causing the problem. On May 4, 6:06 am, japaniel wrote: > I have been reading through the posts here and there were some older > posts that didn'

Re: PEAR Spreadsheet_Excel_Writer

2009-05-04 Thread foldiman
Does anyone have a live example of Spreadsheet_Excel_Writer? Thanks. On May 3, 2:38 pm, shird wrote: > Thank you. I found the problem I was having when I first replied to > this. I am now set on this. I did have to declare the vendors path > though, I am keeping my vendors in the app directory,

How Force Paginator to Use AJAX by default?

2009-05-04 Thread toka...@gmail.com
Hi :), I am trying to switch two elements within controller. The main idea of this is to have different table layout for NEW posts and another one for APPROVED, DELETED posts. So i use elements that are just having different table structure. I am detecting ajax call with 'isAjax' to render one of

Re: What is the limit to the string length to be written to cake po files .Can it be overridden.if so how?

2009-05-04 Thread Anibigi
Thanks! How can I override this if I want to read /write longer strings from/ to po files. - regards On May 4, 3:37 pm, John Andersen wrote: > As stated in the book at: > > http://book.cakephp.org/view/162/Localizing-Your-Application > > ".po files should be encoded using UTF-8, and there i

Re: What is the limit to the string length to be written to cake po files .Can it be overridden.if so how?

2009-05-04 Thread John Andersen
As stated in the book at: http://book.cakephp.org/view/162/Localizing-Your-Application ".po files should be encoded using UTF-8, and there is a 1014- character limit for each msgstr value." Enjoy, John On May 4, 12:48 pm, Anibigi wrote: > Hi, > > I'm attempting to localize content. > Some

Re: Trying to Understand the Containable Behavior

2009-05-04 Thread j0n4s.h4rtm...@googlemail.com
First of all, at least to me, you will either have to use Polymorphic Behavior OR you cannot use "foreignKey" but need to use multiple FKs per model. Following example would NOT use polymorphic (but some FKs being NULL instead) - it uses one FK per model that is bound to Alert. Account HasMany C

Re: user status enum

2009-05-04 Thread j0n4s.h4rtm...@googlemail.com
Hello, generally: I was looking for enum too for use types. You can use Has One relationships to extend users by types as well. (User HasOne Admin, User HasOne SuperUser, User HasOne Customer, User HasOne Client) Besides that, if you can/want to work with a boolean switch (is_admin TINYINT 1 UNSI

Re: getting pagination result similar to find('threaded')

2009-05-04 Thread krishan
Is there is any one who can help me out please? On May 1, 4:50 pm, krishan wrote: > I am struggling to find a way to get result in "threaded comments" via > .. > I need to get same result set as find('threaded', $options) does. --~--~-~--~~~---~--

CakePHP Pagination and custom URLs

2009-05-04 Thread Roman
I have a problem with custom URLs and CakePHP pagination. The URL to my news page is www.site.de/de/news Via CakePHP routing, it goes to the News controller and index action. CakePHP pagination now generates these kind of URLs: www.site.de/news/index/page:2 The link works - but due to SEO rea

What is the limit to the string length to be written to cake po files .Can it be overridden.if so how?

2009-05-04 Thread Anibigi
Hi, I'm attempting to localize content. Some of the strings are very long and when I try to read them it renders the msgid only from the po file and not the mg string. Is there a limit to the length of string to be written in po file..If so..how can I override it. Please help if anyone knows th

Re: Telling PHP to put "&" NOT "&"

2009-05-04 Thread Lapinski
Did you encodeURI() your data before you send it by javascript? I never used jQuery, but I will be surprised if jQuery don't have a function to wrap everything from your form, encodeURI() them before sending it to your server. You shouldn't be seeing your data truncated, as & should have been e

Re: What's Wrong w/ This Loop?

2009-05-04 Thread Jon Bennett
Hi Kyle, > I am attempting to make a loop that goes through all the tags a user > has provided(comma seperated) and then if it's not already in the tags > table, save it then add it to the event they just added. I can't seem > to get it to work because $tag_id is always the same for all the tags

Re: Cakephp Forms Security Flaw

2009-05-04 Thread BeroFX
Well, first of all, you need to validate the data before saving it. http://book.cakephp.org/view/125/Data-Validation Then, you might consider sanitizating the submited data http://book.cakephp.org/view/153/Data-Sanitization And then, you can even go ahead and allow only certain fields to be sa

Re: Telling PHP to put "&" NOT "&"

2009-05-04 Thread Lapinski
Did you encodeURI() your data before you send it by javascript? I never used jQuery, but I will be surprised if jQuery don't have a function to wrap everything from your form, encodeURI() them before sending it to your server. You shouldn't be seeing your data truncated, as & should have been e

Re: Telling PHP to put "&" NOT "&"

2009-05-04 Thread Lapinski
Did you encodeURI() your data before you send it by javascript? I never used jQuery, but I will be surprised if jQuery don't have a function to wrap everything from your form, encodeURI() them before sending it to your server. You shouldn't be seeing your data truncated, as & should have been e

Cakephp Forms Security Flaw

2009-05-04 Thread AzGhanv/.
I was checking tihs tutorial ... http://book.cakephp.org/view/326/The-Cake-Blog-Tutorial Here I see a big security flaw ... and I think this practice is used throughout the framework. # function add() # { # if (!empty($this->data)) # { # if ($this->Post->save($this->data)) # { # $this->flash('Y

404 Not Found

2009-05-04 Thread japaniel
I have been reading through the posts here and there were some older posts that didn't seem to help me. I am getting a 404 Not Found error when going to the myserver.local/ posts/index in the blog tutorial. I have a mac running leopard, but that shouldn't matter seeing as how i have all the need

Validation messages and redirect issue

2009-05-04 Thread Eric Martin
I'm having a problem getting validation messages to show up for a register/sign-up form. I have the form on the home page, which is accessed through a HomeController. The register/sign-up form posts to the UsersController, register function, which does the save. Regardless of the result, it redir