{"action":"created","issue":{"url":"https://api.github.com/repos/spootTheLousy/saguaro/issues/64","labels_url":"https://api.github.com/repos/spootTheLousy/saguaro/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/spootTheLousy/saguaro/issues/64/comments","events_url":"https://api.github.com/repos/spootTheLousy/saguaro/issues/64/events","html_url":"https://github.com/spootTheLousy/saguaro/issues/64","id":95641553,"number":64,"title":"Break down imgboard.php into specialized files and other cleanup.","user":{"login":"RePod","id":7897871,"avatar_url":"https://avatars.githubusercontent.com/u/7897871?v=3","gravatar_id":"","url":"https://api.github.com/users/RePod","html_url":"https://github.com/RePod","followers_url":"https://api.github.com/users/RePod/followers","following_url":"https://api.github.com/users/RePod/following{/other_user}","gists_url":"https://api.github.com/users/RePod/gists{/gist_id}","starred_url":"https://api.github.com/users/RePod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RePod/subscriptions","organizations_url":"https://api.github.com/users/RePod/orgs","repos_url":"https://api.github.com/users/RePod/repos","events_url":"https://api.github.com/users/RePod/events{/privacy}","received_events_url":"https://api.github.com/users/RePod/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spootTheLousy/saguaro/labels/Discussion","name":"Discussion","color":"fad8c7"},{"url":"https://api.github.com/repos/spootTheLousy/saguaro/labels/Revises%20a%20Functional%20change","name":"Revises a Functional change","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-07-17T11:44:11Z","updated_at":"2015-09-15T17:10:38Z","closed_at":null,"body":"Break down: (to non-/class)\r\n----\r\n\r\n- [x] [PostForm](//github.com/spootTheLousy/saguaro/blob/master/_core/postform.php)\r\n - Currently lacks admin-specific functions (like sticky), have fun @Apogate \r\n - Not tested enough for stable.\r\n- [x] [Thread generation](//github.com/spootTheLousy/saguaro/tree/master/_core/thread)\r\n- [x] [Regist + Tripcodes](//github.com/spootTheLousy/saguaro/tree/master/_core/regist) *~600 (~450 + ~150) lines* (currently **non-class**)\r\n - [x] [thumb()](//github.com/spootTheLousy/saguaro/blob/master/_core/regist/thumb.php) *~100 lines*\r\n - [x] [prune_old()](//github.com/spootTheLousy/saguaro/blob/master/_core/regist/prune_old.php) *~46 lines*\r\n- [x] [First run SQL table creation](https://github.com/spootTheLousy/saguaro/blob/f20272096a35bc0abe9b37b172ba389316717951/imgboard.php#L70-L200) *~100 lines*\r\n - ~~Ready to be removed, accurately recreated in [test.php](https://github.com/spootTheLousy/saguaro/blob/956eb2673411d55fc451b55b2b63dbf03e0a3b28/test.php#L143).~~ Done.\r\n - [ ] [Rebuild queue?](https://github.com/spootTheLousy/saguaro/blob/f20272096a35bc0abe9b37b172ba389316717951/imgboard.php#L202-L213) (also in **Rebuilding** section below)\r\n- [x] [Log](//github.com/spootTheLousy/saguaro/blob/master/_core/log/) *~450 lines* #77 (testing)\r\n - [ ] log_cache() *~150 lines* (not removed yet)\r\n - [ ] updatelog() *~400 lines* (not removed yet)\r\n- [ ] Rebuilding *~80 lines*\r\n - [ ] rebuild() *~41 lines*\r\n - [ ] rebuildqueue_create_table() **Currently has a dangerous invalid variable** *~10 lines*\r\n - [ ] rebuildqueue_add() *~8 lines*\r\n - [ ] rebuildqueue_remove() *~8 lines*\r\n - [ ] rebuildqueue_take_all() *~13 lines*\r\n- [x] Administration/Moderation commands *~428 lines*\r\n - [x] valid() *~82 lines*\r\n - [x] admindel() *~180 lines*\r\n - [x] login() *~20 lines*\r\n - [x] userdel() *~59 lines*\r\n - [x] deletepost() *~87 lines*\r\n - [x] ...\r\n- [ ] Inter/intraboard linking and link normalization (Auto Linker) *~92 lines*\r\n- [ ] head()\r\n- [ ] foot()\r\n- [ ] ...\r\n\r\nRelocate:\r\n---\r\nIntended to keep the root of the repository as clean as possible.\r\n- [x] GeoIP: #67 \r\n- [ ] Admin.php\r\n- [ ] Banned.php\r\n\r\nCleanup:\r\n----\r\n- [ ] Large commented out sections that have been replaced functionality-wise.\r\n- [x] oldvalid()\r\n- [x] table_exist() *~9 lines* **(ready to go)**\r\n - Previously used for SQL table creation, but has been replaced entirely in *test.php*.\r\n- [x] md5_of_file() *~15 lines* **(ready to go)**\r\n - [_core/regist/regist.php](//github.com/spootTheLousy/saguaro/blob/master/_core/regist/regist.php)\r\n - Not needed since *test.php* checks for minimum PHP version.\r\n - For legacy PHP before 4.2.0 (April 22nd, 2002).\r\n - Only called twice (which could also be reduced to one call).\r\n- [x] get_gd_ver() *~20 lines* **(ready to go)**\r\n - [_core/regist/thumb.php](//github.com/spootTheLousy/saguaro/blob/master/_core/regist/thumb.php)\r\n - Not needed since *test.php* checks for minimum GD version.\r\n - For legacy GD before 2.x (April 5th, 2006).\r\n - Not future proof if GD's major version increases beyond *2*.\r\n - Only called once.\r\n- [ ] proxy_connect()\r\n - [_core/regist/regist.php](//github.com/spootTheLousy/saguaro/blob/master/_core/regist/regist.php)\r\n - Potentially unsafe.\r\n - Used only by regist().\r\n- [x] ...\r\n\r\nUpdate as needed.\r\n\r\n---\r\n\r\nEventually all functionality will be accurately represented after being broken down.\r\n\r\n**Advantages:**\r\n- Cleaner, smaller, self-documenting code. (i.e. `$catalog->format()`)\r\n- Easily scalable.\r\n- Easier to track down problems and easier to fix/see results.\r\n- Easier to update (a set of) individual files without worrying about who has done what to *imgboard.php* and if it'll conflict.\r\n\r\n**Disadvantages:**\r\n- Lack of top-level scope, limited to what's available.\r\n - Potentially, things should be coded around this to not be a problem."},"comment":{"url":"https://api.github.com/repos/spootTheLousy/saguaro/issues/comments/140466773","html_url":"https://github.com/spootTheLousy/saguaro/issues/64#issuecomment-140466773","issue_url":"https://api.github.com/repos/spootTheLousy/saguaro/issues/64","id":140466773,"user":{"login":"Apogate","id":8524639,"avatar_url":"https://avatars.githubusercontent.com/u/8524639?v=3","gravatar_id":"","url":"https://api.github.com/users/Apogate","html_url":"https://github.com/Apogate","followers_url":"https://api.github.com/users/Apogate/followers","following_url":"https://api.github.com/users/Apogate/following{/other_user}","gists_url":"https://api.github.com/users/Apogate/gists{/gist_id}","starred_url":"https://api.github.com/users/Apogate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Apogate/subscriptions","organizations_url":"https://api.github.com/users/Apogate/orgs","repos_url":"https://api.github.com/users/Apogate/repos","events_url":"https://api.github.com/users/Apogate/events{/privacy}","received_events_url":"https://api.github.com/users/Apogate/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T17:10:38Z","updated_at":"2015-09-15T17:10:38Z","body":"I think rebuild and friends can stay where they are"}}