This repository has been archived on 2024-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
core/Zotlabs/Module
2017-06-09 16:26:30 -07:00
..
Admin start deprecation of server_role 2017-05-29 13:50:02 -07:00
Settings start deprecation of server_role 2017-05-29 13:50:02 -07:00
Achievements.php
Acl.php send directory realm_token for navbar autocomplete searches - if configured 2017-05-10 17:02:56 -07:00
Admin.php remove php version checks for older ( < 5.4) code incompatibilities 2017-05-23 21:20:40 -07:00
Api.php more api re-org 2016-11-08 16:55:29 -08:00
Appman.php apporder module and all the associated backend stuff to make it work; probably needs a bit of UI cleanup and a link to it from somewhere 2017-05-23 21:44:25 +02:00
Apporder.php apporder module and all the associated backend stuff to make it work; probably needs a bit of UI cleanup and a link to it from somewhere 2017-05-23 21:44:25 +02:00
Apps.php apps improvements 2017-02-22 11:22:43 +01:00
Attach.php issue #538 continued 2016-09-29 16:20:26 -07:00
Authorize.php oauth2/oidc testing (please do not port - this requires several extra DB tables to work) 2017-05-03 22:37:06 -07:00
Authtest.php
Block.php
Blocks.php
Bookmarks.php move profile tabs to app-tray 2017-03-20 17:24:48 +01:00
Branchtopic.php
Cal.php move profile tabs to app-tray 2017-03-20 17:24:48 +01:00
Channel.php hubzilla issue #810 2017-06-07 09:37:33 +02:00
Chanview.php start deprecation of server_role 2017-05-29 13:50:02 -07:00
Chat.php move profile tabs to app-tray 2017-03-20 17:24:48 +01:00
Chatsvc.php fix chat member list when one or members are connected via access tokens 2017-01-02 23:35:40 -08:00
Cloud.php get rid of 'davguest' and allow for project specific DB updates (currently db updates are common between all possible projects/subprojects/forks). 2017-03-31 10:26:06 +02:00
Common.php
Connect.php command line connect utility. 2016-11-01 15:27:34 -07:00
Connections.php auto inline embed ostatus image attachments 2017-06-09 15:24:37 -07:00
Connedit.php clean up the warnings about connections on unclonable networks 2017-06-09 16:26:30 -07:00
Contactgroup.php more backquotes - this should take care of most except for the array import queries 2016-10-09 16:31:04 -07:00
Cover_photo.php more work related to attach/photo and os_path, display_path and general code cleanup 2017-03-29 13:44:55 +02:00
Dav.php [FEATURE] Add config and use composer autoloader. 2016-10-18 18:11:41 +02:00
Directory.php don't allow negative age in directory listings 2017-06-07 09:31:22 +02:00
Dirsearch.php pubsites: don't list dead sites 2016-11-30 01:16:44 -08:00
Display.php activity widget - like the forum widget but represents unseen activity by author. Still experimental until it can be tested with diaspora xchans, which may require additional urlencoding. 2017-03-02 17:32:43 -08:00
Dreport.php allow delivery report for not just the author, but also if you're the owner and it's on your wall. 2016-10-03 20:50:13 -07:00
Editblock.php various input filter fixes 2017-03-29 13:56:31 +02:00
Editlayout.php various input filter fixes 2017-03-29 13:56:31 +02:00
Editpost.php more deprecate server_role 2017-05-29 16:25:27 -07:00
Editwebpage.php hubzilla issue #795 2017-05-27 02:22:36 -07:00
Embedphotos.php missing includes 2017-04-13 23:20:09 +02:00
Events.php set 'adjust for viewer timezone' as the default for new events. 2017-01-02 14:13:02 -08: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 provide a broken feed for services which require a broken feed 2017-04-26 14:12:11 +02:00
Fhublocs.php fix typos 2017-01-31 09:43:58 +01:00
File_upload.php Empty ACL should not result in no ACL when uploading a file 2017-05-11 13:31:36 +02:00
Filer.php fix item_list and item_search templates. make item filer use a bootdtrap modal and some css and class fixes 2017-03-17 14:22:10 +01:00
Filerm.php
Filestorage.php get rid of 'davguest' and allow for project specific DB updates (currently db updates are common between all possible projects/subprojects/forks). 2017-03-31 10:26:06 +02:00
Follow.php remove obscured @ hack 2016-10-04 19:37:16 -07:00
Getfile.php partial fix for failure to sync photos - appears to be memory exhaustion and dependent on filesize although an unrelated issue was found with directory creation during file sync (we didn't check ownership when looking for duplicates). 2017-06-07 20:28:59 -07:00
Group.php even more backslashes 2016-10-03 22:01:14 -07:00
Hcard.php various input filter fixes 2017-03-29 13:56:31 +02:00
Help.php some minor help cleanup - add '-/foo' override of language detection 2017-05-24 22:24:45 -07:00
Home.php
Hostxrd.php minor theming and whitespace 2017-02-08 19:47:34 -08:00
Impel.php code_allowed is a real mess. Start the cleanup by remving the account level code allow and limiting to specific channels only. This reduces the possibility of cross channel security issues coming into play. Then provide a single function for checking the code permission. This is only partially done as we often need to check against the observer or logged in channel as well as the resource owner to ensure that this only returns true for local channels which also own the requested resource. 2017-03-29 13:32:23 +02:00
Import_items.php 🔒 Add CSRF protection for import and import_items. 2017-03-30 23:17:32 +02:00
Import.php start deprecation of server_role 2017-05-29 13:50:02 -07:00
Invite.php consolidate email validation checks 2017-05-11 19:01:04 -07:00
Item.php get rid of edit activities 2017-05-08 11:12:09 +02:00
Lang.php
Layouts.php various input filter fixes 2017-03-29 13:56:31 +02:00
Like.php schema fixes 2017-05-23 21:48:58 +02:00
Linkinfo.php when inserting a link, if the url begins with '!' ignore oembed and do everytthing old school. 2016-10-26 16:44:54 -07:00
Lockview.php many dropdown and class fixes. still a long way to go... 2017-03-12 21:11:28 +01:00
Locs.php provide /locs link on settings page if there is more than one hubloc for this channnel *that isn't deleted*. 2016-11-05 03:31:50 -07:00
Login.php
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 some changes merged from wrong branch... new function channel_reddress() instead of hardwired generation and which fixes case-sensitivity; allow dot notation in config and pconfig utils, updated string file 2016-09-17 14:51:57 -07:00
Mail.php more work on client side e2ee 2017-05-01 15:12:43 +02:00
Manage.php In the rare case where a default channel is not selected but channels actually exist, you should be able to visit /manage and set a default channel. Originally I believe this may have been possible but the ability was lost when delegation was added to the interface - which requires an active channel. Remove the active channel restriction so that the rest of the interface works (channel selections can be made and the ability to set a default is provided) however delegation info isn't presented unless there is an active channel. 2017-04-26 14:13:45 +02:00
Menu.php
Message.php call zidify_links() when formatting bbcode for internal consumption 2016-12-19 16:06:49 -08:00
Mitem.php
Mood.php more urlencoding of message-ids which are used in links 2017-01-18 19:36:06 -08:00
Network.php activity widget - like the forum widget but represents unseen activity by author. Still experimental until it can be tested with diaspora xchans, which may require additional urlencoding. 2017-03-02 17:32:43 -08:00
New_channel.php update link to account roles help on new_channel page 2017-05-25 23:03:55 -07:00
Nojs.php
Notes.php
Notifications.php some styling for system notifications 2017-05-18 14:57:10 +02:00
Notify.php
Oembed.php convert oembed tools to use json arrays rather than json objects 2016-09-24 05:15:06 -07:00
Oep.php oembed: ensure that width and height are returned as type int and not float 2017-06-07 09:34:45 +02:00
Oexchange.php minor theming and whitespace 2017-02-08 19:47:34 -08:00
Ofeed.php provide a broken feed as a separate module 2017-04-26 20:14:45 -07:00
Online.php
Page.php apporder style improvement and add to nav menu, also add language awareness to webpages 2017-05-23 21:50:38 +02:00
Pconfig.php
Pdledit.php check that the advanced_theming feature is enabled before the pdledit module can be accessed. 2016-09-01 20:35:52 -07:00
Permcat.php move permcat library functions to Zlib 2017-02-07 16:43:00 -08:00
Photo.php cover photo was unintentionally disabled when block_public in effect 2017-05-08 11:11:50 +02:00
Photos.php some more photo issues 2017-03-29 14:13:10 +02:00
Ping.php provide /locs link on settings page if there is more than one hubloc for this channnel *that isn't deleted*. 2016-11-05 03:31:50 -07:00
Poco.php
Poke.php
Post.php [TASK] Update Doxyfile and fix Doxygen errors. 2016-10-13 11:27:23 +02:00
Prate.php
Pretheme.php
Probe.php
Profile_photo.php consolidate and simplify the generation of activitystreams persons, add a couple more fields hoping eventually Mastodon will accept legal follow activities without choking on them. Requires an update of plugins also. 2017-05-11 17:39:26 -07:00
Profile.php move profile tabs to app-tray 2017-03-20 17:24:48 +01:00
Profiles.php prep work 2017-02-27 14:54:41 -08:00
Profperm.php Create virtual privacy groups for private profile member lists 2017-02-12 15:56:33 -08:00
Pubsites.php redmatrix is no longer considered a supported platform and will not be listed in pubsites as of 2.x 2016-11-19 13:15:29 -08:00
Pubstream.php activity widget - like the forum widget but represents unseen activity by author. Still experimental until it can be tested with diaspora xchans, which may require additional urlencoding. 2017-03-02 17:32:43 -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
Rate.php
Ratings.php
Ratingsearch.php
Rbmark.php
React.php
README.md
Regdir.php sql: limit 1 for UPDATE and DELETE is not supported by the SQL standard and postgresql 2016-10-27 02:41:32 +02:00
Register.php start deprecation of server_role 2017-05-29 13:50:02 -07:00
Regmod.php
Regver.php
Removeaccount.php null_date conversion; phase 1 2016-09-25 17:06:13 -07:00
Removeme.php null_date conversion; phase 1 2016-09-25 17:06:13 -07:00
Rmagic.php better theming of rmagic page 2017-02-05 14:45:28 -08:00
Rpost.php
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
Search.php provide ability to search webpages (either public or which contain the observer in the acl) in addition to conversations 2017-05-30 17:53:58 -07:00
Service_limits.php
Settings.php turn Settings page into sub-modules 2016-09-06 20:10:56 -07:00
Setup.php start deprecation of server_role 2017-05-29 13:50:02 -07:00
Share.php
Sharedwithme.php move profile tabs to app-tray 2017-03-20 17:24:48 +01:00
Siteinfo_json.php
Siteinfo.php upgraded zotlabs.com to https 2016-12-01 19:53:34 -08:00
Sitelist.php
Smilies.php
Snap.php since the snap module runs without permissions controls, verify the logged in channel matches the requested cloud path 2016-10-09 21:36:55 -07:00
Sources.php
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
Subthread.php add gen_link_id() function to selectively encode/decode the message-id component of /display/ links for message-ids that contain troublesome characters 2017-01-19 15:37:30 -08:00
Suggest.php remove include/widgets.php 2017-03-29 12:04:44 +02:00
Tagger.php add gen_link_id() function to selectively encode/decode the message-id component of /display/ links for message-ids that contain troublesome characters 2017-01-19 15:37:30 -08:00
Tagrm.php more backticks 2016-10-03 21:48:53 -07:00
Tasks.php more backquotes - this should take care of most except for the array import queries 2016-10-09 16:31:04 -07:00
Theme_info.php put theme config into its own namespace 2016-09-01 22:20:08 -07:00
Thing.php [TASK] Update Doxyfile and fix Doxygen errors. 2016-10-13 11:27:23 +02:00
Toggle_mobile.php
Toggle_safesearch.php
Token.php oauth2/oidc testing (please do not port - this requires several extra DB tables to work) 2017-05-03 22:37:06 -07:00
Uexport.php channel export - use a selected list of functional data categories to export; this allows one to export single data sets instead of always exporting everything we know about 2017-01-31 15:28:25 -08:00
Update_channel.php fix with update with /channel?f=&mid=hash issue #461 2016-09-28 11:04:02 +02:00
Update_display.php use head_add_link() for feed discovery 2017-02-21 18:58:51 -08:00
Update_home.php
Update_network.php
Update_pubstream.php
Update_search.php
View.php
Viewconnections.php more places to use chanlink_hash() instead of chanlink_url() for profile_link 2017-02-23 10:36:00 +01:00
Viewsrc.php The rest of the library and backend changes to support client-side e2ee and deprecate previous uses of item_obscured. 2017-04-26 14:16:07 +02:00
Wall_attach.php more api work for item/store and doco 2016-12-02 23:09:25 -08: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
Webpages.php fix issue #790 - zip->open returned error 19 (not a valid zip archive). in case there are further issues we should probably also put a ob_end_clean() right before readfile() 2017-05-30 15:15:31 +02:00
Well_known.php
Wfinger.php provide a broken feed as a separate module 2017-04-26 20:14:45 -07:00
Wiki.php Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2017-06-07 17:11:35 -07:00
Xchan.php
Xpoco.php
Xrd.php move disapora xrd stuff to plugin 2017-05-30 16:50:57 -07:00
Xref.php
Zfinger.php
Zotfeed.php authenticate onepoll so we can receive private posts/comments in zotfeed; if local server bypass the network access and invoke zotfeed directly. 2017-05-01 15:14:10 +02:00
Zping.php

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.