streams/Code/Module
2024-03-01 12:46:57 +11:00
..
Admin Merge branch 'dev' into collect 2024-02-22 06:58:05 +11:00
Dev Remove LD-signatures with extreme bias. 2024-01-03 11:17:40 +11:00
Settings Add targets to top-level activities we create which don't already have one 2024-02-13 07:06:28 +11:00
Acloader.php update doco 2023-11-11 07:05:19 +11:00
Activity.php missed signature => proof on a few controllers 2024-01-06 06:31:03 +11:00
Admin.php work in progress 2024-01-09 07:58:16 +11:00
Affinity.php cleanup 2022-09-04 10:20:42 +10:00
Album.php undo authenticated fetch change of default 2023-12-28 15:03:14 +11:00
Api.php cleanup 2022-09-04 10:20:42 +10:00
Appman.php more cleanup 2022-08-27 08:37:04 +10:00
Apporder.php reset apps 2023-10-21 20:13:59 +11:00
Apps.php more apps work 2023-10-14 16:58:12 +11:00
Apschema.php add identity context and refactor context generation 2022-12-16 08:24:47 +11:00
Attach.php don't process markdown on inbound bbcode messages 2023-04-20 19:44:54 +10:00
Audience.php testing audience app 2023-11-10 18:37:43 +11:00
Authorize.php cleanup 2022-12-31 05:41:02 +11:00
Block.php refactor get_post_tags() to remove link argument 2022-10-23 11:50:31 +11:00
Blocks.php more cleanup 2022-08-27 08:37:04 +10:00
Ca.php cache-control 2024-01-27 06:19:53 +11:00
Cal.php repeats 2023-10-09 17:11:45 +11:00
Calendar.php more heavy lifting on conversation collections. This optionally brings collection support into item_store() and also performs clone sync, removing a lot of duplicate code. Events needed significant refactoring. We cannot combine message delivery of standard items and collection activities, so this will have an impact on outgoing message queue size and processing. 2024-02-11 06:22:39 +11:00
Captcha.php added captcha to register workflow 2024-02-21 08:06:38 +11:00
Card_edit.php cleanup 2022-09-04 10:20:42 +10:00
Cards.php refactor get_post_tags() to remove link argument 2022-10-23 11:50:31 +11:00
Categories.php more cleanup 2022-08-27 08:37:04 +10:00
Cdav.php new auth work 2023-07-29 11:07:38 +10:00
Changeaddr.php cleanup 2022-09-04 10:20:42 +10:00
Channel.php refactor the section that recursed earlier 2024-02-13 19:57:09 +11:00
Chanview.php visually indicate order of precedence for the benefit of future travelers. 2024-02-09 08:02:11 +11:00
Chat.php cleanup 2022-09-04 10:20:42 +10:00
Chatsvc.php cleanup 2022-09-04 10:20:42 +10:00
Clients.php it's done 2022-02-15 20:08:28 -08:00
Cloud.php code cleanup 2022-08-14 19:20:43 +10: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 fix register link for non-nomad sites 2023-10-09 07:54:37 +11:00
Connac.php it's done 2022-02-15 20:08:28 -08:00
Connect.php cleanup 2022-09-04 10:20:42 +10:00
Connections.php Add moderated connection filter 2023-09-11 06:40:47 +10:00
Connedit.php syntax 2023-11-27 19:05:22 +11:00
Contactgroup.php it's done 2022-02-15 20:08:28 -08:00
Content_filter.php refactor filter_moderate setting 2023-06-03 08:40:38 +10:00
Conversation.php better test for hubzilla conversations, which doesn't support replyto 2024-02-29 18:56:24 +11:00
Cover_photo.php DTOs 2024-01-12 05:34:22 +11:00
Dav.php log the absence of authentication headers to the dav endpoint. This is not an error for the first access, but will be a problem if we don't get one the second time after we have returned the 'auth required' response. 2023-08-29 06:30:01 +10:00
Defperms.php cleanup 2022-09-04 13:01:34 +10:00
Dev.php code cleanup 2022-08-13 12:09:50 +10:00
Dircensor.php encode argument to dircensor 2023-11-25 17:48:08 +11:00
Directory.php missed signature => proof on a few controllers 2024-01-06 06:31:03 +11:00
Dirsearch.php improve directory censor 2023-11-24 21:18:40 +11:00
Display.php refactor default group creation 2023-11-05 09:15:53 +11:00
Drafts.php it's done 2022-02-15 20:08:28 -08:00
Dreport.php some fixes to codeberg issue #11 . Remaining: federating edited wall-to-wall posts from a different site to ActivityPub and Hubzilla. They will now federate to streams, including to the original site it was posted. Also fixed delivery reports reporting "updated" which were translated to "update ignored". 2022-10-06 02:26:09 -07:00
Editblock.php cleanup 2022-09-04 11:35:50 +10:00
Editlayout.php cleanup 2022-09-04 11:35:50 +10:00
Editpost.php edit issue, remove unused code 2023-09-18 08:08:30 +10:00
Editwebpage.php cleanup 2022-09-04 11:35:50 +10:00
Email_resend.php cleanup 2022-09-04 11:35:50 +10:00
Email_validation.php fix workflow_channel_next in 2 places. Improve follows query. 2022-10-08 19:57:16 +11:00
Embed.php it's done 2022-02-15 20:08:28 -08:00
Embedfiles.php Update Embedfiles.php 2023-03-13 16:05:47 -04:00
Embedphotos.php only show images in embedphotoswidget when called from profile_photo and cover_photo 2024-01-08 21:32:02 +11:00
Event.php Remove LD-signatures with extreme bias. 2024-01-03 11:17:40 +11:00
Events.php more heavy lifting on conversation collections. This optionally brings collection support into item_store() and also performs clone sync, removing a lot of duplicate code. Events needed significant refactoring. We cannot combine message delivery of standard items and collection activities, so this will have an impact on outgoing message queue size and processing. 2024-02-11 06:22:39 +11:00
Expire.php cleanup 2022-09-04 11:35:50 +10:00
Export_follows.php add rejections to $hidden_activities 2023-01-02 14:02:11 +11:00
Fastping.php cleanup 2022-09-05 08:39:58 +10:00
Fbrowser.php cleanup 2022-09-04 11:35:50 +10:00
Fedi_id.php still trying to stop the recursion in issue #146 - a bit brutal, but this should do it. 2024-02-10 07:37:26 +11:00
Feed.php deprecate block_public 2022-06-01 14:18:51 -07:00
Fhublocs.php add fhublocs as cli util 2024-02-01 05:05:47 +11:00
File_upload.php cleanup 2022-09-04 11:35:50 +10:00
Filer.php cleanup 2022-09-04 11:35:50 +10:00
Filerm.php it's done 2022-02-15 20:08:28 -08:00
Filestorage.php add sync to moveInto() interface 2022-11-19 19:56:53 +11:00
Follow.php DTOs 2024-01-12 05:34:22 +11:00
Followers.php Remove LD-signatures with extreme bias. 2024-01-03 11:17:40 +11:00
Following.php Remove LD-signatures with extreme bias. 2024-01-03 11:17:40 +11:00
Future.php it's done 2022-02-15 20:08:28 -08:00
Getfile.php missing use statement 2023-08-01 17:01:16 -07:00
Hashtags.php it's done 2022-02-15 20:08:28 -08:00
Help.php add webp support to doco assets 2023-12-19 12:43:47 +11:00
Home.php Don't validate signatures on requests for the public site actor. 2024-02-14 08:27:04 +11:00
Id.php rename function 2023-01-21 09:35:14 +11:00
Impel.php more heavy lifting on conversation collections. This optionally brings collection support into item_store() and also performs clone sync, removing a lot of duplicate code. Events needed significant refactoring. We cannot combine message delivery of standard items and collection activities, so this will have an impact on outgoing message queue size and processing. 2024-02-11 06:22:39 +11:00
Import.php cover all import paths for generating ed25519 keys 2024-01-02 15:47:27 +11:00
Import_items.php cleanup 2022-09-04 11:35:50 +10:00
Inbox.php cleanup handling of Announce activities 2024-02-17 05:11:05 +11:00
Inspect.php fix unresolved context, html escape inspector output 2024-01-31 06:55:02 +11:00
Invite.php it's done 2022-02-15 20:08:28 -08:00
Item.php remove all the FEP-5624 stuff - it is no longer compatible 2024-02-25 09:43:13 +11:00
Jwks.php cleanup 2022-09-03 15:23:54 +10:00
Lang.php it's done 2022-02-15 20:08:28 -08:00
Layouts.php cleanup 2022-09-04 11:35:50 +10:00
Legal.php cleanup 2022-09-04 10:01:52 +10:00
Like.php more heavy lifting on conversation collections. This optionally brings collection support into item_store() and also performs clone sync, removing a lot of duplicate code. Events needed significant refactoring. We cannot combine message delivery of standard items and collection activities, so this will have an impact on outgoing message queue size and processing. 2024-02-11 06:22:39 +11:00
Linkinfo.php cleanup handling of Announce activities 2024-02-17 05:11:05 +11:00
Lists.php undo authenticated fetch change of default 2023-12-28 15:03:14 +11:00
Lockview.php php 8.1 changes 2022-03-15 01:42:34 -07:00
Locs.php cleanup 2022-09-04 11:35:50 +10: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 cleanup 2022-09-04 11:35:50 +10:00
Magic.php Fuck Apache 2023-06-11 11:02:51 +10:00
Manage.php linked identities continued 2023-05-01 22:28:35 -07:00
Manifest.php only respond at webmanifest ednpoint 2023-06-27 08:37:42 +10:00
Markup.php cleanup 2022-09-04 11:35:50 +10:00
Menu.php cleanup 2022-09-04 11:35:50 +10:00
Mitem.php cleanup 2022-09-04 10:01:52 +10:00
Moderate.php Testing of containerised moderation. 2024-02-24 07:11:32 +11:00
Mood.php Add targets to top-level activities we create which don't already have one 2024-02-13 07:06:28 +11:00
New_channel.php Change default settings for more privacy 2023-12-20 09:49:54 +11:00
Nomad.php rename endpoint 2022-08-31 13:43:07 -07:00
Notes.php cleanup 2022-09-04 11:35:50 +10:00
Notifications.php cleanup 2022-09-04 11:35:50 +10:00
Notify.php cleanup 2022-09-03 15:23:54 +10: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 cleanup 2022-09-04 11:35:50 +10:00
Oep.php add newline before closing /share tag in case it is needed for markdown 2024-01-14 16:59:46 +11:00
Online.php it's done 2022-02-15 20:08:28 -08:00
Opensearch.php add openwebauth to opensearch 2023-08-30 07:54:37 +10:00
Outbox.php more complete handling of unfollow 2024-01-01 08:02:52 +11:00
Owa.php still trying to stop the recursion in issue #146 - a bit brutal, but this should do it. 2024-02-10 07:37:26 +11:00
Page.php refactor get_post_tags() to remove link argument 2022-10-23 11:50:31 +11:00
Pconfig.php more work on identity manager 2023-04-30 15:28:07 +10:00
Pdledit.php cleanup 2022-09-04 10:01:52 +10:00
Permcat.php it's done 2022-02-15 20:08:28 -08:00
Photo.php cache-control 2024-01-27 06:19:53 +11:00
Photomap.php it's done 2022-02-15 20:08:28 -08:00
Photos.php fix photo title on edit (was using description) 2024-01-08 17:02:50 +11:00
Pin.php allow pins to be removed from pinned widget display 2023-06-05 06:57:12 +10:00
Ping.php remove all the FEP-5624 stuff - it is no longer compatible 2024-02-25 09:43:13 +11:00
Plike.php Add targets to top-level activities we create which don't already have one 2024-02-13 07:06:28 +11:00
Poco.php it's done 2022-02-15 20:08:28 -08:00
Poke.php reform the poke app 2022-10-25 20:10:57 +11: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 DTOs 2024-01-12 05:34:22 +11:00
Profile_photo.php not all hashtags were getting stored in term table 2023-07-09 18:28:02 +10:00
Profperm.php it's done 2022-02-15 20:08:28 -08:00
Pubstream.php make scrollbars configurable 2023-10-08 22:06:10 +11: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 more heavy lifting on conversation collections. This optionally brings collection support into item_store() and also performs clone sync, removing a lot of duplicate code. Events needed significant refactoring. We cannot combine message delivery of standard items and collection activities, so this will have an impact on outgoing message queue size and processing. 2024-02-11 06:22:39 +11:00
README.md it's done 2022-02-15 20:08:28 -08:00
Register.php block registration by ip 2024-03-01 12:46:57 +11: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 cleanup 2022-09-02 06:50:26 +10:00
Removeme.php it's done 2022-02-15 20:08:28 -08:00
Rmagic.php fix a few more places where hubloc_addr confusion can potentially occur. 2023-01-01 07:02:03 +11:00
Rpost.php cleanup 2023-03-18 11:29:56 +11:00
Safe.php it's done 2022-02-15 20:08:28 -08:00
Search.php missed signature => proof on a few controllers 2024-01-06 06:31:03 +11: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 more identity manager 2023-05-02 09:21:40 +10:00
Setup.php wordsmith 2023-12-15 08:21:47 +11:00
Share.php Add targets to top-level activities we create which don't already have one 2024-02-13 07:06:28 +11:00
Sharedwithme.php rename include/text -> include/misc 2022-06-17 16:59:11 -07:00
Smilies.php it's done 2022-02-15 20:08:28 -08:00
Sources.php protocol object classes continued 2023-07-22 22:06:41 +10:00
Sslify.php Sslify: URL cannot be NULL 2022-08-29 22:31:40 -07:00
Starred.php it's done 2022-02-15 20:08:28 -08:00
Stream.php refactor default group creation 2023-11-05 09:15:53 +11:00
Subthread.php Add targets to top-level activities we create which don't already have one 2024-02-13 07:06:28 +11:00
Suggestions.php it's done 2022-02-15 20:08:28 -08:00
Superblock.php unwanted whitescreen 2023-08-11 08:27:51 +10:00
Tagadelic.php it's done 2022-02-15 20:08:28 -08:00
Tagger.php more cleanup 2022-09-17 10:25:44 +10:00
Tagrm.php more heavy lifting on conversation collections. This optionally brings collection support into item_store() and also performs clone sync, removing a lot of duplicate code. Events needed significant refactoring. We cannot combine message delivery of standard items and collection activities, so this will have an impact on outgoing message queue size and processing. 2024-02-11 06:22:39 +11:00
Tasks.php task sync 2022-03-17 19:26:10 -07:00
Theme_info.php refactor default group creation 2023-11-05 09:15:53 +11: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 new auth work 2023-07-29 11:07:38 +10:00
Totp_check.php fixes mfa escape from form 2023-03-08 22:33:33 +11:00
Uexport.php deprecate ostatus:conversation 2022-05-19 13:47:30 -07:00
Update.php code cleanup 2022-08-13 20:57:14 +10:00
Userinfo.php it's done 2022-02-15 20:08:28 -08:00
View.php more cleanup 2022-08-27 08:37:04 +10:00
Viewconnections.php smell: remove pesky profile hide_friends setting and from now on rely on permissions view_contacts attribute 2022-09-04 20:40:28 -07:00
Viewsrc.php it's done 2022-02-15 20:08:28 -08:00
Vote.php more heavy lifting on conversation collections. This optionally brings collection support into item_store() and also performs clone sync, removing a lot of duplicate code. Events needed significant refactoring. We cannot combine message delivery of standard items and collection activities, so this will have an impact on outgoing message queue size and processing. 2024-02-11 06:22:39 +11:00
Wall_attach.php typo 2023-08-17 23:55:52 -07:00
Wall_upload.php it's done 2022-02-15 20:08:28 -08:00
Webfinger.php webfinger: don't redirect, possibility of recursion 2024-01-31 08:40:50 +11:00
Webpages.php more cleanup 2022-08-27 08:37:04 +10:00
Well_known.php more cleanup 2022-08-27 08:37:04 +10:00
Xp.php cache-control 2024-01-27 06:19:53 +11:00
Xref.php it's done 2022-02-15 20:08:28 -08:00
Zot.php rename endpoint 2022-08-31 13:43:07 -07: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.