Re: Thread Safety and getLastInsertID

2007-04-30 Thread Dr. Tarique Sani
>From >http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_last-insert-id "The ID that was generated is maintained in the server on a per-connection basis. This means that the value returned by the function to a given client is the first AUTO_INCREMENT value generated for

Re: How can one detect whether the current language is left-to-right or right-to-left?

2007-04-30 Thread Dr. Tarique Sani
Well technically languages do not have direction it is the script which has direction ;) Guess, hard coding which scripts are written right to left will be a simpler option, reading http://www.w3.org/International/questions/qa-scripts may also help. Cheers Tarique -- ==

Cake 1.2 - Session woes

2007-04-30 Thread buzznut
I am having a difficult time working with sessions in my cake 1.2 app. It doesn't appear to be behaving the way that I expect. I have an action that sets a variable using the following line of code. $this->Session->write('companyName',$company['Company']['name']); When I access this action and

Thread Safety and getLastInsertID

2007-04-30 Thread [EMAIL PROTECTED]
Hello Cake Folk, I have been trying to determine if Model::getLastInsertID is thread safe. I'm looking to get the id of the record that I inserted with the statement (I'm using save() for inserting, not just updating): $this->Thing->save($this->data) I'd like to be able to use the ID of this

Re: Newbie Approach to Image Uploading

2007-04-30 Thread rockit
http://bin.cakephp.org/view/1255326741 you can view more of the script. On Apr 30, 7:43 pm, rockit <[EMAIL PROTECTED]> wrote: > snippet: > > > Image: > file('Inventory/image', array('size' => > '40')); ?> > > > For some reason it's trying to pass the value array

Routes Setup

2007-04-30 Thread phpappdev256
I've been looking all over for help on how to set up routes. This is what I need to do... I want: sitename/articles or sitename/articles/ to go to controller: articles action: index ALSO sitename/articles/article_name to go to controller: articles action: view and have it pass "article_name"

How can one detect whether the current language is left-to-right or right-to-left?

2007-04-30 Thread Aaron Shafovaloff
How can one, in CakePHP 1.2, detect whether the current language is left-to-right or right-to-left? Do I have to resort to manually putting it into the .po file? Thanks, Aaron --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

Re: save fields but don't change "MODIFIED" filed

2007-04-30 Thread Sergei
OK, thank you. On 1 май, 11:54, "Samuel DeVore" <[EMAIL PROTECTED]> wrote: > If you have the modified set to the existing value in your data, I > don't think it sets it automatically. --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: Search Engine for a CakePHP app

2007-04-30 Thread Dr. Tarique Sani
On 5/1/07, John David Anderson (_psychic_) <[EMAIL PROTECTED]> wrote: > > > On Apr 30, 2007, at 10:21 PM, Mariano Iglesias wrote: > > > > Zend Framework? HERESY! > They will be assimilated. Oh! they will say that "It is by design" ;) Cheers Tarique -- ==

Re: Search Engine for a CakePHP app

2007-04-30 Thread John David Anderson (_psychic_)
On Apr 30, 2007, at 10:21 PM, Mariano Iglesias wrote: > Zend Framework? HERESY! They will be assimilated. Resistance is futile. All it took was about 60 lines. That is all. -- John > -MI > > -- > - > > Remember, smart

RE: Search Engine for a CakePHP app

2007-04-30 Thread Mariano Iglesias
Zend Framework? HERESY! -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 _ De: ca

Re: Search Engine for a CakePHP app

2007-04-30 Thread Gonzalo Servat
On 5/1/07, John David Anderson (_psychic_) <[EMAIL PROTECTED]> wrote: > > > On Apr 30, 2007, at 9:19 PM, Gonzalo Servat wrote: > > I created a search engine using a few classes from the Zend "Framework." > They've got a nice port of the guts of Lucene, and its pretty easy to create > your own searc

Re: Search Engine for a CakePHP app

