Hi,
Is there an elegant way to completely l6e (localize) the InputHelper's
Date widget? I know about being able to translate month names via .po
files. But I want to built a date input in Japanese, and the 100%
correct way would be like this:
2008年10月29日, i.e. inserting 年, 月 and 日 either be
On 9 Sep 2008, at 16:28, David C. Zentgraf wrote:
> The URL /test implies /test/index, which means Cake will look for
> this:
>
> app/controllers/test_controller.php (needs to have function index())
> app/views/test/index.ctp (or .thtml for Cake 1.1)
Forgot of course that test_controller.php i
Hi!
I have a tree structure like this:
Array (
[0] => Array (
[Location] => Array (
[id] => 1
[parent_id] =>
[lft] => 1
[rght] => 32
[name_en] => Tokyo
Hi,
I was wondering if anybody has thought about adding support for
"manual sorting" to Cake.
In my specific case, I need to paginate a model and want to order it
by the average score of ratings that are stored in another table
(Place hasMany Rating; ORDER BY AVG(Rating.score)). The best so
Hi,
I just updated to the latest svn version 1.2.0.7531, and suddenly Cake
won't find my DB tables anymore.
class Place extends AppModel {
...
var $hasAndBelongsToMany = array(
'Station' => array(
'className' => 'CgStation',
I suppose I'm talking about this:
http://book.cakephp.org/view/21/a-typical-cakephp-request
Just right now I feel it's neither high-level enough nor detailled
enough to really help. Adding code examples would be great. Following
variables/data throughout the application would help (controller
Okay, sorry, please ignore. There _was_ an 'item' relationship which
shouldn't have been there.
Better go get some lunch... ;o)
On 11 Jun 2008, at 13:16, David Christopher Zentgraf wrote:
> Hi,
>
> I'm trying to bake my controllers via the console. My app
Hi,
I'm trying to bake my controllers via the console. My app and Cake
directories are separated, the Cake folder is in /path/to/trunk/cake/
cake, my app in /path/to/trunk/shop/admin.
From /path/to/trunk/cake/cake/console I do this:
$ ./cake -app /path/to/trunk/shop/admin
...
--
Hi,
With the release of RC1 (Cheers!), I'll use the opportunity to ask the
list what you use to update your Cake builds.
What's the best tool for you to merge directory structures? Something
like Diff for whole trees.
I tried several tools on the Mac, but none have really worked all that
we
On 20 May 2008, at 08:21, Dardo Sordi Bogado wrote:
> I've didn't noticed it, isn't anyone else using the Cake schema shell?
> If that is the case, they are missing a great tool.
Speaking for me personally, I'm not using schema because there's very
little documentation to be found. This thread
Don't fumble around with index.php UNLESS you deliberately moved the /
cake and /app directories from their original locations.
What you probably want to do is edit the 3 .htaccess files in / , /app
and /app/webroot to look something like this:
RewriteEngine on
RewriteBase /~user/
Hi,
1) $validate goes into the Model, not the controller!
http://book.cakephp.org/view/66/models
2) $form is the Helper, and you'll need to specify in the Controller
which helpers you want to be able to use in the View.
http://book.cakephp.org/view/98/helpers
Chrs,
Dav
On 19 May 2008, at 21:
.)
> [User] => Array (...)
> )
>
> [1] => Array ...
> )
>
> Has been modified from a normal mysql query result... in what way is
> this a "flat" array?
> What output are you trying to achieve?
>
>
>
>
> On May 19, 11:39
I see, thanks!
I played around with finderQueries a bit more and got them to work to
some extend, but not perfectly.
Depending on which model I'm querying from, Cake throws away part of
the results I'd like to keep, as it doesn't seem to think the result
is related enough to the querying mo
`User`.`email`, `User`.`password`, `User`.`group`,
> `User`.`first_name`, `User`.`last_name` FROM `conversations_users` AS
> `ConversationsUser` LEFT JOIN `conversations` AS `Conversation` ON
> (`ConversationsUser`.`conversation_id` = `Conversation`.`id`) LEFT
> JOIN `users` AS `User` O
Can you post the SQL queries generated by Cake?
Sounds really weird.
On 18 May 2008, at 16:04, oana wrote:
>
> Hi Keith,
>
> Your summary is very accurate, that is exactly what's happening.
>
> This is how i select the conversations for an user, in the user
> controller:
>
> $this->set('conversa
Hi,
I've read many posts on this topic, but I haven't figured out how to
do it right yet.
I have four models linked together (Transaction hasMany Intermediators
belongsTo Account belongsTo User), and I want to run a query on a
"removed cousin", like $this->Account->Intermediator->Transacti
foreach() does neither modify nor unset the original array unless
explicitly told to.
Maybe you're having issues with the array pointer?
http://jp2.php.net/foreach
> foreach has some side effects on the array pointer. Don't rely on
> the array pointer during or after the foreach without reset
Done: http://bin.cakephp.org/view/579746692
Please have a look.
On 14 May 2008, at 19:41, Marcin Domanski wrote:
>
> post your app_controller and routes.php to the bin
>
> On Wed, May 14, 2008 at 10:03 AM, David Christopher Zentgraf
> <[EMAIL PROTECTED]> wrote:
>>
&
Hi,
I ran into this situation:
I'm using the Auth and Acl components to lock down my system.
Really limited accounts basically have no right besides viewing and
editing their own profile page.
I disabled autoforwarding in the Auth component and set up some
customized redirects:
a) if the use
Ich weiß net genau wie's mit 1.1 steht, aber in Cake 1.2 sollte $this-
>Model->id eigentlich immer die aktuelle ID enthalten. Notfalls mal
unter $this->Model->data['Model']['id'] nachschauen?
Seriously, write English, will ya?
Gruß.
On 13 May 2008, at 20:45, grobald wrote:
>
> sIst sicher
/controller/action
> You should see http status 200. If you see anything else 302 (probably
> login redirect), 401 (authentication needed). Anyway, you should see
> something other than an OK 200 response.
>
>
>
> On May 13, 6:31 am, David Christopher Zentgraf <[EMAIL PROTECTED
Actually, you may run into problems with this:
var $validate = array(
array(
'rule' => array('validateUnique', 'email')
),
);
function validateUnique($fieldValue, $fieldName) {
if (!$this->isUnique($fieldName)) {
return false;
} els
Okay, that's weird.
Setting Debug to 1 in core.php suddenly gives me an output.
Even though in my remote action I explicitly call:
$this->layout = 'ajax';
Configure::write('debug', 0);
Interestingly, if I set debug to 0 in core.php and try to turn it back
on in my action, it doesn't work eithe
Hi,
I have a rather peculiar problem:
I have a CakePHP app that external apps need to query some data from.
Any app can basically send a request to a special controller action
with a few encoded parameters in the URL, and the action will return a
blank page with only the words true or false
Hi,
I have a similar setup, where a user has many Accounts, but also has a
default account.
My model looks like this:
class User extends AppModel {
var $name = 'User';
var $belongsTo = array(
'DefaultAccount' => array(
'
Since I'm manually specifying the table name I can call it whatever I
want actually.
No, the problem turned out to be in one of my validation functions,
the checkUnique() function I just took straight from the manual.
For some reason it only came up as a problem in the context of HABTM
saves
;joinTable'=> 'user_friends',
> 'foreignKey'=> 'User.user_id',
> 'associationForeignKey' => 'Friend.friend_id',
> 'unique'=> true
> )
>
nForeignKey' => 'friend_id',
'unique'=> true
)
);
}
On 7 May 2008, at 15:22, Grant Cox wrote:
>
> Can you post your $hasAndBelongsToMany variable definition? I think
> you'll be ab
Hi,
I'm stumbling across bug number 4194. https://trac.cakephp.org/ticket/4194
I have a User model, which has a `name` field.
This User hasMany Accounts, which also have a `name` field.
The User also hasAndBelongsToMany other Users as a friend relationship.
User (`name`, ...)
|
|- hasMany
| |-
Hi,
I wrote a user/login/permission management app in Cake 1.2.
I'm now looking for ways to integrate that into other (non-Cake) apps,
so their permissions and users can be centrally managed.
My idea is to have a small .php file which could be included() from
apps, providing them with an obje
I just had that same issue the other day, see thread:
http://groups.google.com/group/cake-php/browse_thread/thread/3ada672bf5a86b6b/cf386c0d99eca0bf
Basically, all you do is this in your core.php config file:
Configure::write('Config.language', "eng");
This establishes the default language for y
On 22 Apr 2008, at 16:28, [EMAIL PROTECTED] wrote:
> A few things that may cause a change in beforeFilter not to work is
> that you have to set it to eng, fra or swe... not en_us, se_sv or
> something similar (just checking). You should try this with all
> caching off for a start (see above). Als
$i18n = I18n::getInstance();
> $i18n->l10n->get($lang);
>
> hope this helps.
> /Martin
>
> On Apr 21, 12:28 pm, francky06l <[EMAIL PROTECTED]> wrote:
>> I use the l10n/i18n to set language, my method is close to yours
>> except that I set the language using :
&
:28 pm, francky06l <[EMAIL PROTECTED]> wrote:
>> I use the l10n/i18n to set language, my method is close to yours
>> except that I set the language using :
>> $l10n = & new L10n();
>> $l10n->__setLanguage($lang)
>>
>> hth
>>
>> On Apr 21, 8:51 am,
This seems to be the cause of a lot of complaints about l10n/i18n not
working.
I set up two languages in my app: 'eng' and 'jpn'.
In core.php I added:
define('DEFAULT_LANGUAGE', 'eng');
Configure::write('Config.language', 'en');
In my app_controller beforeFilter:
$lang = $this->Auth->user('pr
d something in my solution.
>
> Check it out, and see if it works for you as well.
>
> Since the solution relies on lft and rght values, it will work no
> matter what order the ACO and ARO nodes were created in.
>
> -Aran
>
> On Apr 9, 9:10 pm, David Christopher Zentgraf &l
gt;>
>>> The issue only seems to apply to situations in which the overlapping
>>> permissions are from the same ARO node. I'm not sure this is
>>> going to
>>> be considered buggy behavior by the developers.
>>
>>> Instead, it seems lik
the check loop
would need to be revised IMHO.
On 10 Apr 2008, at 04:06, Chris Hartjes wrote:
>
> On Wed, Apr 9, 2008 at 2:34 AM, David Christopher Zentgraf
> <[EMAIL PROTECTED]> wrote:
>>
>> Ignore my previous fix, only works under certain conditions.
>
>Aro->Permission->alias);
The checking algorithm still needs some revisitation.
On 9 Apr 2008, at 13:15, David Christopher Zentgraf wrote:
> Posted a possible fix in https://trac.cakephp.org/ticket/4450 .
>
> Replace the loop on line 313 of cake/libs/controller/components/
>
appreciated.
On 9 Apr 2008, at 11:56, David Christopher Zentgraf wrote:
> Tried with the latest Nightly (08.04.08), dumped all my tables,
> set everything up again, still the same.
> Opened a ticket for it: https://trac.cakephp.org/ticket/4450
>
> On 8 Apr 2008, at 22:23, Dardo Sor
e/libs/controller/components/acl.php
>
> method check,
>
> look for === -1, change to == -1. If it isn't there, probably you
> need to put a couple of pr() and start debugging :(.
>
> Before that, try with an fresh install of the latest svn.
>
> On Tue, Apr 8, 2008
bug described.
>
> Look in cake/libs/controller/components/acl.php
>
> method check,
>
> look for === -1, change to == -1. If it isn't there, probably you
> need to put a couple of pr() and start debugging :(.
>
> Before that, try with an fresh install of the latest
[8]delete
But:
$cake acl check deceze Users/index all
deceze is allowed.
On 8 Apr 2008, at 20:49, Dardo Sordi Bogado wrote:
>
> Can you post the SQL generated?
>
> On Tue, Apr 8, 2008 at 8:47 AM, David Christopher Zentgraf
> <[EMAIL PROTECTED]> wrote:
>>
,
>
> https://trac.cakephp.org/ticket/3851
> https://trac.cakephp.org/changeset/6342
>
> It's fixed in current versions.
>
> On Tue, Apr 8, 2008 at 6:01 AM, David Christopher Zentgraf
> <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> Am I getting
Hi,
Am I getting this right? With the ACL component, AROs inherit their
permissions like this:
Group [denied something]
|- User [allowed something]
In this case, the explicitly granted permission on the User overrides
the general Group setting, allowing the User something specifically.
With
46 matches
Mail list logo