Re: What do you develop in (ide, text editor, etc.)?

2009-04-14 Thread Baz L

TextMate when at home...
Notepad++ (Portable) when on the road.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: View Caching with AuthComponent

2008-07-16 Thread Baz L

Simplest solution is to not cache pages that need authentication.

On Jul 14, 5:46 pm, the_woodsman [EMAIL PROTECTED] wrote:
 I know that in the cookbook there's some info on marking particular
 sections of a view as  cake:nocache or something similar, and
 similarly you coud just set the action as not cached in the Users
 controller.
 Could those be helpful?

 On Jul 14, 9:32 pm, tdyer [EMAIL PROTECTED] wrote:

  Hi,

  I am trying to use CakePHP 1.2rc2 with the Auth Component and View
  caching. I have noticed that if i do not have the view cached
  everything works as normal and a user that is not logged in will get
  redirected to /users/login but if there is a view cached then the
  cached view gets presented and authorization is not performed.

  Any ideas on whether this is a feature or if I have broken something?

  Thanks

  Tristan
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $this-Auth-user not refreshing after edit

2008-07-16 Thread Baz L

I would avoid writing directly to the Auth's session.

Again, this is generally how Authentication systems work. User
information used by the application is stored in memory (session in
this case). You could force a logout, but I think that you're users
will find this more annoying to be logged out when they change their
profile.

BTW, what 'critical' data could you possibly need in the User session?
If you're displaying stuff on the website, why don't you read the
user_id from Auth and then the rest of the data from the actual table,
if it's critical? If it's critical, read it yourself.

Also, the solutions above will only help you with a user editing their
own profile. This won't help with you scenario of changing user roles.
How is the application expected to log everyone off? You only
possibility is if you use database sessions, then I assume you'd be
able to clear those out in an afterSave() or something like that.

So here's my question to you, what happens when you change your
permissions?
You change the locks when someone is in the house, your change will
only take effect after they leave.

On Jul 14, 11:02 am, RichardAtHome [EMAIL PROTECTED] wrote:
 Back again...

 Added the following to the save block of my edit function:

 $this-Session-write(Auth, $this-data);

 ($this-data is provided by the User edit form)

 Which fixed the problem but with a minor issue (which I can live with
 for now).

 On Jul 14, 2:57 pm, RichardAtHome [EMAIL PROTECTED] wrote:

  Thanks for the feedback everyone. I'll give it a try today and post
  back my results :-)

  On Jul 14, 1:33 pm, Jonathan Snook [EMAIL PROTECTED] wrote:

 Anyone know how to refresh the user record? Is it simply a case of
 setting the Auth Session User var?

   Looking at the Auth source, it populates the key 'Auth.' .
   $this-userModel, or Auth.User by default. You may want to try just
   doing $this-Auth-login() again from the edit page (be sure to pass
   it the username and (hashed?) password).

   -js
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Auth + Custom Login + isAuthorized = Infinite Redirect Loop

2008-07-16 Thread Baz L

Nevermind everyone. I was being an idiot. My loginRedirect was to a
place that required authorization. As soon as I changed it some a
general controller and action that ALL loggged in users had access to,
I was fine.


On Jun 18, 8:46 am, Baz L [EMAIL PROTECTED] wrote:
 I believe I'm having a similar problem as 
 :http://groups.google.com/group/cake-php/browse_thread/thread/6d672c98...

 I'm using controller authorization, so there is a isAuthorized() in my
 app_controller.php which goes off of a simple $this-Auth-

 user('role').

 I'm pretty much working off of the examples in the Cook 
 Book:http://book.cakephp.org/view/172/authentication

 I have the same login() function.

 This is what I've noticed.
 After isAuthorized returns false (user logs in, but is not authorized)
 I get redirected to:
 $controller-redirect($this-noaccessRedirect, null, true);  (from
 Auth::isAuthorized() )
 This sends me back to my login page (which is fine), however (and I'm
 assuming here) Auth::startup gets called again, thus
 Auth::isAuthorized() gets called again, and the whole thing starts
 over and over again.

 If I clear out the UsersController::login(), then every thing works
 fine.

 Can someone with more experiece help me out, or do I submit a ticket.

 Any help would be appreciated.
 --
 Baz L
 Web Development 2.0http://WebDevelopment2.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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