2007-04-30 Thread John David Anderson (_psychic_)
On Apr 30, 2007, at 9:19 PM, Gonzalo Servat wrote: > Hi All, > > So I've gotten to a point in my app that I need to implement some > sort of (basic) search engine functionality. It wouldn't be that > hard to do if all the content was housed in database tables (as I > could do something simi

Search Engine for a CakePHP app

2007-04-30 Thread Gonzalo Servat
Hi All, So I've gotten to a point in my app that I need to implement some sort of (basic) search engine functionality. It wouldn't be that hard to do if all the content was housed in database tables (as I could do something similar to what gwoo suggested in http://groups.google.com/group/cake-php/

Re: save fields but don't change "MODIFIED" filed

2007-04-30 Thread John David Anderson (_psychic_)
On Apr 30, 2007, at 8:38 PM, Sergei wrote: > > So, no one knows? Is it possible? $this->ModelName->execute("UPDATE `model_names` SET `field` = '$value' WHERE `model_names.id` = $id"); -- J --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: save fields but don't change "MODIFIED" filed

2007-04-30 Thread Samuel DeVore
If you have the modified set to the existing value in your data, I don't think it sets it automatically. so something like $Item = $this->ModelName->read('modified',$id); $this->data['ModelName']['modified'] = $Item['ModelName']['modified']; $this->ModelName->id = $id; $this->ModelName->save($th

Re: save fields but don't change "MODIFIED" filed

2007-04-30 Thread Sergei
So, no one knows? Is it possible? Thanks. On 30 апр, 10:51, Sergei <[EMAIL PROTECTED]> wrote: > Hello, > > Is there a way to save some fields to a record but don't change > "modified" field? > > Using latest stable CakePHP. > Thank you. --~--~-~--~~~---~--~~ You

Re: Newbie Approach to Image Uploading

2007-04-30 Thread rockit
snippet: Image: file('Inventory/image', array('size' => '40')); ?> For some reason it's trying to pass the value array to my model. Something i'm missing here? On Apr 30, 5:49 pm, alan <[EMAIL PROTECTED]> wrote: > http://cakebaker.42dh.com/2006/04/15/file-uplo

the onError() function

2007-04-30 Thread ram_64892
Hi, I'm using the latest stable version of cake (downloaded 3 days ago), and while developing, noticed that on line 550 (and several other locations) in dbo_source.php, there is a call to $model- >onError(). This function is called whenever a query to the database returns an error. However, wh

Question on routes

2007-04-30 Thread Repsah
Cake 1.1.4 This is my custom route: $Route->connect('/members/*', array('controller' => 'pages', 'action' => 'display')); I expect it to set my controller to pages and my action to display whichever action I call. But... http://mysite.com/members/index returns this error " Missing view You a

Re: Use of $conditions

2007-04-30 Thread rtconner
I always thought the docs were a little shady on this. To do what you want to do... $this->Program->findAll(null, null, 'p_date DESC, p_time ASC') On Apr 30, 3:01 pm, k4mg <[EMAIL PROTECTED]> wrote: > I have made a simple (my first!) application using CakePHP and Bake. > It works fine, but I am

Use of $conditions

2007-04-30 Thread k4mg
I have made a simple (my first!) application using CakePHP and Bake. It works fine, but I am unable to figure out how to add two more capabilities. I would like to have my List view in order, and paginated so that the headers are always available. For the first, reading the documentation, it see

Re: Saving multiple database records from a single form.

2007-04-30 Thread alan
I would think that you would need to do some custom parsing here... I usually solve this by creating a higher dimensional array... perhaps something along the lines of: -- -- -- Then, in the con

Re: Accessing controller function from routes.php

2007-04-30 Thread Defranco
On Apr 25, 10:09 pm, Defranco <[EMAIL PROTECTED]> wrote: > include("../../cake/libs/model/model.php"); > include("../../cake/app_model.php"); > include("../models/MyModel.php"); //my model php file Latter I discovered that these includes on routes.php was a bad idea as the redeclaration of model

Re: Newbie Approach to Image Uploading

2007-04-30 Thread alan
http://cakebaker.42dh.com/2006/04/15/file-upload-with-cakephp/ or http://bakery.cakephp.org/articles/view/swfupload-and-multipurpose-uploader thanks, -alan- > > what is the equiv of this in cake? > > > if( is_uploaded_file($_FILES[profile_image][tmp_name]) ) { > >move_uploaded_file( $_FIL

Re: Pagination default order for each column

2007-04-30 Thread Defranco
no ideas? defranco --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] Fo

Re: Limiting Results with HABTM FindAll

2007-04-30 Thread Headzoo
Scratch that question. I found *an* answer, which is to change the $hasAndBelongsToMany variable prior to the findAll() call, and adding a limit clause to it. That seems a little sloppy though, and I'm wondering if there is a better way. - Sean --~--~-~--~~~---~--~-

Limiting Results with HABTM FindAll

2007-04-30 Thread Headzoo
Hi all, I have a db setup that's nearly identical to the hasAndBelongsToMany example in the CakePHP manual. There is a posts table, tags table, and post_tags table. If I want to find all posts with a particular tag, I use this code: $tag_name = 'something'; $data = $this->Tag->findAll("Tag.tag =

Re: Newbie Approach to Image Uploading

2007-04-30 Thread John David Anderson (_psychic_)
On Apr 30, 2007, at 1:24 PM, rockit wrote: > > what is the equiv of this in cake? > > if( is_uploaded_file($_FILES[profile_image][tmp_name]) ) { > move_uploaded_file( $_FILES[profile_image][tmp_name], "../ > attachments/ > $path" ); I don't see much I'd change here, except for putting qu

Newbie Approach to Image Uploading

2007-04-30 Thread rockit
what is the equiv of this in cake? if( is_uploaded_file($_FILES[profile_image][tmp_name]) ) { move_uploaded_file( $_FILES[profile_image][tmp_name], "../attachments/ $path" ); --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Re: view blob image

2007-04-30 Thread rtconner
Well I dont know spanish, but are you using a layout that looks just like this? --~--~-~--~~~---~--~~ 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 u

Re: Problem with :"Cook up Web sites fast with CakePHP, Part 1"

2007-04-30 Thread lukemack
I think maybe you have misunderstood how the URLs work in cakePHP, in conjunction with Apache's mod_rewrite. You would be better to install cake in a virtual host under apache rather than in a subdirectory. On Apr 29, 6:20 am, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > You shouldn't set the

Re: Filtering/Searching/Sorting

2007-04-30 Thread phpsmitty
This is similar functionality that the masterbake.php file can bake up but the code it produces is very messy. Seams like a couple include files should be able to dynamically generate this functionality automatically. On Apr 27, 3:35 am, "Jon Bennett" <[EMAIL PROTECTED]> wrote: > > Sorting: > >

Re: Filtering/Searching/Sorting

2007-04-30 Thread phpsmitty
More or less I'd like to be able to sort my vaiours columns and be able to search through them. If you have 1000 entries it becomes cumbersome to find items you'd like to edit. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

Re: view blob image

2007-04-30 Thread christianandradet
Gracias Mariano mejor pregunto en el foro de español que es mas chevere On 30 abr, 10:51, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > He translated it. > > Resides you ought to be learning spanish by now if you want to keep talking > to me :) > > Need more hands on the Spanish google group, A

Re: NULL values

2007-04-30 Thread Brian Dailey
Add the other conditions as a string, e.g., $sqlConditions = "myfield IS NULL AND myfield2 = 'blarg'"; On 4/30/07, codecowboy <[EMAIL PROTECTED]> wrote: > > what if that is only one of the conditions? > > On Apr 29, 9:53 pm, Sergei <[EMAIL PROTECTED]> wrote: > > $sqlConditions="myfield IS NULL" >

Re: NULL values

2007-04-30 Thread codecowboy
what if that is only one of the conditions? On Apr 29, 9:53 pm, Sergei <[EMAIL PROTECTED]> wrote: > $sqlConditions="myfield IS NULL" > > and that's all. > > Sergei. > > On 30 апр, 10:03, codecowboy <[EMAIL PROTECTED]> wrote: > > > Hi All, > > > Does anyone know how to check if a value is null whe

Re: view blob image

2007-04-30 Thread Dr. Tarique Sani
On 4/30/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote: > Resides you ought to be learning spanish by now if you want to keep talking > to me :) > Not fair - I am yet to learn Hindi properly. Besides am too old to learn new tricks :) Tarique -- =

