Re: Security and Model Validation Questions

2011-08-13 Thread euromark
yes, with security component this is not possible. but ceeram is right about the password displayed. On 13 Aug., 01:13, andrewperk andrewp...@gmail.com wrote: The username and password is specific to just that database luckily. I've changed the information. Thanks Ceeram. On Aug 12, 3:51 pm,

Re: redirect admin and user to different dashboard

2011-08-12 Thread euromark
i use the same action only switch the rendered view dashboard{ $this-_dashbboardXXX depending on the role of the current user } _dashboardAdmin( $this-render('dashboard_admin') _dashboardUser( $this-render('dashboard_user') } makes a lot of thins easier On 12 Aug., 10:58, nOLL

Re: Cron help

2011-08-12 Thread euromark
cake prune option1 option2 ... should do the trick On 12 Aug., 12:19, Prabha vathi prabha.ridd...@gmail.com wrote: Hi, http://www.ibm.com/developerworks/opensource/library/os-php-fwk5/?ca=. I used the above link to learn, how to do cron. But I don't understand the below line

Re: Security and Model Validation Questions

2011-08-12 Thread euromark
debug 0 is an absolute nogo for productive sites. but besides that: yes, thats possible there are several easy ways to bypass the baked actions and validation the easiest thing is to post empty forms (using firebug its easy to remove the inputs or replace them with nonsense). @see

Re: Where to place code meant to be universally accessible?

2011-08-11 Thread euromark
usually in the model since controllers can easily access models but that depends on your situation maybe a lib, maybe a behavior, maybe some boostrap code without knowing more details, i go for model code On 11 Aug., 22:30, BurningFuses cassi...@gmail.com wrote: In my app I have a bunch of

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

2011-08-10 Thread euromark
@john only tinyint(1) is boolean tinyint(2/3) is fine @abhimanyu bv but 4 usually doesnt exist (tinyint has 255 values) use int(4)! On 10 Aug., 10:34, John Andersen j.andersen...@gmail.com wrote: The issue could be that you have defined the column as tinyint, which CakePHP consider as a

Re: Why cake not build a good procedure for load components behaviour , help ?

2011-08-10 Thread euromark
as far as I know, this is already done this way. they will be joined between AppController PluginAppController Controller in this order or did you experience it otherwise? it would surprise me because it works this way since several years in my apps. On 10 Aug., 15:01, vcrack

Re: Check username availability using jquery

2011-08-08 Thread euromark
exactly this is quite a bad example! use find() and you will have at least a secure query... On 8 Aug., 04:19, Ma'moon phpir...@gmail.com wrote: The only thing that i can see that worth the concern is using  $this -params['form']['username'] and also $this-User-query() , its been clearly

Re: Model not fully loading

2011-08-08 Thread euromark
class Y extends PluginAppController ??? are you sure thats not supposed to be a model? On 7 Aug., 23:07, crouch...@googlemail.com crouch...@googlemail.com wrote: Hello, I am having a weird problem that I am not able to figure out and am not fully able to describe in a brief statement. So

Re: Access db from static pages

2011-08-08 Thread euromark
http://stackoverflow.com/questions/6973594/access-the-database-from-static-pages-in-cakephp1-3 On 7 Aug., 16:45, AB arun.u...@gmail.com wrote: Is there any way to access the database from static pages? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check

Re: replace emty fields at model or controler level

2011-08-08 Thread euromark
it is not a good idea to do those things in the model/controller a) what if you don't need most of the modified fields in the end? b) what if you somehow need to know in the view which field was empty in the first place simply do that in the view templates with if (!empty) etc on demand that is

Re: submitting empty form gives HTTP 404 page not found error

2011-08-04 Thread euromark
that sounds weird shoudnt happen at all maybe your form is not set up correctly? where does it post to? On 4 Aug., 13:09, Matt Murphy mattyh...@gmail.com wrote: Your view can run some javascript to prevent submission unless the form is filled out.  The javascript event is onsubmit().  Are you

Re: Mapping Booleans as enum('false','true') in MySQL

2011-08-03 Thread euromark
well, of course you can name it whatever you like :) deleted, removed, not_available_anymore, ... but yes, thats how you would do it in cake On 3 Aug., 18:23, Peter Meth mrpm...@gmail.com wrote: I am new to CakePHP and I have a lot of existing mysql tables that have a field is_active that I use