CakePHP User Management/Auth Plugin - Define functions for AppController with code OUTSIDE the file.

2008-07-16 Thread Baz L

I'll cut to the chase:
http://code.google.com/p/cakeusermanagement/

I couldn't get CakePHP's built in ACL to work in a simple to
understand manner. Actually, I couldn't get it to work at all. So I
built upon this:
http://www.studiocanaria.com/articles/cakephp_auth_component_users_groups_permissions_revisited
And tried to stick it in a plugin so that anyone can drop in and use
(and also importantly, update to a later revision).

Features: User Management, User Profile Editing, Changing Passwords
(confirms duplicate passwords), User Registration, Forget/Reset
Password, User Groups (HABTM), User Permissions (handled through
Groups), and some other stuff.

Here's where I'm stuck:
I need to define some functions in the main AppController class. Since
this is a plug in I'm trying to maintain as much of the code in the
actual plugin folder that I can.

So my question is, how do I define functions in /app/
app_controller.php with code from /app/plugins/user/somefile.php.

Currently, I've been reduced to something like this:

function beforeRender() {

require(APP.'plugins'.DS.'user'.DS.'app_controller'.DS.'before_render.php');
}

function isAuthorized(){
return
require(APP.'plugins'.DS.'user'.DS.'app_controller'.DS.'is_authorized.php');;
}

function __permitted($controllerName,$actionName){
return
require(APP.'plugins'.DS.'user'.DS.'app_controller'.DS.'__permitted.php');;
}

Any brighter ideas?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Auth + Custom Login + isAuthorized = Infinite Redirect Loop

2008-06-18 Thread Baz L

I believe I'm having a similar problem as :
http://groups.google.com/group/cake-php/browse_thread/thread/6d672c98ae0557d5/c07ecd162209eab7

I'm using controller authorization, so there is a isAuthorized() in my
app_controller.php which goes off of a simple $this-Auth-
user('role').

I'm pretty much working off of the examples in the Cook Book:
http://book.cakephp.org/view/172/authentication

I have the same login() function.

This is what I've noticed.
After isAuthorized returns false (user logs in, but is not authorized)
I get redirected to:
$controller-redirect($this-noaccessRedirect, null, true);  (from
Auth::isAuthorized() )
This sends me back to my login page (which is fine), however (and I'm
assuming here) Auth::startup gets called again, thus
Auth::isAuthorized() gets called again, and the whole thing starts
over and over again.

If I clear out the UsersController::login(), then every thing works
fine.

Can someone with more experiece help me out, or do I submit a ticket.

Any help would be appreciated.
--
Baz L
Web Development 2.0
http://WebDevelopment2.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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SaveField creates a new blank row

2008-04-08 Thread Baz L

I don't get itWhat does the URL have to do with saveField?

How are you populating that $idItem variable? That right there would
be your problem.

This is not definitely a CakePHP bug unless you can provide more
information.

Why are we using saveField() in a viewItem anyway? But I digress, your
issue is with how you set the ID, it has nothing to do with
saveField() (unless you can prove otherwise)...

I know you fixed it, but you really need to find the deeper issue
here or something like this is going to come back and bite you in the
but.


FYI
I've duplicated what you have here, which is a read of a model via the
ID on the URL and called saveField() and it works fine, without any
need for a trailing slash.

