Multiple HABTM associations in containable find

2012-11-11 Thread Stuart Bridger
I have HABTM associations between two models but can only get find to return one level. I can return several levels with other associations but think I must be doing something wtong with HABTM. Controller/SchedulesController.php $this->Schedule->find('first', array( 'contain' => array(

Re: HTTPSocket POST file upload problem

2012-08-20 Thread Stuart Bridger
with HTTPSocket. On Saturday, 18 August 2012 08:39:24 UTC+1, Stuart Bridger wrote: > I am having problems uploading files from a remote server. Some of the > files download fine but others are incomplete. Strangely, the incomplete > files are always exactly the same length but I get unexpect

Re: HTTPSocket POST file upload problem

2012-08-19 Thread Stuart Bridger
. On Saturday, 18 August 2012 08:39:24 UTC+1, Stuart Bridger wrote: > > I am having problems uploading files from a remote server. Some of the > files download fine but others are incomplete. Strangely, the incomplete > files are always exactly the same length but I get unexpected

HTTPSocket POST file upload problem

2012-08-18 Thread Stuart Bridger
I am having problems uploading files from a remote server. Some of the files download fine but others are incomplete. Strangely, the incomplete files are always exactly the same length but I get unexpected end of file when uncompressing them using gzip. $httpSocket = new HttpSocket(); > $zipFil

Re: Controller routing to home page issue

2012-01-25 Thread Stuart Hallewell
Ok - this application uses the ACL component. I needed to rebuild the ACL to add the 'action' controller into the relevant tables. It would have been nice if there was some kind of useful redirect or message - "You are not authorised to access this area" kind of thing but hey ho, problem resolve

BAKE Cake SPAM

2010-05-13 Thread Stuart Cross
I have seen evidence of SPAM spiders hunting for BAKE'd Cake sites with unprotected admin urls. They are simply using the model names from urls and hitting model/admin/add model/admin/edit/n in the access logs. May seem obvious but check you lock down your admin methods and remove unwanted baked me

Enumerating ACL settings

2009-09-24 Thread Stuart
What's the easiest way to enumerate the who has what ACL settings for a specific ACO entry? I have the appropriate aco_id but there doesn't appear to be an easy way to link this though the aros_acos table back to the aros? BTW: I'm reasonably new to Cake. --~--~-~--~~~---

Re: Created, Modified not set in related model on save

2009-06-11 Thread Stuart
I've been working on this over the last 10 days and still haven't found a solution. I haven't even found any clues. It's impossible to tell how many people have read this but not one person has replied so I'm bumping it up the list. On Jun 1, 4:00 pm, Stuart wrote: >

Created, Modified not set in related model on save

2009-06-01 Thread Stuart
I haven't experienced this before but I'll try to explain it. I have a Facilities model that hasMany Documents and Document belongsTo Facility. When a user creates a new facility they have the option of uploading a document related to that facility. If a document is uploaded when the facility is c

Re: Underscores do what??

2009-05-12 Thread Stuart
-Matthttp://www.pseudocoder.com > > On May 12, 11:30 am, Stuart wrote: > > > Sigh, CakePHP newb here, > > > I see this type of syntax used in bake generated code and views like > > default.ctp but don't see it used in the cookbook. It seems to replace > > e

Underscores do what??

2009-05-12 Thread Stuart
Sigh, CakePHP newb here, I see this type of syntax used in bake generated code and views like default.ctp but don't see it used in the cookbook. It seems to replace echo in some places and not in others. I'm guessing this is some sort of php function to do some string manipulation but I can't see

PHP 5.2, Apache on Solaris: Want to user CakePHP to connect to Sql Server 2005

2009-02-24 Thread Stuart
I've been reading the docs for several PHP frameworks trying to get a feel for which one is the best suited for this purpose. My web/ application server is running on Solaris 7 on a Sun box and I need to connect to a Windows 2003 server running MS SQL Server 2005. I'm beginning to suspect that thi

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:// b

Re: Problem with Phpcake

2008-12-04 Thread Stuart
Nevermind. I wasn't paying attention to the error message. In my case it seems that the CakeErrorController class is throwing the error because it can't extend AppController. I don't think it has anything to do with the AppController class in the application. It might have to do with the App::impo

Re: Problem with Phpcake

2008-12-04 Thread Stuart
I'm afraid I can't help you because I'm having the same problem. It appears to me that cake is looking for the AppController class in the cake core and ignoring the app_controller.php file I have in app/ (Fatal error: Class 'AppController' not found in /usr5/local/lib/ cake_core/cake/libs/error.ph

Re: Multiple rules per fields

2008-01-28 Thread Stuart Harris
This is my user model... ignore the captcha stuff ;) for simplicity, I number all my rules, but if there is ONLY one rule it doesn't need to be numbered... hope this helps you :) var $validate = array( 'username' => array(

Model input approach

2007-07-20 Thread Stuart
process these values after the fact. This doesn't seem very elegant to me. Is there a better way of doing this? Have I got my models muddled? Am I trying to do something that Cake wasn't really designed for? Any help gratefully accepted. Thanks Stuart --~--~-~--~~--

PEAR::DB quoteSmart

2006-09-22 Thread Stuart
Is there a model method or helper that does the same as PEAR::DB::quoteSmart? --~--~-~--~~~---~--~~ 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 unsub

Re: Composit forms for composit models

2006-09-06 Thread Stuart
Thanks, Sohei. Bet you can guess what my next question is. Is there a similar hack to get $html->tagErrorMessage('Person/Address/address1') to work? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group

Composit forms for composit models

2006-09-01 Thread Stuart
7;, array('name' => 'data[Person][Address][address1]', 'id' => 'person_address_address1', 'size' => '40', 'value' => $addresses['Address']['address1'], )) ?> But I end up with inputs like: nam

Re: Cake 2.0 and object-based models

2006-08-15 Thread Stuart Miller
Sorry, I should have been more clear. I wasn't looking for how to do getAge(), but rather the best place to put such a method so that it would be available to views and such.I normally would put these type of methods in the value objects/transfer objects that I use to pass data between the model an

Cake 2.0 and object-based models

2006-08-14 Thread Stuart
irthdate? Cheers, Stuart --~--~-~--~~~---~--~~ 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 P