Re: Vacancy for a CakePHP developer in London (Farringdon)

2016-04-08 Thread Jeremy Burns : Class Outfit
Thank you, but Delhi is a long commute. I don’t think that will work. This is an on site position. > On 8 Apr 2016, at 08:18, Kamal Deol wrote: > > > > On Fri, Apr 8, 2016 at 8:31 AM, Jeremy Burns > wrote: > An old client of mine is looking someone to take

Re: Dealing with MASSIVE Model Files

2015-09-09 Thread Jeremy Burns : Class Outfit
I sometimes splice chunks out into behaviours for this reason. > On 9 Sep 2015, at 08:35, Michael Houghton wrote: > > I have some big projects in CakePHP and always follow the Fat Models, Skinny > Controllers approach. > > The issue I have now, is some of my model files are 5000 lines! > > Is

Re: CakePHP 3 Component

2015-07-18 Thread Jeremy Burns : Class Outfit
Yup - I understand that. But a method in a skinny controller (which I appreciate is the element that should provide feedback on progress) hands off to a single model function which then follows business rules and runs a series of processes in sequence. So my question is “when the progress one wa

Re: CakePHP 3 Component

2015-07-17 Thread Jeremy Burns : Class Outfit
What about the situation where you have a multi-step process inside a model/s and you want to make the progress status available to javascript calls? > On 17 Jul 2015, at 09:55, euromark wrote: > > Your models should stay stateless, as such you should never internally use > the session. > Inst

Re: The (bad) perception and image of CakePHP in the public

2014-10-01 Thread Jeremy Burns : Class Outfit
I've found the documentation pretty good on the whole, but there are two common issues: 1) It sometimes it lacks context. I can see the code example, but where does it go, what does it rely on and what does it impact? 2) It sometimes relies on an existing knowledge of the subject matter or some

Re: The (bad) perception and image of CakePHP in the public

2014-09-30 Thread Jeremy Burns : Class Outfit
My reasons are more practical than technical, but still very relevant: 1. Familiarity 2. Speed to get-go 3. Well maintained/supported Without deep knowledge of other frameworks it's hard to come up with technical arguments, but I'd love have them in my armoury. - Jeremy On 30 Sep 2014, at 09:2

Re: The (bad) perception and image of CakePHP in the public

2014-09-29 Thread Jeremy Burns : Class Outfit
This is so true. I'm a huge fan of Cake but we do feel like the whipping boys sometimes. I recently hired someone into a project and the first thing he tried to do was change the framework for a whole bunch of vague reasons like 'Laravel is just so much better'. Perhaps someone can devise some

Re: 'In test' global variable?

2014-09-17 Thread Jeremy Burns : Class Outfit
ould use >> AppController::beforeFilter() or elsewhere, simple example: >> >> $emailConfig = (Configure::read('debug') > 0) ? 'database' : 'default' >> Configure::write('Email.config', $emailConfig); >> >> //.. somewhere else

Re: 'In test' global variable?

2014-09-16 Thread Jeremy Burns : Class Outfit
Thanks Mark. After writing I decided to check the debug level. If > 0 (i.e. potentially in test) don't send the emails. I send via Mandrill so can't easily log the result without actually sending it. It's cool. On 16 Sep 2014, at 14:14, euromark wrote: > I use custom Configure keys for my Emai

Re: problems while upgrading from cakephp 1.2.5 to 2.5.3

2014-08-24 Thread Jeremy Burns : Class Outfit
You'll need to add a beforeFilter function (you'll find yourself using this a lot in the future): http://book.cakephp.org/2.0/en/controllers.html On 23 Aug 2014, at 22:16, 'Dallas' via CakePHP wrote: > Hello again Jeremy, > Can you explain? I do not see beforeFilter? I tried to just remove b

Re: Security salt issue

2014-08-22 Thread Jeremy Burns : Class Outfit
I'd use the value from your old installation as it is used to encrypt passwords - if the salt is different no one will be able to log in as the encrypted version of the password they enter will not match the encrypted value stored in the database. On 23 Aug 2014, at 03:25, 'Dallas' via CakePHP

Re: problems while upgrading from cakephp 1.2.5 to 2.5.3

2014-08-22 Thread Jeremy Burns : Class Outfit
The $this statements need to sit inside a function - probably beforeFilter in your case. On 23 Aug 2014, at 03:03, 'Dallas' via CakePHP wrote: > I have migrated from cakephp 1.2.5 to Cake 2.5.3 by installing new cake, > importing old database and importing files. I have made changes to file

Re: Advice on MVC pattern for stats site