On Apr 8, 8:24 am, VisionIzoizo [EMAIL PROTECTED] wrote:
 Hi, thanks for replying:

 I did write the code just the way you did before, but I had the same
 bug. Actually, the view is rendered perfectly, the way I wrote my code
 is not the problem. Don't mind about the code, I found a weird
 solution, and it's definitely a CakePhp bug. I found a guy that had
 the same problem, it seems to happen in Firefox, though I'm not 100%
 sure about this. This is the Google cached page: (The original link
 seems to be broken)

 http://64.233.167.104/search?q=cache:USFkqlLTlAYJ:nathan.ashleafmedia...

 You see, I used to call my action with the classical 'items/viewItem/
 idItem', but in this case, cake or mySQL seem to freak out and execute
 random DB saves. I 'solved' the problem just by calling my action with
 this link:

 'items/viewItem/idItem/'

 That's it, that's all it took to fix the bug, though I really don't
 like it, I don't trust hacks.

 Anyways, thanks a lot for replying.

 On Apr 7, 1:50 pm, Baz [EMAIL PROTECTED] wrote:

  I've seen people do this and I've never understood it How are we setting
  Item-id THEN reading???

  What I've always done is:

  $this-Item-recursive = 0;
  $itemViewed = $this-Item-read(null, $idItem;);
  $updatedViews = $itemViewed['Item']['views'] + 1;
  // Why do we need this if we're using saveField?
  // $itemViewed['Item']['views'] = $updatedViews;
  $itemViewed['Item']['views']++;
  $this-Item-saveField(views $updatedViews);
  $this-set('item', $itemViewed);

  On Mon, Apr 7, 2008 at 8:41 AM, VisionIzoizo [EMAIL PROTECTED]
  wrote:

   Hi, I've got a problem here, and it's driving me nuts!

   Everytime I run this code, a blank row is created in the 'items' DB
   table. The 'items' id field is set to auto_increment. And there are
   also some validation rules set in the model, but in this case, they
   won't work:

  $this-Item-recursive = 0;
  $this-Item-id = $idItem;
  $itemViewed = $this-Item-read();
  $updatedViews = $itemViewed['Item']['views'] + 1;
  $itemViewed['Item']['views'] = $updatedViews;
  $this-Item-saveField(views, $updatedViews);
  $this-set('item', $itemViewed);

   Please, someone help me, it's a very strange issue.
--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Email::send() in a loop. (1.2.x.x)

2008-04-08 Thread Baz L

In the interim I guess you can just set your body manually in the
loop.

On Apr 8, 1:05 am, CDMoyer [EMAIL PROTECTED] wrote:
  Now I'm confusedCDMoyer, you posted the link to the ticket, but did you
  read it?

  One reply says you need to reset(), the other reply says that the header
  problem was fixed 6 months ago...

 Right, this is not the header issue, and just like in the bug I
 linked, reset() is not the ideal solution. (that bug was closed with
 Email-reset() and them opened and fixed as requested) reset() would
 reset all the fields, whereas my application only changes the to:
 field and callssend.

 If that's not a supported use, that's fine, it just seems like a
 pretty common scenario

  Has everybody forgotten how to search?

 Wow, I actually did search, I swear.  Firefox autocompletes the search
 form up above:Emailbody duplicateEmailsend() duplicateEmailsend()emailbody 
 double

 I fail. ;)
--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



View this page Cake Apps/Sites In The Wild

2008-03-09 Thread Baz L

Added: http://www.3HNDesigns.com

Click on http://groups.google.com/group/cake-php/web/cake-apps-sites-in-the-wild
- or copy  paste it into your browser's address bar if that doesn't
work.
--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Inner Join on hasMany

2008-02-22 Thread Baz L

For some reason, I don't see the responses to this in the group. They
are in my email, but not the group. For the benefit all everyone I'm
gonna paste these in. Please note I'm not the author of everything:

grigri to Cake

The easiest way to simulate an INNER join from a LEFT is to impose a
not-null condition on the PK of the joined field.

Assuming you're using the bindable behavior to add a left join, your
SQL will look like this:

SELECT [...] FROM `requests` AS `Request` LEFT JOIN `dates` AS `Date`
ON (...) WHERE (...)

