Log message #4155858

# At Username Text
# Jul 5th 2018, 09:09 saeideng I dont use it :slightly_smiling_face:
# Jul 5th 2018, 09:09 saeideng should be stable https://github.com/cakephp/acl/releases
# Jul 5th 2018, 09:08 jm @saeideng is it stable for production?
# Jul 5th 2018, 09:08 saeideng there are other options
# Jul 5th 2018, 09:07 Martin` I'm happy I removed acl from our project :)
# Jul 5th 2018, 09:07 saeideng `github.com/cakephp/acl`
# Jul 5th 2018, 09:07 saeideng it is here `cakephp/acl`
# Jul 5th 2018, 09:06 jm why ACL had been remove in version 3 ? and does cake3 be building stable ACL on 3
# Jul 5th 2018, 08:58 steinkel a better answer could be found here > https://stackoverflow.com/questions/30845997/how-to-generate-sql-function-calls-with-the-cakephp-query-builder
# Jul 5th 2018, 08:45 liaogz82 ah ok ok thanks!
# Jul 5th 2018, 08:44 steinkel @liaogz82 last resort is format your query this way `$t->find()->select(["time_worked" => "TIMEDIFF(DATE_FORMAT(modified, '%H:%i'), DATE_FORMAT(created, '%H:%i'))"])` but keep in mind you'll need to escape variables if any
# Jul 5th 2018, 08:44 portilloster I believe I need to use some helper but I cannot find any up to date related information.
# Jul 5th 2018, 08:43 portilloster Any ideas on how to save an show rich html text?
# Jul 5th 2018, 08:43 portilloster Hi to all!
# Jul 5th 2018, 08:40 tim It also supports times
# Jul 5th 2018, 08:40 tim `dateDiff() Get the difference between two dates/times`
# Jul 5th 2018, 08:37 liaogz82 no example for `TIMEDIFF(DATE_FORMAT(transactions.modified, '%H:%i'), DATE_FORMAT(transactions.created, '%H:%i')) as time_worked`
# Jul 5th 2018, 08:35 liaogz82 @steinkel seems that the query builder do not have `TIMEDIFF`
# Jul 5th 2018, 08:12 steinkel @liaogz82 check https://book.cakephp.org/3.0/en/orm/query-builder.html#using-sql-functions
# Jul 5th 2018, 08:11 liaogz82 and I need the query to work with the CsvView to export data
# Jul 5th 2018, 08:05 neon1024 Morning all :wave:
# Jul 5th 2018, 07:57 liaogz82 it is a mysql query
# Jul 5th 2018, 07:56 slackebot4 sites, transactions where employees.id = transactions.employee_id and sites.id = transactions.site_id; ```
# Jul 5th 2018, 07:56 liaogz82 how to I translate this in the cakephp query form?? ``` select employees.pin_code, employees.name, DATE_FORMAT(transactions.created, '%d-%b-%Y') as date, DATE_FORMAT(transactions.created, '%H:%i') as time_in, DATE_FORMAT(transactions.modified, '%H:%i') as time_out, TIMEDIFF(DATE_FORMAT(transactions.modified, '%H:%i'), DATE_FORMAT(transactions.created, '%H:%i')) as time_worked, sites.name as site from employees,
# Jul 5th 2018, 07:56 liaogz82 hi guys I need some help in the cakephp query
# Jul 5th 2018, 00:48 ricksaccous it seems i needed to specify an array in the type method which shows up as deprecated...
# Jul 5th 2018, 00:48 ricksaccous https://book.cakephp.org/3.0/en/controllers/request-response.html#dealing-with-content-types
# Jul 5th 2018, 00:45 ricksaccous hmm that didn't seem to help
# Jul 5th 2018, 00:42 ricksaccous text/csv
# Jul 5th 2018, 00:42 ricksaccous csv/text instead
# Jul 5th 2018, 00:42 ricksaccous actually it seems i should be using uhhh
# Jul 5th 2018, 00:40 ricksaccous if I just do $response->type('csv') it seems to work... and change $response->getType(); to the proper type
# Jul 5th 2018, 00:35 ricksaccous am i misunderstanding the function of withType?
# Jul 5th 2018, 00:35 ricksaccous when i do $response->withType('csv'); and then $response->getType(); it still returns text/html
# Jul 5th 2018, 00:34 ricksaccous I'm doing $reponse->getType(); and by default it's text/html
# Jul 5th 2018, 00:34 ricksaccous in the use Cake\Http\Response class
# Jul 5th 2018, 00:33 ricksaccous about to celebrate the 4th but i'm curious about something
# Jul 4th 2018, 22:33 ojtibi @josbeir yes, but I found other core classes referring to `new CakeRequest()` by name. I doubt I can do a drop-in extended replacement for CakeRequest without modifying other files. Eg: `Object::requestAction()` has `new CakeRequest()` somewhere in its body. Unfortunately it's exactly requested actions and query strings I'm having problems with. I'm not sure if I can easily upgrade to the 2.9 series at the moment.
# Jul 4th 2018, 21:08 michaelze @admad thanks for your help! Going to bed now ;) gn8!
# Jul 4th 2018, 20:51 michaelze and essentially duplicate the code but not quite (validation vs. application rule)
# Jul 4th 2018, 20:51 michaelze okay, so that means I also have to convert not empty or format (e.g. date) validations to application rules...