RE: view blob image

2007-04-30 Thread Mariano Iglesias
He translated it. Resides you ought to be learning spanish by now if you want to keep talking to me :) Need more hands on the Spanish google group, AD7six is just not enough. -MI --- Remember, smart coders answer ten ques

Re: view blob image

2007-04-30 Thread Dr. Tarique Sani
On 4/30/07, christianandradet <[EMAIL PROTECTED]> wrote: > i tried with firefox, and i get this error message: > La imagen "http:///cake/appja/funcionarios/view/45"; no puede > mostrarse, porque contiene errores. > the image "http:///cake/appja/funcionarios/view/45"; can't be > shown, beca

RE: Pagination

2007-04-30 Thread Mariano Iglesias
Ask for Euros, dollar is weak ;) -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 -M

Re: view blob image

2007-04-30 Thread christianandradet
hi, thanks for your help, i tried with firefox, and i get this error message: La imagen "http:///cake/appja/funcionarios/view/45"; no puede mostrarse, porque contiene errores. the image "http:///cake/appja/funcionarios/view/45"; can't be shown, because it has errors. I don't know what to

Re: Pagination

2007-04-30 Thread Sourabh Sharma
You now how to use the multiple pagination in the same page On 30 Apr, 20:15, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote: > On 4/30/07, Sourabh Sharma <[EMAIL PROTECTED]> wrote: > > > > > I want to use the multiple pagination in the single page if any one > > can guide me as soon as possible >

