Re: 3.x - SecurityComponent and View Cell
Yeah, it makes sense .. How about being able to give the cell a specific view in those cases where you know what you are doing ? /thomas On 18 Jul 2014, at 02:12, mark_story wrote: > I don't think cells are going to be a good fit for either of these use cases. > The general consensus on the github issse is that having cells be isolated is > more useful than having them share state with the containing view scope. > > -mark > > -- > 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/d/optout. -- 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/d/optout.
3.x - SecurityComponent and View Cell
I don't think cells are going to be a good fit for either of these use cases. The general consensus on the github issse is that having cells be isolated is more useful than having them share state with the containing view scope. -mark -- 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/d/optout.
How to calculate in array from $this->model->updateAll()?
I try to do an "update all" in my add action with the following method: $this->CmsPage->updateAll( > array( > 'CmsPage.rgt' => *('CmsPage.rgt' + 2)* > ), > array( > 'CmsPage.rgt >' => $right > ) > ); Unfortunately, i'ts not working. It keeps sending the value "2" to the rgt field in my database table. So my question is: what's should be changed in my array (2 + 'CmsPage.rgt) to do such calculations? :) -- 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/d/optout.
Re: Magic of UpdateAll
This can help you? $this->Picture->query("UPDATE User SET status='active';"); Em terça-feira, 17 de junho de 2014 09h10min30s UTC-3, સાદીકહસન પલસાણીયા escreveu: > > $this->loadModel('User'); > $this->User->updateAll(array('stauts'=>'active'),array()); > > Above code equvivalent SQL query is generated like this > > UPDATE User SET status='active' WHERE 0 = 1; > > When I written updateAll in cakephp like below > > $this->loadModel('User'); > $this->User->updateAll(array('stauts'=>'active')); > > This code equvivalent SQL query is generated like this > > UPDATE User SET status='active'; > > Why this happen I don't know. If I do not understand my question let me > know in comment. I explain in breif. > > > Check reference : > http://stackoverflow.com/questions/24259110/magic-of-updateall?noredirect=1#comment37476920_24259110 > -- 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/d/optout.
Re: problem in sending pdf file as attchment on the fly
Dup of http://stackoverflow.com/questions/24804976/send-runtime-generated-pdf-in-attchment-in-email It is still very unclear as it is currently asked Am Donnerstag, 17. Juli 2014 15:08:13 UTC+2 schrieb JAYESH TANK: > > Hello All, > I am facing one problem. > I want to send an email with attachment. > I have to create a pdf file on the fly means on click of link ->create > pdf ->send as an attchment. and it should be done using ajax. > I am using dompdf to create PDF file. > so is there any solution to achieve this? > > > -- 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/d/optout.
problem in sending pdf file as attchment on the fly
Hello All, I am facing one problem. I want to send an email with attachment. I have to create a pdf file on the fly means on click of link ->create pdf ->send as an attchment. and it should be done using ajax. I am using dompdf to create PDF file. so is there any solution to achieve this? -- 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/d/optout.
Re: fatal error after baking application using cakephp 3.0
Please update to the lastest 2.5 version, what you experience is a known bug of that version On Thursday, July 17, 2014 3:10:13 PM UTC+2, raji gudivada wrote: > > Sorry @ jose Lorenzo > My current version is cakephp 2.5.0. > > > >> >> >> -- 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/d/optout.
Re: fatal error after baking application using cakephp 3.0
So what is in that line? debug() it properly Am Donnerstag, 17. Juli 2014 15:10:13 UTC+2 schrieb raji gudivada: > > Sorry @ jose Lorenzo > My current version is cakephp 2.5.0. > > > >> >> >> -- 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/d/optout.
Re: fatal error after baking application using cakephp 3.0
Sorry @ jose Lorenzo My current version is cakephp 2.5.0. > > > -- 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/d/optout.
Re: fatal error after baking application using cakephp 3.0
Sorry i am using cakephp 2.5.o version On Thursday, July 17, 2014 6:15:39 PM UTC+5:30, raji gudivada wrote: > > Hi > I am new to cakephp and i used baking concept for my tables. Now i got > pages generated but i am unable to do edit and view actions.I am getting > error as > Unsupported operand types > D:\xampp\htdocs\lib\Cake\View\Helper\FormHelper.php Line:1802. > Please help me. > > > Thanks in advance. > > > > -- 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/d/optout.
Re: fatal error after baking application using cakephp 3.0
That error does not correspond to CakePHP 3.0 What version are you actually using? On Thursday, July 17, 2014 2:45:39 PM UTC+2, raji gudivada wrote: > > Hi > I am new to cakephp and i used baking concept for my tables. Now i got > pages generated but i am unable to do edit and view actions.I am getting > error as > Unsupported operand types > D:\xampp\htdocs\lib\Cake\View\Helper\FormHelper.php Line:1802. > Please help me. > > > Thanks in advance. > > > > -- 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/d/optout.
fatal error after baking application using cakephp 3.0
Hi I am new to cakephp and i used baking concept for my tables. Now i got pages generated but i am unable to do edit and view actions.I am getting error as Unsupported operand types D:\xampp\htdocs\lib\Cake\View\Helper\FormHelper.php Line:1802. Please help me. Thanks in advance. -- 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/d/optout.
Re: Data Validation: Checking if at least one field is populated and multiple rules not validating
Thanks very much Stephen. I kept at it and found the solution lay in removing the 'required' and 'allowEmpty' from the 'needOne' ruleset, and adding a 'required' => false in the view. Here's the working solution for any one else with this problem: The model: public $validate = array( 'last_name'=> array( 'needOne' => array ( 'rule' => 'checkOne', 'message' => 'You must enter at least a contact name or email address.' ), 'alphaNumeric' => array( 'rule' => 'alphaNumeric', 'message' => 'Alphabets and numbers only', 'allowEmpty' => TRUE ), 'between' => array( 'rule' => array('between', 2, 45), 'message' => 'Between 2 to 45 characters', 'allowEmpty' => TRUE ) ), 'email' => array( 'needOne' => array ( 'rule' => 'checkOne', 'message' => 'You must enter at least a contact name or email address.' ), 'emailAddress' => array ( 'rule' => 'email', 'message' => 'A valid Email address is required', 'allowEmpty' => TRUE ) ) ); // Ensure at least the last name or email field value is provided public function checkOne($data) { if(!empty($this->data[$this->alias]['last_name']) || !empty($this->data[$this->alias]['email'])) { return TRUE; } else { return FALSE; } } The view/fields (I'm using Bootstrap): echo $this->Form->input('last_name', array( 'required' => false, 'fieldset' => false, 'label' => false, 'before' => 'Last Name *', 'class' => 'form-control', 'placeholder' => 'Last Name', 'div' => 'form-group col-sm-12', 'error' => array( 'attributes' => array( 'wrap' => 'div', 'class' => 'alert alert-danger' ) ) ) ); echo $this->Form->input('email', array( 'required' => false, 'fieldset' => false, 'label' => false, 'before' => 'Email *', 'after' => '', 'class' => 'form-control', 'div' => 'form-group col-sm-12 col-xs-12', 'error' => array( 'attributes' => array( 'wrap' => 'div', 'class' => 'alert alert-danger' ) ) ) ); Thanks. On Wednesday, 16 July 2014 00:44:50 UTC+10, seba wrote: > > Folks, > > I'm trying to ensure at least one of two fields (last_name or email) is > being populated. Each field also has multiple rules. I'm using CakePHP > version 2.4.2. > > The problem I have at the moment, after multiple permutations of updating > and/or moving around the use 'last', 'allowEmpty', 'required', etc, is that > the fields just aren't validating at all, or aren't executing all the rules > when a field is populated. > > Any advice on how to modify the code below to achieve the following > behaviour is much appreciated: > 1. One of the two fields must be populated; > 2. The other rules attached to each field must validate as well (i.e. if a > last name is passed, then it must be between 2 and 45 chars and > alphanumeric only) > > Here's the model code: > > public $validate = array( > 'last_name'=> array( > 'needOne' => array ( > 'required' => FALSE, > 'allowEmpty' => TRUE, > 'last' => TRUE, > 'rule' => array('checkOne','last_name'), > 'message' => 'You must enter at least a contact name or email address.' > ), > 'alphaNumeric' => array( > 'rule' => 'alphaNumeric', > 'message' => 'Alphabets and numbers only' > ), > 'between' => array( > 'rule' => array('between', 2, 45), > 'message' => 'Between 2 to 45 characters' > ) > ), > 'email' => array( > 'needOne' => array ( > 'required' => FALSE, > 'allowEmpty' => TRUE, > 'last' => TRUE, > 'rule' => array('checkOne','email'), > 'message' => 'You must enter at least a contact name or email address.' > ), > 'emailAddress' => array ( > 'last' => TRUE, > 'rule' => array('email', FALSE), > 'message' => 'A valid Email address is required' > ) > ) > ); > // Ensure at least the last name or email field value is provided > function checkOne() { > if(!empty($this->data[$this->User]['last_name']) || > !empty($this->data[$this->User]['email'])){ > return true; > } else { > return false; > } > } > > Thanks in advance! > -- 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/d/optout.
CakePHP 2.5 (linux) con SQLServer 2005
Hola, trabajo en Ubuntu con cakephp 2.5 y necesito conectarme a una Base de Datos en un Servidor de Windows con SQLServer 2005. El problema es que desde el Framework no puedo conectarme, me muestra el siguiente Mensaje: CakePHP is NOT able to connect to the database. Datasource class SqlServer could not be found. Y mi database es así: public $default = array( 'datasource' => 'Database/SqlServer', 'persistent' => false, 'host' => '10.0.0.138', 'login' => 'sa', 'password' => 'sa', 'database' => 'SBDALCD3', 'prefix' => '', //'encoding' => 'utf8', ); La conexión al servidor la tengo habilitada ya que si me conecto con lo siguiente: $usr = "sa"; $psw = "sa"; $server = "10.0.0.138"; $dbname = "SBDALCD3"; $instance = "SRVTESTBJRM03"; $link = mssql_connect($server, $usr,$psw); if (!$link) { echo'Could not connect'; die('Could not connect: ' . mssql_error()); } echo'Successful connection'; mssql_close($link); Me da éxito y puedo consultar las tablas. Me estará faltando algún archivo en cakephp? (baje la version completa 2.5) si alguno tiene idea de porque no puedo conectarme con cakephp a un sqlserver 2005 me daría una mano muy grande!! Saludos!!! -- 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/d/optout.
Get the base url in CakePHP
if you do want to get the base url in Cakephp. Use following code : *echo Router::url('/', true)* It will return exact website url of your website. -- 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/d/optout.