streams/Zotlabs/Module
2018-02-21 20:59:30 -08:00
..
Admin refactor of the DB update system. Updates are now stored individually in Zotlabs/Update/_nnnn.php and are objects; so only the pending updates need to be loaded and executed rather than all historical updates. There is one single number (DB_UPDATE_VERSION) representing the current version and it is EQUAL TO the last known update. A dummy update _1201 was created to address the difference in counting behaviour; it will be executed on the next change of DB_UPDATE_VERSION as well as the next update. The database config values are also loaded from disk on every update immediately before setting the update lock in order to reduce timing conflicts and race conditions. 2018-02-16 12:42:02 -08:00
Settings second part of hubzilla issue #972 2018-02-11 18:17:17 -08:00
Achievements.php
Acl.php 💡 Add source documentation from recent conversations. 2018-01-05 01:38:20 +01:00
Admin.php provide a mechanism to mark apps active in the bin 2017-07-21 10:32:21 +02: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 provide ability to pin apps to navbar from /apps. this removes the ability to have per custom navbar pinned apps - this can be added later if desired 2017-11-16 11:11:06 +01:00
Apporder.php fix issues with apporder related to recent pinned apps changes 2017-11-19 22:42:16 +01:00
Apps.php fix regression in app categories 2018-01-08 11:11:17 +01:00
Article_edit.php article feature 2017-11-22 15:39:06 -08:00
Articles.php surface the article feature 2018-01-15 21:46:27 -08:00
Attach.php check code rights on cloud files 2017-09-05 21:38:07 -07:00
Authorize.php Refactor OAuth2Server a bit. 2018-02-17 01:49:01 +01:00
Authtest.php
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
Bookmarks.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
Branchtopic.php
Cal.php rename channel app events to calendar and add nav_set_selected() to /cal 2017-11-07 11:22:11 +01:00
Card_edit.php card_edit: fix lockstate and current permissions not handed over to editor 2017-10-01 22:46:35 +02:00
Cards.php this will fix the cards query and keep the rest intact 2018-02-04 22:37:30 +01:00
Cdav.php strip acct: from OWA auth to API endpoints 2017-12-07 18:56:26 -08:00
Changeaddr.php allow channel address to be changed 2017-08-04 19:02:41 -07:00
Channel.php some more DB tuning. 2018-02-15 19:24:15 +01:00
Chanview.php typo in chanview, remove output buffering in mod_cloud which is preventing large files from being downloaded. IIRC this was put there to avoid a SAML warning in SabreDAV but I'm not seeing that currently. 2017-06-25 19:17:05 -07:00
Chat.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
Chatsvc.php
Cloud.php mod_cloud: provide a themed page with an error notification on errors instead of an obtuse XML error structure 2017-12-05 18:20:38 -08: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
Connections.php remove mobile_detect (outdated and unmaintainable) 2018-02-05 18:06:25 -08:00
Connedit.php remove mobile_detect (outdated and unmaintainable) 2018-02-05 18:06:25 -08:00
Contactgroup.php
Cover_photo.php replace image cropping library 2018-01-23 16:36:56 -08:00
Dav.php strip acct: from OWA auth to API endpoints 2017-12-07 18:56:26 -08:00
Defperms.php defperms: bad query 2018-02-13 12:13:37 -08:00
Directory.php allow a site to block (public) the directory separately from other resources. 2017-11-12 21:43:46 -08:00
Dirsearch.php simplify dir_tagadelic dramatically 2018-01-17 20:10:49 -08:00
Display.php some feed cleanup 2018-02-01 19:52:40 -08:00
Dreport.php
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
Email_resend.php Merge remote-tracking branch 'mike/master' into dev 2018-01-28 00:18:29 +01:00
Email_validation.php fix workflow for form based email validation when auto_channel_create is in effect. Eventually we will need to rework the workflow logic because it is getting a bit tangled. 2018-01-29 02:41:45 -08:00
Embedphotos.php hubzilla #475 continued - show photos in root folder. Part of Andrew's fix for this wasn't in my repository and hopefully won't conflict; as it appears to have been lost somewhere. It also needed a small change to the folder permissions check. 2017-12-12 14:18:34 -08:00
Events.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
Fbrowser.php
Feed.php issues with feed parameters 2018-01-02 14:04:43 -08:00
Fhublocs.php
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
Filestorage.php sync packet not generated when deleting a file using the web browser interface 2017-11-24 00:12:19 -08:00
Follow.php
Getfile.php use the same variable name consistently 2017-11-29 14:08:30 -08:00
Go.php Surface the ability to change the landing page after channel creation and create a 'go' module to present several possible things to do at this point. Change the default from 'settings' to 'profiles' so that the focus is more on you rather than the software configuration. 2018-01-28 15:56:31 -08:00
Group.php hubzilla issue #832 2017-07-19 18:32:16 -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
Hostxrd.php
Hq.php remove some never used indices which prevented our item queries to find the right query execution plan in mysql and adjust some queries to optimze the result 2018-02-04 20:42:40 +01:00
Impel.php pagetitle lost importing a pdl element from conversation 2017-12-03 19:12:55 -08:00
Import.php import: special handling required for channel photo in the xchan record when not seizing 'primary' 2017-10-02 20:27:04 -07:00
Import_items.php 🔒 Add CSRF protection for import and import_items. 2017-03-30 23:17:32 +02:00
Invite.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
Item.php turn shares into activities - make certain to pull addons or JSON-LD will chuck a wobbly 2018-02-13 20:07:57 -08:00
Lang.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
Layouts.php pagetitle lost importing a pdl element from conversation 2017-12-03 19:12:55 -08:00
Like.php some code cleanup and simplification in mod_like 2018-01-23 20:03:17 -08:00
Linkinfo.php provide a default video image if nothing else is available. Allow sites to change it. 2018-01-28 20:35:05 -08:00
Lockview.php many dropdown and class fixes. still a long way to go... 2017-03-12 21:11:28 +01:00
Locs.php
Login.php
Logout.php implement caching of notifications in browser session storage 2018-01-24 11:16:51 +01:00
Lostpass.php
Magic.php move Zotlabs\Zot\Verify to Zotlabs\Lib\Verify as part of the z6 re-org 2018-02-21 20:59:30 -08:00
Mail.php fix issues with diaspora xchans 2017-11-02 08:44:46 +01:00
Manage.php more fixes 2017-10-08 22:47:43 +02:00
Menu.php
Message.php
Mitem.php
Moderate.php redirect to be moderated items to /moderate and change the conv link to partent mid in /modrate 2017-10-19 11:20:09 +02:00
Mood.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
Network.php use new forum tag style in forum search postings 2018-02-11 15:34:34 -08:00
New_channel.php Add 'Validate' button to new_channel page and disable submit until validated. This is to get around the issue that clicking submit without ever focusing and blurring the nickname field won't actually submit the form but only provide validation. It needs to be clicked again to submit. The first click processed the blur but remained on the page with no feedback. If somebody has better workarounds, please provide. The goal is to ensure that the name and the nickname are both validated before we can submit. 2018-02-20 17:20:35 -08:00
Nojs.php
Notes.php
Notifications.php do not show seen notifys in notifications - show them in mod notifications instead. Update notifications count also on notifications updates 2017-10-22 21:01:58 +02:00
Notify.php some more work on mod hq 2017-11-18 22:16:06 +01:00
Oembed.php add rel=noopener to all external target _blank links 2017-06-14 16:56:13 +02:00
Oep.php article feature 2017-11-22 15:39:06 -08:00
Oexchange.php
Ofeed.php issues with feed parameters 2018-01-02 14:04:43 -08:00
Online.php
Owa.php move Zotlabs\Zot\Verify to Zotlabs\Lib\Verify as part of the z6 re-org 2018-02-21 20:59:30 -08:00
Page.php allow plugin class widgets, fix sql error in page module 2017-10-29 19:52:00 -07:00
Pconfig.php
Pdledit.php pdledit - show original/system layout text for comparison 2017-10-31 18:04:01 -07:00
Permcat.php
Photo.php cover photo was unintentionally disabled when block_public in effect 2017-05-08 11:11:50 +02:00
Photos.php synchronise an attach_move operation to clones 2017-12-06 14:20:17 -08:00
Ping.php since we only save the parent mid in notify we must look for thr_parent when dealing with likes 2018-02-13 11:01:58 +01:00
Poco.php
Poke.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
Post.php whitespace 2017-09-25 23:39:48 -07:00
Prate.php
Pretheme.php
Probe.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
Profile.php remove deprecated $a argument from advanced_profile() 2017-11-23 20:35:34 -08:00
Profile_photo.php add units to css 2018-01-23 16:44:11 -08:00
Profiles.php provide a mechanism to mark apps active in the bin 2017-07-21 10:32:21 +02:00
Profperm.php
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 DB tuning. 2018-02-15 19:24:15 +01: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 pubstream comments and a few other bugfixes that were discovered along the way 2017-11-26 18:29:24 -08:00
README.md
Regdir.php
Register.php Usability improvements to registration/verification workflow. This requires additional testing. 2018-01-27 12:51:48 -08:00
Regmod.php
Regver.php
Removeaccount.php
Removeme.php
Rmagic.php redirect loop with rmagic and owa 2017-10-04 18:51:37 -07:00
Rpost.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
Search.php hubzilla issue #975 (searching for title as well as body could present a performance issue, so perhaps the tradeoffs should be debated) 2018-02-09 14:08:29 -08:00
Search_ac.php
Service_limits.php
Settings.php provide a mechanism to mark apps active in the bin 2017-07-21 10:32:21 +02:00
Setup.php fix typos in comment 2017-10-16 21:33:14 +02:00
Share.php turn shares into activities - make certain to pull addons or JSON-LD will chuck a wobbly 2018-02-13 20:07:57 -08:00
Sharedwithme.php improve file_activity() a little 2017-07-31 16:59:43 +02:00
Siteinfo.php siteinfo embellishments 2018-01-22 20:07:08 -08:00
Sitelist.php
Smilies.php
Snap.php
Sources.php
Sslify.php
Starred.php fix "unstar" 2017-10-28 15:24:37 -07:00
Subthread.php pubstream comments and a few other bugfixes that were discovered along the way 2017-11-26 18:29:24 -08:00
Suggest.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
Tagger.php pubstream comments and a few other bugfixes that were discovered along the way 2017-11-26 18:29:24 -08:00
Tagrm.php
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
Thing.php hubzilla issue #868 2017-10-03 17:03:24 -07:00
Toggle_mobile.php
Toggle_safesearch.php
Token.php Refactor OAuth2Server a bit. 2018-02-17 01:49:01 +01:00
Uexport.php
Update.php explain what happened here 2017-12-04 21:39:53 -08:00
View.php
Viewconnections.php
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 change to bbcode calling parameters: important: will require pulling addons; 2017-11-23 15:21:50 -08:00
Wall_upload.php
Webfinger.php
Webpages.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
Well_known.php
Wfinger.php not sure when but the hcard went missing in webfinger 2017-10-23 21:19:40 -07:00
Wiki.php missed a spot while resolving merge conflict 2017-12-06 12:40:27 +01:00
Xchan.php
Xpoco.php
Xrd.php we need this in the plugin, not in core 2017-09-20 19:34:43 -07:00
Xref.php
Zfinger.php some preliminary work on Zot VI 2017-09-04 22:35:44 -07:00
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.