{"id":29703387,"url":"https://github.com/thedumbtechguy/ordit--kohana-orm-audit-module","last_synced_at":"2025-10-08T20:56:02.296Z","repository":{"id":9128388,"uuid":"10916148","full_name":"thedumbtechguy/Ordit--Kohana-Orm-Audit-Module","owner":"thedumbtechguy","description":"A Kohana 3.x module that adds automatic auditing to the Official ORM module.","archived":false,"fork":false,"pushed_at":"2015-11-14T23:02:31.000Z","size":279,"stargazers_count":2,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-23T13:52:20.619Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thedumbtechguy.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-24T18:15:42.000Z","updated_at":"2015-11-14T23:02:33.000Z","dependencies_parsed_at":"2022-07-07T19:19:18.778Z","dependency_job_id":null,"html_url":"https://github.com/thedumbtechguy/Ordit--Kohana-Orm-Audit-Module","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thedumbtechguy/Ordit--Kohana-Orm-Audit-Module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedumbtechguy%2FOrdit--Kohana-Orm-Audit-Module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedumbtechguy%2FOrdit--Kohana-Orm-Audit-Module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedumbtechguy%2FOrdit--Kohana-Orm-Audit-Module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedumbtechguy%2FOrdit--Kohana-Orm-Audit-Module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thedumbtechguy","download_url":"https://codeload.github.com/thedumbtechguy/Ordit--Kohana-Orm-Audit-Module/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedumbtechguy%2FOrdit--Kohana-Orm-Audit-Module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000635,"owners_count":26082819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-23T13:39:46.285Z","updated_at":"2025-10-08T20:56:02.256Z","avatar_url":"https://github.com/thedumbtechguy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ordit\n\nOrdit is a Kohana 3.x module that adds automatic auditing to the Official ORM module.\n\nOrdit is a transparent extension that audits all CUD actions on your objects.\nIt includes  a Log Viewer to view all Audit logs.\n\n## Getting started\n\nBefore we use Ordit, we must enable the modules required\n\n\tKohana::modules(array(\n\t\t...\n\t\t'database' =\u003e MODPATH.'database',\n\t\t'orm' =\u003e MODPATH.'orm',\n\t\t'ordit' =\u003e MODPATH.'ordit',\n\t\t...\n\t));\n\n[!!] Ordit requires the ORM module (plus its dependencies) to work.\n\n### Setting up the database\n\nYou need to create a table in your database to hold all your logs.\n\nA script is included in the module named `ordit_logs.sql`\nThe script is for a mysql database running the InnoDB engine.\n\nThe table is configured as follows:\n\n\tTable Name :: \n\t\t`ordit_logs`\n\tColumns ::\n\t\t`id` INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY\n\t\t`model` CHAR(50) NOT NULL,\n\t\t`action` CHAR(7) NOT NULL,\n\t\t`values` TEXT NOT NULL,\n\t\t`user` CHAR(50) NOT NULL,\n\t\t`timestamp_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\t\n### Overriding the Ordit::get_username Method\n\nIn order to provide the current logged in user's username for auditing,\ncreate a class in your classes folder named `Ordit` that extends the `Model_Ordit` class. \nThen override the `get_username` method to return the current logged in user's username. The example below uses\nthe default `Auth` module.\n\n\tclass Ordit extends Model_Ordit\n\t{\t\n\t\tprotected function get_username()\n\t\t{\n\t\t\treturn Auth::instance()-\u003eget_user()-\u003eusername;\n\t\t}\n\t}\n\n### Auditing Your Models\n\nTo enable auditing of your ORM models, you simple extend `Ordit`.\n\n\tclass Model_Model extends Ordit\n\t{\n\t\t...\n\t}\n\nAny CREATE, UPDATE and DELETE actions are automatically and transparently logged.\nYou don't have to do anything else.\n\n### Viewing Your Logs\nThe module includes a log viewer. \n\nYou can view logs at (http://site_root/ordit)\n\n[!!]The log viewer was modified from [Kohana Log Viewer](https://github.com/ajaxray/Kohana-Log-Viewer) viewer.\n\n\n## TODO\n\n### Log Changes to Related Modules\nCurrently, changes to related modules are logged as an empty array.\n\n##Improve Viewer\n\nAdd pagination to the log results\n\nAdd ability to search by currently `undefined parameters`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedumbtechguy%2Fordit--kohana-orm-audit-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthedumbtechguy%2Fordit--kohana-orm-audit-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedumbtechguy%2Fordit--kohana-orm-audit-module/lists"}