Re: CakePHP 2.0.0 Stable

2011-03-15 Thread Tilen Majerle
OK Thank you...:) -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/3/15 mark_story mark.st...@gmail.com More. Our normal release process includes an alpha, beta, and usually at least 3 RC releases. None of these have happened yet. And they will not all transpire in one month. -Mark

Re: Problem with selecting associative model data

2011-03-15 Thread heohni
Hi, I tried this: $this-paginate = array( 'conditions' = array( 'Agentprovision.agent_id' = $id ), 'fields' = array( 'Agentprovision.id', 'Agentprovision.apr_status', 'Agentprovision.apr_summe', 'Payment.created' ),

Re: CakePHP 2.0.0 Stable

2011-03-15 Thread WyriHaximus
Is there any ETA for the first alpha? On Mar 15, 3:00 am, mark_story mark.st...@gmail.com wrote: More. Our normal release process includes an alpha, beta, and usually at least 3 RC releases.  None of these have happened yet.  And they will not all transpire in one month. -Mark On Mar 14,

Question about $virtualFields

2011-03-15 Thread heohni
Hi, I am using the $virtualFields when I do a paginate for a find. But it works only when I have not restrictions on the fields. var $virtualFields = array( 'memberfullname' = 'CONCAT(Member.mitg_nachname, , , Member.mitg_vorname)', ); As soon as I limit the fields, I can't select

select multiple options

2011-03-15 Thread cake-learner
how can i select multiple options? i do like this but didn't work. ?= $form - select( 'SurveyCategory.'.$index.'.department_list', $department_list, array( 'selected' = array( 232,233 ), 'mutiple' = 'true' ), array( 'multiple'='true', 'class' = 'input_selection group_selection' ) ); ?

Re: select multiple options

2011-03-15 Thread Stephen
Try this instead: ?php echo $form-input('SurveyCategory.'.$index.'.department_list', array('options' = $department_list, 'selected' = array(232, 233), 'multiple' = true, 'class' = 'input_selection group_selection')); ? I wouldn't use short tag (?=) as it will become depreciated in later versions

Re: how to recognize App in SHELL mode?

2011-03-15 Thread toka...@gmail.com
Hi to all, thanks for your replies!! http://groups.google.com/group/cake-php/browse_thread/thread/3fc6b2c82433c7de?hl=en# PHP_SAPI const is what I was looking for and I did not know where to find :-) now it is working great and I can easily recognize CLI and WEB! btw ... gethostname() was not

Re: obfuscate hash form ids

2011-03-15 Thread arron
its not my only form of security i just wanted another layer to make it harder for anyone to hack it. whats wrong with making it harder for someone to know what your database tables are? how can you hide them? is there a better way? On Mar 14, 5:15 pm, arron w...@wwisinc.com wrote: I want to

Re: obfuscate hash form ids

2011-03-15 Thread euromark
you dont really hide them - you just rename them you need to start off at a totally different angle - in particular: http://www.dereuromark.de/2010/09/21/saving-model-data-and-security/ On 15 Mrz., 16:30, arron w...@wwisinc.com wrote: its not my only form of security i just wanted another

Re: obfuscate hash form ids

2011-03-15 Thread Sam Bernard
If you really want to do this, the best way would be to extend the formHelper to generate the obfusciated fields and then a component that will convert it back to a normal data array before the controller action gets it. -- Our newest site for the community: CakePHP Video Tutorials

Re: obfuscate hash form ids

2011-03-15 Thread Renato de Freitas Freire
I agree with aaron. Security is never too much. I never tought about this issue. Its not a real issue, but think a little further, if one day they discover a bug in cakephp core that let you execute sql querys. This could be a problem, since the table names and fields are avaliable on source

Redirect to wrong page when form isn't correctly filled in

2011-03-15 Thread Kevin Vandenborne
Hey everyone, I have a little problem - possibly something stupid but i can't seem to fix it. I have a blog and I'm displaying a comments form on it, when i fill the form and press enter - it adds the data as expected. But if a field was empty and isn't suppose to be empty, then it goes to

Re: obfuscate hash form ids

2011-03-15 Thread AD7six
On Mar 15, 4:30 pm, arron w...@wwisinc.com wrote: its not my only form of security i just wanted another layer to make it harder for anyone to hack it. Are you using the security component? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the

cakephp with NuSphere PHPed

2011-03-15 Thread farly tjoanda
hi, im new to cakephp and im interested to use cakephp for my final project anyone know how to use cakephp with nusphere phped? i mean to integrate cakephp with nusphere phped so i can use feature like when we pres ctrl+space in delphy (i dont know what's that feature named). thanks before. --

Re: how to recognize App in SHELL mode?

2011-03-15 Thread cricket
On Tue, Mar 15, 2011 at 12:22 AM, Ryan Schmidt google-2...@ryandesign.com wrote: On Mar 14, 2011, at 14:33, cricket wrote: Test whether $_SERVER exists. That won't work because $_SERVER *does* exist, even for a CLI script. (In that case, it contains things like $_SERVER['argv'].) I meant

HABTM COUNT Working but SELECT not adding join table

2011-03-15 Thread Mike Digital
I've got two tables and a join table: * drink_reviews * comments * comments_drink_reviews I am trying to paginate on a specific category and here in lies the problem: $this-Category-DrinkReview-bindModel(array('hasOne' =

Having trouble getting cake bake to work

2011-03-15 Thread Mark Murphy
I've installed the latest version of CakePHP on a Ubuntu 10.10 machine. I was able to run through a beginner tutorial just fine so I think my configuration is close to being correct. I can't get cake bake to completely work though. Below is my session. Things that look like anomolies are marked

CakePHP Enviroment

2011-03-15 Thread Maxwell
Hellow Fellos!!! I am a new graduate from university and works as an intern with one of our government's department. We use php to develop web applications. Problem is that the framework being used currently is not fully Object Oriented and knowing the benefits of the PARADIGM one would want to

Re: select multiple options

2011-03-15 Thread Shinya Koizumi
?php echo $form-input('SurveyCategory.'.$index.'.department_list', array('options' = $department_list, 'selected' = array(232, 233), 'multiple' = true, 'class' = 'input_selection group_selection')); ? Didn't work I also added 'type' = 'select' in the array but still didn't work The rest should be

acl :: deny access to PostsController

2011-03-15 Thread AKO
So I read the tutorial over and over again and cant figure out why my permissions are not working.. I followed the tutorial 11.2 and have almost similar structure but instead of 'posts' and 'widgets' i have only 'tests': - superadmin has acces to all controllers - admin has acces to all

Re: obfuscate hash form ids

2011-03-15 Thread Graham Weldon
Security through obscurity is not a solution. Fortunately, if you use the CakePHP Security component, you need not worry about form manipulation, sql injection, and all other forms of nasties. I really do encourage you to use the Security component for what you need. That said, you can achieve

Re: Problem with selecting associative model data

2011-03-15 Thread cricket
On Tue, Mar 15, 2011 at 3:32 AM, heohni heidi.anselstet...@consultingteam.de wrote: Hi, I tried this: $this-paginate = array(            'conditions' = array(                'Agentprovision.agent_id' = $id            ),            'fields' = array(                'Agentprovision.id',

Re: Question about $virtualFields

2011-03-15 Thread LipeDjow
Not sure, but try this: array('CONCAT(Member.mitg_nachname, , , Member.mitg_vorname) as `Member.memberfullname`') HTH LipeDjow -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others

Re: Question about $virtualFields

2011-03-15 Thread cricket
On Tue, Mar 15, 2011 at 5:48 AM, heohni heidi.anselstet...@consultingteam.de wrote: Hi, I am using the $virtualFields when I do a paginate for a find. But it works only when I have not restrictions on the fields. var $virtualFields = array(        'memberfullname' =

Re: HABTM COUNT Working but SELECT not adding join table

2011-03-15 Thread cricket
On Tue, Mar 15, 2011 at 12:59 AM, Mike Digital thethirstydu...@gmail.com wrote: I've got two tables and a join table: * drink_reviews * comments * comments_drink_reviews I am trying to paginate on a specific category and here in lies the problem:

Corrupted app/tmp/cache/views/ Files

2011-03-15 Thread Dwayne
I've run into the following problem sporadically on different sites we have running on top of Cake: A client will report in that some page or other isn't loading, when it's examined the page will be a blank screen. Turning on debug will give a PHP syntax error in the cached file in

Re: how to recognize App in SHELL mode?

2011-03-15 Thread Ryan Schmidt
On Mar 15, 2011, at 08:55, toka...@gmail.com wrote: btw ... gethostname() was not working (using Mac OS + XAMPP) so I use this instead php_uname('n'); http://php.net/manual/en/function.gethostname.php gethostname() works fine on my Mac, but does require PHP 5.3.0 or later. -- Our newest

Re: Corrupted app/tmp/cache/views/ Files

2011-03-15 Thread Miles J
I have had a similar problem, a few questions? Are you using Dreamhost? I am assuming you are using filesystem cache, have you tried Memcache or APC? What OS is your server running? On Mar 15, 12:57 pm, Dwayne dwayne.kristjan...@gmail.com wrote: I've run into the following problem sporadically

Re: CakePHP Enviroment

2011-03-15 Thread Ryan Schmidt
On Mar 14, 2011, at 05:42, Maxwell wrote: Any help would be much appreciated on how to set up my enviroment so I could start using cake php. Sounds like you should start by spending a few hours reading the book: http://book.cakephp.org/ -- Our newest site for the community: CakePHP

Re: Cache filenames messed up

2011-03-15 Thread Sarpidon
It worked!!! Thanks!!! On Mar 14, 2:51 pm, Sarpidon epap...@gmail.com wrote: Thank you Jeremy. I am going to try that and see... On Mar 2, 5:08 pm, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: This has come up before, but the answer is not obvious. Here's a stolen

Re: Question about $virtualFields

2011-03-15 Thread dreamingmind
Perhaps the fields involved in assembly of the virtualField need to be in the field list for the find. Don On Mar 15, 2:48 am, heohni heidi.anselstet...@consultingteam.de wrote: Hi, I am using the $virtualFields when I do a paginate for a find. But it works only when I have not restrictions

problem checking if user is logged in from any controller other than users

2011-03-15 Thread Eugene
I have ajax log in on my website. I have a login form element that displays either a login form or a link to profile page depending if user is logged in or not. If i log in and got to profile page which is in users controller then it works fine but on all the other pages user is not logged in

mp4 metadata

2011-03-15 Thread jet trick
hello guys. Someone knows how to get metadata from .mp4 files using cakephp? i used google but couldnt find something :( ps sorry for my english ^_^ -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site

Re: mp4 metadata

2011-03-15 Thread Ryan Schmidt
On Mar 15, 2011, at 12:21, jet trick wrote: Someone knows how to get metadata from .mp4 files using cakephp? I don't know of a CakePHP-specific solution for that. I'd recommend looking for a plain PHP way to do that, and then write a CakePHP library for it, or just incorporate it into your

Re: CakePHP 2.0.0 Stable

2011-03-15 Thread mark_story
Not really, I haven't had much time to really work on things. New baby and all. I'd like to get a 1.3 and 1.2 release out before doing a 2.0 alpha. Of course if you're interested in checking how 2.0 is progressing, the code is always available on github. Not like alpha releases guarantee any

Re: How to validate multiple fields with the same name?

2011-03-15 Thread Eddy
Thanks, I can't believe the solution was so simple! With saveAll() the data gets validated just as I needed. Thanks!! The only changes I had to do were in the controller /// IN THE CONTROLLER function listProducts() ?php function listProducts() if( !empty($this-data) ) {

Re: mp4 metadata

2011-03-15 Thread cricket
On Tue, Mar 15, 2011 at 1:21 PM, jet trick riruka.h...@gmail.com wrote: hello guys. Someone knows how to get metadata from .mp4 files using cakephp? i used google but couldnt find something :( ps sorry for my english ^_^ Try this: http://getid3.sourceforge.net/ If you're on Ubuntu: sudo

Re: problem checking if user is logged in from any controller other than users

2011-03-15 Thread cricket
On Tue, Mar 15, 2011 at 3:07 PM, Eugene yeti.mos...@gmail.com wrote: I have ajax log in on my website. I have a login form element that displays either a login form or a link to profile page depending  if user is logged in or not. If i log in and got to profile page which is in users

Re: Question about $virtualFields

2011-03-15 Thread cricket
On Tue, Mar 15, 2011 at 8:05 PM, dreamingmind dreamingmin...@gmail.com wrote: Perhaps the fields involved in assembly of the virtualField need to be in the field list for the find. No, that's not the case. Given a table with columns id, first_name, last_name we can do: SELECT id,

Re: Cascade Cake vs DB

2011-03-15 Thread cricket
On Tue, Mar 15, 2011 at 8:34 PM, Krissy Masters naked.cake.ba...@gmail.com wrote: What are your general thoughts on using Cascade on delete in Cake vs setting up the db to handle deleting related data? Is better to do which? Any reason for choosing one over another? Not all DBs support it.

RE: Cascade Cake vs DB

2011-03-15 Thread Krissy Masters
Right. Good point. So I rephrase the question... if your db can handle it and you have the option to choose to have cake handle the relation deletes or use foreign key restraints which is best? Is there a reason to choose 1 over the other? -Original Message- From:

cakephp find

2011-03-15 Thread cakebaker
I am trying to run cakephp find query for the following sql query: $sql=select * from books where book_username='this-$username'; $this-Book-find('all',array('conditions'= array('User.username'='myName'),'fields'='Book.name','order'= 'Book.id ASC','limit'=10,'recursive'=0)); what is wrong with

Re: Having trouble getting cake bake to work

2011-03-15 Thread cakebaker
try this way: /var/www/cake/app (cake is the application name) cake bake -app /var/www/cake/app set the project that way..and retry...!! On Mar 15, 8:23 am, Mark Murphy mobitin...@gmail.com wrote: I've installed the latest version of CakePHP on a Ubuntu 10.10 machine. I was able to run through

Re: Cascade Cake vs DB

2011-03-15 Thread Zaky Katalan-Ezra
I try to follow these rules of thumb 1. If the database know how to do it do it in the database. 2. The less code you write the better. Writing functional processes in the database give you more option to test your logic. If it work in the database and not in the application you know where you

Re: problem checking if user is logged in from any controller other than users

2011-03-15 Thread Zaky Katalan-Ezra
in your app_controller beforeFilter add this line: $this-set('loginuser',$this-Auth-user()); In any view or layout you can check for $loginuser. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org

Re: CakePHP 2.0.0 Stable

2011-03-15 Thread keymaster
Mark, Are you all by yourself on the core development, or is there a team actively helping you? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related

Re: Cascade Cake vs DB

2011-03-15 Thread Jeremy Burns | Class Outfit
Foreign keys, indexes and referential integrity are important for the database for reasons way beyond the PHP/Ajax you have written to interact with it, such as performance and data integrity. I would never abandon them. My 2c worth: If cascading deletes (CD) are [really] important to the model