2014-08-05 Thread Jeremy Burns : Class Outfit
I'd make them either separate controller actions or a single action that accepts a parameter and then tidy them up with a route. The controller function can then either render the view associated with the action(s), specify a view to render and/or specify a layout. On 5 Aug 2014, at 20:08, Rus

Re: 403 error

2014-07-31 Thread Jeremy Burns : Class Outfit
Thanks Andy. Turns out it was something much simpler. I use MAMP Pro and had the cache module set to APC. As soon as I turned that off the issue went away. On 31 Jul 2014, at 06:52, AD7six wrote: > That sounds like a consequence of web requests and CLI requests sharing the > same tmp folder. E

Re: Cookbook: database query in controller???

2014-07-06 Thread Jeremy Burns : Class Outfit
It is using the model. It's calling the 'find' method of the Post model with the 'all' parameter. The Post model is then using the core Model functions to do the database extraction. On 6 Jul 2014, at 11:59, Sam Clauw wrote: > I've a question about the MVC in CakePHP. Normally, the model shoul

Re: Grouping Api controllers in a seperate sub directory

2014-07-02 Thread Jeremy Burns : Class Outfit
It's simpler than that. Each controller function can act as an API method, so leave the folder structure as it is.You can detect the json extension by using the RequestHandler component and adding Router::setExtensions(array('json')); near the bottom of routes.php. Then you can call /controller

Re: CakePHP Login redirect

2014-06-30 Thread Jeremy Burns : Class Outfit
Are you certain the Auth->logout action is being called? Is the session clear (destroyed) after logout? On 28 Jun 2014, at 12:54, Gagik Navasardyan wrote: > Hi everyone. > > I have one question. > > I'm working on an application which is working in local network and acting as > POS(Point of

Re: cross tables in cake 1.3

2014-06-30 Thread Jeremy Burns : Class Outfit
That is A LOT of models to load and there is almost certainly a better way of cracking your nut. What are you trying to achieve? On 30 Jun 2014, at 08:33, 'Chris' via CakePHP wrote: > hi guys,.. I'm using to many cross tables in a controller,... and getting > memory error not enough bites,...

Re: Auth Component

2014-06-27 Thread Jeremy Burns : Class Outfit
What happens if, when you define $user, you also include (contain?) the Person and Company models and log in with that $user variable? On 27 Jun 2014, at 00:57, Matt Myers wrote: > I've been hitting my head over this for quite some time now. When I login > using the Auth Component as such: >

Re: Help me for First Application with CakePHP!

2014-06-25 Thread Jeremy Burns : Class Outfit
Sure. What would like us to build for you? On 25 Jun 2014, at 06:30, Sankar V wrote: > > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePH

Re: How to Integrate paymentgateway in cakephp

2014-06-06 Thread Jeremy Burns | Class Outfit
By reading and researching. Sent from my iPhone > On 6 Jun 2014, at 07:00, vinothku...@constient.com wrote: > > This message has no content. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are sub

Re: display data 3 tables

2014-06-05 Thread Jeremy Burns : Class Outfit
You are not doing something right. Can you show more code with the debugged output please? Cracking this and understanding what is happening will help you enormously with developing Cake apps from here. On 5 Jun 2014, at 15:18, ajt wrote: > I set recursive to -1 and it doesnt work as I get us

Re: display data 3 tables

2014-06-05 Thread Jeremy Burns : Class Outfit
With the Containable behaviour you should set recursive to -1. Recursion makes the model automatically attache related models n deep (where n is your recursion level) so can give unexpected (or at least uncontrolled) results. When it is -1 it only returns the model associations you specify. The

Re: display data 3 tables

2014-06-05 Thread Jeremy Burns : Class Outfit
Isn't $tutor['Teacher']['User']['username'] what you're looking for? On 5 Jun 2014, at 14:18, ajt wrote: > There just is no user being displayed with the below, there is with Teacher > in the find if I add it but every field is undefined in the view. > > $this->Tutorsession->recursive = 2;

Re: display data 3 tables

2014-06-04 Thread Jeremy Burns : Class Outfit
You are referencing the $user variable when you have set a $tutor variable. Add this to your view so you can inspect the shape of the $tutor variable and work out how to access the key you are looking for: die(debug($tutor)); It'll probably look something like this: array( 'Tutorsessio

Re: display data 3 tables

2014-06-04 Thread Jeremy Burns : Class Outfit
A couple of things... Why find all when presumably there is only one expected teacher? The contain statement doesn't go inside an array: $this->set( 'tutor', $this->Tutorsession->find( 'first', array( 'conditions' => array('

Re: display data 3 tables

