I created a Behavior that logs some information to another table.
Anyone has a pattern on how to create a testcase for this type of
behavior?
I have tried using the TestCase patterns on the bakery and it appears
that behaviors listed there do not use a different table in the
database.
thanks.
I agree with you... Infact, I've been thinking about it from long
time. Its surely a security risk... Though it looks like we are just
exposing the database structure, but its still a confidential
information, which can take attacker to his aim
Cake might be secured enough, but consider some
Try
link('Home', array('controller'=>'docs',
'action'=>'index', admin=>false)); ?>
Note tested though.
Geoff
--
http://lemoncake.wordpress.com
On Oct 10, 3:45 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I use $form->create and $html->link all through my site, but sometimes
> I need to
I use $form->create and $html->link all through my site, but sometimes
I need to link to a non-admin page from an admin page (or visa-versa).
For example, I do this on an admin page:
link('Home', array('controller'=>'docs',
'action'=>'index')); ?>
and it will send me to /admin/docs/index/
But,
The other thing you need to do is make sure you've added "Form" to the
$helpers array in your controller.
On Oct 9, 7:36 am, Justin <[EMAIL PROTECTED]> wrote:
> first time cake user, trying to get up to speed.
>
> I want to use the FormHelper, but when I do it tells me that no such object
> exist
On Oct 10, 4:19 pm, Comida411 <[EMAIL PROTECTED]> wrote:
> When the page is rendered if some one does a view source he can
> clearly see the table name and the coloum name.
>
> Is it not a security risk?
Arguably it gives an attacker more information - but it's no more of a
risk than the attacker
Thanks for all of you replies.
if i want to use myfolder's session in cakephp files. Then what should
i do ?
Thanks again !!
On Oct 10, 2:59 am, Travis Cline <[EMAIL PROTECTED]> wrote:
> On Oct 9, 3:28 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > Cake creates a new session. Check
Assuming you have reasonable security in your database (strong
passwords with normal expiration periods, hard to guess user names,
updated db software), I don't know why you'd care about this.
Would it *really* be a big problem if you were forced to publish your
data model on your website? What d
I am a new bee to cake PHP and I have a concern on the way cake expses
the data model of the application in the view.Since we have to follow
a naming convention for cake to update the model automatically from
the view. I see there is a risk of exposing once's data model.
Example:
I have a user ta
lol, did you actually try to access these methods via browser? if you
start it with and underscore, it does not get dispatched.
but yeah if you have too many methods in your controller you are
likely doing something wrong. most logic should go in your models.
On Oct 9, 2:56 pm, stefanb <[EMAIL P
Looks like you need to use $form->create(), and then $form->input();
in your post view.
Try baking your views with the console application 'cake bake' (check
out the screencasts on this subject: http://cakephp.org/screencasts )
to see how they get baked by default, its a great way to learn. As
w
$db =& ConnectionManager::getInstance();
$default_prefix = $db->config->default['prefix'];
On Oct 9, 10:14 pm, Meloy <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I'm looking for a way to access the database-prefix (set in
> database.php) in a controller to use it in a custom query but can't
> manage to
Still Stumped has anyone else ran into this issue? Thanks
On Oct 9, 3:36 pm, seacloud9 <[EMAIL PROTECTED]> wrote:
> Anyones help in this matter would be greatly appreciated truly
> stumped..
>
> On Oct 9, 12:17 pm, seacloud9 <[EMAIL PROTECTED]> wrote:
>
> > I have been working on the blog tutoria
That isn't accurate either.
The model can set any data it wants. The controller should then forward that
data onto the view. There is no definitive right or wrong way to generate
the error messages - simply a correct layer for displaying them.
If the error pertains to the data the model is suppo
Ok, one thing I'm running into when I use the default.ctp layout is
that it works for the top layer view but not more detailed views...
so the website I'm working on is:
http://www.tolerase.com/posts
In this view the layout is rendering the content within my default
layout, however if I try to v
> I'm porting an existing application to Cake. One of the database
> tables was setup with a primary index that is made up of 3 columns,
> none are incrementing numeric values.
>
> The table's index is made up of:
> website_id
> link_id
> run_id
>
> Is this possible in Cake? Can I tell Cake not
On Oct 9, 3:28 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Cake creates a new session. Check PHP session_name('identifier')
> function.
>
> Check config/core.php file. You will find CAKE_SESSION_STRING
> constant. Copy the parameter into application script in "myfolder"
> like this:
> ses
Yep,
It really is this easy!
...and now I can bake my views as-they-should-be-in-my-project!
Hope this helps!
Dan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send emai
In Cake, they all go in your default layout:
masthead + primary navigation + footer =>
cake\views\layouts\default.ctp (or .thtml)
Just add in the middle where you
want your content to appear.
Wayne
On 10/9/07, brianfidler <[EMAIL PROTECTED]> wrote:
>
> I'm brand new to Cake and struggling a li
I'm brand new to Cake and struggling a little with the best way to
structure my files. Prior to cake I typically had an 'includes'
directory and a 'templates' directory. In the 'includes' directory I'd
usually put all of my database query code and logic files. In my
'templates' directory I'd usual
You should probably move this function to a component. What are you
doing in the function? Why is it in this particular controller?
If you insist on keeping it in the controller, you can do something in
beforeFilter(), perhaps something with $this->Security like calling
blackhole()? Not sure if t
Hmm, I already use _foo() for protected methods and __bar() for
private methods.
What I'm looking for, is some sort of config that allows my to say
"don't dispatch these methods" in an array or something...
On Oct 9, 10:34 pm, rtconner <[EMAIL PROTECTED]> wrote:
> use an underscore...
>
> _funct
Anyones help in this matter would be greatly appreciated truly
stumped..
On Oct 9, 12:17 pm, seacloud9 <[EMAIL PROTECTED]> wrote:
> I have been working on the blog tutorial. I enabled clean urls. I
> would now like to add comments but I have been having some issues
> Any and All help would
Well that's what I would have expected and is how I set it up to begin
with, but it didn't seem to work that way. I had my tables and
associations built exactly as you describe in your second example, but
when I called up a record from the Products model, it found no related
Image, because it see
Cake creates a new session. Check PHP session_name('identifier')
function.
Check config/core.php file. You will find CAKE_SESSION_STRING
constant. Copy the parameter into application script in "myfolder"
like this:
session_name('your identifier from cake');
session_start();
This way your applica
use an underscore...
_functionName() {}
On Oct 9, 12:43 pm, stefanb <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How can I specify that a public function in a controller should NOT be
> an action?
--~--~-~--~~~---~--~~
You received this message because you are subscribe
But why does it generate different queries for the same objects?
On 9 Oct, 18:47, Joshua Benner <[EMAIL PROTECTED]> wrote:
> You might consider a custom finderQuery. There are examples of this on the
> [EMAIL PROTECTED]:Hi, I have moved the project to the production server and I
> got this erro
Hello everyone,
I'm porting an existing application to Cake. One of the database
tables was setup with a primary index that is made up of 3 columns,
none are incrementing numeric values.
The table's index is made up of:
website_id
link_id
run_id
Is this possible in Cake? Can I tell Cake not t
Hi Friends,
i am in a bit of trouble. Here is my directory sturture :-
htdocs->app,cake.( all cakephp's files/directories ) , myfolder
I am creating a session in one of the file in myfolder and wants to
use those session variables in cake's files.
Now i have creted an session in Cakephp's
> > Yes, but according to the MVC pattern, what the user sees (like error
> > messages) really is supposed to go into the view, not the model...
>
> Are you saying that a model cannot generate error messages that need
> to be displayed in a view?
You *can*... But according to MVC principles, you
On 10/9/07, stefanb <[EMAIL PROTECTED]> wrote:
>
> Yes, but according to the MVC pattern, what the user sees (like error
> messages) really is supposed to go into the view, not the model...
Are you saying that a model cannot generate error messages that need
to be displayed in a view?
--
Chris
Hi,
How can I specify that a public function in a controller should NOT be
an action?
--~--~-~--~~~---~--~~
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
Yes, but according to the MVC pattern, what the user sees (like error
messages) really is supposed to go into the view, not the model...
On Oct 9, 8:09 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On 10/6/07, stefanb <[EMAIL PROTECTED]> wrote:
>
> > In my view:
> > $form->input('name', array(
On 10/6/07, stefanb <[EMAIL PROTECTED]> wrote:
> In my view:
> $form->input('name', array('type' => 'text', 'class' => 'input_text',
> 'error' => array('required' => 'Name is required', 'length' => 'This
> field can only be 20 characters long')))
>
> How can I avoid this? Can I fetch the rule in m
You might consider a custom finderQuery. There are examples of this on
the group.
[EMAIL PROTECTED]
wrote:
Hi,
I have moved the project to the production server and I got this
error:
---
SELECT `Post`.`id` , `Post`.`event_id` , `Post`.`visible` ,
`Post`.`time` , `Post`.`subject` , `Post`
Hi, I have a 'view applicant' controller/view which displays
somebodies details in a form, for viewing/editting. If they edit, it
calls upon the edit() action.. but if i validate in the edit action
and want to display error messages on the 'view applicant' view then
the error messages are out of s
So, I take it this is not possible in Cake?
On Oct 7, 7:46 pm, "R. Rajesh Jeba Anbiah"
<[EMAIL PROTECTED]> wrote:
> On Oct 6, 11:24 pm, stefanb <[EMAIL PROTECTED]> wrote:> How can I fetch the
> validation parameters from my models?
>
>
>
> You may check related links
> inhttp://groups.goog
Hi,
I have moved the project to the production server and I got this
error:
---
SELECT `Post`.`id` , `Post`.`event_id` , `Post`.`visible` ,
`Post`.`time` , `Post`.`subject` , `Post`.`body` ,
`Post`.`published_in_forum`
FROM `posts` AS `Post`
JOIN `posts_tags` ON ( `posts_tags`.`tag_id` =10
AND `
I have been working on the blog tutorial. I enabled clean urls. I
would now like to add comments but I have been having some issues
Any and All help would be greatly appreciated. Thanks in advance for
your time.
/*-- Comments Model
--
create('Newuser',array('default'=> false)); ?>
It's $form->method() not $this->form->method();
--
Antonio Cortés (Dr Zippie)
"El ordenador es la evolucion logica del hombre: Inteligencia sin moral":
John Osborne.
"A nullo videbatur, ipse autem omnia videbat"
--~--~-~--~~--
first time cake user, trying to get up to speed.
I want to use the FormHelper, but when I do it tells me that no such object
exists.
Code (register.thtml):
form->create('Newuser',array('default'=> false)); ?>
end();?>; ?>
Result:
*
*
*Notice* (8) : Undefined property: View::$form
[*CORE/app/
Hi,
I'm new to jQuery, but I wonder if it is possible to return a result
via controller that jQuery can handle on success?
I'm trying to POST data to an "add" method, and on success loading the
view with the right $id. Anyone know how to do that?
thanks
--~--~-~--~~~--
I added my last website: www.sandroni.it.
Its main features:
- an unlimited-deep menu structure, with multiple parents per node.
- two kinds of page: normal page and "lavorazioni", that are pages
with different tabs (in-depth description, technical sheet,
downloadable files, faq...).
The next ste
I have combined the two words in the controller file name, because
time is of the essence. However, I do plan to investigate the
routes.php solution you both have provided (thank you very much!). My
concern with combining the two, although it works just fine, is that
it is not proper use of conv
On 9 Ott, 10:16, M <[EMAIL PROTECTED]> wrote:
> Hello, I have the following problem.
>
> I would like to use PHPLIST on the same server where I installed a web
> application based on CAKEPHP.
I set-up a third-level domain (newsletter.mywebsite.it) that points
to /newsletter. Note that in the root
Hi!
I'm looking for a way to access the database-prefix (set in
database.php) in a controller to use it in a custom query but can't
manage to find it...
Can someone help?
Regards
Meloy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Hey,
Has anyone used this for rewriting on IIS:
http://cheeso.members.winisp.net/IIRF.aspx
If so what rules did you use to make cakephp work
Thanks
Phill
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP
burzum wrote:
>My problem is that i have a multipage-report, or better to say one big
>report (table) with ~500 fields devided into some pages with a list of
>pages to make it less confusing. Some of the pages contain 1 to 12
>images. Now my question or problem:
>
>How do i handle them in a good
Fran,
This will be supported soon with the new media view class that has ben added
to the 1.2 branch.
--
/**
* @author Larry E. Masters
* @var string $userName
* @param string $realName
* @returns string aka PhpNut
* @access public
*/
On 10/9/07, Fran Iglesias <[EMAIL PROTECTED]> wrote:
>
>
>
dardosordi, that is exactly the solution to my problem!
Thank you!
--~--~-~--~~~---~--~~
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
JS and CSS in the vendors folder is not supported on installations
without mod_rewrite.
On Oct 9, 4:38 am, Fran Iglesias <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to put some shared CSS into the vendors/css folder, but
> they are not loaded at all. All links echoed by $html->css() point t
This sounds like a concurrency issue. What database are you using?
On Oct 9, 12:04 am, Loci-master <[EMAIL PROTECTED]> wrote:
> Hello everyone.
>For the start, I`ll explain what configuration do I use. It`s
> CakePHP 1.2.0.5427alpha and usual built-in CakePHP Test Suite v
> 1.2.0.0.
>
> The
On 10/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi
> How can I set a rules in validation data between two field of model?
>
> example
>
> fielad A < field B
>
> var $validate = array(
> 'fieldA' => 'fieldA < fieldB'
> );
>
> Many Thanks
>
In CakePHP 1.2, you can crea
> if you look at Cake's session component and helper, they are quite
> similar, but exactly, so I guess to start true to MVC that's exactly
> what you should do.
I meant 'not exactly' above!
jb
--
jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett
--~--~-
> I know that it's not really an MVC behavior but I wouldn't rewrite a
> component with the same function of the calendar helper to manage date
> and time in a controller.
if you look at Cake's session component and helper, they are quite
similar, but exactly, so I guess to start true to MVC that
Thank you for fully understanding the question. It is very difficult
to look up the source for a function that does not exist. I wouldn't
even know where to start.
Cory
On Oct 4, 9:10 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
> I didn't answer Cory because I didn't know the answer - it's a
> beha
But this data was allready available in the view before with right? As
long as you setup the assocation correct in the model and the
recursive? I thought the advantage of this was you had access to this
data in the controller.
On Oct 9, 8:36 am, "R. Rajesh Jeba Anbiah"
<[EMAIL PROTECTED]> wrote:
Maybe this can help:
http://groups.google.com/group/cake-php/browse_thread/thread/88486a5e156d7242/c3b9a9bd6f861d99#c3b9a9bd6f861d99
ciao
Stefano
On 9 Ott, 10:16, M <[EMAIL PROTECTED]> wrote:
> Hello, I have the following problem.
>
> I would like to use PHPLIST on the same server where I insta
Hi
How can I set a rules in validation data between two field of model?
example
fielad A < field B
var $validate = array(
'fieldA' => 'fieldA < fieldB'
);
Many Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
Hi,
I'm trying to put some shared CSS into the vendors/css folder, but
they are not loaded at all. All links echoed by $html->css() point to
webroot. I'm not sure if I need to do something more.
The server enviroment is:
- PHP as CGI (Server API CGI/FastCGI)
- Shared hosting
- PHP 4.3.11
-
Hello, I have the following problem.
I would like to use PHPLIST on the same server where I installed a web
application based on CAKEPHP.
I tried to install PHPLIST under the webroot, but it does not work
(has some problem with POST and storing variables in session).
If I install PHPLIST in the
I know that it's not really an MVC behavior but I wouldn't rewrite a
component with the same function of the calendar helper to manage date
and time in a controller.
On 9 Ott, 02:33, francky06l <[EMAIL PROTECTED]> wrote:
> Well it's not really an MVC behavior, but in cake you can use
> loadHelpe
62 matches
Mail list logo