{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/11292","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11292/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11292/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11292/events","html_url":"https://github.com/joomla/joomla-cms/pull/11292","id":167334533,"number":11292,"title":"Decimal fields return a comma","user":{"login":"roland-d","id":359377,"avatar_url":"https://avatars.githubusercontent.com/u/359377?v=3","gravatar_id":"","url":"https://api.github.com/users/roland-d","html_url":"https://github.com/roland-d","followers_url":"https://api.github.com/users/roland-d/followers","following_url":"https://api.github.com/users/roland-d/following{/other_user}","gists_url":"https://api.github.com/users/roland-d/gists{/gist_id}","starred_url":"https://api.github.com/users/roland-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roland-d/subscriptions","organizations_url":"https://api.github.com/users/roland-d/orgs","repos_url":"https://api.github.com/users/roland-d/repos","events_url":"https://api.github.com/users/roland-d/events{/privacy}","received_events_url":"https://api.github.com/users/roland-d/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/joomla/joomla-cms/milestones/15","html_url":"https://github.com/joomla/joomla-cms/milestones/Joomla%203.6.1","labels_url":"https://api.github.com/repos/joomla/joomla-cms/milestones/15/labels","id":1819592,"number":15,"title":"Joomla 3.6.1","description":"","creator":{"login":"brianteeman","id":1296369,"avatar_url":"https://avatars.githubusercontent.com/u/1296369?v=3","gravatar_id":"","url":"https://api.github.com/users/brianteeman","html_url":"https://github.com/brianteeman","followers_url":"https://api.github.com/users/brianteeman/followers","following_url":"https://api.github.com/users/brianteeman/following{/other_user}","gists_url":"https://api.github.com/users/brianteeman/gists{/gist_id}","starred_url":"https://api.github.com/users/brianteeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianteeman/subscriptions","organizations_url":"https://api.github.com/users/brianteeman/orgs","repos_url":"https://api.github.com/users/brianteeman/repos","events_url":"https://api.github.com/users/brianteeman/events{/privacy}","received_events_url":"https://api.github.com/users/brianteeman/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":115,"state":"open","created_at":"2016-06-10T09:18:44Z","updated_at":"2016-07-25T10:42:20Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-07-25T10:27:31Z","updated_at":"2016-07-25T10:58:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/11292","html_url":"https://github.com/joomla/joomla-cms/pull/11292","diff_url":"https://github.com/joomla/joomla-cms/pull/11292.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/11292.patch"},"body":"#### Summary of Changes\r\nThe function getTableColumns() with the flag typeOnly returns only the field types without any size information. Now this works fine for all fields except decimal as this contains a comma in it's definition.\r\n\r\nBefore:\r\n![before_fix](https://cloud.githubusercontent.com/assets/359377/17098276/c714da8a-5261-11e6-9b97-b45c918e6180.png)\r\n\r\nAfter:\r\n![after_fix](https://cloud.githubusercontent.com/assets/359377/17098279/cca063de-5261-11e6-85b7-00fe8bfb8767.png)\r\n\r\n#### Testing Instructions\r\n1. Alter the assets table with the following code. Change jos to your own prefix if you use another.\r\n\r\n   ```sql\r\n   ALTER TABLE `jos_assets`\r\n\tADD COLUMN `values` DECIMAL(10,5) NULL AFTER `rules`;\r\n   ```\r\n2. Open the file administrator/components/com_cpanel/views/cpanel/tmpl/default.php\r\n3. Add the following code after line 14:\r\n\r\n   ```php\r\n     $db = JFactory::getDbo();\r\n     $cols = $db->getTableColumns('#__assets', true);\r\n    ?>\r\n    <pre><?php\r\n\techo __FILE__ . '::' . __LINE__ . ':: ';\r\n\techo 'cols: ';\r\n\techo '<div style=\"font-size: 1.5em;\">';\r\n\tprint_r($cols);\r\n\techo '</div>';\r\n\t?></pre><?php\r\n   ```\r\n4. Open the URL <site>/administrator/index.php\r\n5. See the before code. There is a comma after the decimal.\r\n6. Apply the patch\r\n7. Reload the page\r\n8. See the after code. The decimal is gone.\r\n9. You can remove the decimal column again :)\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/234923411","html_url":"https://github.com/joomla/joomla-cms/pull/11292#issuecomment-234923411","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11292","id":234923411,"user":{"login":"brianteeman","id":1296369,"avatar_url":"https://avatars.githubusercontent.com/u/1296369?v=3","gravatar_id":"","url":"https://api.github.com/users/brianteeman","html_url":"https://github.com/brianteeman","followers_url":"https://api.github.com/users/brianteeman/followers","following_url":"https://api.github.com/users/brianteeman/following{/other_user}","gists_url":"https://api.github.com/users/brianteeman/gists{/gist_id}","starred_url":"https://api.github.com/users/brianteeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianteeman/subscriptions","organizations_url":"https://api.github.com/users/brianteeman/orgs","repos_url":"https://api.github.com/users/brianteeman/repos","events_url":"https://api.github.com/users/brianteeman/events{/privacy}","received_events_url":"https://api.github.com/users/brianteeman/received_events","type":"User","site_admin":false},"created_at":"2016-07-25T10:58:51Z","updated_at":"2016-07-25T10:58:51Z","body":"Doesnt the same change have to be made in other drivers? I see the same regex there as well<hr /><sub>This comment was created with the <a href=\"https://github.com/joomla/jissues\">J!Tracker Application</a> at <a href=\"https://issues.joomla.org/tracker/joomla-cms/11292\">issues.joomla.org/joomla-cms/11292</a>.</sub>"}}
{"actor":{"display_login":"brianteeman"}}