Re: Custom controller name

2011-07-31 Thread euromark
but almost as easy: CalController extends ... var $name = 'CalController'; and make sure you post all forms to themselves (which is the default thing for cake2 anyway!) On 31 Jul., 02:58, Roland Pish rolandp...@gmail.com wrote: Thank you Sam! I'll use the route. Cheers On 30 jul, 17:42,

Re: Validation!

2011-07-30 Thread euromark
I use a custom validation rule which completes the schema and maks the url always the same (adding trailing slash, http:// etc). you could also modify the url in beforeValidate(). this way you would get the result you are looking for. BUT you should know that www.url and url do not necessarily

Re: cakephp 1.3 loading page is slow

2011-07-28 Thread euromark
yeah, probably a cheap webhosting package on a shared environment sounds like it, anyway. correct me if i'm wrong mark On 28 Jul., 08:45, WyriHaximus webmas...@wyrihaximus.net wrote: Tbh it's worth the time to find out why a simple static page is extremely slow rather then just wack the

Re: CakePHP 2.0 Auth

2011-07-27 Thread euromark
or simply use a behavior: https://github.com/dereuromark/tools/blob/master/models/behaviors/change_password.php this is still cake1.3 though :) On 27 Jul., 04:18, Meroe Kush whme...@gmail.com wrote: Disregard my last post please. As soon as I hit send I found this: Hashing passwords

Re: cakephp ecommerce work

2011-07-26 Thread euromark
and maybe my bitcoin plugin :) as soon as i am finished On 26 Jul., 11:46, paul alberto.pri...@gmail.com wrote: Hi! anyone interested in a little work to complete an ecommerce shopping cart made ​​in CakePHP? I've made it custom. And I have to add the webtechnick paypal plugin -- Our

Re: Configuration problem

2011-07-26 Thread euromark
i bet u used a / at the beginning of the css declaration or mod rewrite is not working/enabled is that the default cake template? besides: I can only encourage you to use virtual hosts on your local computer http://www.dereuromark.de/2011/05/29/working-with-domains-locally/ makes your life so

Re: Multilanguage in CakePHP 1.3

2011-07-25 Thread euromark
your double post has already been answered in the german group http://www.cakephp-forum.com/installation-und-konfiguration/multilanguage-in-cakephp-1-3-t1044.html LC_MESSAGES instead of LC_MESSAGE will most likely this fix your problem On 25 Jul., 21:10, Davor Ilic webfa...@gmail.com wrote:

Re: Internationalizing Validation Rules Messages in 2.0

2011-07-24 Thread euromark
i started a similar discussion in the core group http://groups.google.com/group/cakephp-core/browse_thread/thread/bd6c5ddda2662a8f/9ffcf1ad9422010f#9ffcf1ad9422010f maybe - as this is directly related we could also discuss the i18n part of it? On 24 Jul., 17:58, Javier javier.iba...@gmail.com

Re: utf8 in bake

2011-07-21 Thread euromark
i must say - quite a bit of work for nothing you said it yourself: as long as there is no utf8 character those files are identical, no matter if they are saved as ansi or utf8 and that is actually the case. they are 100% the same. so there is no need to go through them and manually set those files

Re: app::import to use a script in a plugin

2011-07-21 Thread euromark
a) /vendors/shells/ (plural) b) why would you want to use a shell script in a controller? those are meant to be used from the command line in your console what you are looking for is either a lib or a component, I would say mark On 20 Jul., 00:35, Autolycus asimmee...@gmail.com wrote: Hi I

Re: tableCells with form

2011-07-21 Thread euromark
tip: you dont need php here simply output plain html with only php where your variable content goes this makes it usually more readable. On 20 Jul., 19:24, Rafael Marques rafaelomarq...@gmail.com wrote: Hi, I would like to know how can i create a table with inputs... something like: table

Re: utf8 in bake

2011-07-21 Thread euromark
where will you start? and where end? there are css files which need different commenting chars as js or php or html for that matter it will make the code look more ugly in my opinion. a year ago i used to have the exact same trouble accepting a simple fact: it simply isn't worth the act at that