Re: multi language site

2007-04-30 Thread Anton Morrison
This is more about translating the core stuff. I want my client to update there own pages and translate them. I was more asking if there was a way i could bind the fields from the content_english table with there corresponding fields in the page table. In rails you can use 'bind' is there a

Re: Upgrade Path From 1.1 to 1.2

2007-04-30 Thread Gonzalo Servat
On 4/30/07, Sliv <[EMAIL PROTECTED]> wrote: > > > [..snip..] > If it helps provoke a response, there's still months of dev left in > this current app; it's just me working on it and I don't consider > myself an expert by any stretch of the imagination, but I have built > some basic apps and scripts

Re: SQL Transactions

2007-04-30 Thread John David Anderson (_psychic_)
On Apr 30, 2007, at 7:17 AM, xavi wrote: > > Hello! > > I'm looking for information about sql transactions in Cake with Mysql5 > > I'm using 3 models with 3 separates $this->themodel->save($data), and > I'm interested i control the transaction itself, doing a commit after > 3 save will be ok. >

Re: view blob image

2007-04-30 Thread Dr. Tarique Sani
On 4/30/07, christianandradet <[EMAIL PROTECTED]> wrote: > > in the layout, in the view.ctp file, > Use a tool like httpliveheaders under firefox to see what are the exact headers that your browser is recieveing HTH T -- = PHP for E-

Re: Upgrade Path From 1.1 to 1.2

2007-04-30 Thread John David Anderson (_psychic_)
On Apr 30, 2007, at 8:10 AM, Sliv wrote: > > The current app I'm working on has been keeping up with the latest > release versions of the 1.1 branch. I'm seeing more and more posts > about 1.2, including folks building prod apps using this branch. > > I'm looking for opinions on whether it woul

Re: Pagination

2007-04-30 Thread Dr. Tarique Sani
On 4/30/07, Sourabh Sharma <[EMAIL PROTECTED]> wrote: > > I want to use the multiple pagination in the single page if any one > can guide me as soon as possible > WOW! another chance for me to earn my $ million - don't spoil it for me MI ;) T -- ===

Re: Upgrade Path From 1.1 to 1.2

2007-04-30 Thread Dr. Tarique Sani
On 4/30/07, Sliv <[EMAIL PROTECTED]> wrote: > I'm looking for opinions on whether it would be a good idea for me to > upgrade to 1.2 on my current app and spend some time moving towards > the new functionality, or just continue on with 1.1. I would say if it is not a commercial app ready to go li

Re: multi language site

2007-04-30 Thread Anton Morrison
I cant find the documentation either. Is this a automatic translation script? I dont want that i want to set it up so humans enter all the content. On 30 Apr 2007, at 16:13, Mariano Iglesias wrote: > > If you are using CakePHP 1.2 take a look at the Translation behavior: > > https://trac.cak

Re: view blob image

2007-04-30 Thread christianandradet
in the layout, in the view.ctp file, On 30 abr, 10:01, "John David Anderson (_psychic_)" <[EMAIL PROTECTED]> wrote: > On Apr 30, 2007, at 8:36 AM, christianandradet wrote: > > > > > hi, > > I am trying to view an image that is store in the database with a blob > > data type, this is the code i a

Re: view blob image

2007-04-30 Thread John David Anderson (_psychic_)
On Apr 30, 2007, at 8:36 AM, christianandradet wrote: > > hi, > I am trying to view an image that is store in the database with a blob > data type, this is the code i am trying > > > > When i display this, the binary data is displayed Where is this code? In the controller or the layout? -- J