you need to add an external condition (not inside the ON ()), so the
sql is like this

SELECT [...] FROM `requests` AS `Request` LEFT JOIN `dates` AS `Date`
ON (...) WHERE (`Date`.`id` IS NOT NULL AND (...))

You can add that through the $conditions parameter of the find method,
should be simple enough.

On Feb 7, 6:03 am, Baz L [EMAIL PROTECTED] wrote:
 Any ideas anyone?
 --
 Baz L
 Web Development 2.0: Web Design, CakePHP, 
 Javascripthttp://www.WebDevelopment2.com/

Dardo Sordi Bogado to cake-php

http://groups.google.com/group/cake-php/browse_thread/thread/9f092441185a5b72/f32a7b86bc9ec5d1?lnk=gstq=%22inner+join%22#f32a7b86bc9ec5d1[[BR
- Hide quoted text -

AD7six to Cake

On Feb 7, 2:44 pm, Baz [EMAIL PROTECTED] wrote:
 Hey AD7six,

 This sounds promising, but I'm unsure how to implement in my case.

1. What would I use as the 'join table' since I have a Has Many and a
Belongs To?

 ThanX in advance.

$this-bindModel(array('hasOne' = 'Dummy' = array('className' =
'Date')));
$conditions = array('Dummy.date_start' = ' ' . $start);
$recursive = 1;
$results = $this-find('all', compact('conditions', 'recursive')); //
find all requests with at least one Date that starts in the future.

Or similar.

JP Mortiboys to me

Sure thing.

The main difference between a left join and an inner join is that an
inner join requires both records to exist whereas a left join only
requires that the left (first specified) record exists. You can
simulate an inner join by performing a left join and requiring that
the right record exists.

Any conditions you set inside the association variable will be set in
the ON(...) part of the select query. This will not influence whether
or not a record is joined, only how it is joined, so it's useless for
this purpose.

If you impose a condition on the outer part of the findAll, it is
obeyed for every record fetched. So if you specify that the PK
(primary key) of the joined table must exist, then it will effectively
be an inner join.

