Re: [URGENT] Acl::check() is not working

2012-11-13 Thread polutan
No, that's not what i mean. Administrator can choose a group from a list group, then click List Access . After clicking List Access button, will open List Access Rights Page. Ahh hard to say :( i think nobody will understand :( aaarrrgghhh.. 2012/11/13 lowpass zijn.digi...@gmail.com This

Re: How to set mapResources for all controllers?

2012-11-13 Thread derwu22
Anyone? W dniu poniedziałek, 12 listopada 2012 18:41:05 UTC+1 użytkownik derwu22 napisał: *Router::mapResources(Array('groups','examTypes','...'));* I know that I can manually set array of controllers name, but how I can set it automatically? -- Like Us on FaceBook

Parsed url / Redirect - base issue

2012-11-13 Thread Vanja Dizdarević
I have an 2.1.1 app under a sub-path (example.com/*app-name*/). I am doing a redirect like this: $url = Router::url(array('controller' = 'user', 'action' = 'view', 5)); //yields /*app-name*/user/view/5 $this-redirect($url); Redirects to '/*app-name*/*app-name*/user/view/5'. Essentially

Re: how to put a check for time difference in a cakephp controller

2012-11-13 Thread Vanja Dizdarević
Nice idea, database sessions. I would have never thought of that... :D I would have just recorded the last login time in the users table. Than do the same hourly cronjob as suggested (shell script checks which users have logged in between 24 and 25 hours ago). Just another possible idea... On

My Model Relationships don't work

2012-11-13 Thread Tsampika
I have three models: Category, Post, Attachment My Relations in these Models are: 1. Category hasMany Post hasMany Attachment 2. Post hasMany Attachment 3. Category hasMany Attachment My attachments table has the following fields: id, title, foreign_key, model The field model contains Category

Re: Parsed url / Redirect - base issue

2012-11-13 Thread lowpass
On Tue, Nov 13, 2012 at 9:21 AM, Vanja Dizdarević lex.non.scri...@gmail.com wrote: I have an 2.1.1 app under a sub-path (example.com/app-name/). I am doing a redirect like this: $url = Router::url(array('controller' = 'user', 'action' = 'view', 5)); //yields /app-name/user/view/5

Re: How to set mapResources for all controllers?

2012-11-13 Thread lowpass
What do you mean by automatically? Like in a config file? On Tue, Nov 13, 2012 at 9:06 AM, derwu22 derw...@gmail.com wrote: Anyone? W dniu poniedziałek, 12 listopada 2012 18:41:05 UTC+1 użytkownik derwu22 napisał: Router::mapResources(Array('groups','examTypes','...')); I know that I can

Re: My Model Relationships don't work

2012-11-13 Thread lowpass
On Tue, Nov 13, 2012 at 10:43 AM, Tsampika bettina.oberrau...@gmail.com wrote: I have three models: Category, Post, Attachment My Relations in these Models are: 1. Category hasMany Post hasMany Attachment 2. Post hasMany Attachment 3. Category hasMany Attachment My attachments table has

Re: Parsed url / Redirect - base issue

2012-11-13 Thread Vanja Dizdarević
Yes, the array'ed redirects work properly. The thing is that redirect() obivously expects a APP RELATIVE path (if a string is given). But I have no way to generate an app-relative url string (without a base). At least as far as I know... :D This is the current patch: $return =

nginx and CakePHP

2012-11-13 Thread Dave Maharaj
I I finally have the site configured to run on nginx but I am getting a weird error on forms. Anytime the same form is submitted back to back. For example if I go to login and purposely enter wrong password I end up back to login invalid user / pass as it should but try to login again I get error

How to use KoolPHP with CakePHP

2012-11-13 Thread Russell Brown
Anyone have good documentation or examples about how to use the KoolPHP controls with CakePHP 2.X? I have figured some very minor things out: 1) How to load in Controller: App::import('Vendor', 'KoolControls/KoolGrid/koolgrid'); $Koolgrid = new koolgrid($_il6n); 2) Copy KoolControls folder

Re: How to use KoolPHP with CakePHP

2012-11-13 Thread Greg Skerman
I've not used KoolPHP or KoolGrid - however: 1) The grid itself (and rendering thereof) is probably best suited to living in a view, not a controller. The controller manages application flow and business logic, not presentation. 2) Yes, its a vendor thing, it belongs in the Vendor folder (the PHP

Yet another Call to a member function find on a non-object error

2012-11-13 Thread Andrew Johnston
I know this post gets written every couple of months, and I swear that I've read through all of the back posts, yet can't find a solution that works. Whenever I try to call related data from one of my models, I get the above error. Below is the relationship code for each model. class Slide

ask cake bake on ubuntu 12.04

2012-11-13 Thread ecko usil
Hi all, I have some issue with cake bake in ubuntu, when I use windows cake bake all running well but not in my ubuntu. I don't know why. When run *cake bake all* from terminal its just creating a *model*. Welcome to CakePHP v2.2.3 Console

Filter Records on Distant Association

2012-11-13 Thread double07
Hi All, So I'm a bit stuck on the above and I keep getting an sql server error. Yes I'm using mssql server :| - not my database. A little background, my relationships concerned look like this: AssetMaintenanceRecord-(belongs to)-Asset-(belongs to)-Project-(has one)-ProjectManager (note

Re: Yet another Call to a member function find on a non-object error

2012-11-13 Thread bs28723
I don't think you provided enough info for anyone to help you. Please provide the function and point out the line that is getting the error. Thanks, Bill Stoltz On Nov 13, 2012, at 10:31 PM, Andrew Johnston [via CakePHP] ml-node+s1045679n571225...@n5.nabble.com wrote: I know this post gets

Interesting problem with pagination

2012-11-13 Thread char
Hi all, I've got a problem which I hope is interesting to everyone. Got a generic table, in which each item has an image and an attribute that says wether the orientation is portriat or landscape. id int(10) unsigned NOT NULL namevarchar(255) NULL image varchar(255) NULL image_portrait

A somewhat interesting pagination problem

2012-11-13 Thread char
Hi all, I've got a problem which I hope is interesting to everyone. Got a generic table, in which each item has an image and an attribute that says wether the orientation is portriat or landscape. id int(10) unsigned NOT NULL namevarchar(255) NULL image varchar(255) NULL image_portrait

Re: delete image file in server from controller

2012-11-13 Thread Chris
thank you for your reply Ma.Jerle this is what I got,... in case anyone wonder,... I took delete images from server to a Model Group when the Group is deleted,... function getOriginalFile($id, $secret, $create = null, $chmod = null) { return new File(WWW_ROOT . 'group-banners' . DS .

Re: delete image file in server from controller

2012-11-13 Thread Chris
thank you bs28723,... it solved,... check the reply on this post,... On Monday, November 12, 2012 7:19:44 AM UTC-8, bs28723 wrote: You did not specify which line is getting the error. I am guessing one of the File lines Have you tried... $file = new File(WWW_ROOT

Re: Yet another Call to a member function find on a non-object error

2012-11-13 Thread Reuben
At a guess, it's the usage of the model name in the hasMany OModule order directive. Since the User has many OModule, then the order should also reference OModule, rather than the class Module. But a stack trace might help. On Wednesday, 14 November 2012 13:20:11 UTC+10, Andrew Johnston