2014-06-04 Thread Jeremy Burns : Class Outfit
Look at the Containable behaviour: http://book.cakephp.org/2.0/en/core-libraries/behaviors/containable.html On 4 Jun 2014, at 14:47, ajt wrote: > Hi, > > I just want to display fields from 3 tables which I have checked on how to do > this and I am not clear on this. Examples I have found conc

Re: Site down after restart

2014-06-04 Thread Jeremy Burns : Class Outfit
I had a weird error once where the Config folder was renamed to config (lower case c) after uploading some updates via FTP. The site just blanked out. After searching and debugging for a few hours I went to the test page and it presented the error to me. Might be worth a try. On 4 Jun 2014, at

Re: How to get URL parameters in cakephp with URL that ends with xml?

2014-06-04 Thread Jeremy Burns : Class Outfit
Have a look at http://book.cakephp.org/2.0/en/development/routing.html#Router::parseExtensions On 4 Jun 2014, at 10:41, Sam wrote: > I would like to pass URL parameters in cakephp with URL that ends with xml > like below; > > http://localhost/cp251/controller/api_get_info?page=1.xml > The con

Re: cant find a field

2014-06-03 Thread Jeremy Burns : Class Outfit
I missed a single speech mark when I typed my example For clarity it should be: $teacherId = $this->Teacher->field('id', array('Teacher.user_id' => $currentUserId)); On 4 Jun 2014, at 06:46, Jeremy Burns : Class Outfit wrote: > The code you pasted probably

Re: cant find a field

2014-06-03 Thread Jeremy Burns : Class Outfit
The code you pasted probably won't work. $currentuserid=AuthComponent::user('id'); // Use $this->Auth->user('id') instead. In the find you are using the user_id field as a condition but only returning the Teacher.id field - do the Teacher.id and Teacher.user_id fields contain the same value?

Re: cant find a field

2014-06-03 Thread Jeremy Burns : Class Outfit
You ask a lot of questions that are in the book... Look at Model-> field() : http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#model-field On 3 Jun 2014, at 15:38, ajt wrote: > Hi, Is this is the correct way to find a 1 field in 1 row of data? > I just want the teacherID of a r

Re: button wont display as it should

2014-06-03 Thread Jeremy Burns : Class Outfit
Generally speaking you'd create your own CSS file and place it in /app/webroot/css and use that instead of the default Cake CSS. If you want to use both then call both in the head of your layout page. On 3 Jun 2014, at 12:48, jagguy wrote: > Hi, > > No I havent touched the css but where do I

Re: button wont display as it should

2014-06-02 Thread Jeremy Burns : Class Outfit
Then just use CSS. On 2 Jun 2014, at 15:01, jagguy wrote: > Form buttons should not be used as simple links, so this cant be the solution > > http://stackoverflow.com/questions/13491421/cakephp-create-simple-buttons-that-redirects-to-views > > > P: (03) 9866 7737 > E: i...@itfutures.edu.au >

Re: button wont display as it should

2014-06-02 Thread Jeremy Burns : Class Outfit
Use $this->Form->button... On 2 Jun 2014, at 14:37, jagguy wrote: > Hi, > > I simply want to display a button instead of a link but the button doesnt > appear as I cant override the link display with htmlHelper > In older versions of cake 2.x this does work. > > echo "" .$this->Html->link

Re: Order using Containable-Behaviour on deeper levels (>1)

2014-05-29 Thread Jeremy Burns : Class Outfit
Ah. Not sure, but it looks like it sorts by a single key. Sorry. On 29 May 2014, at 11:55, LDSign wrote: > Thanks. Ive already looked at the Hash::sort method. > > But with that it is not possible to sort on multiple fields in priority. e.g. > first "lastname" than "firstname" > > Or do I mi

Re: cant edit but can add row cakephp

2014-05-28 Thread Jeremy Burns : Class Outfit
What happens when you try the save? Does it create a new row instead or does it fail somewhere? On 28 May 2014, at 15:10, jagguy wrote: > Hi, > > In cakephp I cant edit a row from my mysql db but I can add a new row on the > same table without error. > Not sure what to do or how to debug thi

Re: Access $this->Session from a model

2014-05-28 Thread Jeremy Burns : Class Outfit
Pass the current user's id to the model from the calling controller, which can reference the session. On 28 May 2014, at 09:23, Thomas von Hassel wrote: > If your model depends on knowing, by it self, who the user is, you are doing > it wrong .. > > /thomas > > > On 27 May 2014, at 20:59, H

Re: adding a new record with foreign key option

2014-05-25 Thread Jeremy Burns | Class Outfit
Try looking at find->list )http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#find-list). It'll return a key => value array where key is the value you want to store (teacher_id or student_id) and value is the name of the teacher or student that will be displayed in the drop down. C