$this-Request-bindModel(array('hasOne' = array(
  'Date' = array('conditions' = array('Date.date' = '
2008-02-07'))
));
$this-Request-findAll();

This will generate the following SQL:

SELECT [...] FROM `requests` AS `Request` LEFT JOIN `dates` AS `Date`
ON(`Date`.`request_id`=`Request`.`id` AND `Date`.`date` 
'2008-02-07')

As you can see, the date condition you put in the binding is inside
the ON() clause, so the left join really is a left join, and the SQL
will return all requests, with a joined date that is in the future, if
it exists, and null otherwise.

To force the inner join, add a condition to the actual find call:

$this-Request-findAll('Date.id IS NOT NULL');

Of course, you could just put the date condition in the findAll
directly:

$this-Request-bindModel(array('hasOne' = array('Date')));
$this-Request-findAll(array('Date.date' = ' 2008-02-07'));

Which will effectively do the same thing. Personally though, I prefer
the first method - it's more clear cut.

Hope this clears things up, if not, let me know and I'll see if I can
explain it a bit better.
grigri

Baz wrote:




Baz to JP

show details Feb 7


Reply


JP Mortiboys: YOU'RE A GENIUS!

Although I discovered how to do custom pagination yesterday, it seemed
like overkill for this problem. ThanX.

more minor caveat with my specific example: I use the bindable
behavior, so I needed to restrict to model to not include the hasMany
date, then do a manual bind for the hasOne, THEN pass reset as false,
since I was using paginate.

ThanX all.
--
Baz L
--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Saving Date and Time NOT in the Model/Database (cleanUpFields not working)

2008-02-06 Thread Baz L

There 'work around' doesn't exactly work:

I'd have to override schema() in my model to add the fields. Then I
could manually call deconstruct().

However, overriding schema will be done for ALL of the model's
functions. I would then get problems when performing find('all'), etc.

On Jan 13, 2:00 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Try:

 $property_formatted_date_string = $this-Model-deconstruct($this-

 data['Model']['datefield']);

 When you're saving data, it seems to work fine without calling
 Model::deconstruct, but if you're doing 'custom' date fields (e.g.,
 searching records in a database) it appears that you need to
 deconstruct it yourself. When I updated from pre-beta to beta I ran
 into this problem.

 - B. D.

 On Dec 11 2007, 2:04 pm, Baz [EMAIL PROTECTED] wrote:

  It says it was replaced by: Model::deconstruct()

  But the functionality is different. Doing a direct call didn't work for me.

  Even if it did, there's another issue with the latest version not saving
  dates and times to the database. I think I'll just hold up on the SVN for
  now. At least until they update the API.

  On Dec 11, 2007 9:33 AM, Gwoo [EMAIL PROTECTED] wrote:

   What does it saycleanUpFields() was replaced by? Maybe you could use
   that
--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Inner Join on hasMany

2008-02-06 Thread Baz L

Any ideas anyone?
--
Baz L
Web Development 2.0: Web Design, CakePHP, Javascript
http://www.WebDevelopment2.com/

On Dec 10 2007, 2:55 pm, Baz [EMAIL PROTECTED] wrote:
 Hey guys...this is what I'm trying to accomplish:

 I got a model (Request). Each request hasMany Dates.

 I'm doing a simple find on the Request, but I ONLY want to return those
 requests that have a certain date range.

 I'm been able to using the excellent Bindable behavior to set the condition
 on the Date.

 But, it always brings back ALL the requests.

 After, I'm having to loop through the array and remove requests where the
 ...['Request']['Date'] array is empty. Beside the fact that this is
 extremely sloppy (sorry had a deadline - this is just a demo anyway), it's
 messing up the numbering on my paginator.

 Any ideas on how to do this simply?
 Someone once mentioned adding 'type' = 'INNER' to the association, but that
 didn't work (also didn't find code to support it).

 Any ideas? ThanX in advance.

 BTW: Using Cake 1.2 Nightly (12-08-07)
 --
 Baz L
 Web Development 2.0http://WebDevelopment2.com/
--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to INNER Join in Model ?

2007-12-05 Thread Baz L

I ran into a need for this today.

In the interest of time, I just trim the array I get back after the
fact, however...is there someway to do this?
--
Baz L
Web Development 2.0
http://WebDevelopment2.com/

On Dec 1, 1:30 pm, foxmask [EMAIL PROTECTED] wrote:
 gooed evening
 any idea aboutinner join?

 On Nov 29, 12:39 pm, foxmask [EMAIL PROTECTED] wrote:

  Hi i'd like to know what i need to do and in what model, to be able to
  use this SQL query

  SELECT t.id, t.subject FROM topics AS tINNER JOINforums AS f ON
  f.id=t.forum_id LEFT JOIN forum_perms AS fp ON (fp.forum_id=f.id AND
  fp.group_id='xxx') WHERE (fp.read_forum IS NULL OR fp.read_forum=1)
  AND t.moved_to IS NULL  ORDER BY t.last_post DESC LIMIT 10

  actually this SQL Query :
  SELECT `Post`.`id`, `Post`.`poster`, `Post`.`poster_id`,
  `Post`.`poster_ip`, `Post`.`poster_email`, `Post`.`message`,
  `Post`.`hide_smilies`, `Post`.`posted`, `Post`.`edited`,
  `Post`.`edited_by`, `Post`.`topic_id`, `Topic`.`id`, `Topic`.`poster`,
  `Topic`.`subject`, `Topic`.`posted`, `Topic`.`last_post`,
  `Topic`.`last_post_id`, `Topic`.`last_poster`, `Topic`.`num_views`,
  `Topic`.`num_replies`, `Topic`.`closed`, `Topic`.`sticky`,
  `Topic`.`moved_to`, `Topic`.`forum_id` FROM `posts` AS `Post` LEFT
  JOIN `topics` AS `Topic` ON (`Post`.`topic_id` = `Topic`.`id`) WHERE 1
  = 1 ORDER BY `last_post` desc LIMIT 10

  is produce when i do in my element :

  $pt_active_topics = $this-requestAction('posts/index/sort:last_post/
  direction:desc/limit:10');

  here are my models :

  ?php
  class Post extends AppModel {

  var $name = 'Post';

  //The Associations below have been created with all possible keys,
  those that are not needed can be removed
  var $belongsTo = array(
  'Topic' = array('className' = 'Topic',
  
  'foreignKey' = 'topic_id',
  
  'conditions' = '',
  'fields' = 
  '',
  'order' = 
  '',
  
  'counterCache' = ''),
  );

  }

  ?php
  class Topic extends AppModel {

  var $name = 'Topic';

  //The Associations below have been created with all possible keys,
  those that are not needed can be removed
  var $belongsTo = array(
  'Forum' = array('className' = 'Forum',
  
  'foreignKey' = 'forum_id',
  
  'conditions' = '',
  'fields' = 
  '',
  'order' = 
  '',
  
  'counterCache' = ''),
  );

  var $hasMany = array(
  'Post' = array('className' = 'Post',
  
  'foreignKey' = 'topic_id',
  
  'conditions' = '',
  'fields' = 
  '',
  'order' = 
  '',
  'dependent' 
  = ''),
  );

  }

  ?php
  class Forum extends AppModel {

  var $name = 'Forum';

  //The Associations below have been created with all possible keys,
  those that are not needed can be removed
  var $hasMany = array(
  'ForumPerm' = array('className' = 'ForumPerm',
  
  'foreignKey' = 'forum_id',
  
  'conditions' = '',
  'fields' = 
  '',
  'order' = 
  '',
  'limit' = 
  '',
  'offset' = 
  '',
  'dependent' 
  = '',
  'exclusive' 
  = '',
  
  'finderQuery' = '',
  
  'counterQuery' = ''),
  'Topic' = array('className' = 'Topic',
  
  'foreignKey' = 'forum_id

does $cakeDebug work?

2007-09-01 Thread Baz L

Since this has been ignored for a while, I guess a lot of people don't
really care for it much, but I do. I noticed that when I went to cake
1.2 it just died.

Here's how I fixed it:

Opened this file: cake\libs\view\templates\elements\dump.ctp

changed:
?php print_r($this-controller); ?

to

?php print_r($this); ?



Opened this file: cake\libs\view\view.php

changed:
if (Configure::read()  2  $this-controller != null) {

to

if (Configure::read()  2  $this != null) {


I guess from cake 1.2 we no longer populate $this-controller?

Could one of the developers confirm this so that (if it's correct) we
can get it into the next version?

Thanks:
--
Baz L
Web Development 2.0: Web Design, CakePHP, Javascript
http://www.WebDevelopment2.com/


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Need: CakePHP Contact Form Need Please

2007-07-27 Thread Baz L

I'm really having problems here.

I'm guessing someone has already developed something like this.

I looked at this in the bakery:
http://bakery.cakephp.org/articles/view/sending-email-with-phpmailer

But it seems a bit incomplete.

I started with Cake about a month ago. Anyway, anyone who can offer
some help, I'd greatly appreciate it:

--
Baz L
Day In The Life of Baz
http://www.LifeOfBaz.com


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Show a Page without a Model in cakePHP

2007-07-06 Thread Baz L

I have the same question, except that I can't use the uses var. I
actually do have a pages in my database.

I just want to change:
a.com/pages/home
to
a.com/home

without defining tons of different routes.

On Jun 8, 10:57 am, MarsDev [EMAIL PROTECTED] wrote:
 Thanks all.

 JP (Quanack)  and Samuel said it all. Just set the $uses class
 variable to NULL in correspondingmodelcode.
 That's all I need.

 I appreciate all your comments.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---