Re: validation is not working properly and generating Notice (8): Undefined property error

2011-07-20 Thread euromark
seems like Contacts does not inflect to Contact as singular form have you overridden the inflections with custom settings? maybe you put Contact=Contact in there otherwise I don't know whats wrong. your code looks good. taking a closer look.. for some reason $this-Contact does not exist this has

Re: Pass value of referencing field

2011-07-18 Thread euromark
as documented here :) http://www.dereuromark.de/2010/06/23/working-with-forms/ On 18 Jul., 13:00, Hiken flamef...@gmail.com wrote: worked like a charm :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site

Re: Pass value of referencing field

2011-07-17 Thread euromark
pass the id in the url /registrations/add/CAMPERID and set it inside the controller function add($id) { if (!empty($this-data)) { POST PART } else { // here goes your id $this-data['Registration']['camper_id'] = $id; } ... } On 16 Jul., 17:11, Hiken flamef...@gmail.com wrote: I'm new to

Re: Form-Helper (kind of disfunction)

2011-07-15 Thread euromark
to the FormHelper::create() function. Greetings func0der On 8 Jul., 03:06, euromark dereurom...@googlemail.com wrote: and as I said with ('url' = '/'.$this-params['url']['url']) it has to post to itself maybe you have some kind of Auth or redirect in between On 7 Jul., 20:54

Tree and Indentation in pagination lists

2011-07-15 Thread euromark
If i have a list of continents and want to indent them by level of hierarchy, is that possible simply by looking at left/right? I could look at parent_id but that would only work for the first level... (would be enough in this scenario, but what if I wanted to combine Africa, Europe and Asia to

Re: cake2 and configure load

2011-07-14 Thread euromark
i thought the PhpReader is attached by default as it used to be thx! On 14 Jul., 20:13, majna majna...@gmail.com wrote: btw. it's all in docs https://github.com/cakephp/docs/blob/master/en/development/configurat... -- Our newest site for the community: CakePHP Video Tutorials

Re: Private Messaging system (PMS)

2011-07-14 Thread euromark
i guess he wanted to save him the trouble :) unfortunetaly there are not plugins for all purposes yet and i cannot give you my messaging or conversation plugin as it is highly customized to my social network app and would not run out of the box. On 14 Jul., 15:49, Greg Skerman

Re: Setting a minMonth / minDay like minYear and maxYear?

2011-07-13 Thread euromark
use a js datepicker those can be configured to disable those dates and always make sure the validation in php (backend) is there as well (as frontend js validation can be tempered with in the browser) On 13 Jul., 18:38, Shaz shazam...@gmail.com wrote:

cake2 and configure load

2011-07-13 Thread euromark
playing around with cake2.0 head I could not get configure::load() to load my custom configs.php: Configure::load('configs'); /app/Config/configs.php: $config['X'] = 'y'; ... Configure::read() would not display the new ones anything I am missing? -- Our newest site for the community: CakePHP

Re: Non-caching of flash elements continued

2011-07-11 Thread euromark
this could be some browser cache issue there is a controller method called disableCache() this this one. it will set the appropriate headers! On 11 Jul., 11:38, Michael Christoff michael.n.christ...@gmail.com wrote: I was wondering whether the issue below had ever been solved...

Re: Setting variables in AppController to use in Layout.

2011-07-10 Thread euromark
well, beforeFilter() is not always triggered why not putting everything in beforeRender() would make more sense to me by the way: for some data you can always use Configure::write() and Configure::load() might make sense if you want to use it in different locations On 10 Jul., 10:00, runckel

Re: Localization in Cakephp problems

2011-07-10 Thread euromark
^^ its the error way around, dude msgid Error msgstr Fehler On 10 Jul., 10:05, runckel robhueb...@web.de wrote: Its hard to give you a solution with that kind of Question. So the only thing i can say delete the cached po file /tmp/cache. Maybe thats it, if not i think we need more code

Re: Localization in Cakephp problems

2011-07-10 Thread euromark
know why. another problem i found is that i can translate the error views. how can be this done. is there a other technic in cakephp. i read that this func __() is a global func but when i use it in falsh_error like __('Error') it don´t work 2011/7/10 euromark dereurom...@googlemail.com

Re: model find function

2011-07-07 Thread euromark
it simply can't as it will only check for the right keys it is your responsibility to check the array for correctness quite simple to do that as the result will not be the expected :) On 7 Jul., 12:49, cake-learner sh.koiz...@gmail.com wrote: why cakephp is not generating any errors when I go

Re: What is best way to do this?

2011-07-07 Thread euromark
you shouldnt have such a function in the app controller then move it into a component or let the models handle it completly with a component: $this-Component-sendEmail() you could also form a EmailableBehavior and call from any place in your model $this-sendEmail() or from a controller

Re: How to add search function in my e-commercial website?

2011-07-07 Thread euromark
try http://cakedc.com/downloads/view/cakephp_search_plugin On 7 Jul., 14:33, AddOil qiang.m...@gmail.com wrote: Dear all, I'm a beginner of CakePHP. I created an e-commercial website based on CakePHP. I'd like to add the search function to my website, which allow users to search goods.

Re: Form-Helper (kind of disfunction)

2011-07-07 Thread euromark
actions depend on that settings. On 7 Jul., 00:48, euromark dereurom...@googlemail.com wrote: i see :L) where does it post to then? On 7 Jul., 00:13, func0der funco...@web.de wrote no! it is admin_home because i want it to be like that ^^ It's only the page or better the view i

Re: Newbie Question - Controller Model Binding

2011-07-06 Thread euromark
where did you find that? sounds totally wrong to be. but i would need to see the source in order to tell you if its worthy to read. you usually create - model - controller - views in this order (using the baking tools this is quite comfortable) it is as alive as is gets :) of course you turn up

