streams/Code/Module
2022-06-19 13:27:14 -07:00
..
Admin rename include/text -> include/misc 2022-06-17 16:59:11 -07:00
Dev fixes from upstream 2022-06-06 18:55:58 -07:00
Settings cleanup 2022-03-02 14:54:19 -08:00
Acloader.php deprecate block_public 2022-06-01 14:18:51 -07:00
Activity.php it's done 2022-02-15 20:08:28 -08:00
Admin.php it's done 2022-02-15 20:08:28 -08:00
Affinity.php it's done 2022-02-15 20:08:28 -08:00
Album.php it's done 2022-02-15 20:08:28 -08:00
Api.php begin hubloc refactor 2022-06-16 19:46:54 -07:00
Appman.php refactor app sync logic 2022-05-11 03:57:37 -07:00
Apporder.php unit tests 2022-02-20 00:12:31 -08:00
Apps.php it's done 2022-02-15 20:08:28 -08:00
Apschema.php it's done 2022-02-15 20:08:28 -08:00
Attach.php it's done 2022-02-15 20:08:28 -08:00
Authorize.php it's done 2022-02-15 20:08:28 -08:00
Block.php it's done 2022-02-15 20:08:28 -08:00
Blocks.php it's done 2022-02-15 20:08:28 -08:00
Ca.php it's done 2022-02-15 20:08:28 -08:00
Cal.php deprecate block_public 2022-06-01 14:18:51 -07:00
Calendar.php rename include/text -> include/misc 2022-06-17 16:59:11 -07:00
Card_edit.php it's done 2022-02-15 20:08:28 -08:00
Cards.php deprecate block_public 2022-06-01 14:18:51 -07:00
Categories.php it's done 2022-02-15 20:08:28 -08:00
Cdav.php begin hubloc refactor 2022-06-16 19:46:54 -07:00
Changeaddr.php it's done 2022-02-15 20:08:28 -08:00
Channel.php slightly more aggressive/proactive hubloc filtering 2022-06-16 14:48:13 -07:00
Chanview.php begin hubloc refactor 2022-06-16 19:46:54 -07:00
Chat.php it's done 2022-02-15 20:08:28 -08:00
Chatsvc.php it's done 2022-02-15 20:08:28 -08:00
Clients.php it's done 2022-02-15 20:08:28 -08:00
Cloud.php it's done 2022-02-15 20:08:28 -08:00
Cloud_tiles.php it's done 2022-02-15 20:08:28 -08:00
Comment_control.php it's done 2022-02-15 20:08:28 -08:00
Common.php typos 2022-02-15 22:10:50 -08:00
Communities.php ui tweaks 2022-03-21 14:29:13 -07:00
Connac.php it's done 2022-02-15 20:08:28 -08:00
Connect.php slightly more aggressive/proactive hubloc filtering 2022-06-16 14:48:13 -07:00
Connections.php it's done 2022-02-15 20:08:28 -08:00
Connedit.php remove deprecated rating feature 2022-04-25 04:15:05 -07:00
Contactgroup.php it's done 2022-02-15 20:08:28 -08:00
Content_filter.php it's done 2022-02-15 20:08:28 -08:00
Conversation.php it's done 2022-02-15 20:08:28 -08:00
Cover_photo.php use current timestamp for cover_photo_activity object instead of photo timestamp, as the photo could come from media library 2022-06-16 15:00:36 -07:00
Dav.php replace auth hubloc lookup 2022-06-16 19:56:53 -07:00
Defperms.php it's done 2022-02-15 20:08:28 -08:00
Dev.php Move technical tools to /dev as submodules 2022-05-03 03:41:08 -07:00
Dircensor.php deprecate directory stuff 2022-06-06 20:41:40 -07:00
Directory.php deprecate block_public 2022-06-01 14:18:51 -07:00
Dirsearch.php fix anomoly in search results when principal exists on multiple networks 2022-06-19 13:27:14 -07:00
Display.php deprecate block_public 2022-06-01 14:18:51 -07:00
Drafts.php it's done 2022-02-15 20:08:28 -08:00
Dreport.php it's done 2022-02-15 20:08:28 -08:00
Editblock.php it's done 2022-02-15 20:08:28 -08:00
Editlayout.php it's done 2022-02-15 20:08:28 -08:00
Editpost.php it's done 2022-02-15 20:08:28 -08:00
Editwebpage.php it's done 2022-02-15 20:08:28 -08:00
Email_resend.php used wrong path by mistake 2022-03-07 16:03:32 -08:00
Email_validation.php it's done 2022-02-15 20:08:28 -08:00
Embed.php it's done 2022-02-15 20:08:28 -08:00
Embedphotos.php it's done 2022-02-15 20:08:28 -08:00
Event.php it's done 2022-02-15 20:08:28 -08:00
Events.php rename include/text -> include/misc 2022-06-17 16:59:11 -07:00
Expire.php it's done 2022-02-15 20:08:28 -08:00
Fastping.php it's done 2022-02-15 20:08:28 -08:00
Fbrowser.php it's done 2022-02-15 20:08:28 -08:00
Fedi_id.php it's done 2022-02-15 20:08:28 -08:00
Feed.php deprecate block_public 2022-06-01 14:18:51 -07:00
File_upload.php it's done 2022-02-15 20:08:28 -08:00
Filer.php it's done 2022-02-15 20:08:28 -08:00
Filerm.php it's done 2022-02-15 20:08:28 -08:00
Filestorage.php it's done 2022-02-15 20:08:28 -08:00
Follow.php it's done 2022-02-15 20:08:28 -08:00
Followers.php deprecate block_public 2022-06-01 14:18:51 -07:00
Following.php deprecate block_public 2022-06-01 14:18:51 -07:00
Future.php it's done 2022-02-15 20:08:28 -08:00
Getfile.php begin hubloc refactor 2022-06-16 19:46:54 -07:00
Hashtags.php it's done 2022-02-15 20:08:28 -08:00
Help.php it's done 2022-02-15 20:08:28 -08:00
Home.php begin hubloc refactor 2022-06-16 19:46:54 -07:00
Hq.php it's done 2022-02-15 20:08:28 -08:00
Id.php it's done 2022-02-15 20:08:28 -08:00
Impel.php it's done 2022-02-15 20:08:28 -08:00
Import.php adjust permissions from other import/sync platforms if they don't include deliver_stream 2022-05-05 22:32:09 -07:00
Import_items.php it's done 2022-02-15 20:08:28 -08:00
Inbox.php extra paren 2022-05-11 15:26:06 -07:00
Inspect.php begin hubloc refactor 2022-06-16 19:46:54 -07:00
Invite.php it's done 2022-02-15 20:08:28 -08:00
Item.php begin hubloc refactor 2022-06-16 19:46:54 -07:00
Jwks.php it's done 2022-02-15 20:08:28 -08:00
Lang.php it's done 2022-02-15 20:08:28 -08:00
Layouts.php it's done 2022-02-15 20:08:28 -08:00
Like.php regression: undo like of comment 2022-04-23 13:27:12 -07:00
Linkinfo.php slightly more aggressive/proactive hubloc filtering 2022-06-16 14:48:13 -07:00
Lists.php wrap nohtml content from html purification by simply escaping it. add attribution to lists. 2022-04-09 18:44:23 -07:00
Lockview.php php 8.1 changes 2022-03-15 01:42:34 -07:00
Locs.php hubloc refactor continued - hubloc_delete() 2022-06-17 19:24:50 -07:00
Login.php it's done 2022-02-15 20:08:28 -08:00
Logout.php it's done 2022-02-15 20:08:28 -08:00
Lostpass.php it's done 2022-02-15 20:08:28 -08:00
Magic.php begin hubloc refactor 2022-06-16 19:46:54 -07:00
Manage.php mod_pubstream: regression including non-existent file. mod_manage: flag the system channel. 2022-04-14 22:15:51 -07:00
Manifest.php it's done 2022-02-15 20:08:28 -08:00
Markup.php it's done 2022-02-15 20:08:28 -08:00
Menu.php it's done 2022-02-15 20:08:28 -08:00
Mitem.php it's done 2022-02-15 20:08:28 -08:00
Moderate.php it's done 2022-02-15 20:08:28 -08:00
Mood.php it's done 2022-02-15 20:08:28 -08:00
New_channel.php it's done 2022-02-15 20:08:28 -08:00
Notes.php it's done 2022-02-15 20:08:28 -08:00
Notifications.php it's done 2022-02-15 20:08:28 -08:00
Notify.php it's done 2022-02-15 20:08:28 -08:00
Nullbox.php it's done 2022-02-15 20:08:28 -08:00
Oauthinfo.php it's done 2022-02-15 20:08:28 -08:00
Oembed.php it's done 2022-02-15 20:08:28 -08:00
Oep.php php8 warnings 2022-03-11 21:17:09 -08:00
Online.php it's done 2022-02-15 20:08:28 -08:00
Outbox.php begin hubloc refactor 2022-06-16 19:46:54 -07:00
Owa.php begin hubloc refactor 2022-06-16 19:46:54 -07:00
Page.php it's done 2022-02-15 20:08:28 -08:00
Pconfig.php it's done 2022-02-15 20:08:28 -08:00
Pdledit.php it's done 2022-02-15 20:08:28 -08:00
Permcat.php it's done 2022-02-15 20:08:28 -08:00
Photo.php various php 8 and php 8.1 warnings 2022-03-17 22:48:35 -07:00
Photomap.php it's done 2022-02-15 20:08:28 -08:00
Photos.php rename include/text -> include/misc 2022-06-17 16:59:11 -07:00
Pin.php it's done 2022-02-15 20:08:28 -08:00
Ping.php it's done 2022-02-15 20:08:28 -08:00
Plike.php it's done 2022-02-15 20:08:28 -08:00
Poco.php it's done 2022-02-15 20:08:28 -08:00
Poke.php it's done 2022-02-15 20:08:28 -08:00
Poster.php it's done 2022-02-15 20:08:28 -08:00
Pretheme.php it's done 2022-02-15 20:08:28 -08:00
Profile.php deprecate block_public 2022-06-01 14:18:51 -07:00
Profile_photo.php fixes from upstream 2022-06-06 18:55:58 -07:00
Profiles.php rename include/text -> include/misc 2022-06-17 16:59:11 -07:00
Profperm.php it's done 2022-02-15 20:08:28 -08:00
Pubstream.php deprecate block_public 2022-06-01 14:18:51 -07:00
Q.php begin hubloc refactor 2022-06-16 19:46:54 -07:00
Randprof.php it's done 2022-02-15 20:08:28 -08:00
React.php it's done 2022-02-15 20:08:28 -08:00
README.md it's done 2022-02-15 20:08:28 -08:00
Register.php deprecate directory stuff 2022-06-06 20:41:40 -07:00
Regmod.php it's done 2022-02-15 20:08:28 -08:00
Regver.php it's done 2022-02-15 20:08:28 -08:00
Removeaccount.php it's done 2022-02-15 20:08:28 -08:00
Removeme.php it's done 2022-02-15 20:08:28 -08:00
Rmagic.php begin hubloc refactor 2022-06-16 19:46:54 -07:00
Rpost.php it's done 2022-02-15 20:08:28 -08:00
Safe.php it's done 2022-02-15 20:08:28 -08:00
Search.php deprecate block_public 2022-06-01 14:18:51 -07:00
Search_ac.php it's done 2022-02-15 20:08:28 -08:00
Secrets.php it's done 2022-02-15 20:08:28 -08:00
Service_limits.php it's done 2022-02-15 20:08:28 -08:00
Settings.php it's done 2022-02-15 20:08:28 -08:00
Setup.php file not closed after reading exif, update install requirements to php 7.4 even though it should really be 8.0 2022-05-20 14:28:03 -07:00
Share.php it's done 2022-02-15 20:08:28 -08:00
Sharedwithme.php rename include/text -> include/misc 2022-06-17 16:59:11 -07:00
Siteinfo.php remove all remote tracking services and their enablers 2022-06-08 16:48:07 -07:00
Smilies.php it's done 2022-02-15 20:08:28 -08:00
Sources.php it's done 2022-02-15 20:08:28 -08:00
Sslify.php it's done 2022-02-15 20:08:28 -08:00
Starred.php it's done 2022-02-15 20:08:28 -08:00
Stream.php add 'received' stream order 2022-05-25 16:00:59 -07:00
Subthread.php it's done 2022-02-15 20:08:28 -08:00
Suggestions.php it's done 2022-02-15 20:08:28 -08:00
Superblock.php sync xchans for superblock 2022-03-22 12:45:55 -07:00
Tagadelic.php it's done 2022-02-15 20:08:28 -08:00
Tagger.php it's done 2022-02-15 20:08:28 -08:00
Tagrm.php it's done 2022-02-15 20:08:28 -08:00
Tasks.php task sync 2022-03-17 19:26:10 -07:00
Theme_info.php code cleanup continued 2022-02-24 13:00:41 -08:00
Thing.php it's done 2022-02-15 20:08:28 -08:00
Toggle_safesearch.php it's done 2022-02-15 20:08:28 -08:00
Token.php it's done 2022-02-15 20:08:28 -08:00
Uexport.php deprecate ostatus:conversation 2022-05-19 13:47:30 -07:00
Update.php try/catch module construction in mod_update to catch bad input without throwing execptions 2022-06-01 22:32:29 -07:00
Userinfo.php it's done 2022-02-15 20:08:28 -08:00
View.php it's done 2022-02-15 20:08:28 -08:00
Viewconnections.php deprecate block_public 2022-06-01 14:18:51 -07:00
Viewsrc.php it's done 2022-02-15 20:08:28 -08:00
Vlists.php it's done 2022-02-15 20:08:28 -08:00
Vote.php it's done 2022-02-15 20:08:28 -08:00
Wall_attach.php it's done 2022-02-15 20:08:28 -08:00
Wall_upload.php it's done 2022-02-15 20:08:28 -08:00
Webfinger.php it's done 2022-02-15 20:08:28 -08:00
Webpages.php it's done 2022-02-15 20:08:28 -08:00
Well_known.php it's done 2022-02-15 20:08:28 -08:00
Xp.php it's done 2022-02-15 20:08:28 -08:00
Xref.php it's done 2022-02-15 20:08:28 -08:00
Zot.php file renames 2022-02-15 20:50:35 -08:00

