streams/Zotlabs/Module
2019-04-01 19:04:08 -07:00
..
Admin expose setting to block public search 2019-02-07 21:05:42 -08:00
Settings more prep work for collections 2019-03-23 15:23:59 -07:00
Acl.php fixes from upstream 2019-03-26 16:06:06 -07:00
Activity.php fix mod_activity AS query and change the fix for urlencoding of categories in category widget to match upstream 2019-02-21 14:38:11 -08:00
Admin.php fixes from upstream 2019-02-17 21:45:31 -08:00
Affinity.php use affinity slider to set default affinity slider values 2019-04-01 19:04:08 -07:00
Alist.php rename privacy groups to access lists, forums to groups 2019-02-14 15:26:37 -08:00
Ap_probe.php add ap_probe 2018-08-19 20:41:32 -07:00
Api.php scrutinizer issues: none worthy of including in 3.0, there will likely be a few hundred more before all is said and done. 2018-01-08 14:45:21 -08:00
Appman.php issues with app ordering 2018-12-12 19:04:59 -08:00
Apporder.php issues with app ordering 2018-12-12 19:04:59 -08:00
Apps.php Merge branch 'red' into dev 2018-09-18 20:51:38 -07:00
Apschema.php misc fixes from the logs and upstream 2019-02-05 19:01:17 -08:00
Attach.php check code rights on cloud files 2017-09-05 21:38:07 -07:00
Authorize.php oidc cleanup and discovery 2018-08-13 20:24:04 -07:00
Block.php more heavy lifting 2018-05-31 21:05:09 -07:00
Blocks.php remove the app $a passed to profile_load, also add profile_load to mod_wiki which should fix issue #431 2016-06-26 22:13:59 -07:00
Branchtopic.php module updates 2016-04-18 20:38:38 -07:00
Cal.php appify categories 2019-03-24 20:08:23 -07:00
Card_edit.php appify categories 2019-03-24 20:08:23 -07:00
Cards.php appify categories 2019-03-24 20:08:23 -07:00
Categories.php xchan_instance_url was still being referenced, add expire app 2019-03-24 22:46:31 -07:00
Cdav.php appify invite 2018-09-15 10:48:51 +02:00
Changeaddr.php fixes from upstream 2019-03-26 16:06:06 -07:00
Channel.php xss issue from upstream, messagefilter enhancements 2019-03-18 19:19:04 -07:00
Chanview.php regression in socgraph 2018-10-15 19:29:32 -07:00
Chat.php more removal of unnecessary legacy stuff, string update 2019-02-17 15:00:08 -08:00
Chatsvc.php we must now provide the full path to the profile image for the cavatar plugin to work 2018-05-15 10:20:20 +02:00
Cloud.php SECURITY: provide option to disable the cloud 'root' directory and make the cloud module require a target channel nickname. This is a low impact change as there is currently no disclosure of private information. The presence of a file browser for all the channels on the site could be (and is reported to be) a concern to some people and there is no reason why it shouldn't be optional. 2018-06-13 20:27:10 -07:00
Cloud_tiles.php make most recent cloud_tiles setting for local channels persistent across logins 2017-11-07 19:34:00 -08:00
Common.php some basic work on mod common 2017-10-03 11:37:45 +02:00
Connect.php add moderated permission 2019-02-28 15:14:22 -08:00
Connections.php make moderation notifications go to the right place 2019-03-27 19:20:35 -07:00
Connedit.php convert new-friend activity to note since ASV2 vocabulary is incompatible with ASV1. 2019-04-01 17:00:00 -07:00
Contactgroup.php rename privacy groups to access lists, forums to groups 2019-02-14 15:26:37 -08:00
Content_filter.php update help text for content filters 2019-03-19 17:23:33 -07:00
Cover_photo.php chunk uploads for profile and cover photos 2019-03-05 19:51:41 -08:00
Dav.php strip acct: from OWA auth to API endpoints 2017-12-07 18:56:26 -08:00
Defperms.php updates 2019-01-18 13:04:05 -08:00
Directory.php xss issue from upstream, messagefilter enhancements 2019-03-18 19:19:04 -07:00
Dirsearch.php fixes from upstream 2019-03-26 16:06:06 -07:00
Display.php xss issue from upstream, messagefilter enhancements 2019-03-18 19:19:04 -07:00
Dreport.php peertube improvements, missing host in dreport 2018-10-15 18:27:03 -07:00
Editblock.php add cancel button to editor, fix issue with autosave of categories 2018-05-10 20:54:48 -07:00
Editlayout.php add cancel button to editor, fix issue with autosave of categories 2018-05-10 20:54:48 -07:00
Editpost.php appify categories 2019-03-24 20:08:23 -07:00
Editwebpage.php add cancel button to editor, fix issue with autosave of categories 2018-05-10 20:54:48 -07:00
Email_resend.php Merge remote-tracking branch 'mike/master' into dev 2018-01-28 00:18:29 +01:00
Email_validation.php several email validation issues 2018-02-28 21:15:26 -08:00
Embed.php post embed 2019-01-29 21:26:52 -08:00
Embedphotos.php do a better job of mapping comment policy to zot6, use photo table (not item object) to get photolink in embedphotos 2019-04-01 15:19:41 -07:00
Event.php event AP endpoint update 2018-10-16 20:42:44 -07:00
Events.php appify categories 2019-03-24 20:08:23 -07:00
Expire.php xchan_instance_url was still being referenced, add expire app 2019-03-24 22:46:31 -07:00
Fbrowser.php more backquotes - this should take care of most except for the array import queries 2016-10-09 16:31:04 -07:00
Feed.php more heavy lifting 2018-05-31 21:05:09 -07:00
File_upload.php split off libsync from libzot 2018-06-04 18:40:11 -07:00
Filer.php more heavy lifting 2018-05-31 21:05:09 -07:00
Filerm.php more db column renames 2016-05-31 21:45:33 -07:00
Filestorage.php fix guest file (creator) delete 2019-02-19 13:04:28 -08:00
Finger.php checkin lots of recent zap/zot6 work 2018-05-18 03:09:38 -07:00
Follow.php more string changes 2019-02-14 17:06:17 -08:00
Followers.php the rest of the bits 2018-10-10 17:58:51 -07:00
Following.php the rest of the bits 2018-10-10 17:58:51 -07:00
Getfile.php code cleanup 2019-02-25 19:45:50 -08:00
Hashtags.php allow case independence of replacements as well as patterns 2018-03-30 01:59:32 -07:00
Hcard.php missing space in nav tpl 2017-06-28 16:45:48 -07:00
Help.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Home.php the rest of the bits 2018-10-10 17:58:51 -07:00
Hostxrd.php minor theming and whitespace 2017-02-08 19:47:34 -08:00
Hq.php xss issue from upstream, messagefilter enhancements 2019-03-18 19:19:04 -07:00
Id.php add item uuid 2019-02-19 14:59:22 -08:00
Impel.php add item uuid 2019-02-19 14:59:22 -08:00
Import.php preserve system apps during channel cloning (check those that were installed on the other site and install them locally, preserving categories) 2019-03-06 14:58:19 -08:00
Import_items.php 🔒 Add CSRF protection for import and import_items. 2017-03-30 23:17:32 +02:00
Invite.php appify mood 2018-09-15 11:00:41 +02:00
Item.php xchan_instance_url was still being referenced, add expire app 2019-03-24 22:46:31 -07:00
Lang.php appification of the lang module 2018-09-16 09:30:07 +02:00
Layouts.php pagetitle lost importing a pdl element from conversation 2017-12-03 19:12:55 -08:00
Like.php make sure enough info in edited photos is changed to actually update on the other end 2019-03-30 15:56:37 -07:00
Linkinfo.php linkinfo honour link-only setting for images, local videos. Photo editing anomalies. 2019-03-30 15:01:25 -07:00
Lockview.php rename groups and group_members tables 2018-09-25 17:50:59 -07:00
Locs.php add moderated permission 2019-02-28 15:14:22 -08:00
Login.php refactor the 'where does the register link point?' logic 2018-05-14 19:19:25 -07:00
Logout.php channel delegation: push current identity and pop it on logout from the delegated channel. This fixes the known issue of being forced to log back in after leaving the delegated channel. 2018-04-11 17:40:04 -07:00
Lostpass.php Unify the various mail sending instance to enotify::send() and z_mail(). Both take the same arguments. z_mail() is text only, enotify::send() provides html and text. Both are pluggable using the enotfy_send hook. 2016-10-01 03:06:01 -07:00
Magic.php owa issue 2018-10-16 19:32:17 -07:00
Manage.php Merge branch 'red' 2018-07-18 18:55:28 -07:00
Menu.php some work to make menus editable by visitors with webpage write permissions; this needed to revise the link structure so that the page specified an owner channel in the url. Otherwise we could only operate on menus owned by local_channel(). Have done some basic regression testing but have not yet fully tested guest editing functionality. 2018-06-05 21:12:42 -07:00
Message.php move libzot to class 2018-05-31 19:42:13 -07:00
Mitem.php accesscontrol rename 2019-02-14 16:01:40 -08:00
Moderate.php let people know there's nothing in the moderation queue if the query returns empty 2019-03-27 20:30:12 -07:00
Mood.php add item uuid 2019-02-19 14:59:22 -08:00
Network.php xss issue from upstream, messagefilter enhancements 2019-03-18 19:19:04 -07:00
New_channel.php new_channel - make text strings translatable and use the name as a base for the nick if you try to create without entering a nick 2018-05-21 20:17:17 -07:00
Nojs.php mangled urls on redirects 2018-07-18 17:05:38 -07:00
Notes.php split off libsync from libzot 2018-06-04 18:40:11 -07:00
Notifications.php add summary field to item table 2018-07-15 18:31:39 -07:00
Notify.php some more work on mod hq 2017-11-18 22:16:06 +01:00
Nullbox.php connect perms 2018-08-29 02:19:32 -07:00
Oauthinfo.php oidc cleanup and discovery 2018-08-13 20:24:04 -07:00
Oembed.php add rel=noopener to all external target _blank links 2017-06-14 16:56:13 +02:00
Oep.php remove items for removed connections in the background, also only deliver toplevel sync items to clones and remove these from normal delivery, fix to oep albums which was still using hex2bin/bin2hex (these are now hashes), add content import to translated apps, allow api routes to contain an optional argument. 2019-03-04 15:39:03 -08:00
Oexchange.php minor theming and whitespace 2017-02-08 19:47:34 -08:00
Online.php module updates 2016-04-18 20:38:38 -07:00
Owa.php issues with autoperms, rewrite owa, upstream fixes to main.js 2019-01-23 14:27:51 -08:00
Page.php more heavy lifting 2018-05-31 21:05:09 -07:00
Pconfig.php hardening 2018-11-20 18:55:33 -08:00
Pdledit.php move articles to addons, allow addons to provide module pdl files. 2018-07-08 18:33:55 -07:00
Permcat.php move permcat library functions to Zlib 2017-02-07 16:43:00 -08:00
Photo.php turn photos into proper AS objects (still need to fix the places where they were turned into Note for short-term compatibility) 2018-10-28 20:39:01 -07:00
Photos.php make sure enough info in edited photos is changed to actually update on the other end 2019-03-30 15:56:37 -07:00
Ping.php make moderation notifications go to the right place 2019-03-27 19:20:35 -07:00
Poco.php module updates 2016-04-18 20:38:38 -07:00
Poke.php Merge branch 'red' into dev 2018-09-18 20:51:38 -07:00
Pretheme.php module updates 2016-04-18 20:38:38 -07:00
Probe.php regression in socgraph 2018-10-15 19:29:32 -07:00
Profile.php php warnings 2019-02-14 20:44:34 -08:00
Profile_photo.php chunk uploads for profile and cover photos 2019-03-05 19:51:41 -08:00
Profiles.php update help text for content filters 2019-03-19 17:23:33 -07:00
Profperm.php Create virtual privacy groups for private profile member lists 2017-02-12 15:56:33 -08:00
Pubsites.php separate pubsites page into separate projects 2018-10-23 17:49:08 -07:00
Pubstream.php xss issue from upstream, messagefilter enhancements 2019-03-18 19:19:04 -07:00
Q.php cloud perms and location independent content searching 2019-02-19 12:31:39 -08:00
Randprof.php convert randprof to use chanlink_hash() instead of chanlink_url() and filter sys channels by xchan.xchan_system instead of xchan_addr != sys@% 2017-06-03 10:13:42 +02:00
React.php add item uuid 2019-02-19 14:59:22 -08:00
README.md readme for the module directory, also provide an undocumented way to reset the timestamp on connection photos to force a refresh without messing with the database directly. 2016-06-14 17:04:29 -07:00
Regdir.php better signature handling 2018-10-09 21:08:57 -07:00
Register.php refactor the 'where does the register link point?' logic 2018-05-14 19:19:25 -07:00
Regmod.php refactor the 'where does the register link point?' logic 2018-05-14 19:19:25 -07:00
Regver.php module updates 2016-04-18 20:38:38 -07:00
Removeaccount.php null_date conversion; phase 1 2016-09-25 17:06:13 -07:00
Removeme.php wrong default param for pubstream_incl (this checkin also picked up a few minor and hopefully non-significant changes) 2018-05-18 16:57:45 -07:00
Rmagic.php mangled urls on redirects 2018-07-18 17:05:38 -07:00
Rpost.php accesscontrol rename 2019-02-14 16:01:40 -08:00
Search.php misc cleanup from hubzilla 2018-11-15 20:52:08 -08:00
Search_ac.php Bring the saved search feature in line with the spec, and publish the feature spec. 2016-09-28 20:55:15 -07:00
Service_limits.php module updates 2016-04-18 20:38:38 -07:00
Settings.php move libzot to class 2018-05-31 19:42:13 -07:00
Setup.php sync apps, fix some warnings and prepare for a jot link modal 2019-03-21 21:57:43 -07:00
Share.php add item uuid 2019-02-19 14:59:22 -08:00
Sharedwithme.php remove profile_tabs() which has been deprecated and replaced by channel_apps() 2018-09-13 10:59:37 +02:00
Siteinfo.php ebs 2018-12-13 14:14:01 -08:00
Sitelist.php fix some issues with friend suggestions on standalone sites with no 'suggestme' volunteers. This wrongly pulled up a site directory suggesting everybody on the site. While a better outcome than finding nobody, this does not fit with our ethical design goals. If there are no friends of friends, we will only suggest those who volunteer to be on the default suggestion list. Also do not attempt to load poco data from dead sites. 2018-03-04 17:40:38 -08:00
Smilies.php module updates 2016-04-18 20:38:38 -07:00
Sources.php prevent json-ld bombing, turn off browser autocomplete on channel sources creation 2018-08-11 16:16:54 -07:00
Sslify.php there are occasional sites which use different capitalisation of Content-Type; which is rare, but completely legal. 2016-12-15 18:08:23 -08:00
Starred.php split off libsync from libzot 2018-06-04 18:40:11 -07:00
Subthread.php add item uuid 2019-02-19 14:59:22 -08:00
Suggest.php updates 2019-01-18 13:04:05 -08:00
Tagger.php split off libsync from libzot 2018-06-04 18:40:11 -07:00
Tagrm.php more backticks 2016-10-03 21:48:53 -07:00
Tasks.php last remaining task in tasklist was not removed from view when 'completed' 2017-08-23 23:59:05 -07:00
Theme_info.php put theme config into its own namespace 2016-09-01 22:20:08 -07:00
Thing.php accesscontrol rename 2019-02-14 16:01:40 -08:00
Toggle_safesearch.php module updates 2016-04-18 20:38:38 -07:00
Token.php Fixes to OAuth2 connect-with-openid. Add zothash Claim. Add zotwebbie Claim. 2018-08-10 12:01:05 -04:00
Uexport.php issues encountered testing content_import plugin 2019-02-24 21:36:06 -08:00
Update.php explain what happened here 2017-12-04 21:39:53 -08:00
Userinfo.php updates 2019-01-18 13:04:05 -08:00
View.php module updates 2016-04-18 20:38:38 -07:00
Viewconnections.php xss issue from upstream, messagefilter enhancements 2019-03-18 19:19:04 -07:00
Viewsrc.php modify item export api call, plus a few changes from upstream 2019-02-23 15:23:33 -08:00
Wall_attach.php split off libsync from libzot 2018-06-04 18:40:11 -07:00
Wall_upload.php deprecate/remove get_channel_by_nick() which is just a less generalised variant of channelx_by_nick() 2016-11-08 18:15:57 -08:00
Webfinger.php misc fixes, plus add cover photo and profile "about" to AP actor document 2018-12-03 21:45:35 -08:00
Webpages.php remove profile_tabs() which has been deprecated and replaced by channel_apps() 2018-09-13 10:59:37 +02:00
Well_known.php Merge branch 'red' 2018-08-13 20:36:40 -07:00
Xchan.php module updates 2016-04-18 20:38:38 -07:00
Xpoco.php module updates 2016-04-18 20:38:38 -07:00
Xref.php module updates 2016-04-18 20:38:38 -07:00
Zot.php add more schema validation to clone sync activities 2018-11-19 17:30:22 -08:00
Zot_probe.php debug x-zot: protocol requests 2019-02-18 17:28:29 -08:00
Zotfeed.php more heavy lifting 2018-05-31 21:05:09 -07:00

Zotlabs/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 Zotlabs/Web/Controller as a template.

Template:

<?php

namespace Zotlabs\Web;


class Controller {

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

}

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

<?php
namespace Zotlabs\Module;

class Foo extends \Zotlabs\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 Zotlabs/Daemon class functions.