Re: Are we using the slowest PHP framework there is?

2009-02-19 Thread Rafael Bandeira aka rafaelbandeira3
We can't forget that even not using $uses, when loading a Model it will construct all its links, and its link will construct all of their links, and so forth... So, anyway, you are most probably going to load each and every model by just loading a single one - even though they might have nothing t

Re: Can a model belong to and habtm one model?

2008-12-12 Thread Rafael Bandeira aka rafaelbandeira3
yes you can, just assign different aliases like 'Owner' and 'OwnerFriends' eagerterrier wrote: > I have a facebook type app that I need to build for a client (don't we > all?) and in it I have a model that ideally needs to be owned by one > user, and also habtm other users (the owners friends) >

Re: REgarding using Mysql functions like NOW(), CURDATE() etc

2008-11-29 Thread Rafael Bandeira aka rafaelbandeira3
> Finally if you are hopping that cake allow you to make mysql function calls > inside a query you should read thishttps://trac.cakephp.org/ticket/5345as > stateted that "it would actually > make SQL injection a *feature" > Notice that every user input should be properly sanitized and escaped if

Re: multiple [controllerName].po files + normal core.po?

2008-11-28 Thread Rafael Bandeira aka rafaelbandeira3
> PS a controller should itself have very few __ calls (only flash messages) ... And be said that even this can be delegated to the view layer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post

Re: calling exit() after redirect STILL redirects

2008-11-27 Thread Rafael Bandeira aka rafaelbandeira3
> Deleting this key solved the problem. instead of deleting the session key, why don't you set the right url on AuthComponent::$loginRedirect? $this->Auth->loginRedirect = array('controller' => 'user', 'action' => 'info'); --~--~-~--~~~---~--~~ You received this m

Re: JQuery and AjaxHelper

2008-11-27 Thread Rafael Bandeira aka rafaelbandeira3
> I was wondering if there is anyway in order to still use the Ajax > helper (I don't really want to write all the code to implement it > everytime) while using JQuery instead of Prototype and Scriptaculous? No. There's no way of doing this. AjaxHelper only spits code based on Prototype and Scrip

Re: HABTM pagination

2008-11-27 Thread Rafael Bandeira aka rafaelbandeira3
grigri wrote: > @Markus and Rafael Oh come on... I wasn't asking, I was answering... the code supplied by the thread author is invalid, and I pointed it out. Every method presented since then is just fine. --~--~-~--~~~---~--~~ You received this message because y

Re: HABTM pagination

2008-11-27 Thread Rafael Bandeira aka rafaelbandeira3
> $this->set('filters',$this->Listing->Cuisine->find('all',array > ('conditions'=>array('Cuisine.id'=>$searchby))), $this->paginate()); what is it supposed to do? I think that what you really want to do is: // in the controller $this->set('filter', $this->paginate()); --~--~-~--~~

Re: What you people use: Browser based automated tests or Cake's Inbuilt lib?

2008-11-27 Thread Rafael Bandeira aka rafaelbandeira3
... forgot the last paragraph: and he is always giving support over cakebaker.42dh.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

Re: What you people use: Browser based automated tests or Cake's Inbuilt lib?

2008-11-27 Thread Rafael Bandeira aka rafaelbandeira3
> BTW, I did tested Daniel's code before, It was not of much help, as it > didn't worked out with latest versions. And I think no one is using it > right now. are you sure? He just pushed SeleniumHelper to github --~--~-~--~~~---~--~~ You received this message bec

Re: What you people use: Browser based automated tests or Cake's Inbuilt lib?

2008-11-27 Thread Rafael Bandeira aka rafaelbandeira3
Abhimanyu Grover wrote: > Hey Bakers, > > From quite a few days, Selenium IDE is seducing me as its a huge time > saver in writing tests. Earlier I was using CakeWebTestCase which > fulfilled our team's needs easily. Now I'm stuck in dilemma whether we > should use Cake's Inbuilt CakeWebTestCase

Re: Agregating multiple databases

2008-11-26 Thread Rafael Bandeira aka rafaelbandeira3
For sure that's a way to do that. > > Can I create a model that will show me a list of all users in Ohio and > Kentucky? > Are both dbs on same host and can they be accessed by same app's db client and therefore be used in a same sql query? --~--~-~--~~~---~--~~

Re: Multiple views

2008-11-23 Thread Rafael Bandeira aka rafaelbandeira3
> On the front-page of my application I want to be able to display > numerous other views. For example I may want to display a view of my > pages controller (for example a welcome message), and a view from my > calendar controller. > > How would I do this? use View::element(), as such: $this->el

Re: Named parameters VS $_GET

2008-11-20 Thread Rafael Bandeira aka rafaelbandeira3
ted data or something that has no direct > impact on the pages content, you might instead choose query strings. > > Hope that helps, > EW > > On Nov 19, 4:55 am, Rafael Bandeira aka rafaelbandeira3 > > <[EMAIL PROTECTED]> wrote: > > Query strings are evil for

Re: cakePHP auth help (for a cake newbir)

2008-11-20 Thread Rafael Bandeira aka rafaelbandeira3
>It's important to know what's out there! Totally agreed, I've done it before. The conclusion: almost every other framework is a) ugly and/or b) unlogical and/or c) useless and/ or d) too complex for it's too unsensible featurity. And yes. CI is totally unlogical and bloated with lots of crap feat

Re: cakePHP auth help (for a cake newbir)

2008-11-20 Thread Rafael Bandeira aka rafaelbandeira3
the easiest way to get you on the path to the success is: quit CI and all other non-logic based framework out there. you little heretic man... ;-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To po

Re: Mambo on CakePHP brainstorm

2008-11-19 Thread Rafael Bandeira aka rafaelbandeira3
What I see a lot is people looking for a admin backend that actually works. A CMS just for the MS. I think that a fashion way of delivering data to views, and a good UI work on admin end is what people really seek. Modularity and extensibility are huge pluses - but not strictly necessary. --~--~--

Re: Named parameters VS $_GET

2008-11-19 Thread Rafael Bandeira aka rafaelbandeira3
Query strings are evil for seo. That's why. --~--~-~--~~~---~--~~ 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: Fatal error: Maximum execution time of 30 seconds exceeded

2008-11-14 Thread Rafael Bandeira aka rafaelbandeira3
Tópicos em português devem ser postados no fórum pt-br. ok? --~--~-~--~~~---~--~~ 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 grou

Re: How to dynamically load controller based on field in database.

2008-11-13 Thread Rafael Bandeira aka rafaelbandeira3
On 13 nov, 03:53, Nick <[EMAIL PROTECTED]> wrote: > Basically I am using wildflower cms which is built on cakephp. > It routes are setup so that / goes to the pages controller. > I am building a product catalog and could simply have the urls be / > products/category/product-name > however I do n

Re: Model Validation -> 'blank' rule triggered without beeing set

2008-11-13 Thread Rafael Bandeira aka rafaelbandeira3
> triggered? And how can i avoid it without changing the cakecore? set the 'rule' key on $validate for each field, and specify the rule you want it to follow, when a validation scheme is set on $validate but no rule is specified, the 'blank' rule is assumed. Please refer to the cookbook for more

Re: HABTM Model::save() or Model::__saveMulti() seems to be broken :-/

2008-11-12 Thread Rafael Bandeira aka rafaelbandeira3
> Model.[0].[key]='a' > Model.[0].[key]='b' > Model.[0].[key]='c' what is it? the structure should be like this: $data['HABTMModel']['HABTMModel'] = array( array('HABTMAssociationForeignKey' => 1), array('HABTMAssociationForeignKey' => 2), array('HABTMAssociationForeignKey' => 3) );

Re: HABTM Model::save() or Model::__saveMulti() seems to be broken :-/

2008-11-11 Thread Rafael Bandeira aka rafaelbandeira3
Forgot to mention, if you just want to keep your tables as they are, refer to #5722¹ to see the correct data set format to use. ¹ - https://trac.cakephp.org/ticket/5722#comment:2 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

Re: HABTM Model::save() or Model::__saveMulti() seems to be broken :-/

2008-11-11 Thread Rafael Bandeira aka rafaelbandeira3
Model::__saveMulti() was changed in the last few days due to a bug, new tests were added, and everything seems to be working just as expected. The problem is that the data format you are using is only supported by numeric ids and uuids, being processed only if it's values are 36 char long or numer

Re: Fatal error Call to undefined method Controller Html()

2008-10-31 Thread Rafael Bandeira aka rafaelbandeira3
> link('Activate account', > array('controller'=>'users', 'action' => 'activate', $userid); ?> ^ it's missing a close bracket here -^ anyway: > Is there a way the above can be used to print out an absolute url ? $html->link('Activate account', $html- >url(arr

Re: class 'Routes' not found

2008-09-25 Thread Rafael Bandeira aka rafaelbandeira3
> class 'Routes' not found You are mispelling "Router" somewhere in your application, probably on app/config/routes.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send ema

Re: To model or not to model

2008-09-25 Thread Rafael Bandeira aka rafaelbandeira3
> > Still thinks that executing queries is needed? > > Yes. Sometimes You have uncommon database design, and You can't > EFFECTIVELY receive data just by using standard, even magic, model Definetly correct, my sentence wasn't much happy. I meant for the cases he presented. Anyway, keep in mind th

Re: Weird behavior with characters

2008-09-24 Thread Rafael Bandeira aka rafaelbandeira3
tried to set your source code files encoding to UTF-8? The default of many IDEs is to set them as ISO-8859-1, wich messes up with accented chars, make sure you are rendering your content in UTF-8 too. But anyway, I would like to point that it's not a good idea, accented chars are generally a pain

Re: bulk load data into CakePHP?

2008-09-24 Thread Rafael Bandeira aka rafaelbandeira3
t know if anyone's done any sort of > measurements about "CPU X, with memory Y GB, Cake can draw Z records > into memory in A milliseconds", but it would be fascinating to see :) > > Thanks again for the quick, really helpful response! > (And, for what it's worth, I'

Re: To model or not to model

2008-09-24 Thread Rafael Bandeira aka rafaelbandeira3
> > Rule of thumb perhaps? :) > If you really mean it: Let's say rule of thumb isn't exactly a rule. Now, if you were being ironic: Yay right, that's the kind of rule that can be applied to a pattern! --~--~-~--~~~---~--~~ You received this message because you are

Re: bulk load data into CakePHP?

2008-09-24 Thread Rafael Bandeira aka rafaelbandeira3
Mike, I think it's not "how much data is Cake intended to deal with" is how much data your app is intended to deal with, thousands of records is not something that should be dealed by php, the database does it much faster and safer. Having lots of data in database doesn't mean you have to deal wit

Re: To model or not to model

2008-09-24 Thread Rafael Bandeira aka rafaelbandeira3
First of all people: what Rule? It's not made of rules, it's a pattern to follow - but follow as you want. Second, no, it doesn't "break the Rule" it only makes your code uglier and hard to read - see above - but the thing is, why to use a hand made query when you can easily/prettier/"readablier"

Re: bulk load data into CakePHP?

2008-09-23 Thread Rafael Bandeira aka rafaelbandeira3
Hey Mike, it's totally not a matter of performance here. First of all, there's no reason on use this approach for a that huge amout of data, you should probably import it to your db. But if you want to do this in the app layer, maybe it's a feature - I don't know, you should definetly build INSERT

Re: Models: Why not more Object Oriented??

2008-09-23 Thread Rafael Bandeira aka rafaelbandeira3
I don't really get it... you can easily handle your data in Model side, even more now since [7640] - wich actually encourages you to do so. Ok, but lets focus on the "iterating more than once" problem. After all isn't it what you actually do in every MVC based app? i.e: db (iteration over table da

Re: Simply aligning form->input fields and labels nicely....

2008-09-22 Thread Rafael Bandeira aka rafaelbandeira3
You can use an array to specify label's tag attributes: $form->input('Schedule.expected_check_in', array('label' => array('class' => 'input-label', 'text' => 'Expected Arrival', 'title' => 'When are you expecting to arrive at the place?'))); The 'text' key is the one to be used as the text, so t

Re: nested condition

2008-08-30 Thread Rafael Bandeira aka rafaelbandeira3
> Only, unfortunately, I found out cake can't yeild expression like: > > sth NOT IN('a','b') Yes it can, use 'not' => array('sth' => array('a', 'b')) And you could write those conditions like this > 'conditions'=>array( > array

Re: method find using regex

2008-08-30 Thread Rafael Bandeira aka rafaelbandeira3
> athttp://book.cakephp.org/view/73/retrieving-your-data, is some info > about usind find with regex (at conditions param). I can't find one > example of usage and there is nothing at the docs. Someone can give a > example of usage? I actually didn't understand what you want but if you want to us

Re: cannot get ibm tutorial part 2 var belongto work ! anyone done this tutoral before ??

2008-08-30 Thread Rafael Bandeira aka rafaelbandeira3
> class Product extends AppModel > { > var $name = 'Product'; > var $belongsTo = array ( > 'Dealer' => array( > 'className' => 'Dealer', > > 'foreignKey'=>'dealer_id' > ) > );} are you sure your code is just it? --~--~-~--~~~---~--~~ You received this message beca

Re: find group parameter problem (GROUP BY problem)

2008-08-29 Thread Rafael Bandeira aka rafaelbandeira3
> > Should I open a bug report for this? > If you're sure about it, yes --~--~-~--~~~---~--~~ 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 f

Re: Complex ACL & Auth

2008-08-28 Thread Rafael Bandeira aka rafaelbandeira3
Paste your code and your approach, a test approach at least. I don't think someone will actually *do* it for you. But many people can point out what you're missing --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake

Re: Initialization function on the model core

2008-08-28 Thread Rafael Bandeira aka rafaelbandeira3
i thought you were telling me that it was possible to > call a function in the declaration of a variable in a class > > Sorry for your loosed time, Rafa > > regards > > On 28 ago, 21:18, Rafael Bandeira aka rafaelbandeira3 > > <[EMAIL PROTECTED]> wrote: &

Re: Initialization function on the model core

2008-08-28 Thread Rafael Bandeira aka rafaelbandeira3
i thought you were telling me that it was possible to > call a function in the declaration of a variable in a class > > Sorry for your loosed time, Rafa > > regards > > On 28 ago, 21:18, Rafael Bandeira aka rafaelbandeira3 > > <[EMAIL PROTECTED]> wrote: &

Re: Initialization function on the model core

2008-08-28 Thread Rafael Bandeira aka rafaelbandeira3
On 28 ago, 15:46, villalvilla <[EMAIL PROTECTED]> wrote: > Wrong! > have you tried that? Yes... as with any object in PHP... > I have tried it before posting this, trust me, and due to the Model > constructor specifications it fails! > that's why i've done this hooking! Are you nuts or somethin

Re: Initialization function on the model core

2008-08-28 Thread Rafael Bandeira aka rafaelbandeira3
> > > So i think it would be great for all the cake comunity to have this > > concept implementated on the next release of cake! > > Please open an enhancement ticket for it on trac (https:// > trac.cakephp.org) so the devs can consider to add it. > I don't think it's appliable... use MyModel::__

Re: Database relationships etc

2008-08-22 Thread Rafael Bandeira aka rafaelbandeira3
Oh, I almost slept, you should try to more clear and less verborragic, so many explanation just messed up things more and more... And you should do 2 things when you can't speak a language : 1) look for groups with the same language of yours and 2) say your nacionality, so members from the same co

Re: OrderedBehavior - Order your lists in a TreeBehavior like manner, but only for one level.

2008-08-20 Thread Rafael Bandeira aka rafaelbandeira3
> I propose we should think of how we can use the Bakery to become our > ultimate resource for articles.  I have a couple of simple ideas and > if anyone is also interested,  I'll start a thread about this topic so > we can give positive feedback, ideas and encouragement to the Bakery > developer

Re: CakePHP and widgets

2008-07-20 Thread Rafael Bandeira aka rafaelbandeira3
> Andy Dawson's mini controllers still work the best for me - despite the name > it really is a combination of Components and Elements Why not to use some model tricks inside a helper? Form helper does it... Grab your model whithin the ClassRegister and serve yourself... I've already done the ap