Re: Retrograde counterCache

2011-07-06 Thread euromark
there are already several different counterCache solutions available one in the core see the cookbook or http://stackoverflow.com/questions/1351823/countercache-in-cake-php and several als plugins etc depends on what exactly you need

Re: Retrograde counterCache

2011-07-06 Thread euromark
Outfit: Doesn't his question relate to populating the counterCache fields with the right values on creation, rather than maintaining it? Jeremy Burns Class Outfit http://www.classoutfit.com On 6 Jul 2011, at 17:17, euromark wrote: there are already several different

Re: Retrograde counterCache

2011-07-06 Thread euromark
and most of the sluggable behaviors I know do provide a similar method (of course^^ if you change the way the behavior works you need to trigger the updateAll) simply copy and paste it On 6 Jul., 23:26, euromark dereurom...@googlemail.com wrote: well of course you have to trigger it somehow

Re: Form-Helper (kind of disfunction)

2011-07-06 Thread euromark
, euromark dereurom...@googlemail.com wrote: a) its not admin_home but home: ('url'=''/admin/pages/display/home) the admin prefix is already implicitly attached b) you are probably looking for ('url' = '/'.$this-params['url']['url']) which always posts exactly to itself (which

Re: separate class that prepares an IteratorAggregate object for View layer - where to place this?

2011-07-05 Thread euromark
apologise. Please educate me on how usual php arrays can possibly have these attributes as well. On Jul 5, 7:17 am, euromark dereurom...@googlemail.com wrote: why are the normal 1.3 arrays not working for you? they also have all those functions built in (in plain php functions

Re: Newsletter plugin (send e-mails in backgroud)

2011-07-05 Thread euromark
i think there is somwhere out there a database approach of a queue https://github.com/MSeven/cakephp_queue/wiki the bakery article: http://bakery.cakephp.org/deu/articles/mseven_myopenid_com/2010/10/09/cakephp_simple_queue_plugin_1 you could then use this in your newsletter plugin On 5 Jul.,

Re: I need plugin to build social network

2011-07-04 Thread euromark
i need a drink a drink that can make my day :) On 4 Jul., 05:33, taqman filler taqman...@gmail.com wrote: I need to use cake plugin to build social network  plugin of the kind that can make it thank -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check

Re: I need plugin to build social network

2011-07-04 Thread euromark
looks to me like some other php framework but i cant quite figure out which one. unfortunately the source code is encrypted :) On 4 Jul., 10:30, Zaky Katalan-Ezra procsh...@gmail.com wrote: Try socialengine http://www.socialengine.net/ framework On Mon, Jul 4, 2011 at 11:20 AM, euromark

