Cakephp netbeans plugin no command available on mac

2013-06-19 Thread Levavasseur Jacques
When i try to run command with thé netbeans cakephp plugin i've got no 
command available.

To resolve this i add this in lib/Cake/Cache/CacheEngine.php at line 60

if(strpos(PHP_OS,'WIN')===false) : date_default_timezone_set('GMT');  endif;

For me it's work with GMT but you can specify your timezone.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Pagination->sort associated Model

2013-05-06 Thread Levavasseur Jacques
Hello,
I use cakephp 2.3.4
When I use paginator->sort on a field of model default I have no problem.
But if I want to sort on a field associated, sorting is the default.
I use the code: $this->Paginator->sort(Model.NOM','HeaderName')
when I look at $ this-> params is what I get, you can see it at the attach 
file
Thank for your help

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


params => array(
'plugin' => null,
'controller' => 'defaultModels',
'action' => 'index',
'named' => array(
'sort' => 'newModel.NOM',
'direction' => 'asc'
),
'pass' => array(),
'isAjax' => false,
'paging' => array(
'defaultModel' => array(
'page' => (int) 1,
'current' => (int) 15,
'count' => (int) 40,
'prevPage' => false,
'nextPage' => true,
'pageCount' => (int) 3,
'order' => array(
'defaultModel.NOM' => 'asc'
),
'limit' => (int) 15,
'options' => array(
'order' => array(
'defaultModel.NOM' => 'asc'
),
'sort' => 'newModel.NOM',
'direction' => 'asc'
),
'paramType' => 'named'
)
),
'models' => array(
'defaultModel' => array(
'plugin' => null,
'className' => 'defaultModel'
),
'newModel' => array(
'plugin' => null,
'className' => 'newModel'
)
)
)




Re: Security Release - CakePHP 1.2.12, 1.3.16, 2.2.8 and 2.3.4

2013-05-03 Thread Jacques Levavasseur
I set the default timezone in CacheEngine.php at Line 60 because i've got en 
error when i use netbeans cakephp plugin with strtotime

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Bug in Cache/CacheEngine.php at Line 60 wehnelt i use netbeans plugin

2013-05-03 Thread Jacques Levavasseur
I add date_default_timezone_set('Europe/Paris') because Therese si an error 
Wotherspoon strtotime

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: HABTM pagination issue

2009-09-15 Thread Jacques

Having a similar problem, anyone have any ideas?

On Sep 2, 8:08 am, double07  wrote:
> Hi All,
>
> I'm having an issue with usingHABTMwithpagination...
>
> My app has a users and roles table - usersHABTMroles, roles have
> many users.
>
> In my users index controller I'm trying to limit thepagination
> results so that only users with certain roles are displayed.
>
> At the moment I have:
> $this->User->recursive = 1;
> $this->set('users', $this->paginate('User', array('Roles.name' =>
> 'Administrator')));
>
> This gives me this error:
> Warning (512): SQL Error: 1054: Unknown column 'Roles.name' in 'where
> clause' [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
>
> When I do pretty much the same this with a 'find all' it seems to work
> ok:
> $this->set('data', $this->User->Role->find('all', array
> ('conditions'=>array('Role.name'=>'Administrator';
>
> Where am I going wrong here?
>
> TIA
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Containable, Pagination and HABTM

2009-08-18 Thread Jacques

Hi All,

I have a similar problem and am hoping that by posting on this post we
can get a resolution and some good advice from the community for both
our problems

Here goes:

I have the following models (denoted by UPPERCASE) :

USERS belongsTo CLIENT,
CONTACTS belongsTo USERS and HABTM CONTACT_GROUPS.


I have a setting on the clients side that allows users to each others
clients, i.e. a company may have many contacts these could belong to
different users, however ultimately they belong to the company. Hence
at times a user should be able to see all the contacts for a company.

Now paginating all contacts is simple using Cakes pagination and even
paginating contacts that only belong to a specific user.

Where I need advise or help is paginating the contacts that belong to
a specific group and user. i.e. at times I will want to display all
contacts linked to a specific group and user and at other times I need
to limit this by displaying contacts that are linked to a specific
group and CLIENT (being the top level)


I have tried to use containable in the paginate method to no avail
what I need to know if there is a simple solution in passing two
related models fields into the conditions array of the paginate
function or if I have to override the paginate function in the model.

Again to simplify:

PAGINATE: GET CONTACTS WITH user_id IN (1,2,3) AND group_id = 1

or

PAGINATE: GET CONTACTS WITH user_id = 1 AND group_id IN (1,2,3)


Any advise or help will be appreciated.

Thanks
Jacques












I can easily paginate the contacts


On Aug 12, 7:37 pm, sunertl  wrote:
> On 12 Aug., 19:00, brian  wrote:
>
> > Why not just use find()? Can a User belong to so many Groups that you
> > need to paginate them?
>
> Normally, a user will belong to about 10 groups, but the "moderators"
> belong to much more (30-50). Also groups are used only for one year
> tops and I would like to keep an archive with all expired ones. So I
> think a pagination would be useful.
>
> And even if it wasn't for this case I still would like to know what's
> wrong here ;-).
>
> Btw: I just found a typo in my original post. The table for Group is
> "groups" of course, not "group" as stated above.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP Editor/IDE

2009-08-06 Thread Jacques

Hi there,

have a look at 
http://mark-story.com/posts/view/code-completion-for-cakephp-in-eclipse

Not sure if that'll help - but I use eclipse - suits my needs.

Ciao
Jacques

On Aug 5, 11:23 pm, maigel  wrote:
> Hi cakephp programmers,
> I was wondering which Editor/IDE you guys use, or think it's the best
> one to use with cakephp.
> When I first tried out symfony framework I used PHPedit or Eclipse
> which gave me autocompletion for it. But they don't for Cakephp (for
> example when you use models and such).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Sending email with attachments

2009-08-06 Thread Jacques

Hi

Does the attachments array not require a physical path to the file
e.g.



$this->Email->attachments = array('/var//files/' .$filename );

or another example

$consultant_id = $consultant['Consultant']['id'];


$this->Email->attachments = array('/var//files/consfile' .
$consultant_id . '.csv');

Whereas I am not sure of array('/leads/export_csv/leads.csv?
consultant_id='.$consultant['Consultant']['id']); is this a url?
or 


Ciao
J


On Aug 6, 5:18 am, "m...@w8"  wrote:
> Hi All,
>
> I'm trying to send out daily emails to salespeople with an attached
> CSV file containing all their leads.
>
> Currently they can click on a link to download the CSV, but I'd like
> to email it daily.
>
> The manual is very light on information regarding attachments.
>
> I've tried using
> $this->Email->attachments = array('/leads/export_csv/leads.csv?
> consultant_id='.$consultant['Consultant']['id']);
>
> But I get an error
> Warning (2): Invalid argument supplied for foreach() [CORE/cake/libs/
> controller/components/email.php, line 516]
>
> Has anyone done this before?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Correct Way to save HTML code to database

2009-07-15 Thread Jacques

Hi All,

I came right thanks - the problem was the character set being read in
not being utf-8 a simple php mb_convert solved the problem.

Cheers
J

On Jul 15, 9:18 am, Jacques 
wrote:
> Hi There,
>
> I am having a problem saving html code to a MySQL field using the
> saveAll method.
>
> Basically what is happening is that only half of the html is actually
> saved at times depending on the content. At other times it works fine.
> When the body is comprised of text everything works perfectly
> everytime. This tells me that the code is in order for saving etc, the
> problem must be with certain html entities.
>
> The code is extracted from html formatted emails (body).
>
> Being new to ... wait for it ... PHP, CakePHP and MySQL this is a
> challenge as I have googled and yahood and read the manual been
> through the API code and to no avail ...
>
> Humbly I ask for any assistance that anyone may provide, I am not sure
> if I should be running a function against the html prior to saving,
> and then again possibly when I want to display it (important to note
> that I require the original html to be viewed by a user at a later
> stage)
>
> Thanks
> Jacques

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Correct Way to save HTML code to database

2009-07-15 Thread Jacques

Hi There,

I am having a problem saving html code to a MySQL field using the
saveAll method.

Basically what is happening is that only half of the html is actually
saved at times depending on the content. At other times it works fine.
When the body is comprised of text everything works perfectly
everytime. This tells me that the code is in order for saving etc, the
problem must be with certain html entities.

The code is extracted from html formatted emails (body).

Being new to ... wait for it ... PHP, CakePHP and MySQL this is a
challenge as I have googled and yahood and read the manual been
through the API code and to no avail ...

Humbly I ask for any assistance that anyone may provide, I am not sure
if I should be running a function against the html prior to saving,
and then again possibly when I want to display it (important to note
that I require the original html to be viewed by a user at a later
stage)

Thanks
Jacques


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Wamp cakePHP allright except bake

2008-10-27 Thread Jacques Coeur

Hi,

I am using cakephp and I am currently following the tutorial from IBM
(currently part2).
Everything was working fine until I needed to bake the Models (or the
Controller).

Whever I choose the test or default settings, I get :
"""
Fatal error : call to undefined function mysql_connect() in /dbo/
dbi_mysql.php.
"""
The application can connect to the database otherwise.
I only get an error with the baking ...

Do you have any idea ?

Thanks in advance.
JCoeur
PS : I am using apache 1.3, php 5x

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---