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
DM42.Net Hubzilla Development 3e133bbfa3 Move auto_save_draft to header from thread comment
(cherry picked from commit c86b35da701674510a97ccc21e46581bd864cc31)
2019-11-28 09:42:59 +01:00
..
Admin make inline pdf a security option, move thumbnail security to security options from admin/site 2019-11-15 11:03:38 +01:00
Settings calendar merge: implement channel calendar import in cdav/calendar 2019-05-10 12:18:37 +02:00
Achievements.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
Acl.php fix typo 2019-03-23 20:17:35 +01:00
Admin.php MySQL 8 admin summary compatibility 2019-02-17 22:47:08 +01:00
Affinity.php missing use app 2019-02-14 14:48:16 +01: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 regression: the ability to order apps messed up since adding pinned apps to the ordering 2018-12-12 19:11:30 -08:00
Apporder.php regression: the ability to order apps messed up since adding pinned apps to the ordering 2018-12-12 19:11:30 -08:00
Apps.php move chat from feature to apps 2018-09-13 11:32:43 +02:00
Apschema.php add hashtag to appschema and bump appschema rev 2019-07-18 14:19:32 +02:00
Article_edit.php fix missing summary in mod article_edit 2019-10-02 11:05:24 +02:00
Articles.php merge opengraph fixes from dev 2019-11-25 08:41:34 +00: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
Authtest.php module updates 2016-04-18 20:38:38 -07:00
Block.php remove unused page_widgets.php include and provide a general function for loading sql from file to use in the cdav migration 2017-06-22 22:43:08 -07:00
Blocks.php Status editor hook 2018-09-29 20:22:27 +02:00
Bookmarks.php bookmarks: change wording 2018-10-06 14:50:17 +02:00
Branchtopic.php module updates 2016-04-18 20:38:38 -07:00
Cal.php apply calendar encoding fixes to mod cal 2019-06-20 18:44:23 +02:00
Card_edit.php Status editor hook 2018-09-29 20:22:27 +02:00
Cards.php Correct and extend Doxygen comments. 2019-01-23 22:25:47 +01:00
Cdav.php Ãremove some old unused javascript libraries 2019-11-10 09:59:22 +01:00
Changeaddr.php fix 48 hours timeframe check and remove unused var in mod changeaddr 2019-03-23 20:32:15 +01:00
Channel_calendar.php calendar: revert back to UTC strings for dates due to better legibility. Strip timezone info from UTC string and always treat values as UTC. 2019-07-11 11:12:27 +02:00
Channel.php merge opengraph fixes from dev 2019-11-25 08:41:34 +00:00
Chanview.php macke mod chanview aware of zot6 2019-01-24 18:06:27 +01:00
Chat.php Update Chat.php 2018-09-28 19:46:20 +02: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_tiles.php make most recent cloud_tiles setting for local channels persistent across logins 2017-11-07 19:34:00 -08:00
Cloud.php fix bitrot in util/zotsh 2019-08-15 16:28:06 -07:00
Common.php some basic work on mod common 2017-10-03 11:37:45 +02:00
Connect.php Update Connect.php 2018-09-28 19:46:36 +02:00
Connections.php Fix channel address in follow link 2019-10-15 22:37:03 +02:00
Connedit.php add zot6 to clonable networks 2019-03-13 17:48:00 +01:00
Contactgroup.php Update Contactgroup.php 2018-09-28 00:11:03 +02:00
Cover_photo.php update directory on cover photo changes 2019-05-03 14:11:14 +02:00
Dav.php fix bitrot in util/zotsh 2019-08-15 16:28:06 -07:00
Defperms.php defperm app 2018-10-04 13:26:45 +02:00
Directory.php More nofollow tags to discourage backlink farmers 2019-09-03 14:32:52 +02:00
Dirsearch.php fix typo 2019-07-03 22:13:14 +02:00
Display.php Revert code to use thr_parent for comment replies 2019-05-01 15:12:01 +02:00
Dreport.php clone systems apps to the extent possible, auto-configure imagick thumbnail binary during setup if possible 2019-03-18 09:35:53 +01:00
Editblock.php Status editor hook 2018-09-29 20:22:27 +02:00
Editlayout.php Status editor hook 2018-09-29 20:22:27 +02:00
Editpost.php select event by event_hash instead of item_id 2019-04-30 10:47:48 +02:00
Editwebpage.php Status editor hook 2018-09-29 20:22:27 +02: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 work on repeat/share for Hubzilla 2019-02-06 17:26:09 -08:00
Embedphotos.php fix embedphotos image size 2019-06-07 08:45:08 +02:00
Events.php Merge branch 'dev' into 'dev' 2019-06-20 17:32:10 +02: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 issues with feed parameters 2018-01-02 14:04:43 -08:00
Fhublocs.php fix typos 2017-01-31 09:43:58 +01:00
File_upload.php remove logging line 2017-11-30 19:11:26 -08: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 more db column renames 2016-05-31 21:45:33 -07:00
Filestorage.php fix ability for file storage creators (visitors) to be able to delete their own content 2019-02-19 13:14:19 -08:00
Follow.php more work with unicode usernames 2018-03-14 18:42:07 -07:00
Getfile.php http signature consolidation 2019-06-26 21:45:21 -07:00
Go.php provide new member widget which sits beneath the notifications for the first 60 days after an account creation. 2018-02-28 19:49:33 -08:00
Group.php hz core issue #1386 - function name must be a string 2019-07-28 23:46:38 -07: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 do not default to channel_startpage if startpage app is not installed 2018-10-01 12:38:04 +02:00
Hostxrd.php minor theming and whitespace 2017-02-08 19:47:34 -08:00
Hq.php some more xss prevention 2019-03-18 21:30:25 +01:00
Id.php http signature consolidation 2019-06-26 21:45:21 -07:00
Impel.php add item.uuid to relevant places 2018-11-15 16:34:09 -08:00
Import_items.php 🔒 Add CSRF protection for import and import_items. 2017-03-30 23:17:32 +02:00
Import.php import/export zot6 hublocs+xchans 2019-04-26 09:34:58 +02:00
Invite.php Update Invite.php 2018-09-28 19:47:20 +02:00
Item.php fix duplicate attachment and regression with audio file upload 2019-11-04 10:34:24 +01:00
Lang.php Update Lang.php 2018-09-28 19:47:37 +02:00
Layouts.php Status editor hook 2018-09-29 20:22:27 +02:00
Like.php add autocomplete js to calendar and fix issue with extended likes mid 2019-05-14 09:09:48 +02:00
Linkinfo.php linkinfo: only allow to embed public items 2019-08-11 10:55:38 +02:00
Lockview.php changes to support direct messages in zot6 (set item.item_private = 2 when private mentions are used and federate with zot:directMessage attribute which aligns with litepub:directMessage) 2019-06-19 17:32:38 -07: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 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 http signature consolidation 2019-06-26 21:45:21 -07:00
Mail.php base64 encode message signature 2019-06-15 16:03:35 +02:00
Manage.php only explain how to select a channel if there are channels to select 2018-09-23 20:54:36 +02:00
Menu.php fix issue #1402 2019-11-03 11:15:12 +01:00
Message.php add alt_pager to mod_moderate, remove legacy $a parameter from all occurrences of alt_pager 2018-04-17 23:36:35 -07:00
Mitem.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
Moderate.php add alt_pager to mod_moderate, remove legacy $a parameter from all occurrences of alt_pager 2018-04-17 23:36:35 -07:00
Mood.php add item.uuid to relevant places 2018-11-15 16:34:09 -08:00
Network.php some more xss prevention 2019-03-18 21:30:25 +01:00
New_channel.php do not count removed channels 2019-01-10 13:35:27 +01:00
Notes.php Extend documentation. 2019-01-28 23:58:19 +01:00
Notifications.php this is messing with names containing a comma and is superfluous now 2018-07-06 08:44:25 +02:00
Notify.php some more work on mod hq 2017-11-18 22:16:06 +01:00
Oauth2.php Update Oauth2.php 2018-09-28 19:48:44 +02:00
Oauth2testvehicle.php disable the oauth2testvehicle completely until it is safe 2018-04-03 21:58:11 -07:00
Oauth.php Update Oauth.php 2018-09-28 19:48:25 +02:00
Oauthinfo.php oidc cleanup and discovery 2018-08-13 20:24:04 -07:00
Ochannel.php prevent reload loop if somebody lands on /ochannel (without channel_address and without trailing slash) 2018-03-22 13:55:23 +01:00
Oembed.php add rel=noopener to all external target _blank links 2017-06-14 16:56:13 +02:00
Oep.php mod_oep: photos/album/xxxxx is no longer hex2bin/bin2hex but the album hash and is throwing php warnings when trying to decode 2019-03-04 20:07:01 -08:00
Oexchange.php minor theming and whitespace 2017-02-08 19:47:34 -08:00
Ofeed.php issues with feed parameters 2018-01-02 14:04:43 -08:00
Online.php module updates 2016-04-18 20:38:38 -07:00
Owa.php http signature consolidation 2019-06-26 21:45:21 -07:00
Page.php allow plugin class widgets, fix sql error in page module 2017-10-29 19:52:00 -07:00
Pconfig.php fix preg_match(): Delimiter must not be alphanumeric or backslash warning 2019-01-02 17:53:28 +01:00
Pdledit.php Update Pdledit.php 2018-09-28 19:49:02 +02:00
Permcat.php move permcat library functions to Zlib 2017-02-07 16:43:00 -08:00
Permcats.php fix issues with bs accordions 2018-10-04 22:21:20 +02:00
Photo.php Prefer use Etag on photo modification validation 2019-11-04 21:44:42 +01:00
Photos.php Move auto_save_draft to header from thread comment 2019-11-28 09:42:59 +01:00
Ping.php decode encoded mid 2019-06-28 13:09:44 +02:00
Poco.php module updates 2016-04-18 20:38:38 -07:00
Poke.php Update Poke.php 2018-09-28 19:49:42 +02:00
Post.php whitespace 2017-09-25 23:39:48 -07:00
Poster.php Add jot videos inline and with poster if possible 2019-04-27 17:20:38 -07:00
Prate.php daemon conversion continued... 2016-05-19 22:26:37 -07:00
Pretheme.php module updates 2016-04-18 20:38:38 -07:00
Probe.php remote diagnostics app 2018-10-06 15:21:22 +02:00
Profile_photo.php Add remove profile photo button 2019-04-19 15:30:05 +02:00
Profile.php remove deprecated $a argument from advanced_profile() 2017-11-23 20:35:34 -08:00
Profiles.php fix linkify_tags() so it works with xchans across multiple protocols, also some fixes to activity parsing from upstream. 2019-02-03 16:53:49 -08:00
Profperm.php Create virtual privacy groups for private profile member lists 2017-02-12 15:56:33 -08:00
Pubsites.php comment out statistics link in mod pubsites until we have something functional again 2017-10-24 18:21:19 +02:00
Pubstream.php some more xss prevention 2019-03-18 21:30:25 +01:00
Randprof.php randprof app 2018-10-06 15:27:46 +02:00
Rate.php ratings are gone. They can be enabled, but there is no UI for doing so at this time; and will likely only be available in a 'pro' configuration once the new implementation details have been hashed out. This appears to require a mechanism for rebuttal before it can again be opened to the public. There are also some synchronisation issues to contend with; as ratings are currently only distributed to active directory servers. There is no reliable mechanism for a new directory server to fetch existing ratings. 2016-08-25 17:43:07 -07:00
Ratings.php ratings are gone. They can be enabled, but there is no UI for doing so at this time; and will likely only be available in a 'pro' configuration once the new implementation details have been hashed out. This appears to require a mechanism for rebuttal before it can again be opened to the public. There are also some synchronisation issues to contend with; as ratings are currently only distributed to active directory servers. There is no reliable mechanism for a new directory server to fetch existing ratings. 2016-08-25 17:43:07 -07:00
Ratingsearch.php add the hidden flag also 2016-07-27 16:14:46 -07:00
Rbmark.php module updates 2016-04-18 20:38:38 -07:00
React.php emojireaction compat 2019-05-02 21:18:54 -07: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 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 form security token for mod register ported from zap 2019-05-13 10:13:51 +02: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 rmagic discovery for z6 networks 2018-12-09 16:37:15 -08:00
Rpost.php Status editor hook 2018-09-29 20:22:27 +02: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
Search.php live-update not triggering on mod_search 2019-05-29 17:04:27 -07:00
Service_limits.php module updates 2016-04-18 20:38:38 -07:00
Settings.php provide a mechanism to mark apps active in the bin 2017-07-21 10:32:21 +02:00
Setup.php required php version not available but allowed to continue 2019-04-18 13:53:39 -07:00
Share.php reflect repeats in notifications, use force flag for import_xchan_photo() in cron 2019-07-22 19:11:52 +02: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 the root cause for doubled entries is fixed now 2018-10-08 11:25:49 +02: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
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 Update Sources.php 2018-09-28 19:49:56 +02:00
Sslify.php Keep remote site headers for caching 2018-12-17 09:34:30 +01:00
Starred.php fix "unstar" 2017-10-28 15:24:37 -07:00
Subthread.php fix subthread on sys channel items 2019-03-23 22:48:52 +01:00
Suggest.php pubstream app 2018-10-06 16:08:15 +02:00
Tagger.php fix typo 2019-03-23 22:49:27 +01: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 There was no pdl for mod_thing; add one because it's only a link away from profile creation and remains on that page until you go elsewhere and new members may need help to find their way out 2018-03-03 15:19:39 -08:00
Toggle_mobile.php module updates 2016-04-18 20:38:38 -07: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
Tokens.php Update Tokens.php 2018-09-28 19:50:15 +02:00
Uexport.php uexport app 2018-10-04 11:50:38 +02:00
Update.php explain what happened here 2017-12-04 21:39:53 -08:00
Userinfo.php Fixes to OAuth2 connect-with-openid. Add zothash Claim. Add zotwebbie Claim. 2018-08-10 12:01:05 -04:00
View.php module updates 2016-04-18 20:38:38 -07:00
Viewconnections.php use urlencode 2019-03-18 13:29:08 +01:00
Viewsrc.php fix summary and use item_normal_search() for viewsrc so we can also view the source for articles, cards, etc. 2019-02-21 08:48:47 +01:00
Wall_attach.php svg stuff 2019-11-08 10:47:00 +01: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 imagemagick preserves exif when scaling. GD does not. We do not want to preserve exif on thumbnails which we have rotated, as a browser reading the exif information could rotate them yet again. This checkin adds an abstract function to the generic photo driver which makes the behaviour consistent by stripping EXIF from imagick processed images. However, we will attempt to preserve any ICC colour profiles. See http://php.net/manual/en/imagick.stripimage.php 2018-04-22 18:12:16 -07:00
Webpages.php Status editor hook 2018-09-29 20:22:27 +02:00
Well_known.php Update Well_known.php 2019-08-30 00:55:36 +02:00
Wfinger.php add attachments to zot6 event objects, add zot6 to federated transports (webfinger) 2019-04-15 20:51:57 -07:00
Wiki.php wiki: urlencode the entire share link 2019-05-17 12:24:25 +02: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
Xrd.php we need this in the plugin, not in core 2017-09-20 19:34:43 -07:00
Xref.php module updates 2016-04-18 20:38:38 -07:00
Zfinger.php http signature consolidation 2019-06-26 21:45:21 -07:00
Zot_probe.php http signature consolidation 2019-06-26 21:45:21 -07:00
Zot.php push recent changes 2018-11-19 15:04:08 -08:00
Zotfeed.php issues with image import to zot6 - wrong mid. Also label source project of zotfeed since it is not completely compatible across projects. 2019-08-22 19:39:11 -07:00
Zping.php module updates 2016-04-18 20:38:38 -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.