Code/Module

This directory contains controller modules for handling web requests. The lowercase class name indicates the head of the URL path which this module handles. There are other methods of attaching (routing) URL paths to controllers, but this is the primary method used in this project.

Module controllers MUST reside in this directory and namespace to be autoloaded (unless other specific routing methods are employed). They typically use and extend the class definition in Code/Web/Controller as a template.

Template:

<?php

namespace Code\Web;


class Controller {

	function init() {}
	function post() {}
	function get() {}

}

Typical Module declaration for the '/foo' URL route:

<?php
namespace Code\Module;

class Foo extends \Code\Web\Controller {

	function init() {
		// init() handler goes here
	}

	function post() {
		// post handler goes here
	}

	function get() {
		return 'Hello world.' . EOL;
	}

}

This model provides callbacks for public functions named init(), post(), and get(). init() is always called. post() is called if $_POST variables are present, and get() is called if none of the prior functions terminated the handler. The get() method typically retuns a string which represents the contents of the content region of the resulting page. Modules which emit json, xml or other machine-readable formats typically emit their contents inside the init() function and call 'killme()' to terminate the Module.

Modules are passed the URL path as argc,argv arguments. For a path such as

https://mysite.something/foo/bar/baz

The app will typically invoke the Module class 'Foo' and pass it

$x = argc(); // $x = 3

$x = argv(0); // $x = 'foo'
$x = argv(1); // $x = 'bar'
$x = argv(2); // $x = 'baz'

These are handled in a similar fashion to their counterparts in the Unix shell or C/C++ languages. Do not confuse the argc(),argv() functions with the global variables $argc,$argv which are passed to command line programs. These are handled separately by command line and Code/Daemon class functions.