Re: Class 'File' not found

2011-07-04 Thread euromark
i am not so sure but sometimes this is quite buggy then just to check if thats the reason, your off your opcode cache and try again On 4 Jul., 23:24, Benj. D. bj.delo...@gmail.com wrote: Yes I'm using APC and I'm on windows platform. Why would there a problem with an opcode caches? And how to

Re: separate class that prepares an IteratorAggregate object for View layer - where to place this?

2011-07-04 Thread euromark
why are the normal 1.3 arrays not working for you? they also have all those functions built in (in plain php functions then of course) On 5 Jul., 01:06, Zeu5 kimc...@gmail.com wrote: I have cars controller, Car model and views for cars. I am using Twig

Re: Class 'File' not found

2011-07-03 Thread euromark
seems like a typical windows (wamp/xampp) problem do you use opcode caches? for me, it always dies then as well as soon as an error occures On 3 Jul., 06:48, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: What does your Form code look like? Jeremy Burns Class Outfit

Re: Form-Helper (kind of disfunction)

2011-07-03 Thread euromark
a) its not admin_home but home: ('url'=''/admin/pages/display/home) the admin prefix is already implicitly attached b) you are probably looking for ('url' = '/'.$this-params['url']['url']) which always posts exactly to itself (which will be the default in 2.0 anyway) On 3 Jul., 22:31, func0der

Corrupt tables and problematic response of the framework

2011-07-02 Thread euromark
yesterday it happened again. the second time in only two months one of the tables was suddenly corrupt. and every time it happens to be cake_sessions anyone else who had similar issues? its a nginx / mysql system. the result was that the whole DB was down again. But even after restarting

Re: Getting CakePHP to return a 50x HTTP response when an un-handled exception occurs

2011-07-02 Thread euromark
i have similar problems with an incorrect status code for MYSQL errors http://groups.google.com/group/cake-php/browse_thread/thread/70b6a8b241ab0948# seems like there is a lot to do concerning correct response codes On 30 Jun., 14:37, lsiden lsi...@gmail.com wrote: I am writing a CakePHP

Re: Extract .po file from my app with i18n extract console command

2011-07-02 Thread euromark
you could have it way easier on windows http://www.dereuromark.de/2010/10/03/console-for-cakephp/ then you only need to navigate to your app folder and enter cake i18n extract etc thats all! no path stuff On 1 Jul., 19:57, Glauco glauco.custo...@gmail.com wrote: Hi there, I am trying extract a

Re: AES or DES

2011-07-02 Thread euromark
what are the SQL error messages you get? i guess one would need to have more details in order to help you On 30 Jun., 23:26, Thomas thomaswong@gmail.com wrote: Greetings, We have tried to use DES_ENCRYPT and DES_DECRYPT to protect data in MySQL database. However, when we created a model

Re: Single Quotes

2011-07-01 Thread euromark
will stick around. -Mark On Jun 30, 5:12 pm, Miles J mileswjohn...@gmail.com wrote: They are being removed because they are slower than the original counter-parts. But like you said, you can place them yourselves if they get removed :P On Jun 30, 1:44 pm, euromark dereurom

Re: Single Quotes

2011-06-30 Thread euromark
everything :) you dont have to do anything cake takes care of that for you simply use h() in the views to display your data safely On 30 Jun., 10:24, Prabha Vathi prabha.ridd...@gmail.com wrote: Hi, addslashes(Sanitize::html($this-data['Post']['content'],array('remove' = true))); This is

Re: List of PlugIns, Behaviours, Components and Helpers

2011-06-30 Thread euromark
i only know of http://cakepackages.com/ which is buggy, partly outdated and not really actively maintained but might still be helpful On 30 Jun., 13:42, Jens Dittrich jdittr...@gmail.com wrote: Does anyone know a List somewhere in the web of cakePHP PlugIns, Components, Behaviours and Helpers

Re: Single Quotes

2011-06-30 Thread euromark
well, i dont care^^ its about the most important function ever so if that was actually the case (which i highly doubt due to its importance) later on i would simply but the same function in my bootstrap On 30 Jun., 21:43, Ryan Schmidt google-2...@ryandesign.com wrote: On Jun 30, 2011, at