Re: multi language site

2007-04-30 Thread R. Rajesh Jeba Anbiah
Anton Morrison wrote: > Hi I am trying to build a micro content management system so have > more than one langage, with human translation. Possibly -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~

view blob image

2007-04-30 Thread christianandradet
hi, I am trying to view an image that is store in the database with a blob data type, this is the code i am trying When i display this, the binary data is displayed What should I do?? --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Pagination

2007-04-30 Thread Sourabh Sharma
I want to use the multiple pagination in the single page if any one can guide me as soon as possible Thanks & Regards Sourabh Sharma --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to thi

Upgrade Path From 1.1 to 1.2

2007-04-30 Thread Sliv
The current app I'm working on has been keeping up with the latest release versions of the 1.1 branch. I'm seeing more and more posts about 1.2, including folks building prod apps using this branch. I'm looking for opinions on whether it would be a good idea for me to upgrade to 1.2 on my curren

RE: multi language site

2007-04-30 Thread Mariano Iglesias
If you are using CakePHP 1.2 take a look at the Translation behavior: https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/model/behaviors/ translate.php poLK added a small documentation somewhere but can't remember where. -MI

RE: Dynamic Links with DS constant?

2007-04-30 Thread Mariano Iglesias
link($html->image('test.gif'), '#', array('escape'=>false)); ?> Or: link($html->image('test.gif'), '#', array(), false, false, false); -MI --- Remember, smart coders answer ten questions for every question they ask. So b

Re: User model: unique validation and beforeValidate help

2007-04-30 Thread R. Rajesh Jeba Anbiah
On Apr 30, 6:22 pm, "R. Rajesh Jeba Anbiah" <[EMAIL PROTECTED]> wrote: > On Apr 30, 5:12 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote: While on this topic, but for solution, I'm wondering if I can have action based validation. Say, for example, on a user search page, I may want to dis

multi language site

2007-04-30 Thread Anton Morrison
Hi I am trying to build a micro content management system so have more than one langage, with human translation. I want the amount of langages to be changeable so thought the best way to do this was have different 'content' tables for the different langages then have a foren key linking to

Re: Dynamic Links with DS constant?

2007-04-30 Thread Samuel DeVore
On 4/29/07, Anton Morrison <[EMAIL PROTECTED]> wrote: > > I can never use the $html->link when i want to link on an image as it > turns all the < into gth; > > has anyone ever found a way? If you look at the api http://api.cakephp.org/class_html_helper.html#444f26b63f2193142b80169b8d04cf95 you

Re: Autocomplete

2007-04-30 Thread majna
This component is very limited , there is echo in component... You can customize and create your own autocomplete stuff using this example : /** EXAMPLE * Create users db table with id, username, email... * Create user model... **/ /** * 1. Test controller: controller/tests.php **/ class Te

Re: cake 1.1 & cake1.2 on Windows apache 2.2.4 Crashes

2007-04-30 Thread Sam Sherlock
I renamed the .htaccess to htaccess.txt & changed the directive for internal rewrite. On 30/04/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > When you disabled mod rewrite, did you delete the .htaccess file, or > comment out the mod rewrite directive? > > > On Apr 28, 1:42 pm, "Sam Sherloc

RE: Question: Join two tables, count and sort result

2007-04-30 Thread Mariano Iglesias
Can you show how you are issuing the query? I added a test to test for field parsing as you entered here and it succeeds: https://trac.cakephp.org/changeset/4951 -MI --- Remember, smart coders answer ten questions for eve

Re: ? Set::filter (Was Re: allowEmpty in validate)

2007-04-30 Thread R. Rajesh Jeba Anbiah
On Apr 30, 5:22 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote: > On 4/30/07, R.RajeshJebaAnbiah<[EMAIL PROTECTED]> wrote: > > I don't find "Set::filter" > query=Set::filter>. Do you know where to find? TIA > > Use the source > > https://trac.cak

Re: User model: unique validation and beforeValidate help

2007-04-30 Thread R. Rajesh Jeba Anbiah
On Apr 30, 5:12 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote: > On 4/30/07, R.RajeshJebaAnbiah<[EMAIL PROTECTED]> wrote: > > > I wanted the unique check only on users/register. But, it rather > > checks on every User->validates() and User->save() call. I thought of > > filtering the check insi

