{"action":"created","issue":{"url":"https://api.github.com/repos/yakamara/yconverter/issues/2","repository_url":"https://api.github.com/repos/yakamara/yconverter","labels_url":"https://api.github.com/repos/yakamara/yconverter/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/yakamara/yconverter/issues/2/comments","events_url":"https://api.github.com/repos/yakamara/yconverter/issues/2/events","html_url":"https://github.com/yakamara/yconverter/issues/2","id":181607512,"number":2,"title":"value1 bis value20 auf serialisierte Daten prüfen und umwandeln","user":{"login":"tbaddade","id":338267,"avatar_url":"https://avatars.githubusercontent.com/u/338267?v=3","gravatar_id":"","url":"https://api.github.com/users/tbaddade","html_url":"https://github.com/tbaddade","followers_url":"https://api.github.com/users/tbaddade/followers","following_url":"https://api.github.com/users/tbaddade/following{/other_user}","gists_url":"https://api.github.com/users/tbaddade/gists{/gist_id}","starred_url":"https://api.github.com/users/tbaddade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbaddade/subscriptions","organizations_url":"https://api.github.com/users/tbaddade/orgs","repos_url":"https://api.github.com/users/tbaddade/repos","events_url":"https://api.github.com/users/tbaddade/events{/privacy}","received_events_url":"https://api.github.com/users/tbaddade/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-07T08:05:21Z","updated_at":"2016-10-07T10:38:24Z","closed_at":null,"body":""},"comment":{"url":"https://api.github.com/repos/yakamara/yconverter/issues/comments/252211879","html_url":"https://github.com/yakamara/yconverter/issues/2#issuecomment-252211879","issue_url":"https://api.github.com/repos/yakamara/yconverter/issues/2","id":252211879,"user":{"login":"tbaddade","id":338267,"avatar_url":"https://avatars.githubusercontent.com/u/338267?v=3","gravatar_id":"","url":"https://api.github.com/users/tbaddade","html_url":"https://github.com/tbaddade","followers_url":"https://api.github.com/users/tbaddade/followers","following_url":"https://api.github.com/users/tbaddade/following{/other_user}","gists_url":"https://api.github.com/users/tbaddade/gists{/gist_id}","starred_url":"https://api.github.com/users/tbaddade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbaddade/subscriptions","organizations_url":"https://api.github.com/users/tbaddade/orgs","repos_url":"https://api.github.com/users/tbaddade/repos","events_url":"https://api.github.com/users/tbaddade/events{/privacy}","received_events_url":"https://api.github.com/users/tbaddade/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T10:38:24Z","updated_at":"2016-10-07T10:38:24Z","body":"Skript um nachträglich in R5 die Daten umzuwandeln\r\n\r\n\r\n```php\r\n<?php\r\nclass R4\r\n{\r\n    public static function toArray($value)\r\n    {\r\n        $return = @unserialize($value);\r\n        if (!$return) {\r\n            $return = unserialize(htmlspecialchars_decode(str_replace('<br />', '', $value), ENT_QUOTES));\r\n        }\r\n        return is_array($return) ? $return : null;\r\n    }\r\n}\r\n```\r\n\r\n```php\r\n<?php\r\n// Modulausgabe\r\n$sql = rex_sql::factory();\r\n$items = $sql->getArray('SELECT  id, \r\n                                value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, \r\n                                value11, value12, value13, value14, value15, value16, value17, value18, value19, value20 \r\n                        FROM    rex_article_slice\r\n                        WHERE   module_id = 5 \r\n                            OR  module_id = 13\r\n                            OR  module_id = 27');\r\n\r\nforeach ($items as $item) {\r\n    $sql = rex_sql::factory();\r\n    $sql->setDebug();\r\n    $sql->setTable('rex_article_slice');\r\n    $sql->setWhere('id = :id', ['id' => $item['id']]);\r\n\r\n    for ($i = 1; $i <= 20; $i++) {\r\n        $column = 'value' . $i;\r\n        $value = R4::toArray($item[$column]);\r\n        if (is_array($value)) {\r\n            $sql->setValue($column, json_encode($value));\r\n        }\r\n    }\r\n    $sql->update();\r\n}\r\n```"}}
{"actor":{"display_login":"tbaddade"}}