Media plugin: user model won't validate if the media file is not submitted

2010-04-20 Thread Nasko
failing to configure something so that new records do not depend on the file being uploaded? Thanks in advance! Greetings, Nasko Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed

Re: Media plugin: user model won't validate if the media file is not submitted

2010-04-20 Thread Nasko
After more thorough debugging, I've come to the conclusion that the above IF test - if (!isset($Model-data[$Model-alias]['file'])) is true, because in plugins/media/models/behaviors/transfer.php:213 there are these lines: if (TransferValidation::blank($file)) {

Re: Parameters ignored in paginator links

2008-04-05 Thread Nasko
Have you read the Frequent discussions page: http://groups.google.com/group/cake-php/web/frequent-discussions?hl=en There are a bunch of useful links to articles regarding various problems experienced repeatedly - your case is one of them. Scroll down to 'How to retain search param in paging?',

Re: Problems sorting by multiple foreign models using the same DB field

2008-03-03 Thread Nasko
'Sender.username': $sender_options['class'] = $sortDir; break; case 'Recipient.username': $recipient_options['class'] = $sortDir; break; } } } On Feb 29, 11:31 am, Nasko [EMAIL PROTECTED] wrote: Anyone? I

Re: Help needed with filtering by (multiple) a HABTM model(s)

2008-02-11 Thread Nasko
grigri, I've upgraded my CakePHP core to current beta: rev. 6311 and can verify that what you suggested works just fine! AD7six, grigri, thank you both for your help! On Feb 11, 2:24 pm, grigri [EMAIL PROTECTED] wrote: What version are you using? I just did a quick test using my playground

Re: Help needed with filtering by (multiple) a HABTM model(s)

2008-02-11 Thread Nasko
I'm using rev. 5693. Didn't want to upgrade whenever a newer revision appeared in the branch, and when the pre-beta was released we were close to finishing the project - I didn't want to take the risk of missing deadlines by fixing backward inconsistencies, etc. Your example produced identical

Re: Help needed with filtering by (multiple) a HABTM model(s)

2008-02-11 Thread Nasko
Andy, thank you for your input! Okay now I feel like a total **rk for asking something that has been a) explained so well in a discussion and b) stuck in the frequent discussion page :) The thing is I've actually read that specific discussion (plus a bunch of other threads/articles), but because

Re: Help needed with filtering by (multiple) a HABTM model(s)

2008-02-11 Thread Nasko
grigri, I tried this an got this SQL query: SELECT Array, 1, COUNT(DISTINCT User.id) AS count, `User`., `User`.`id` FROM `users` AS `User` LEFT JOIN `groups` AS `Group` ON (`User`.`group_id` = `Group`.`id`) LEFT JOIN `genders` AS `Gender` ON (`User`.`gender_id` = `Gender`.`id`) LEFT JOIN

Help needed with filtering by (multiple) a HABTM model(s)

2008-02-10 Thread Nasko
, 'CategoryPost.category_id' = $cat2_id, 'PostTag.tag_id' = $tag_id, ); I'd be extremely thankful for any hints on the right solution to these issues! Regards, Nasko --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Pagination

2008-01-22 Thread Nasko
/projects/noswad and download the 1.1 Pagination demos package. There are alternative controllers/views bundled for different use scenarios in it. This has been a tremendous source of help for me, so I think you should be able to borrow an idea from them. Greetings, Nasko On 22 Ян, 11:18, bhushan

Re: Problems modeling User - Friend HABTM associations

2007-11-27 Thread Nasko
nate, Sam D: thank you for your replies! could be this one http://othy.wordpress.com/2006/06/03/unbind-all-associations-except-s... Sam D Yes, I'm using Oth's method mainly in an effort to optimize my applications as a last phase - to remove unnecessary DB queries. I didn't feel it was worth

Re: Problems modeling User - Friend HABTM associations

2007-11-26 Thread Nasko
Could anyone help me out with this one? I'm really stuck :-( --~--~-~--~~~---~--~~ 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

Re: Problems modeling User - Friend HABTM associations

2007-11-22 Thread Nasko
Sorry, I forgot to specify: I'm using CakePHP 1.2 rev. 5693 from the branches. --~--~-~--~~~---~--~~ 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

Problems modeling User - Friend HABTM associations

2007-11-22 Thread Nasko
23:46:20 ) [Friend] = Array ( [id] = 1 [group_id] = 2 [email] = [EMAIL PROTECTED] [username] = nasko [password] = 6a496d870428fbe5fbf6ce086ed6a96e

Re: Admin routing in combination with OthAuth

2007-06-26 Thread Nasko
identified (remember that long cookie lifetime?) they would be redirected to /admin/texts/index instead per my '/admin' route above. HTH, Nasko On Jun 26, 1:54 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I've got the following code in routes.php: $Route-connect('/admin', array('controller' = 'users

Re: Admin routing in combination with OthAuth

2007-06-26 Thread Nasko
othAuth documentation. It's all in there :) Regards, Nasko --~--~-~--~~~---~--~~ 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

Re: Check for value in findAllBy... function?

2007-06-25 Thread Nasko
So your answer is the same as mine. Well, you could have used 3 or 4 intermediate variables along the way and that piece of code would still have worked. This doesn't make my answer the same as yours. You can't use these variables directly in the controllers. Why not?

Re: Which editor you use for views ?

2007-06-21 Thread Nasko
VIM + PHP syntax highlighting Bufexplorer NERD_tree Taglist CTags w/ custom tag definitions to catch //TODO, //FIXME, etc. This gives me pretty much the same experience that I've had using ZDE. I only switch occasionally to ZDE when I need some deep debugging for I haven't been able to get VIM

Re: HABTM gives me problems with conditional queries.

2007-06-21 Thread Nasko
into this matter, so hopefully this will get you going. I'm copy/pasting this from my working copy so it is working :-) Credits go to Andy, Jon and the rest of the guys who keep on answering questions and making learning Cake a pleasant experience. Regards, Nasko

Re: HABTM gives me problems with conditional queries.

2007-06-21 Thread Nasko
Chris, we've cross-posted :) I'd go with Adam's suggestion of creating a method in your models to do the binding for you when you need it, and also don't set recursive so high and I think that should prevent the duplicate records coming back. yes, I just did that. I've set recursive = 2,

Re: HABTM gives me problems with conditional queries.

2007-06-21 Thread Nasko
On Jun 21, 6:06 pm, Nasko [EMAIL PROTECTED] wrote: Unfortunately, defining the fake model association in the Bookmarks model caused the normal $this-Bookmark-findAll() requests in other actions to return multiple records for each bookmark :( As advised by AD7six on IRC I've reworked

Re: Image gallery - add multiple entries for a model

2007-06-15 Thread Nasko
for me, so I used a non-admin action for this - Image::upload() I didn't have similar issues with the ajax request made for rotating the images. On Jun 2, 9:10 am, Nasko [EMAIL PROTECTED] wrote: @all: Thanks guys, I'll let you know how I tackled

Re: Image gallery - add multiple entries for a model

2007-06-02 Thread Nasko
On Jun 1, 7:07 pm, Joshua McFarren [EMAIL PROTECTED] wrote: Don't mean to hijack the thread but could you post some links to the gallery tutorials you found? This would be really helpful to me and probably others. Sure:

Re: Image gallery - add multiple entries for a model

2007-06-02 Thread Nasko
@all: Thanks guys, I'll let you know how I tackled this :-) --~--~-~--~~~---~--~~ 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