Re: filter data with controller or model?

2014-05-23 Thread Jeremy Burns | Class Outfit
As a general rule, let the model do all the heavy lifting (fat models, thin controllers). It keeps the business logic in one place. What you have described below are two different things. The first is a find command called by the controller. The second is the code that associates this model with

Re: How to retrieve data from anther table in one model

2014-04-30 Thread Jeremy Burns | Class Outfit
> --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to cake-php+unsubscr...@googlegroups.com. > To post to this group, send email to c

Re: Image is not displaying

2014-04-17 Thread Jeremy Burns : Class Outfit
I've experienced this before and it was nothing to do with the images. Try checking that all of your CSS and JS files are being called correctly. I have noticed that if you are trying to load a non-existent file through the Html helper, other things break. Jeremy Burns Class Outfit

Re: iOS app authentication

2014-04-02 Thread Jeremy Burns : Class Outfit
Thanks Jose - we'll try that. On 2 Apr 2014, at 21:19, José Lorenzo wrote: > Send the data encoded with application/x-www-form-urlencoded > > On Wednesday, April 2, 2014 10:04:40 PM UTC+2, Jeremy Burns wrote: > We're developing a CakePHP web site alongside an iOS app. Our iOS developer > is tr

Re: Testing a logged in user

2014-03-27 Thread Jeremy Burns : Class Outfit
Thanks Mark. How do I incorporate --stderr into tests run via the web, rather than from the command line? On 27 Mar 2014, at 10:45, euromark wrote: > Yes, you can simple use the Session to store and "fake" a logged in user. > Just make sure you dont forget --stderr to append to your test comman

Re: How to return json message inside controller?

2014-03-13 Thread Jeremy Burns | Class Outfit
I put this in AppController beforeFilter: if ($this->request->is('ajax')) { Configure::write('debug', 0); $this->autoRender = false; $this->layout = 'ajax'; $this->disableCache(); } On 13 Mar 2014, at 11:29, Wladimir Chopite wrote: > Use at the beginning of your

Re: Is Cake Dead Or Just Catching Up?

2014-03-12 Thread Jeremy Burns : Class Outfit
I was also surprised to see Zend so far down - any glance over the job boards suggests this is one of the most in demand frameworks. I'm not losing any sleep over this survey. On 12 Mar 2014, at 14:50, kdubya wrote: > I'm taking the bait: > > Looking at the article and the pie chart I have th

Re: Is Cake Dead Or Just Catching Up?

2014-03-11 Thread Jeremy Burns : Class Outfit
the tool. Jeremy Burns Class Outfit http://www.classoutfit.com On 11 Mar 2014, at 06:35, Jeremy Burns : Class Outfit wrote: > This question is a bit like "What's your favourite colour; triangle or > banana?" It's largely a matter of interpretation, habit and opinion. Or

Re: Is Cake Dead Or Just Catching Up?

2014-03-10 Thread Jeremy Burns : Class Outfit
e core members left the team. It didn't die then and it isn't going to die now. It's all good. Jeremy Burns Class Outfit http://www.classoutfit.com On 11 Mar 2014, at 06:24, Dr. Tarique Sani wrote: > CakePHP is far from dead. Have been hearing about since a few years now ;-)

Re: Any problems if foreign key is defined in the table creation SQL script?

2014-02-23 Thread Jeremy Burns : Class Outfit
I always view them separately. The model associations tell Cake how different tables are related but doesn't enforce it. The SQL absolutely defines the relationships and enforces the integrity. I wouldn't omit the integrity as that is the golden source. Jeremy Burns Class Ou

Re: Does the choice of framework matter to ease of ajax dynamic front-end coding?

2014-01-20 Thread Jeremy Burns : Class Outfit
CakePHP is absolutely fine for Ajax. Your approach sounds right - it’s what I do. On 20 Jan 2014, at 14:58, Sam wrote: > I have an upcoming project which may use lots of ajax dynamic front-end > features. Does the choice of framework matter to ease of ajax dynamic > front-end coding? I have n

Re: Customise authError message class

2013-12-13 Thread Jeremy Burns : Class Outfit
Burns Class Outfit http://www.classoutfit.com On 12 Dec 2013, at 22:59, seba wrote: > Solved. Here's the working solution for reference- > > Code snippet in /Controller/AppController.php: > > public function beforeFilter() { > //Set custom authError message if

Re: Is it possible to retrieve webroot folder location in Javascript?