Re: Single Quotes

2011-06-30 Thread euromark
some convenience functions do make sense to get rid of but not h() -1 from me On 30 Jun., 22:32, Miles J mileswjohn...@gmail.com wrote: I think it was supposed to be 1.3, but most likely 2.0 now. Any of these convenience functions like h() or r() are removed. On Jun 30, 12:43 pm, Ryan Schmidt

Re: Single Quotes

2011-06-30 Thread euromark
i highly doubt that you get any significant speed improvements out of that even if you use it 1000 times on a single page (which you simply cannot) as the view/output is compared to the huge framework itself the smaller part of the puzzle. anyway most people should be made aware of those basic

Re: Single Quotes

2011-06-30 Thread euromark
did i just write thread? i guess you all know what it is supposed to read^^ bedtime for me now On 30 Jun., 23:56, euromark dereurom...@googlemail.com wrote: i highly doubt that you get any significant speed improvements out of that even if you use it 1000 times on a single page (which you

Re: Single Quotes

2011-06-30 Thread euromark
Jul., 00:23, Jamie jamie@gmail.com wrote: You could, you know, use htmlspecialchars() - that's all h() is. Not the end of the world, and it certainly makes the code more clear (h? wtf is h?). On Jun 30, 1:44 pm, euromark dereurom...@googlemail.com wrote: some convenience functions do

Re: My Model doesn't validate anything

2011-06-28 Thread euromark
of required? They perform two different functions. required = true won't let you save the model without the key being present, while allowEmpty controls whether you can save with the value of that field being empty or not. On Jun 26, 8:57 am, euromark dereurom...@googlemail.com wrote: omit

Re: any example project

2011-06-28 Thread euromark
there is also miles' forum http://milesj.me/code/cakephp/forum or many hundred other projects on github On 29 Jun., 01:36, Ryan Snowden sicapi...@gmail.com wrote: Also check out the CakeDC plugins (although some parts are inconsistent) they do put on a good show On 27 June 2011 22:44, Tilen

Re: What to do before deployment

2011-06-28 Thread euromark
change the security salt the cookie name isnt that important because it is public anyway On 27 Jun., 23:21, Santiago Basulto santiago.basu...@gmail.com wrote: Hello People. Would like to make a good list of things to do before deploy my App in production. Here things i do right now: 1.

Re: How to get something to show onscreen

2011-06-28 Thread euromark
maybe a recursion problem? bake your app without scaffolding and manually set the recursion level (or use containable behavior) On 27 Jun., 19:53, Magician davis_justinmich...@yahoo.com wrote: Hi.  I am new to cake php and am in the middle of making a blog. Right now, I am stuck on a section.  

Re: Access method of another controller

2011-06-26 Thread euromark
or make it a component which you can add to the app controller now all controllers have access to it as well On 26 Jun., 00:45, Miles J mileswjohn...@gmail.com wrote: Place it in your AppController and make sure your other controllers extend it. On Jun 25, 4:59 am, Dominik Gajewski

Re: My Model doesn't validate anything

2011-06-26 Thread euromark
omit the required part (and its not an array anyway!) use allowEmpty=false instead On 24 Jun., 21:45, Ciul luiscarlosj...@gmail.com wrote: Hi CakePHP pals. I'm reading about CakePHP, I come from CodeIgniter and well, I've liked a lot what I've seen until now. I am following examples for

Re: Recent troubles with 'minYear' and 'maxYear'

2011-06-22 Thread euromark
did you try a simply echo $this-Form-input() instead of inputs()? On 22 Jun., 13:21, krisspnet christophe.pou...@gmail.com wrote: Well no, the date did not changed on the server... /Off topic : Yes, true the use of Sanitize is not required./ -- View this message in

Re: Where should i contact right people in CakePHP.org because this security critical problem

2011-06-22 Thread euromark
i always do it the other way around in core debug=0 and if on localhost, raise it afterwards to 1/2 this way there should be no flaws On 23 Jun., 06:50, oceanguy seagri...@gmail.com wrote: I've been baking for over 3 years, and while I know leaving debug 0 is not kosher, I often leave it

Re: Where should i contact right people in CakePHP.org because this security critical problem

2011-06-21 Thread euromark
this is not really a security issue! if you hung up your door key on the front porch it would be your fault if you get robbed, too. it's the responsibility of the (cake) developer to turn debug of in production mode. non productive pages should be behind htaccess protection etc. simply write

Re: Where should i contact right people in CakePHP.org because this security critical problem

2011-06-21 Thread euromark
, and it certaintly suprised me how many sites this brings back with passwords on show. On Jun 21, 12:46 pm, yodi bashl...@gmail.com wrote: Sorry, it was on random site build by CakePHP. To Euromark, i found more than 100 website affected with this problem and i don't have much time

Re: Always I am getting error message in validation

2011-06-20 Thread euromark
or use if ($this-Post-validates()) { $this-Post-create(); $this-Post-save(null, false) } will only validate once as well and use the correct data array (previously validated) On 20 Jun., 12:44, Tilen Majerle tilen.maje...@gmail.com wrote: ok, first, why you validate 2 times?...just do

Re: Problems with CakePHP 1.3 and user helpers

2011-06-20 Thread euromark
jesus christ that looks awefully wild...^^ if you need sth to work both in controllers and helpers make a lib! otherwise use a component in your controller and if you really need to use a helper in a controller (should not be the case) app::import() it On 20 Jun., 14:56, Tilen Majerle

Re: Problems with CakePHP 1.3 and user helpers

2011-06-20 Thread euromark
by the way: http://www.dereuromark.de/2010/06/26/helper-component-lib/ if you need help on where use what when. On 20 Jun., 15:02, euromark dereurom...@googlemail.com wrote: jesus christ that looks awefully wild...^^ if you need sth to work both in controllers and helpers make a lib

Re: automatice cake bake in some parts?

2011-06-18 Thread euromark
did you try cake bake all etc? those options are available the only downside is that you cannot really change the default settings. i usually cannot use it because it would not bake admin views and stuff. but you can give it a try - maybe it works for you On 18 Jun., 17:39, mivogtGermanyLU

Re: How get the database name from a Model?

2011-06-16 Thread euromark
oops, i read table name. my bet On 16 Jun., 05:00, Dr. Loboto drlob...@gmail.com wrote: $databaseName = $this-getDataSource()-config['database']; On 16 июн, 00:06, Celso cels...@gmail.com wrote: Hi ! How get the database name from a Model? Because the $useDbConfig returns only

Re: Silent Mode on MYSQL Errors

2011-06-16 Thread euromark
i propose a 500 status code for this scenario it would also make sense for search engines which would otherwise process invalid content instead of knowing that they should simply retry it later on. On 16 Jun., 01:29, euromark dereurom...@googlemail.com wrote: Currently the default behavior

Silent Mode on MYSQL Errors

2011-06-15 Thread euromark
Currently the default behavior of any cake site if the database goes down is simply to function normally - without the data of course. this causes a lot of confusion among the users. they see all the static content of the page, the dynamic database loaded content is gone. they try to login but

Re: How get the database name from a Model?

2011-06-15 Thread euromark
i would go for $this-tablePrefix.$this-table prefix you would need if you used in your config tip: use a proper IDE which auto-completion this will show you the available names/fields inside your model On 15 Jun., 19:07, Tilen Majerle tilen.maje...@gmail.com wrote: $useTable -- Lep

Re: Little bit lost in space - trying to handle static pages

2011-06-10 Thread euromark
class ContactsController extends AppController { var $name = 'Contact'; .. that doesnt work!! class ContactController + $name = Contact On 10 Jun., 13:01, Ryan Schmidt google-2...@ryandesign.com wrote: On Jun 10, 2011, at 03:15, heohni wrote: I always get the error Undefined

Re: app_controller overwriting title_for_layout variable

2011-06-10 Thread euromark
i use this hack for 1.3: last thing of beforeRender(): # default title if (empty($this-pageTitle)) { $this-pageTitle = __(Inflector::humanize($this-action), true).' | '.__(Inflector::humanize(!empty($this-params['controller'])?$this-

Re: Filter out Elements in an Array

2011-06-07 Thread euromark
i think you are making a fuzz about nothing here :) in the end you need more time to create sth like this than you needed if you did write some function yourself if any of cake's functions can be used here it will be Set::extract() - or any other method of the Set class check if out - especially

Re: facebook style messaging system

2011-06-06 Thread euromark
yes i have i used conversations, (HasMany) conversation_users and (HasMany) conversation_messages pretty straight forward On 6 Jun., 06:46, Miqdad Ali mr.miqdad@gmail.com wrote: Hey I want to create facebook style messaging system in CakePHP ... anybody have done it ... anybody have idea

Re: Saving into id-less table

2011-06-06 Thread euromark
you always need some kind of id - or so called primary key/identifier which can be indexed what is that in your table? you need to adjust this manually in your model then var $id = name of primary key field; On 6 Jun., 10:45, thom cyber.phanto...@gmail.com wrote: Hello fellas, I am trying to

Re: UTF-8 and the » character

2011-06-06 Thread euromark
i guess your two files are encoded differently its very important that you save your view and layout files UTF8 encoded if you use any special chars in them my guess: only the layout is properly saved On 6 Jun., 14:20, Okalany Daniel dokala...@gmail.com wrote: Hi All, I have the » character in

Re: Saving into id-less table

2011-06-06 Thread euromark
sry i meant you need to adjust var $primaryKey since virtual fields are not very stable this is not a good idea at all. On 6 Jun., 11:31, thom cyber.phanto...@gmail.com wrote: On Mon, Jun 6, 2011 at 4:22 PM, euromark dereurom...@googlemail.com wrote: you always need some kind of id - or so

Re: cake bake not recognize in command prompt

2011-06-05 Thread euromark
what happens if you just type cake? did you try to restart? On 4 Jun., 07:55, aya ayoob.khodad...@gmail.com wrote: hi i use wamp server and i like use CakePHP but i can't use cake bake  aya in CMD . i already set path D:\wamp\cake\app\console\;D:\wamp\bin\php\;D:\wamp\bin\mysql

Re: why i use before save for save datetime in filed created and modified

2011-06-03 Thread euromark
you shouldnt be messing with created and modified in the first place cake will take care of that for you. On 3 Jun., 16:59, taq taqman...@gmail.com wrote: the two field have same value function beforeSave() {         if (!empty($this-data['Myprofile']['created']) !

Re: Some core helpers not available within elements

2011-06-02 Thread euromark
did you include them in the controller? maybe you use $html = something or $text = somethingElse this would break the objects of $this-Html and $this-Text as well... On 1 Jun., 13:51, the_nerd thenerd...@gmail.com wrote: Hi all, Some core helpers are not available within an element. e.g.

Re: MySQL Enum Values

2011-06-01 Thread euromark
enums are not supported by cake at least not the way you describe i guess i usually use http://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-attributes/ On 1 Jun., 20:43, Schemer illescas@gmail.com wrote: Hi all, In my view i want to display all the options of an enum typed

Re: Can't validate model ?!

2011-05-30 Thread euromark
you should use if(!empty($this-data)) {} see baked code examples as a beginner i strongly recommend that you use baking to create your views and forms On 29 Mai, 21:47, Niels steni...@gmail.com wrote: Hey everybody, I'm new to CakePHP, so don't shoot me if I made a stupid mistake. I'm

Re: Dates

2011-05-30 Thread euromark
not in scaffolding bake your views and then simply modify them to your needs there are filter plugins out there that can be used almost with drag- and-drop On 29 Mai, 14:10, Jae Choi hybm...@hotmail.com wrote: In a list view under scaffolding, is there a way we can create a form at the top so

Re: Editing ID

2011-05-27 Thread euromark
updateAll is usually NOT for unsecured user input its for atomic queries and multiple changes mainly but if you use it for user input you have to secure your data of course (manually!) PS: all you needed was to add the id to the data array this-data['Poscheck']['id'] = $id; $save =

Re: Creating an input list and parsing it

2011-05-27 Thread euromark
the type should not be changed, either use input or textarea after posting it you can process the string and explode() it into pieces then you can iterate over this result array and save all records On 26 Mai, 23:41, Schemer illescas@gmail.com wrote: I am trying create an input field, where

<    5   6   7   8   9   10   11   12   13   14   >