joomla-projects / gsoc16_recording-action-logs

Recording actions logs, accessible by super admin
https://summerofcode.withgoogle.com/projects/#4547036649095168
GNU General Public License v2.0
4 stars 4 forks source link

UserLogsHelper::dataToCsv($data) #47

Closed zero-24 closed 8 years ago

zero-24 commented 8 years ago

Steps to reproduce the issue

https://github.com/joomla-projects/gsoc16_recording-action-logs/blob/staging/administrator/components/com_userlogs/helpers/userlogs.php#L28-L56

Expected result

Using JFile or view..php (see below)

Actual result

hard coded php function

Additional comments

Have a look here https://github.com/joomla/joomla-cms/tree/staging/administrator/components/com_admin/views/sysinfo

There we have different view..php that shoud fit the needs.

zero-24 commented 8 years ago

This way it is easy to introduce json, text etc. and different formats

muhakh commented 8 years ago

@zero-24 I think the view.csv.php file will work if we are exporting the whole list of logs, but if we want to export selected logs, it won't be useful as the JToolbarHelper::link doesn't provide a way to select elements. Is there a way to export selected logs using it?

zero-24 commented 8 years ago

Than we should atleast move that code to JFile classes

muhakh commented 8 years ago

I have a problem matching the JFile class with my code. As I just want a temporary file to be created and downloaded without creating a file in the server. Is this possible using JFile?

zero-24 commented 8 years ago

Maybe this can help https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_admin/views/sysinfo/view.text.php i can have a look into that later today too.