2013-10-29 Thread Jeremy Burns : Class Outfit
Not sure if it's the approved way, but I do this: var baseUrl = '<?php echo $this->Html->url('/', true); ?>'; ...before I load jQuery, which means I can use the baseUrl variable. Jeremy Burns Class Outfit http://www.classoutfit.com On 30 Oct 201

Re: How to relate table with one of many others?

2013-09-30 Thread Jeremy Burns | Class Outfit
Cake won't/can't but your code can make it happen. Jeremy Burns Class Outfit http://www.classoutfit.com On 30 Sep 2013, at 13:55:01, Kemal wrote: > I am using Mysql Workbench and it forces plural names. I will fix them. Will > cakephp decide whether it is a domain or a ho

Re: How to relate table with one of many others?

2013-09-30 Thread Jeremy Burns | Class Outfit
ng orders_id to something that doesn't end in _id as Cake will try to find a related table and build an association with it; perhaps client_reference would be better? If you made those changes you could get your basic models built using cake bake. Jeremy Burns Class Outfit http://www.class

Re: How to relate table with one of many others?

2013-09-30 Thread Jeremy Burns | Class Outfit
Surely there would be a 1->many relationship between: orders_types (which ought to be called order_types) and orders domains to orders hostings to orders? Jeremy Burns Class Outfit http://www.classoutfit.com On 30 Sep 2013, at 13:05:18, Kemal wrote: > Hello, > > I have create

Re: Cake PhP Beginner: nested associations and views

2013-09-16 Thread Jeremy Burns | Class Outfit
Have a look at the Containable behaviour, add it to your AppModel (so it is always available) and set recursive to -1 in your AppModel. Containable is your friend. It gives you complete control over what associated data is returned. Jeremy Burns Class Outfit http://www.classoutfit.com On 16

Re: Putting custom code in a separate repository