SQL Transactions

2007-04-30 Thread xavi
Hello! I'm looking for information about sql transactions in Cake with Mysql5 I'm using 3 models with 3 separates $this->themodel->save($data), and I'm interested i control the transaction itself, doing a commit after 3 save will be ok. Is this possible? I've only read the $model->transaction b

Re: Question: Join two tables, count and sort result

2007-04-30 Thread Alexey Kuimov
In this case I get error message: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.`count` :-( On Apr 30, 5:45 pm, dardosordi <[EMAIL PROTECTED]> wrote: > Try: > > SELECT `Vendor`.`id`, COUNT(`Model`.`v

Re: sanitizing data with beforeValidate

2007-04-30 Thread ianh
Yes - it is for this reason that I call the function in beforeValidate, because an isUnique query using unchanged data which then gets changed is not ideal. My approach with usernames and passwords is to say by the field what characters are not allowed and then confirm what got saved to the DB in

Re: Question: Join two tables, count and sort result

2007-04-30 Thread dardosordi
Try: SELECT `Vendor`.`id`, COUNT(`Model`.`vendor_id`) as `Vendor`.`count` FROM `vendors` AS `Vendor` LEFT JOIN `models` AS `Model` ON (`Model`.`vendor_id` = `Vendor`.`id`) WHERE 1=1 GROUP BY `Vendor`.`id` On Apr 29, 3:18 pm, thequietlab <[EMAIL PROTECTED]> wrote: > I don't think so.. > > Baker

Re: ? Set::filter (Was Re: allowEmpty in validate)

2007-04-30 Thread Dr. Tarique Sani
On 4/30/07, R. Rajesh Jeba Anbiah <[EMAIL PROTECTED]> wrote: > > On Apr 19, 3:59 am, nate <[EMAIL PROTECTED]> wrote: > > As of 1.2 current SVN: > > > > function beforeValidate() { > >$this->data[$this->name] = Set::filter($this->data[$this->name], > > true); > >return true; > > > > } > > >

RE: ? Set::filter (Was Re: allowEmpty in validate)

2007-04-30 Thread Mariano Iglesias
That's because the API docs haven't been updated yet since the Set::filter function was added after last CakePHP 1.2 release. API docs get updated after each release. Look into cake/libs/set.php and search for function filter() -MI ---

Re: cake 1.1 & cake1.2 on Windows apache 2.2.4 Crashes

2007-04-30 Thread [EMAIL PROTECTED]
When you disabled mod rewrite, did you delete the .htaccess file, or comment out the mod rewrite directive? On Apr 28, 1:42 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote: > APPLYS TO cake 1.1 & cake 1.2 > > using php 5.2.1 and mysql 4.1 and apache 2.2.4 > > every is fine with either version of ca

strange error msg

2007-04-30 Thread wewo
hi there, maybe it'a a stupid question, but since the update to the actual 1.2.0.4798 release, I get some strange error messages in my app: Notice (8): Undefined property: Folder::$table [CORE/cake/libs/model/ model.php, line 671] Notice (8): Undefined property: Folder::$name [CORE/cake/libs/m

Re: User model: unique validation and beforeValidate help

2007-04-30 Thread Dr. Tarique Sani
On 4/30/07, R. Rajesh Jeba Anbiah <[EMAIL PROTECTED]> wrote: > I wanted the unique check only on users/register. But, it rather > checks on every User->validates() and User->save() call. I thought of > filtering the check inside beforeValidate() by checking the action, If your users/register is e

? Set::filter (Was Re: allowEmpty in validate)

2007-04-30 Thread R. Rajesh Jeba Anbiah
On Apr 19, 3:59 am, nate <[EMAIL PROTECTED]> wrote: > As of 1.2 current SVN: > > function beforeValidate() { >$this->data[$this->name] = Set::filter($this->data[$this->name], > true); >return true; > > } > > Works for me. I don't find "Set::filter"

Re: sanitizing data with beforeValidate

2007-04-30 Thread gmwebs
Quite a conundrum... If the function is called beforeSave() then the input is not sanitized before being used for validation. Could be an issue when using isUnique() as the database is queried at validation time using unsanitized input data. Could this be a candidate for SQL injection? --~--~---

User model: unique validation and beforeValidate help

2007-04-30 Thread R. Rajesh Jeba Anbiah
I have a User model similar to (has unique check in beforeValidate() callback) I wanted the unique check only on users/register. But, it rather checks on every User->validates() and User->save() call. I thought of filtering the

Re: sanitizing data with beforeValidate

2007-04-30 Thread ianh
Interesting point. Perhaps it would be better if the function gets called beforeSave() instead? On Apr 30, 12:47 pm, gmwebs <[EMAIL PROTECTED]> wrote: > How would I echo the sanitized input in my form rather than the > unsanitized input? If a user were to input non-alphanumeric characters > in a

Re: sanitizing data with beforeValidate

2007-04-30 Thread gmwebs
How would I echo the sanitized input in my form rather than the unsanitized input? If a user were to input non-alphanumeric characters in a username on a registration page for instance, the input is sanitized before validation which means the form validates and the data is saved, but the user will

Re: sanitizing data with beforeValidate

2007-04-30 Thread ianh
No worries - let me know how the function works out for you and any improvements you think might be warranted. Ian On Apr 30, 11:01 am, gmwebs <[EMAIL PROTECTED]> wrote: > Thanks Ian... > > I had the return true in the beforeValidate() but I was trying > something in beforeSave() and had neglecte

Re: Bad link without mod rewrite

2007-04-30 Thread sickrandir
Tried to figure out the problem by myself but without success... Anyone can help? thank you sickrandir On Apr 19, 6:26 pm, sickrandir <[EMAIL PROTECTED]> wrote: > I'm running a site with the latest stable version of cake 1.1 . > I disabled mod rewrite by uncommenting: define ('BASE_URL', > env(

Re: sanitizing data with beforeValidate

2007-04-30 Thread gmwebs
Thanks Ian... I had the return true in the beforeValidate() but I was trying something in beforeSave() and had neglected to put the return true in there. It works fine now. Regards, Graham --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: Dynamic Links with DS constant?

2007-04-30 Thread Anton Morrison
I can never use the $html->link when i want to link on an image as it turns all the < into gth; has anyone ever found a way? On 29 Apr 2007, at 21:18, Samuel DeVore wrote: > > btw r() is a convenience function for str_replace > > manual.cakephp.org/chapter/constants > > On 4/29/07, Mariano I

Undefined property: hashkey when using othAuth

2007-04-30 Thread matlin
I tried to reply to a thread where people were having problems with oth_auth I got the error below when I started to use the component/helper and found a solotion. Notice: Undefined property: hashkey in /afs/su.se/services/www/hosts/ www.lab.it.su.se/pages/cake/app/views/helpers/oth_auth.php on l

Re: Tutorial: ControlPanel

2007-04-30 Thread 浪漫様
About the bakery... uhm... is too troublesome and i'm wasting too much time checking if all the post and codes follows the rules of the community... i just wanted to share what i had done for other users to understand how to work with CakePHP with some nice example that covers quite a big part of

SWFUpload problem

2007-04-30 Thread [EMAIL PROTECTED]
Dear bakers, I'm a newbie at using cake and I really could use some help. I've stripped down my project which can be found at http://www.2nfuse.nl/example.zip In the dir "database" you can find the SQL script for creating the corresponding tables in a database called "example". I'm using the la

RE: Tutorial: ControlPanel

2007-04-30 Thread Mariano Iglesias
If you are in such a hurry you should consider checking the comments on the article, and also you have checked "I agree to The Bakery Guidelines (http://bakery.cakephp.org/pages/guidelines)" but still somehow the code does not follow CakePHP Coding Standards (https://trac.cakephp.org/wiki/Develope

Strange behaviour when saving data

2007-04-30 Thread ifcanduela
Hello, I'm having a strange problem when using the 'save' method to insert new records. This is what is happening: I have a Country with id=0 that belongs to a region with, say, id=3. When the 'add' action of the countries_controller is called, instead of adding a new country with id=2 and region

Re: sanitizing data with beforeValidate

2007-04-30 Thread ianh
Hi Graham - thanks for giving the function a whirl. If you can still see the data after sanitization then the most obvious thing to ask is are you calling it correctly? It must look like this: function beforeValidate() { $this->__sanitize($this->data); return true; } It is vital that the bef

Re: Tutorial: ControlPanel

2007-04-30 Thread 浪漫様
Well, I think is just a matter of time, wait a little until it gets approved (^-^) Anyway, you have all the code written here too, so you can check it! Regards, Rohman --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups