Re: How to add a read button to a view.ctp?

2011-12-09 Thread euromark
@daniel using cake2 you should distance yourself from GET requests changing the DB it always was a bad idea to do so in the first place use Form-postLink() instead On 9 Dez., 00:28, Daniel danwgr...@gmail.com wrote: I used an action: li?php echo $this-Html-link(__('Mark as read', true),

Re: Can a plugin component auto-load a helper

2011-12-09 Thread euromark
you should always mention the current cakephp version I am assuming however that you use 1.3 (due to App::import) yes, you can. quite easily as a matter of fact. inside your component, all you have to do: $this-controller-helpers[] = 'MyPluginName.MyHelperName'; or $controller-helpers[] =

request says put instead of post

2011-12-08 Thread euromark
For 2.0 I just changed all if (!empty($this-data)) to if ($this-request-is('post')) But now it haunts be. In FF8 Cakephp $this-request does say false after a normal post (whereas firebug itself says it is a post) but is('put') returns true Same with every other browser it seems. so it never

Re: request says put instead of post

2011-12-08 Thread euromark
-is('post') in Google Chrome (latest): true Firefox (latest): true IE 8: true i'm on xampp 1.7.3 with php 5.3.5 and Cake version: 2.0.4 so problem is somewhere in your project or maybe server configuration -- Lep pozdrav, Tilen Majerlehttp://majerle.eu 2011/12/8 euromark dereurom

Re: request says put instead of post

2011-12-08 Thread euromark
? On Dec 8, 1:44 pm, euromark dereurom...@googlemail.com wrote: thats really weird. happening on windows/wamp - php5.3.8 maybe some bug? the firefox firebug debug data for POST reads: Parameter application/x-www-form-urlencoded _method PUT data[UserInfo][country_id...    1

Re: request says put instead of post

2011-12-08 Thread euromark
POST to be set if PUT is set (as PUT is usually a sub- part of POST). or ALWAYS set POST. On 8 Dez., 23:03, euromark dereurom...@googlemail.com wrote: I think its the FormHelper a simple: ?php echo $this-Form-create('User', array('id'='userData'));? results in: form action=/admin/members

Re: 2.0.4: Class 'Helper' not found

2011-12-07 Thread euromark
in such cases simply take a look at the core folder its not like it is a big secret there you will find the Helper.php in /View (not in /View/Helper) therefore you need to adjust your uses statement accordingly i know, it can be confusing App::uses('Helper', 'View'); but App::uses('AppHelper',

Re: Edit an object without creating it

2011-12-07 Thread euromark
what AD said I can only confirm if those are user records (which contain a user_id) you will have to verify that those records belong to the right users, as well. therefore I always use $this-find('first') in - every edit action - every delete action at the very beginning this way you can easily

Re: Cake 2.0 documentation

2011-12-07 Thread euromark
it would also be nice if one could jump from 1.3 = 2.0 for the same thing often times the google results are still on 1.3 but then I have to research in the ajax box what I have been looking for before because there is no direct link On 7 Dez., 18:19, mark_story mark.st...@gmail.com wrote: I've

Re: Adding image (png) icon in form-button element - please help.

2011-12-07 Thread euromark
why are you purposely setting 'escape'=true? if you want to use html inside an element you are shooting yourself in the foot this way. it should rather by false then. On 7 Dez., 21:10, Blues Clues bluesclu...@gmail.com wrote: Hi: I have a, hopefully, silly problem. Can you help ? I have for

Re: cakephp revisionable behavior

2011-12-06 Thread euromark
From a glance I see only 2 code flaws: private declarations shouldnt be used inside a framework without very good reason to do so (use protected instead) -Save should probably be -save and it would probably be a good idea to make a test case for it. especially since revisions and everything

Re: Prefix routing and urls

2011-12-06 Thread euromark
:1209, euromark wrote: the first one is correct (using the prefix admin) if you want to use prefixes and get an url like /admin/controller/action the second one doesnt use prefixes and would result in /controller/action (admin_ is a meaningless prefix here) On 5 Dez., 18:35

Re: Dropdown list is empty

2011-12-06 Thread euromark
automagic only works with the $variableName being the same than field name (nothing to do with foreignKeys) $recipients means that the field should be recipient or recipient_id or recipients so in your case try $toUsers or simply set it manually using 'options'=$recipients On 6 Dez., 16:41,

Re: How Can I do custom pagination in Cake PHP ?

2011-12-06 Thread euromark
what do mean by that? without more specifics and some code you already tried out nobody will be able to help you I'm afraid On 6 Dez., 07:55, Sandip Ghosh d.sandi...@gmail.com wrote: How Can I do custom pagination in Cake PHP ? -- Our newest site for the community: CakePHP Video Tutorials

Re: Trying to reduce arrays

2011-12-06 Thread euromark
you can always use foreach() ;) the set:: methods wont use anything else, either (internally) so its also the quickest way of doing it. On 6 Dez., 22:41, McScreech scre...@sympatico.ca wrote: I am completely stumped. I have tried combinations of Set::extract, Set::classicExtract,

Re: NotificationBehavior

2011-12-05 Thread euromark
$Model-alias is usually more accurate than $Model-name and you should include models using $notification = ClassRegistry::init('Notification'); On 5 Dez., 12:51, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: What are you trying to achieve? Jeremy Burns Class Outfit

Re: Cake 2.0 Virtual Fields

2011-12-05 Thread euromark
this way when a virtual field called name is used. Is there a way to have Cake display the virtual field as the select menu's option names? Thanks, -Brian On Dec 3, 3:42 pm, euromark dereurom...@googlemail.com wrote: you might be doing sth wrong how are you processing the result

Re: cake.po resource location

2011-12-05 Thread euromark
For starters, I can provide German (both informal and formal). On 3 Dez., 22:32, euromark dereurom...@googlemail.com wrote: Since the introduction of cake as domain for many common framework translations, the translations from the default.po are not used anymore. Leaving the strings

Re: simple cron job?

2011-12-05 Thread euromark
not that much different from 1.3 actually: http://www.dereuromark.de/2011/10/31/freshly-baked-cake2-0-tips/ On 6 Dez., 01:55, GG jairusk...@gmail.com wrote: I would like to send out a simple e-mail at 5:00pm to all users. I have a users table: id username password email. I have found other

Re: Prefix routing and urls

2011-12-05 Thread euromark
the first one is correct (using the prefix admin) if you want to use prefixes and get an url like /admin/controller/action the second one doesnt use prefixes and would result in /controller/action (admin_ is a meaningless prefix here) On 5 Dez., 18:35, Jeremy Burns jeremybu...@classoutfit.com

Re: how to get url by giving the controller name, action name and parameters?

2011-12-03 Thread euromark
you probably want to use Router::url() On 3 Dez., 14:22, Todong gbstac...@gmail.com wrote: Hi, everyone! I know HtmlHelper::link() can generate a link whose url is generated by an array containing controller, action and parameters e.g. HtmlHelper::link('book', array('controller'='books',

Re: CakePHP 2.0.3 out of the oven

2011-12-03 Thread euromark
for overcoming the above phpunit 3.6 output swallowing this might work as an enhancement for the CakeTestCase class: /** * outputs debug information during a web tester (browser) test case * since PHPUnit=3.6 swallowes all output by default * this is a

Re: Validation rules - what a nightmare...

2011-12-03 Thread euromark
you should be using last=true for every subrule http://book.cakephp.org/2.0/en/models/data-validation.html?highlight=last On 3 Dez., 18:16, heohni heidi.anselstet...@consultingteam.de wrote: Hi folks! Whats wrong here? var $validate = array(         'ben_name' = array(            

Re: Validation rules - what a nightmare...

2011-12-03 Thread euromark
well, thats another problem, of course. without last=true if will show the wrong validation message but your empty string will always be hashed as well (using cake1.3) thats why you shouldnt use password as field name. I recommend reading:

cake.po resource location

2011-12-03 Thread euromark
Since the introduction of cake as domain for many common framework translations, the translations from the default.po are not used anymore. Leaving the strings untranslated, of course. I imagine once translated a cake.po file does not change that often anymore. Are there any plans for a central

Re: Cake 2.0 Virtual Fields

2011-12-03 Thread euromark
you might be doing sth wrong how are you processing the result? because Reporter__name is correct so far. cake will then automatically merge the content of this key back to the Model result array with the key name. and then it should be available with $result['Reporter']['name'] since name and

Re: Is it possible to access AuthComponent from a Helper ?

2011-12-02 Thread euromark
i think it is possible but would create quite some overhead... and yes, it would probably break MVC On 2 Dez., 10:16, Dan dan.gillet...@gmail.com wrote: I would like to write a Helper which would check if a given link is authorized for the current user. I'm using CakePHP 2.0. I'm using the

Re: HTML Tidy Component

2011-12-02 Thread euromark
personally I would find it more interesting to know what has to be fixed (missing closing p tag etc) because one should ask himself why the output has to be fixed in the first place. after all its the own code which should have been valid from the start (if its your layout/template stuff and not

Re: How to add a fixture to a plugin test?

2011-12-02 Thread euromark
thats because it wont be the real model but an app model instance :) i figured that out the hard way, too On 2 Dez., 15:47, Roland kreativestal...@gmail.com wrote: Ah, of course^^ Thx, now it works :) best regards, Roland On 30 Nov., 04:46, euromark dereurom...@googlemail.com wrote

Re: Send Email problem with multiple receivers

2011-12-01 Thread euromark
if you are using the new EmailLib in 2.0 you should be using the setter methods: $this-Email-to() etc On 1 Dez., 06:36, Graham Weldon predomin...@gmail.com wrote: What CakePHP version are you on? Cheers, Graham Weldonhttp://grahamweldon.com e. gra...@grahamweldon.com p. (+61) 0407 017 293

Re: any one else having trouble with table prefixes in 2.0?

2011-12-01 Thread euromark
://github.com/dereuromark/cakephp/blob/2.0hacked/lib/Cake/Model/Model.php#L705 On 1 Dez., 12:15, Mattia Manzati manzat...@gmail.com wrote: I have the same problem on Cake 2.0.4. Any way to solve? On 31 Ott, 17:27, euromark dereurom...@googlemail.com wrote: OK... it happens on normal views

Re: Spaces in Filenames (Theme / Themed / Upgrade Cake 1.3 to Cake 2.0)

2011-12-01 Thread euromark
or not using any spaces in filenames (bad thing to do anyway^^) On 1 Dez., 07:40, Graham Weldon predomin...@gmail.com wrote: The alternative is moving your assets to the web root, instead of symlinking them, I guess. Cheers, Graham Weldonhttp://grahamweldon.com e. gra...@grahamweldon.com

Re: js/css compression helpers for cakephp 2.0

2011-11-30 Thread euromark
I was already wondering about the AssetHelper some time ago http://stackoverflow.com/questions/8233532/asset-helper-and-protected-view-scripts-in-cakephp-2-0/8249645#8249645 seems like McCurry's helper would need a massive rewrite in order to work again so mark story's would probably be the best

Re: How Check validate before save

2011-11-30 Thread euromark
I dont understand your code - where do you actually save your data? as of right now you only validate it... On 30 Nov., 12:17, Mamdoohi hamid.mamdo...@gmail.com wrote: ok. I have two model ( user, employee ). and use this code if($this-Employee-saveAll($this-data,array('validate'='only')){

Re: Conditions in model associations

2011-11-30 Thread euromark
the conditional associations almost useless and I bet it catches a lot of people out. It took me an hour or so to realise what was happening. Jeremy Burns Class Outfit http://www.classoutfit.com On 29 Nov 2011, at 21:25, euromark wrote: and I think this is the ticket: http

Re: CakeEmail Invalid email

2011-11-30 Thread euromark
a) you dont have to submit it to cake if you really want to go down that road, build your own class and put it in /app/Lib/Network/Email/ CakePHP will then use your custom class instead b) if you wont to know if it works, try it - but I woudn't recommend it On 30 Nov., 06:32, localhost

Re: Blog with posts and comments

2011-11-30 Thread euromark
please take a lot at the book starting right about here: http://book.cakephp.org/2.0/en/console-and-shells/code-generation-with-bake.html?highlight=bake On 30 Nov., 17:15, joserafael josecam...@gmail.com wrote: No, the blog tutorial cover only post. I dont know who to do it On 30 nov, 07:12,

Re: js/css compression helpers for cakephp 2.0

2011-11-30 Thread euromark
I only thing I am wondering about that plugin is, whether it supports assert compression by using the default $this-Html-css/script syntax Or if one would have to completely rewrite all views/layouts here. (to $this-AssetCompress-...) From the look into the code and docs it seems this is necessary

Re: cakephp select option stored as 0 in database instead of selected value

2011-11-30 Thread euromark
I guess you made a mistake in your form why is it not echo $this-Form-input('period_id'); (note the _id)? tip: let cake bake your code. this way less mistakes can be made and such as above easily be avoided On 1 Dez., 00:09, GG jairusk...@gmail.com wrote: The form is successfully adding a new

Re: Cake2.0 not recognizing my PHPUnit installation

2011-11-29 Thread euromark
) On 8 Nov., 16:41, euromark dereurom...@googlemail.com wrote: I just saw an awesome idea in github:https://github.com/Hyra/PHPUnit-Cake2 If I was him I would make a it a os independent cake2 shell though.. cakePhpUnitinstall (or even upgrade one day) would be a self installing shell

Re: Access Data in Associations Efficiently

2011-11-29 Thread euromark
especially as beginner you should ALWAYS bake your code first using the bake shell cake bake ... it will produce out of the box code you can already use to create/edit/ view/delete records step two then is adjusting the baked code to your needs the advantage: you can easily modify your relations

Re: Blog with posts and comments

2011-11-29 Thread euromark
you shoudnt use scaffolding but bake your code using the bake shell then you probably discover that all your problems are gone On 29 Nov., 16:55, joserafael josecam...@gmail.com wrote: If anything I could do in cakephp is to relate a table of news with commentary. Yes, that is simple but I can

Re: Conditions in model associations

2011-11-29 Thread euromark
If I remember right a core member once wrote that this is a known limitation of the current conditions array for relations. Personally, I think this should be addressed in 2.1 as a bugfix to be fixed (if I add a global condition it should always be applied, no matter what). As of right now you

Re: Conditions in model associations

2011-11-29 Thread euromark
and I think this is the ticket: http://cakephp.lighthouseapp.com/projects/42648/tickets/1793-model-conditions-not-recursively-applied On 29 Nov., 22:22, euromark dereurom...@googlemail.com wrote: If I remember right a core member once wrote that this is a known limitation of the current

Re: How to add a fixture to a plugin test?

2011-11-29 Thread euromark
i think you just have to use ClassRegistry::init('ModelName); here On 29 Nov., 22:38, Roland kreativestal...@gmail.com wrote: None, that's the problem. I got non error or tips what is not working... but when I do $article-find('all') I get an empty result... thanks Roland On 29 Nov.,

Own exception templates

2011-11-28 Thread euromark
in /app/View/Errors/ I created a file error403.ctp (I want to customize 403s) I thought this would override the core file (as with everything else). But then I read in the book that in debug mode the app files are used, in productive mode they will simply be ignored. I fail to see the point in

Re: How Check validate before save

2011-11-27 Thread euromark
does this help? http://www.dereuromark.de/2010/06/20/validating-multiple-models-at-once/ On 27 Nov., 09:02, Mamdoohi hamid.mamdo...@gmail.com wrote: hi I want validate data before save. my data is for two table so I want check validate then save data into two table how can do it? -- Our

Re: Cakephp 2.0.3: Troubles with Sessions...

2011-11-27 Thread euromark
you can simplify the condition to if ($scounter = $this-Session-read('scounter')) {} but besides that how is the test case set up? because it is possible that it resets itself after each run therefore the session would always be emptied afterwards... On 27 Nov., 11:38, ava avon...@gmx.net

Rss feed and special chars

2011-11-27 Thread euromark
It seems that the RssHelper of cake (2) does encode äöü to ##xE4;#xF6;#xFC; inside the description. The document is utf8 (as is the website which does not encode them - as it should be). Is that a normal behavior for Rss? I compared it to the output of the Xml class itself which also does not

Re: Media View: specifying the filename when download = false

2011-11-26 Thread euromark
yes - last week after upgrading to 2.0 I had the same problem. I wanted to render files as pdf automatically (/controller/action/ [ID].pdf) and it always returned the ID no matter what I did. after some research I found out that this is a well known bug in almost all browsers they simply ignore

Re: How to add a fixture to a plugin test?

2011-11-25 Thread euromark
what do you mean with it doesnt work? how did you initialize/access the model then? some code would be great On 25 Nov., 15:26, Roland kreativestal...@gmail.com wrote: Hi! I have a fixture in plugins/Bancha/Test/Fixture/ArticleFixture.php and a test case in

Re: plugin uses (wrong) app controller

2011-11-24 Thread euromark
unfortunate if you use plugins with similar/same classes ;) but it makes sense. will do! On 24 Nov., 16:24, José Lorenzo jose@gmail.com wrote: Sorry, duplicate classnames are not allowed by PHP. Cake is not failing hard with a fatal error in your case because it caches the classname

Re: Validation rules

2011-11-23 Thread euromark
I think its the database schema - if you set default NULL or default NOT NULL although I always thought of this as not very helpful (since the forms are usually not 1:1 what the schema defines) so in 1.3 I hacked the form helper to avoid adding those rules automatically. if I want them to, I

Re: Validation rules

2011-11-23 Thread euromark
'last' = true should be the default for 2.0 anyways as I suggested a few months ago in a ticket. (although, as I understand, 2.0 seems to be capable of returning an array of errors instead of a string) I'd love to understand it, as well, as I, too, have the feeling of losing control over the

Re: Problem with DB float field

2011-11-23 Thread euromark
we would need to know about the database used and we also would need to see what exactly the declaration for the field is. show us some code or sql create table/field snippet etc On 23 Nov., 10:17, Gerrit lober.ger...@googlemail.com wrote: Hey, I've a problem with my DB float fields in Cake

plugin uses (wrong) app controller

2011-11-23 Thread euromark
Is this an intentional change in 2.0? That if I call /plugin_name/controller/action/ and if happen to have a controller with the same name in /app/ Controller dir that it uses the local controller in app dir instead of plugin dir? I have a ConversationsController in the plugin Messaging I also

Re: CakePHP

2011-11-22 Thread euromark
But I think we cannot do that in cakephp. you can use models anywhere in the complete cakephp framework - even in the subsubsubsub element of a view if you want to. simply be using ClassRegistry::init(ModelName) But that doesnt mean that you should...^^ On 22 Nov., 13:56, Kane The Pirate

Re: How to track the referer when error 404 happens?

2011-11-22 Thread euromark
I did that for while - after upgrading the application jesus christ. I can tell you. I would have gotten hundreds of mails per second With session token (and one email per session every HOUR) it went down to a lot ;) Anyway - the thing is, that a browser opens invalid urls all the time

Re: Daylight Saving Time (DST) in cakephp

2011-11-21 Thread euromark
to avoid that the programmer has to explicitly call these functions each time. Best,     Chris On Fri, Nov 18, 2011 at 1:45 PM, euromark dereurom...@googlemail.comwrote: right you would have to convert it back again of course find() = behavior converts all to local time save

Re: Paginate relational data with multiple condition.

2011-11-21 Thread euromark
what exactly is your question or where did you hit a wall? sounds more like a statement to me. On 21 Nov., 16:49, saddam hossoin saddamhoss...@gmail.com wrote: I have a four table, Questionnaire-QuestionGroup-Question-Answer. Questionnaire has many QuestionGroup, Question Group has many

Re: how to include javascript in cakephp ?

2011-11-21 Thread euromark
yeah, that kinda the point ;) On 21 Nov., 19:28, phpMagpie p...@webbedit.co.uk wrote: I don't think the other two guys got the point that you gave this answer over at stackoverflow?!? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new

Re: Associations in CakePHP with non-conventional database

2011-11-20 Thread euromark
usually you use two keys to create flexible relations key model and key foreign_id (some call it foreign_key) you just have to save array('model'='Pet', 'foreign_id'='1') or array('model'='User', 'foreign_id'='3') etc with the rest of the save data. then you can easily query based on the model

Re: how to include javascript in cakephp ?

2011-11-19 Thread euromark
i already answered him: http://stackoverflow.com/questions/8191877/how-to-include-javascript-in-cakephp-1-3 On 19 Nov., 11:10, phpMagpie p...@webbedit.co.uk wrote: Try showing us a working page and we can debug? I'm not going to go to the trouble of creating a test environment on your behalf.

Re: Techniques for passing data around

2011-11-19 Thread euromark
its not about the browsers each browser has its own unique session the problem is the tabs of one and the same browser - they all share the same session. so if you have for example 3 open tabs of the same website, they will most certainly intefere with each other. thats why I consider it a nogo

Re: How to download multiples files with cake?

2011-11-19 Thread euromark
yes, zipping/packing them is one of the only changes you got. you could open tons of popups/new windows which then each trigger a download or you could probably do sth similar with ajax but thats sure not very user friendly On 19 Nov., 23:04, dtemes dte...@gmail.com wrote: Is that possible at

Removing the required attribute for browser validation

2011-11-18 Thread euromark
Currently the new 2.0 Form Helpers seems to attach the required attribute to each input which supposedly should be required based on the DB schema. But most of the time this does not mean it actually is required in this particular view. Sometimes the value will be added in beforeValidate etc. So

Re: Installation of CakeDC's Migrations plugin for CakePHP 2.0

2011-11-18 Thread euromark
actually, both can by underscore or both can by camelcased (and mixed as well) I still vote to make both camelcase for more consistency, though (at least visibly in the list - it can still be accessed both ways, of course). On 18 Nov., 17:12, Sam Sherlock sam.sherl...@gmail.com wrote:

Re: security threat using this-here?

2011-11-18 Thread euromark
I didnt see your answer until now. well, right. but some people might think an url couldn't actually be harmful. just a few months ago, even the core templates still didn't use h() to print out content, for example. and no one cared for decades^^ (except for a few maybe including me) and I see

Re: Daylight Saving Time (DST) in cakephp

2011-11-18 Thread euromark
the record it'd save the 'local' version, wouldn't it? Jeremy Burns Class Outfit http://www.classoutfit.com On 4 Nov 2011, at 13:32, euromark wrote: probably i wouldt apply new keys then, just override the old ones. if you don't change the current keys your forms will have

Re: Seeking clarification

2011-11-18 Thread euromark
I now submitted my final patch for the upgrade shell: http://cakephp.lighthouseapp.com/projects/42648/tickets/2117-improvements-for-20-upgrade-shell#ticket-2117-15 the removal of the name attribute worked quite well. all thousand files where it occurred have been successfully processed so far.

Re: cakephp: $this-redirect is not passing $student_info parameter from one controller to another controller action

2011-11-17 Thread euromark
jeremy's right, serialize the array. then you need to use am() on the two arrays first, and then pass the merged array On 17 Nov., 07:40, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: I could be wrong, but I don't think you can pass an array through a redirect url like that;

Re: Use of $resursive=-1 in a model

2011-11-17 Thread euromark
most cakephp developers put this in their app model to ensure that the amount of unnecessary data returned by find queries stay as low as possible: http://book.cakephp.org/view/1063/recursive if you put -1 in there or a specific model, by default it only gets the model data itself (no join data).

Re: cakephp: $this-redirect is not passing $student_info parameter from one controller to another controller action

2011-11-17 Thread euromark
besides the point that this is not quite possible to do this way (even serializing will probably break the url!) this approach is not very beautiful, of course. i recommend that you take a look at the search or filter plugin (search plugin is from cake dc in github) it is very sophisticated and

Re: cakephp 2.0 auth session problem

2011-11-16 Thread euromark
I also experienced quite an amount of unexpected logouts in 2.0 now. To make sure it is not the garbage collector of the file system I switched to database. There no garbage collector should interfere as long as expires is not reached (which is several days). But the systems logs the user out

Lib Package names in 2.0

2011-11-15 Thread euromark
I was wondering how you manage your Lib classes now in cake2.0 Seems like putting them in /Lib directly is kind of deprecated. They should belong to a package so to speak. /Lib/ZodiacLib.php becomes then (using Misc Package) /Lib/Misc/ZodiacLib.php and instead of using App::import('Lib',

Inconsistency when loading libs?

2011-11-15 Thread euromark
This worked in 1.3: a file called icq_lib.php App::import('Vendor', 'Tools.icq/icq'); class IcqLib extends Icq {} you could then App::import('Lib', 'IcqLib') and use the IcqLib class right away But in 2.0 most library classes are now in packages inside /Lib In my example

Re: hi need to maintain to layouts one for admin and one for remaining

2011-11-14 Thread euromark
if (!empty($this-params['admin'])) {} suffices On 14 Nov., 11:20, anjith anjithkumar.garap...@gmail.com wrote: Its working. On Nov 14, 3:05 pm, Xoubaman xouba...@gmail.com wrote: In AppController::beforeFilter iif (isset($this-params['admin']) ($this-params['admin'] == 1)) {

Re: my own controller instead of user_controller login problem

2011-11-14 Thread euromark
you should also be aware of uppercase and lowercase naming of your objects On 14 Nov., 15:46, phpMagpie p...@webbedit.co.uk wrote: From page:http://book.cakephp.org/view/1250/Authentication Now, there are a few conventions to think about when using AuthComponent. By default, the

Re: Concurrency control

2011-11-14 Thread euromark
The only behavior in that direction I can think of is called LockTable Behavior it restricts to either read/write for a complete table but maybe you can modify it to restrict access to rows for certain users for a certain amount of time etc On 14 Nov., 17:14, phpMagpie p...@webbedit.co.uk

Re: Using REST In CakePHP 2.0

2011-11-14 Thread euromark
and it should also be mentioned that now all keys are (forced) lowercase. I dont know WHY but thats how it is now.. really messed up tons of my library classes - which of course were looking for keys like Data instead of now data took me hours to fix all occurrences of this change. especially if

Re: Containable Memory Usage

2011-11-14 Thread euromark
. On 12 Nov., 18:41, euromark dereurom...@googlemail.com wrote: well, I doubt that, too. Especially with a lot of model relations you are usually better off using recursive=-1 globally and defining contain everywhere. What troubles me more is the fact that containable is not optimized

Re: PHP 5.4

2011-11-14 Thread euromark
if you are in E_STRICT mode in PHP (which you seem to be) you will be notified if you don't use the exact param declaration in the inheriting classes. the Model::beforeSave() is: public function beforeSave($options = array()) {} so you need to use the exact same params (with the exact same

Re: Containable Memory Usage

2011-11-12 Thread euromark
well, I doubt that, too. Especially with a lot of model relations you are usually better off using recursive=-1 globally and defining contain everywhere. What troubles me more is the fact that containable is not optimized. Or in other words: It creates up to 50x more queries than necessary

Re: Validation rules question

2011-11-12 Thread euromark
you should always use the full array syntax and also add last=true to every rule. example: 'email' = array( 'email' = array( 'rule' = array('email', true), 'message' = 'valErrInvalidEmail',

Re: SEO friedly URLs

2011-11-11 Thread euromark
the urls can stll be underscore and lowercase MyController.php etc but /my_controller/action_name etc On 11 Nov., 05:16, Andras Kende and...@kende.com wrote: Kevin, seo friendly urls in cakephp are very very easy… below is the basic idea to do domain.com/video/return-of-the-jedi instead of

Re: Help using paginator

2011-11-10 Thread euromark
two questions: a)why are you using both find(all) and paginate? b) why do you use lowercase model name in paginate()? On 9 Nov., 14:21, Jean Luis Morillo jeanluis.mori...@gmail.com wrote: Hello Im getting this error message when trying to paginate. Warning (512): Controller::paginate() -

Re: Scheduled day for 2.0.3 release?

2011-11-10 Thread euromark
use the head :) thats what I do. the only real difference is the naming^^ nothing fancy after all On 10 Nov., 20:07, Chris Cinelli chris.cine...@formativelearning.com wrote: We have some bug fix that are on HEAD that we are interested about. I was wondering when the 2.0.3 will be available.

Are automagic models for HABTM not supported anymore in 2.0?

2011-11-09 Thread euromark
After upgrading a larger project to 2.0 i got hundreds of errors that need manual corrections. But some bug me more than others. If you have User and Hotel models and you got HABTM between them you sometimes want to use the join table to in order to get better queries (left join etc). In 1.3 this

Re: Are automagic models for HABTM not supported anymore in 2.0?

2011-11-09 Thread euromark
yes, it sure does. only that in your case its part of the form (view) and in my case part of the query building (model). but sth with App::load anyway On 10 Nov., 01:04, rchavik rcha...@gmail.com wrote: Euromark, This sounds similar tohttp://cakephp.lighthouseapp.com/projects/42648/tickets

Re: Why do cake bake seems not to access my app folder?

2011-11-08 Thread euromark
you should always navigate to your app - or at least - its parent folder (for a new app) before executing the cake console: http://www.dereuromark.de/2011/10/31/freshly-baked-cake2-0-tips/ On 8 Nov., 08:49, Andras Kende and...@kende.com wrote: Try cake bake from inside the app folder... cd

Re: CakePhp related domain

2011-11-08 Thread euromark
indeed, pretty cocky :) nothing against making some profit using software made with cake. but this is not a place to put advertising and THEN profit from it. pretty soon everybody puts some ads in here. and it ain't gonna be no help forum anymore.. On 8 Nov., 05:52, Larry E. Masters

Re: Parse error: syntax error, unexpected T_ELSE error?

2011-11-08 Thread euromark
you should never use if/else without {} the first one works because php accepts if/else without {} for one line statements but as I said, its really ugly and bad practice. On 8 Nov., 13:08, shmeg intertelaustra...@gmail.com wrote: Can anyone tell my why this works: ?php if($facebook_user)  

Re: Cake2.0 not recognizing my PHPUnit installation

2011-11-08 Thread euromark
I just saw an awesome idea in github: https://github.com/Hyra/PHPUnit-Cake2 If I was him I would make a it a os independent cake2 shell though.. cake PhpUnit install (or even upgrade one day) would be a self installing shell then. On 25 Okt., 18:45, andrewperk andrewp...@gmail.com wrote:

Re: Class 'File' not Found / Class 'Folder' not found in Version 2.0 (worked OK in version 1.3)

2011-11-07 Thread euromark
the original upgrade shell is lacking a few vital parts i added the file/folder stuff and called it legacy: https://github.com/XTAIN/cakephp/commit/57b13c1fb4a4e05080a3c5947a000ddee40d8931#L0R577 On 7 Nov., 23:08, 100rk lubomir.st...@gmail.com wrote:

Re: CakePHP v2.0.2 on IIS 5.1 (Win2k) ISAPI_rewrite not functioning

2011-11-06 Thread euromark
my guess is that you didnt update the htaccess I added it to my upgraded version of the UpgradeShell (haha) anyway, here is the fragment $patterns = array( array( 'index.php?url=$1 = index.php?/$1',

security threat using this-here?

2011-11-05 Thread euromark
I searched for answers to this topic at stackoverflow http://stackoverflow.com/questions/7985366/additional-this-here-security-still-necessary/7985529 /** * Don't you EVER remove this line else you will make the whole * application a swiss cheese for XSS! * We often call echo $this-here in

Re: Convert UTF-8 Problem , but i don't know how to do .

2011-11-04 Thread euromark
well, it should have been utf8 in the first place (even in 1.3 - it shouldnt even work with utf-8). maybe this is the problem? is it possible that the encoding is already messed up in the database? take a look at some utf8 content is the text scrambled or visible? that would be my guess. try

Re: error while running shell as cron

2011-11-04 Thread euromark
cake1.3 or 2.0? On 4 Nov., 13:35, abhimanyu bv vmabhi...@gmail.com wrote: I am getting the following error when cron is running- 'PHP Fatal error:  Class 'Shell' not found in /var/www/web/vendors/shells/ deals.php on line 3'. How to rectify this error? -- Our newest site for the community:

Re: Daylight Saving Time (DST) in cakephp

2011-11-04 Thread euromark
maybe you can adopt some of this https://raw.github.com/jellehenkens/lemon_utils/master/View/Helper/TimeMachineHelper.php I am wondering: How do you guys handle the daylight saving time issue? Currently we face this problem in 2.0: - dates (created, modified, own ones) are saved without it (-1

Re: Daylight Saving Time (DST) in cakephp

2011-11-04 Thread euromark
that sets new keys like 'LocalTime'? Jeremy Burns Class Outfit http://www.classoutfit.com On 4 Nov 2011, at 13:04, euromark wrote: maybe you can adopt some of this https://raw.github.com/jellehenkens/lemon_utils/master/View/Helper/Ti... I am wondering: How do you guys handle

<    3   4   5   6   7   8   9   10   11   12   >