2013-09-09 Thread Jeremy Burns : Class Outfit
You add submodules in a path relative to the root of the git repository. I am a Git command line coward so use SourceTree (http://sourcetreeapp.com) which does it all for me. I have all (most) of my plugins as submodules. On 9 Sep 2013, at 14:48, David Suna wrote: > Thanks for the suggestion.

Re: Putting custom code in a separate repository

2013-09-09 Thread Jeremy Burns : Class Outfit
Check out Git submodules - that's exactly what they are for. Jeremy Burns Class Outfit http://www.classoutfit.com On 9 Sep 2013, at 14:17, David Suna wrote: > I started a project locally by cloning the git repository for CakePHP (branch > 2.4). I would like to maintain the abil

Re: Ajax Login - Redirect Help

2013-09-05 Thread Jeremy Burns : Class Outfit
Don't know if this is the best way of handling this, but this is what I do: https://gist.github.com/classoutfit/6459420 It seems to work pretty well. Jeremy Burns Class Outfit Mob: +44 (0) 7973 481949 Tel: +44 (0) 208 123 3822 Skype: jeremy_burns classoutfit.com @classoutfit On

Re: My awesome flash system

2013-09-04 Thread Jeremy Burns : Class Outfit
How is that more awesome than what you do out of the box? On 4 Sep 2013, at 16:14, Prashant Shah wrote: > Hi, > > This is first time I am working with cakephp and I was not satisfied with the > flash message system in cakephp. > > Here is how to setup your own awesome flash system (MIT Licens

Re: decrypt password

2013-08-30 Thread Jeremy Burns : Class Outfit
It (deliberately) uses one way encryption. All it can do is encrypt your password attempt and see if it matches what is stored (which is also encrypted). Jeremy Burns Class Outfit http://www.classoutfit.com On 30 Aug 2013, at 10:53, raj kumar Pustela wrote: > hi to

Re: Where are the sites?

2013-08-17 Thread Jeremy Burns | Class Outfit
t a decent back end the pretty site will not work very well. You could say judging the mechanics of a site by focussing on how good it looks is like putting a vacuum cleaner motor inside a Ferrari body, no? Jeremy Burns Class Outfit http://www.classoutfit.com On 18 Aug 2013, at 05:40:03,

Re: Include count of nested associated object as virtual field.

2013-08-17 Thread Jeremy Burns | Class Outfit
counterCache is your friend. Jeremy Burns Class Outfit http://www.classoutfit.com On 17 Aug 2013, at 23:02:51, Nicholas Amon wrote: > Hi, > > I have the following model relationships > > Question belongs to Chapter > Chapter belongs to Unit > > I want to add a v

Re: Data validation: Client or Server?

2013-08-16 Thread Jeremy Burns | Class Outfit
or API? Then you'd need to load up your validation anyone. Just my 2c. Jeremy Burns Class Outfit http://www.classoutfit.com On 16 Aug 2013, at 12:32:29, jer...@anthemwebsolutions.com wrote: > I wanted to get some opinions on this. Cake's validation structure is easy to >

Re: Prefilling form data doesn't seem to work

2013-08-14 Thread Jeremy Burns : Class Outfit
$data = $this->Model->find etc... unset($data['Model']['id']; $this->data = $data; On 14 Aug 2013, at 19:40, Anja Liebermann wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi David, > > > this is how I would do it: > > copy your edit method and rename it to "copy". Like with

Re: Security and Ajax

2013-08-08 Thread Jeremy Burns : Class Outfit
Because the keys are 'use once', so when submitted by ajax become invalid. See this page for a solution: http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#SecurityComponent::$csrfUseOnce Jeremy Burns Class Outfit http://www.classoutfit.com On 8 Aug 2

Re: rawurlencode() expects parameter 1 to be string, array given [CORE/Cake/Routing/Route/CakeRoute.php, line 503]

2013-08-06 Thread Jeremy Burns | Class Outfit
Looks like $menuList is an array but a string is expected. Jeremy Burns Class Outfit http://www.classoutfit.com On 6 Aug 2013, at 15:58:54, Nicholas Amon wrote: > Hi, > > I am making this requestAction call in my menu.ctp: > > $menus = $this->requestAction(array( >

Re: illuminate, remove Year in birthday field in cake 1.3

2013-06-22 Thread Jeremy Burns | Class Outfit
Have you thought about adding month and day fields to the table and populating them beforeSave? Less processing required when you want to run your cron job. Jeremy Burns Class Outfit http://www.classoutfit.com On 22 Jun 2013, at 21:13:01, Chris wrote: > Hi guys,... can anyone help me ple

Re: Can a single cakephp app connect to multiple databases?

2013-06-06 Thread Jeremy Burns | Class Outfit
http://book.cakephp.org/2.0/en/development/configuration.html#database-configuration Jeremy Burns Class Outfit http://www.classoutfit.com On 7 Jun 2013, at 02:54:02, Sam wrote: > Can a single cakephp app connect to multiple databases? When I look at > Config/database.php, it seems lik

Re: User defined id

2013-05-30 Thread Jeremy Burns : Class Outfit
Set the 'type' of the input to 'text; echo $this->Form->input('id', array('type' => 'text')); Jeremy Burns Class Outfit http://www.classoutfit.com On 30 May 2013, at 14:04, Eros Zanchetta wrote: > Hi there, > > I'm just

Re: CakePHP 2.x Moving Find into Model

2013-05-23 Thread Jeremy Burns : Class Outfit
r you. > Then do standard: > > $this->set('whatever', $this->paginate('Model')); > > All it is basically is the same as you normally would do in the controller > but rather than having all that crap I find it easier to say paginateThis(), > pagginate

Re: CakePHP 2.x Moving Find into Model

2013-05-23 Thread Jeremy Burns : Class Outfit
Have you got an example of that? On 24 May 2013, at 01:09, lowpass wrote: > Apply the array to the $paginate class var, not the method. Basically, you > can declare the $paginate array as a class var, then add to or override any > part of it from within an action. > > > On Thu, May 23, 2013

Re: search by field

2013-05-17 Thread Jeremy Burns | Class Outfit
Maybe $prod is empty? What happens when you add die(debug($prod)); after the find in the show function? Jeremy Burns Class Outfit http://www.classoutfit.com On 17 May 2013, at 05:22:19, Victor Daniel Ojeda wrote: > I have > > show.ctp > -- > foreach ($prod as

Re: want to show the decode the hashed password which saved in database and want to show this on my profile page

2013-05-08 Thread Jeremy Burns | Class Outfit
CakePHP uses a one way hash mechanism meaning that they can't be reverse engineered (= secure). Jeremy Burns Class Outfit http://www.classoutfit.com On 8 May 2013, at 08:30:59, Prakash Bisht wrote: > want to show the decode the hashed password which saved in database and want > t

Re: POST form changes to PUT

2013-05-07 Thread Jeremy Burns | Class Outfit
ting-forms that states it's a POST on create and a PUT on edit (read the second 'output'; "Since this is an edit form, a hidden input field is generated to override the default HTTP method."). Could that be what's happening in your case? Jeremy Burns Class Outfit h

Re: POST from external site

2013-05-03 Thread Jeremy Burns | Class Outfit
array( 'my_action_name' ); $this->Components->disable('Security'); That seems wrong - very wrong - but it was the only way I could stop the Security component clearing the POST. I'd be really keen to see if there is a more 'proper' solution. Jeremy Burns

Re: Bug on Manually Login with AuthComponent

2013-05-02 Thread Jeremy Burns | Class Outfit
. Might not be the answer, but I've had issues here myself before. Jeremy Burns Class Outfit http://www.classoutfit.com On 3 May 2013, at 05:56:00, lhas wrote: > Hi, people! > > I'm doing a manual login action, where i find the user based on your username > (findByUser

Re: select all HABTM records not in join table

2013-05-02 Thread Jeremy Burns | Class Outfit
Like. Jeremy Burns Class Outfit http://www.classoutfit.com On 3 May 2013, at 03:03:11, lowpass wrote: > Solved! I just tried yet another (desperate) way -- fetch the item_ids from > the join table, then all ids from main table, use array_diff() and a regular > find using the re

Re: Hidden fields in IE (cakePHP: 2.3.2)

2013-04-30 Thread Jeremy Burns | Class Outfit
What happens when you try: echo $this->Form->hidden('category', array('value' => $category)); Jeremy Burns Class Outfit http://www.classoutfit.com On 30 Apr 2013, at 11:20:59, Mario Rico wrote: > I'm having a problems with Internet explorer and hidden f

Re: Deletion Simulation

2013-04-27 Thread Jeremy Burns : Class Outfit
rious points to see what data is affected. Jeremy Burns Class Outfit http://www.classoutfit.com On 24 Apr 2013, at 12:32, godjen99 wrote: > I would recommend using Unit Tests. It will take some time to set up the data > (fixtures) and write the tests and such, but it will benefit

Re: Proper Relations Question

2013-04-13 Thread Jeremy Burns | Class Outfit
s the employees have that field. Jeremy Burns Class Outfit http://www.classoutfit.com On 13 Apr 2013, at 10:32:45, "Advantage+" wrote: > I need to properly configure this model relationship and was looking for some > insight. > > Basically : > Company hasMany Employe

Re: Cakehp Security Command Injection vulnerability

2013-04-11 Thread Jeremy Burns | Class Outfit
I recently had a CakePHP app I had built penetration tested (2.3). It failed 16 out of nearly 50,000 tests; 12 of those were server related. If you build to the conventions and use the Security component, you'll be OK. Jeremy Burns Class Outfit http://www.classoutfit.com On 11 Apr 2013,

Re: unserialize() [function.unserialize]: Error at offset 0 of 4283 bytes [CORE\Cake\Cache\Engine\FileEngine.php, line 197]

2013-04-09 Thread Jeremy Burns : Class Outfit
Clear all files (not folders) in /app/tmp/cache and try again. Jeremy Burns Class Outfit http://www.classoutfit.com On 9 Apr 2013, at 08:36, Sandip Das wrote: > Please hgelp me , i am gettinh this notice in > CakePHP 2.3.2. > > > -- > Like Us on FaceBook https://www.fa

Re: Cake Bake User -- Error: Table facebooks for model Facebook was not found in datasource default.

2013-04-08 Thread Jeremy Burns : Class Outfit
Do you have a field called facebook_id? Jeremy Burns Class Outfit http://www.classoutfit.com On 9 Apr 2013, at 01:52, Nathan Pierce wrote: > I'm really perplexed. I'm following the ACL guide :HERE and I've run into a > snag. > > SSHROOT [~/public_html]# cak

Re: Login and registration form on same page - Flash issue

2013-04-04 Thread Jeremy Burns | Class Outfit
Oh I see - I was slightly confused. You're talking about validation messages (which are properly handled in the model), not flash messages (which are properly handled by the controller). Let me think about how to do what you want... Jeremy Burns Class Outfit http://www.classoutfit.com

Re: Login and registration form on same page - Flash issue

2013-04-04 Thread Jeremy Burns | Class Outfit
ourth parameter to (e.g.) 'login-failed' or 'registration-failed'. Then you'd flash out the 'login-failed' message on the login form/element and the registration-failed message on the registration form/element. Jeremy Burns Class Outfit http://www.classoutfit

Re: Login and registration form on same page - Flash issue

2013-04-04 Thread Jeremy Burns | Class Outfit
You can set a specific key for each flash message and then flash it out where and when needed. See: http://book.cakephp.org/2.0/en/core-libraries/components/sessions.html#creating-notification-messages Jeremy Burns Class Outfit http://www.classoutfit.com On 4 Apr 2013, at 12:37:50, Nathan

Re: The request has been black-holed

2013-04-02 Thread Jeremy Burns | Class Outfit
m his site. Jeremy Burns Class Outfit http://www.classoutfit.com On 2 Apr 2013, at 16:40:59, b...@articad.cc wrote: > > So you didn't turn it off? > > So when people are browsing the site they are constantly hassled with "you > have been blackholed"?? > > On T

Re: The request has been black-holed

2013-04-02 Thread Jeremy Burns | Class Outfit
learning curve with the Security component but in the end it does what it say it will on the tin. The guide is also useful if you take the tine to read it. Jeremy Burns Class Outfit http://www.classoutfit.com On 2 Apr 2013, at 16:06:35, b...@articad.cc wrote: > > True, but should it be

Re: The request has been black-holed

2013-04-02 Thread Jeremy Burns | Class Outfit
'your_action' ) ) Setting csrfUseOnce to false means it will reuse the existing tokens, which in turn means you can refresh the page without a black hole. The unlockedActions setting is clearly more risky as it effectively disables the component for that action - but in some c

Re: missing controller exception

2013-03-10 Thread Jeremy Burns | Class Outfit
It could be a missing js or css file that is called with $this->Html->script/css, or perhaps a missing image that is called inside a css file. Jeremy Burns Class Outfit http://www.classoutfit.com On 10 Mar 2013, at 23:02:29, Devario Johnson wrote: > so you mean in one of the pare

Re: missing controller exception

2013-03-08 Thread Jeremy Burns | Class Outfit
Check the error log for missing js or css assets - I've seen this before. Jeremy Burns Class Outfit http://www.classoutfit.com On 9 Mar 2013, at 04:06:45, Devario Johnson wrote: > Thanks for the suggestion. I've never done anything in the Controller (since > it'

Re: Getting conditions Data for View

2013-03-05 Thread Jeremy Burns | Class Outfit
b->find('list'); } $this->set('jobs', $jobs); } } Jeremy Burns Class Outfit http://www.classoutfit.com On 5 Mar 2013, at 17:06:15, Jerome Walitzek wrote: > Hi there, >

Re: How to define a variable in Cakephp

2013-03-05 Thread Jeremy Burns | Class Outfit
I'm pleased it works, but I'm confused why you need this line: public $variableValue = 'Open'; Why not just do this: $this->set('variableValue', 'Open'); Jeremy Burns Class Outfit http://www.classoutfit.com On 5 Mar 2013, at 12:08:43, Victor Musvibe

Re: How to define a variable in Cakephp

2013-03-05 Thread Jeremy Burns | Class Outfit
Correction (sorry): Then in your view you can refer to $myVariableName. Jeremy Burns Class Outfit http://www.classoutfit.com On 5 Mar 2013, at 11:03:15, Jeremy Burns | Class Outfit wrote: > To pass a variable through to a view, simply do this in your controller > function: > >

Re: How to define a variable in Cakephp

2013-03-05 Thread Jeremy Burns | Class Outfit
To pass a variable through to a view, simply do this in your controller function: $this->set('myVariableName', $variableValue); Then in your view you can refer to $variableValue. Jeremy Burns Class Outfit http://www.classoutfit.com On 5 Mar 2013, at 10:59:50, Victor Musvibe

Re: How to define a variable in Cakephp

2013-03-05 Thread Jeremy Burns | Class Outfit
Some light reading for you: http://book.cakephp.org/2.0/en/index.html http://book.cakephp.org/2.0/en/tutorials-and-examples.html Jeremy Burns Class Outfit http://www.classoutfit.com On 5 Mar 2013, at 10:55:37, Victor Musvibe wrote: > I trying to pass a variable in cakephp to a view

Re: error on installation -db config file

2013-02-26 Thread Jeremy Burns | Class Outfit
It's just a wild guess, but I reckon you are missing a closing bracket on line 67 of /app/Config/database.php Jeremy Burns Class Outfit http://www.classoutfit.com On 26 Feb 2013, at 00:40:14, Osgaldor Storm wrote: > I have just set up a fresh install of Cake, When I set the db cre

Re: 3.0: a peek into CakePHP's future

2013-02-19 Thread Jeremy Burns | Class Outfit
I got turned off for years the same reason. Then I had a project that *really* needed ACL, so I piled in and learned it. Now I use it on every project. The Acl plugin makes life easier but isn't very user friendly (or robust). Jeremy Burns Class Outfit http://www.classoutfit.com On 2

Re: Model relations (optional level)

2013-02-18 Thread Jeremy Burns | Class Outfit
How about setting up the companies table as a tree, where subsidiaries are beneath their company in the tree. Then a user can simply acquire the 'company_id' which could be either a company or a subsidiary. Jeremy Burns Class Outfit http://www.classoutfit.com On 18 Feb 2013, at 19:4

  1   2   3   4   5   6   7   8   9   10   >