mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-24 02:05:45 -04:00
Compare commits
62 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d95573741d | ||
|
|
faf4bcdd62 | ||
|
|
f699442bec | ||
|
|
8720931a53 | ||
|
|
d60c53cd12 | ||
|
|
6b0fe6e0a0 | ||
|
|
28f1f4cbdc | ||
|
|
508b3ce730 | ||
|
|
87ecc61fb4 | ||
|
|
0f6166da00 | ||
|
|
07e5b8295e | ||
|
|
9afdf86961 | ||
|
|
f4f1974be0 | ||
|
|
6f6399ca0f | ||
|
|
5018c0fbb8 | ||
|
|
188975ccbd | ||
|
|
5e1addc75e | ||
|
|
138beeac41 | ||
|
|
187364d94a | ||
|
|
6e74e76fcd | ||
|
|
615424d272 | ||
|
|
d40a7a609e | ||
|
|
0ec40f00a9 | ||
|
|
de054026f2 | ||
|
|
175b45d1ed | ||
|
|
e236b77817 | ||
|
|
21cd4a1b48 | ||
|
|
e9a50371f5 | ||
|
|
71f8a08e5f | ||
|
|
4419c93d80 | ||
|
|
fcc13ce02c | ||
|
|
941db04260 | ||
|
|
87d7a3053a | ||
|
|
ae11b2c281 | ||
|
|
f43577ec27 | ||
|
|
c648c38fb0 | ||
|
|
34d54fd309 | ||
|
|
891b1428cc | ||
|
|
453dd38e51 | ||
|
|
f59aefd3d9 | ||
|
|
451468d129 | ||
|
|
c0adf31da9 | ||
|
|
bb43c57b07 | ||
|
|
6c94bbc93f | ||
|
|
50422c608f | ||
|
|
7639157a49 | ||
|
|
f74cfaec5f | ||
|
|
d559b4a201 | ||
|
|
2d4064aca4 | ||
|
|
337d8ea78c | ||
|
|
4c0a26dbf9 | ||
|
|
885edd6261 | ||
|
|
011de75706 | ||
|
|
852e456d44 | ||
|
|
18136788e4 | ||
|
|
f1101808b7 | ||
|
|
791d5098a0 | ||
|
|
f2fd12fbe5 | ||
|
|
b5ab77908e | ||
|
|
5750e6cada | ||
|
|
394aa76a8f | ||
|
|
35c4deb884 |
@@ -40,7 +40,8 @@ before_script:
|
||||
- curl -sS https://getcomposer.org/installer | php
|
||||
# Install dev libraries from composer
|
||||
- php ./composer.phar install --no-progress
|
||||
|
||||
# php.ini settings
|
||||
- echo 'xdebug.mode=coverage' >> /usr/local/etc/php/php.ini
|
||||
|
||||
# hidden job definition with template for MySQL/MariaDB
|
||||
.job_template_mysql: &job_definition_mysql
|
||||
|
||||
133
CHANGELOG
133
CHANGELOG
@@ -1,3 +1,28 @@
|
||||
Hubzilla 5.0.5 (2020-12-12)
|
||||
- Fix hubloc issue in mod getfile
|
||||
- Remove duplicate SQL query
|
||||
|
||||
|
||||
Hubzilla 5.0.4 (2020-12-01)
|
||||
- Fix regression updating the primary
|
||||
- Dismiss title in response activities
|
||||
|
||||
|
||||
Hubzilla 5.0.3 (2020-11-26)
|
||||
- Upgrade phpunit to version 9
|
||||
- Remove dbunit because its not maintained anymore
|
||||
- Add uuid version 5 based uuid's to imported feeds
|
||||
- Fix potential delivery loop
|
||||
- Fix actor of fetched activities not stored
|
||||
- Improve update mechanism for comments and likes to prevent page jumps
|
||||
- Fix issue where channel suggestions was suggesting oneself
|
||||
- Do not auto-update except for own actions
|
||||
- Introduce ctrl-enter shortcut to send comments and posts
|
||||
|
||||
Addons
|
||||
Pubcrawl: improve addressing of mentioned actors
|
||||
|
||||
|
||||
Hubzilla 5.0.2 (2020-11-16)
|
||||
- Fix edge case in acl selector
|
||||
- Fix ping_site()
|
||||
@@ -14,7 +39,7 @@ Hubzilla 5.0.2 (2020-11-16)
|
||||
|
||||
|
||||
Hubzilla 5.0.1 (2020-11-12)
|
||||
- Fix share title size
|
||||
- Fix share title size
|
||||
- Fix issue where hublocs could get mixed up between different protocols
|
||||
|
||||
Addons
|
||||
@@ -330,7 +355,7 @@ Hubzilla 4.2 (2019-06-04)
|
||||
|
||||
Hubzilla 4.0.3 (2019-04-26)
|
||||
- Add attachments to zot6 event objects
|
||||
- Add zot6 to federated transports
|
||||
- Add zot6 to federated transports
|
||||
- Update import/export to handle zot6 hublocs and xchans
|
||||
- Update fix_system_urls() to handle zot6 hublocs
|
||||
- Fix infinite loop using postgres as backend
|
||||
@@ -383,7 +408,7 @@ Hubzilla 4.0.1 (2019-03-21)
|
||||
- Perform zot6 discovery in import_author_xchan
|
||||
- Fix authenticated fetches
|
||||
- Port zot_record_preferred() from zap
|
||||
|
||||
|
||||
Addons:
|
||||
- Pubcrawl: deliver comments to abook contacts and thread participants
|
||||
- Pubcrawl: fix can_comment_on_post()
|
||||
@@ -597,7 +622,7 @@ Hubzilla 3.8.3 (2018-11-05)
|
||||
- Fix forum notifications count not correct
|
||||
- Fix gallery addon which broke mod apps in some situations
|
||||
- Fix wiki_list widget not working on every page respectively level
|
||||
|
||||
|
||||
|
||||
Hubzilla 3.8.2 (2018-10-29)
|
||||
- Merge unmerged changes from dev into master
|
||||
@@ -613,7 +638,7 @@ Hubzilla 3.8.2 (2018-10-29)
|
||||
- Look for for matches in the entire string when suggesting emojis
|
||||
- Add [summary] bbcode to autocomplete list
|
||||
- Update blueimp_upload to version 9.23
|
||||
- Update spanish strings
|
||||
- Update spanish strings
|
||||
|
||||
Addons
|
||||
- Cart: don't allow items to be added unless user is logged into the Grid.
|
||||
@@ -671,7 +696,7 @@ Hubzilla 3.8 (2018-10-19)
|
||||
- Sanitise vcard fields
|
||||
- Don't sync system apps
|
||||
|
||||
|
||||
|
||||
Bugfixes
|
||||
- Fix issue with timeago plurals
|
||||
- Fix issue with HTTP signatures
|
||||
@@ -730,7 +755,7 @@ Hubzilla 3.8 (2018-10-19)
|
||||
Hubzilla 3.6 (2018-07-25)
|
||||
- Update jquery.timeago library
|
||||
- Implement Hookable CSP
|
||||
- ActivityStreams: accept header changes to support plume
|
||||
- ActivityStreams: accept header changes to support plume
|
||||
- Streamline inconsistencies in addon naming
|
||||
- SECURITY: hash the session_id in logs
|
||||
- Update justified gallery library
|
||||
@@ -743,9 +768,9 @@ Hubzilla 3.6 (2018-07-25)
|
||||
- Make droping posts of removed connections more memory efficient
|
||||
- Refactor getOutainfo() for DAV storage
|
||||
- Optionally report total available space when uploading
|
||||
- SECURITY: provide option to disable the cloud 'root' directory and make the cloud module require a target channel nickname
|
||||
- SECURITY: provide option to disable the cloud 'root' directory and make the cloud module require a target channel nickname
|
||||
- Add plink and llink to viewsource
|
||||
- Add new 'filter by name' feature
|
||||
- Add new 'filter by name' feature
|
||||
- Remove network tabs
|
||||
- New activity filter widget
|
||||
- New activity order widget
|
||||
@@ -787,8 +812,8 @@ Hubzilla 3.6 (2018-07-25)
|
||||
- Fix sys channels visible in dirsearch
|
||||
- Fix remote_self not working correctly
|
||||
- Fix photos not syncing properly if destination is a postgres site
|
||||
- Fix wrong hubloc_url for activitypub hublocs
|
||||
- Fix z_check_dns() for BSD
|
||||
- Fix wrong hubloc_url for activitypub hublocs
|
||||
- Fix z_check_dns() for BSD
|
||||
- Fix not null violation in oauth1
|
||||
- Fix DB issues with oauth2 on postgresql
|
||||
- Fix 'anybody authenticated' not correctly handled in can_comment_on_post()
|
||||
@@ -1350,10 +1375,10 @@ Hubzilla 2.6.2 (2017-08-31)
|
||||
Hubzilla 2.6.1 (2017-08-18)
|
||||
- Fix a regression with dav clients
|
||||
- Raise install requirements
|
||||
|
||||
|
||||
Plugins/Addon
|
||||
- Diaspora: fix PHP warning
|
||||
- GNU-Social: fix PHP warning
|
||||
- GNU-Social: fix PHP warning
|
||||
|
||||
|
||||
Hubzilla 2.6 (2017-08-16)
|
||||
@@ -1361,18 +1386,18 @@ Hubzilla 2.6 (2017-08-16)
|
||||
- Consolidate disable_discover_tab config
|
||||
- Fix some bbcode to markdown conversion issues
|
||||
- Improved finding of recursive attachment permissions
|
||||
- Smaller line-height for notification badges
|
||||
- Smaller line-height for notification badges
|
||||
- Bluegrid schema removed - will be added again if someone is willing to maintain it
|
||||
- Improved file_activity()
|
||||
- DB - add index for item.obj_type
|
||||
- Add options flag to bb_to_markdown() so we can distinguish between diaspora use and other use and therefore filter and adjust content selectively
|
||||
- Close the apps-menu if the notifications-menu is open and vice versa
|
||||
- Close the apps-menu if the notifications-menu is open and vice versa
|
||||
- Remove redundant call to jquery ready function in photo albums view
|
||||
- Remove borders from navbar toggler in mobile view
|
||||
- Improve the formatting of shares when converting from bbcode to markdown
|
||||
- Suppress fopen errors from dav
|
||||
- Make local channel (not our own) nav menus appear similar to what we are used from remote channels
|
||||
- Indicate the selected channel in the dropdown menu if the feature is enabled
|
||||
- Indicate the selected channel in the dropdown menu if the feature is enabled
|
||||
- Provide a mechanism to mark apps active in the app tray
|
||||
- Allow wildcard tag and category searches
|
||||
- Improved installer
|
||||
@@ -1384,7 +1409,7 @@ Hubzilla 2.6 (2017-08-16)
|
||||
- Update htmlpurifier to version 4.9.3
|
||||
- Update sabre/http to version 4.2.3
|
||||
- Add optimize-autoloader to composer config
|
||||
- Missing abook_{my,their}_perms in pg schema and missing keys in mysql schema
|
||||
- Missing abook_{my,their}_perms in pg schema and missing keys in mysql schema
|
||||
- Provide a gender icon on the profile sidebar within reason
|
||||
- Provide more comprehensible information on the admin summary page
|
||||
- Upgrade blueimp from 9.8 to 9.18
|
||||
@@ -1450,7 +1475,7 @@ Hubzilla 2.6 (2017-08-16)
|
||||
Cdav addon moved to core
|
||||
head_add_css() needs a preceding '/' to find files in the addons dir
|
||||
New addon code syntax highlighting (moved from core to addon)
|
||||
Pubsubhubbub: specify a minimum number of records - otherwise it defaults to zero
|
||||
Pubsubhubbub: specify a minimum number of records - otherwise it defaults to zero
|
||||
|
||||
|
||||
Hubzilla 2.4 (2017-05-31)
|
||||
@@ -1804,10 +1829,10 @@ Hubzilla 1.14 (2016-10-13)
|
||||
- Start grouping addons by server_role
|
||||
|
||||
Hubzilla 1.12
|
||||
- extensible permissions so you can create a new permission rule such as "can write to my wiki" or "can see me naked".
|
||||
- guest access tokens can do anything you let them, including create posts and administer your channel
|
||||
- extensible permissions so you can create a new permission rule such as "can write to my wiki" or "can see me naked".
|
||||
- guest access tokens can do anything you let them, including create posts and administer your channel
|
||||
- ACLs can be set on files and directories prior to creation.
|
||||
- ACL tool can now be used in multiple forms within a page
|
||||
- ACL tool can now be used in multiple forms within a page
|
||||
- a myriad of new drag/drop features (drop files or photos into /cloud or a post, or drop link into a post or comment, etc.)
|
||||
- multiple file uploads
|
||||
- improvements to website import
|
||||
@@ -1832,7 +1857,7 @@ Hubzilla 1.10
|
||||
Wiki:
|
||||
Lots of enhanced functionality, usability improvements, and bugfixes from v1.8
|
||||
Turned into an optional feature (default on) but disabled in UNO
|
||||
Sync:
|
||||
Sync:
|
||||
Items are now relocated (links patched) when syncing to clones
|
||||
Access Tokens:
|
||||
New feature - allows members to create access controlled guest logins and create/share 'dropbox' style links to protected resources.
|
||||
@@ -1840,7 +1865,7 @@ Hubzilla 1.10
|
||||
Use icons instead of iconic text constructs
|
||||
Only request geolocation permission when creating a post, not on page load
|
||||
provide 'redeliver' option on Delivery Report page for when things really stuff up
|
||||
CalDAV/CardDAV management pages with heaps of functionality
|
||||
CalDAV/CardDAV management pages with heaps of functionality
|
||||
Lib:
|
||||
z_fetch_url() updated to accept different request methods and request bodies
|
||||
item_store(), item_store_update() now return the stored items
|
||||
@@ -1864,7 +1889,7 @@ Hubzilla 1.10
|
||||
issues with 'use existing photo' for profile photo
|
||||
layout editor "list all layouts" returned empty
|
||||
oembed - better detect video file URLs so they aren't loaded into memory.
|
||||
handcrafted bbcode tables could end up with way too much whitespace due to CRLF translation
|
||||
handcrafted bbcode tables could end up with way too much whitespace due to CRLF translation
|
||||
refresh permissions whitescreen in 1.8
|
||||
force immediate profile photo update on local site
|
||||
regression: 'save bookmarks' post action missing
|
||||
@@ -1889,7 +1914,7 @@ Hubzilla 1.8
|
||||
Documentation:
|
||||
Clarify privacy rights of commenters w/r/t conversation owners, as this policy is network dependent.
|
||||
Wiki (Git backed):
|
||||
Brand new feature. We'll call it experimental until it has undergone a bit more testing.
|
||||
Brand new feature. We'll call it experimental until it has undergone a bit more testing.
|
||||
Account Cloning:
|
||||
Regression on clone channel creation created a new channel name each time.
|
||||
New issue (fixed) with directory creation on cloned file content
|
||||
@@ -1912,7 +1937,7 @@ Hubzilla 1.8
|
||||
Experimental PDO database driver
|
||||
Creation of Daemon Master class and port all daemon (background task) interfaces to use it
|
||||
Create separate class for each of 'Cron', 'Cron daily', and 'Cron weekly'.
|
||||
Always run a Cron maintenance task if not run in the last four hours
|
||||
Always run a Cron maintenance task if not run in the last four hours
|
||||
Refactor the template classes
|
||||
Refactor the ConversationItem mess into ThreadItem and ThreadStream
|
||||
Refactor Apps, Enotify, and Chat library code
|
||||
@@ -1920,7 +1945,7 @@ Hubzilla 1.8
|
||||
Created WebServer class for top level
|
||||
Remove mcrypt dependencies (deprecated in PHP 7.1)
|
||||
Remove all reserved (including merely 'not recommended') words as DB table column names
|
||||
Provide mutex lock on DB logging to prevent recursion under rare failure modes.
|
||||
Provide mutex lock on DB logging to prevent recursion under rare failure modes.
|
||||
Bugfixes:
|
||||
Remove db_close function on page end - not needed and will not work with persistent DB connections.
|
||||
Undefined ref_session_write
|
||||
@@ -1940,7 +1965,7 @@ Hubzilla 1.8
|
||||
CalDAV/CardDAV plugin provided
|
||||
Issue sending Diaspora 'like' activities from sources that did not propagate the DCV
|
||||
Allow 'superblock' to work across API calls from third party clients
|
||||
statistics.json: use 'zot' as protocol
|
||||
statistics.json: use 'zot' as protocol
|
||||
Issues fixed during testing of ability to follow Diaspora tags
|
||||
Parse issue with Diaspora reshare content
|
||||
Chess: moved to main repo, ported to 1.8
|
||||
@@ -1952,7 +1977,7 @@ Hubzilla 1.6
|
||||
Plugin hook interface adapted to call static class methods
|
||||
Context help improved dramatically with content for the most accessed pages.
|
||||
Reverted a compatibility change to support GNU-social events. We copied their feed format and their feed format is wrong (XML namespace collisions).
|
||||
Provide a querystring attribute to CSS/JS resources to avoid caching issues when our code changes (which is often).
|
||||
Provide a querystring attribute to CSS/JS resources to avoid caching issues when our code changes (which is often).
|
||||
Fix javascript detection and allow either positive or negative detection.
|
||||
Refactor the plugin hook registration procedure, provide 'unregister all' ability.
|
||||
Fix RSD (Real Simple Discovery) which has been broken for some time.
|
||||
@@ -1961,7 +1986,7 @@ Hubzilla 1.6
|
||||
Update font-awesome to 4.6.1
|
||||
Update SabreDAV to 3.0 (PHP version requirements prevent us from pushing it further at this time)
|
||||
Help text added to cmdline utilities config and pconfig
|
||||
Reworking of the database logging facility to avoid the rare but troublesome recursion when the log facility needed to query the DB internally to obtain config parameters.
|
||||
Reworking of the database logging facility to avoid the rare but troublesome recursion when the log facility needed to query the DB internally to obtain config parameters.
|
||||
Implement singleton delivery (emulate nomadic identity to singleton networks and services)
|
||||
Fix empty album name in photo activities when photo is stored in top level folder.
|
||||
Allow engineering units to be used in service class data size restrictions (400M, 1G, etc.)
|
||||
@@ -1969,7 +1994,7 @@ Hubzilla 1.6
|
||||
Admin interface provided to manage external resource repositories
|
||||
Oembed security reworked. Now all sources are filtered by default unless blocked.
|
||||
Remove the date-string version and use only STD_VERSION
|
||||
Add categories and categorisation filtering and the ability to edit all apps (including system apps) for a given channel
|
||||
Add categories and categorisation filtering and the ability to edit all apps (including system apps) for a given channel
|
||||
Ensure the ability to translate names of all system apps (except those provided in addons)
|
||||
Provide ability to add categories to content from channel sources
|
||||
Lots of work on the presentation of the ACL widget to enhance usability and intuitiveness
|
||||
@@ -1983,24 +2008,24 @@ Hubzilla 1.6
|
||||
Provide some extra security checks to import data and files to prevent mischief
|
||||
Block CalDAV/CardDAV namespace reserved words from being used as a channel nickname/redress since Sabre is somewhat inflexible in this regard
|
||||
Plugins:
|
||||
Diaspora
|
||||
markdown translator work needed to eradicate the Diaspora Comment Virus.
|
||||
Diaspora
|
||||
markdown translator work needed to eradicate the Diaspora Comment Virus.
|
||||
upgrade all inbound paths with the most recent protocol changes (several of these)
|
||||
convert 'diaspora_meta' (Diaspora Comment Virus) to iconfig and eradicate from sites with Diaspora disabled
|
||||
implement social relay and allow following tags
|
||||
upgrade statistics.json to NodeInfo. Currently hubzilla sites are tagged as 'redmatrix' because the NodeInfo schema lacks extensibility and project names are used to designate protocol compatibility rather than protocol names.
|
||||
Std-embeds
|
||||
New addon to allow a handful of corporate providers to run unfiltered embed code (youtube, vimeo, soundcloud)
|
||||
New addon to allow a handful of corporate providers to run unfiltered embed code (youtube, vimeo, soundcloud)
|
||||
Various:
|
||||
upgrade font-awesome icons and adapt a few addons to Objects and the new hook interface and new controller interface
|
||||
|
||||
|
||||
Hubzilla 1.4
|
||||
[This list may appear brief, but encompasses a huge amount of re-writing and re-factoring
|
||||
of the internal code structure to gain long-term performance and stability and provide a standard
|
||||
interface to alternate protocol federation plugins which were made possible by the UNO configuration.
|
||||
UNO is a configuration of hubzilla introduced in 1.3 with reduced complexity and which provides
|
||||
improved protocol federation potential to other networks by virtue of removing nomadic identity
|
||||
(which is not possible to model or work around using other network protocols).]
|
||||
UNO is a configuration of hubzilla introduced in 1.3 with reduced complexity and which provides
|
||||
improved protocol federation potential to other networks by virtue of removing nomadic identity
|
||||
(which is not possible to model or work around using other network protocols).]
|
||||
|
||||
Implement channel move operation for UNO configuration
|
||||
Remove bookmark references in UNO (which has no bookmarks by default)
|
||||
@@ -2023,10 +2048,10 @@ Hubzilla 1.4
|
||||
Rework detection of JavaScript to avoid reload penalty under normal operation
|
||||
Changed primary directory server to a hubzilla server
|
||||
Plugins:
|
||||
Diaspora - switch to alternate XML parser to avoid storing compound objects
|
||||
Diaspora - switch to alternate XML parser to avoid storing compound objects
|
||||
GNU-Social - Huge amounts of work, federation somewhat working now, several issues remain
|
||||
Friendica - Initial federation work (not yet published)
|
||||
|
||||
|
||||
Hubzilla 1.3
|
||||
Admin Security configuration page created which consolidates several previously hidden settings:
|
||||
Communication white/black lists
|
||||
@@ -2042,26 +2067,26 @@ Hubzilla 1.3
|
||||
"pubsites" module UI reworked
|
||||
item-meta ("iconfig") created which implements arbitrary storage for item metadata for plugins
|
||||
abook-meta ("abconfig") created which implements arbitrary storage for connection metadata for plugins
|
||||
"Strict transport security header" made optional as it conflicts with some existing Apache/nginx configurations
|
||||
"Hubzilla UNO" (Hubzilla with radically simplified and locked site settings) implemented as an install configuration.
|
||||
"Strict transport security header" made optional as it conflicts with some existing Apache/nginx configurations
|
||||
"Hubzilla UNO" (Hubzilla with radically simplified and locked site settings) implemented as an install configuration.
|
||||
.well-known directory conflict worked out to support LetsEncrypt cert ownership checks without disrupting webfinger and other internal uses of .well-known
|
||||
Lots of work on 'zcards' which are self-contained HTML representations of a channel including cover photos, profile photos, and some text information
|
||||
Long standing bug uncovered which failed to properly restrict the lower time limit for public feed requests
|
||||
A number of fixes to "readmore" to fix page jumping
|
||||
Bugfix: persons other than the channel owner who have permission to upload photos to a channel could not do so if the js_upload plugin/addon was enabled
|
||||
Siteinfo incorrectly identifying secondary directory servers
|
||||
Allow admin to set and lock features when UNO is configured
|
||||
Allow admin to set and lock features when UNO is configured
|
||||
Atom feeds: alter how events are formatted to be compatible with GNU-social
|
||||
Allow guest/visitor access to view personal calendar
|
||||
Moved several more classes to "composer format" and provided an autoloader.
|
||||
Bugfix: require existing password to change password
|
||||
Bugfix: allow relative_date() to be translated to Polish which has more than two plural forms.
|
||||
Bugfix: allow relative_date() to be translated to Polish which has more than two plural forms.
|
||||
Plugin API: add "requires" keyword to module header to indicate dependent addons
|
||||
ActivityStreams improvements and cleanup: photo and file activities
|
||||
UI cleanup for editing profile when multiple profiles enabled
|
||||
Removed the "markdown" feature as there are numerous issues and no maintainer.
|
||||
Provide "footer" bbcode to ease theming of post footer content
|
||||
Bugfix: install issues caused by composer code refactor and typo in postgres load file
|
||||
Bugfix: install issues caused by composer code refactor and typo in postgres load file
|
||||
Plugins:
|
||||
keepout - "block public on steroids"
|
||||
pubsubhubbub - provides PuSH support to Atom feeds, required for GNU-social federation
|
||||
@@ -2069,7 +2094,7 @@ Hubzilla 1.3
|
||||
Diaspora protocol - some work to ease migration to the new signing format
|
||||
Diaspost - disabled; numerous issues and no maintainer
|
||||
smileybutton - theme work and fixed compatibility with other jot-tools plugins
|
||||
|
||||
|
||||
|
||||
Hubzilla 1.2
|
||||
Provide extra HTTP security headers (several of them).
|
||||
@@ -2079,7 +2104,7 @@ Hubzilla 1.2
|
||||
Add locked features to siteinfo report to aid remote debugging
|
||||
Provide version compatibility checking to plugins (minversion, maxversion, and minphpversion)
|
||||
Account config storage
|
||||
Provide optional integrated registration and channel create form
|
||||
Provide optional integrated registration and channel create form
|
||||
cli utility for managing addons
|
||||
issue with sharing photo "items"
|
||||
cover photo manager: upload, crop, and store
|
||||
@@ -2101,7 +2126,7 @@ Hubzilla 1.2
|
||||
proc_run modified to use exec() instead of proc_open() - causing issues on some PHP installations
|
||||
remote delegation failure under a specific set of circumstances which we were finally able to duplicate
|
||||
Delegation section of Channel Manager was missing names and contained useless notification icons.
|
||||
Change "expire" channel setting to show system limit if there is one.
|
||||
Change "expire" channel setting to show system limit if there is one.
|
||||
Regression: provide a one-click ignore of pending connection
|
||||
Config to control directory keyword generation on client and server.
|
||||
"Collections" renamed to "Privacy Groups", documentation improved
|
||||
@@ -2154,11 +2179,11 @@ Hubzilla 1.1
|
||||
Addons/Plugins:
|
||||
Pageheader addon ported from Friendica
|
||||
Hubwall (allow admin to send email to all accounts on this hub) created
|
||||
GNU-social - queueing added
|
||||
Diaspora - fixes for various failures to update profile photos, updates to queue API
|
||||
GNU-social - queueing added
|
||||
Diaspora - fixes for various failures to update profile photos, updates to queue API
|
||||
Cross Domain Authenticated Chess (Andrew Manning's repository)
|
||||
|
||||
And... the normal "lots of bugs fixed, translations updated, and documentation improved"
|
||||
|
||||
|
||||
|
||||
And... the normal "lots of bugs fixed, translations updated, and documentation improved"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -640,9 +640,16 @@ class Notifier {
|
||||
}
|
||||
else {
|
||||
if(! in_array($hub['hubloc_url'],$urls)) {
|
||||
$hublist[] = $hub['hubloc_host'] . ' ' . $hub['hubloc_network'];
|
||||
$dhubs[] = $hub;
|
||||
$urls[] = $hub['hubloc_url'];
|
||||
if($hub['hubloc_url'] === z_root()) {
|
||||
//deliver to local hub first
|
||||
array_unshift($hublist, $hub['hubloc_host'] . ' ' . $hub['hubloc_network']);
|
||||
array_unshift($dhubs, $hub);
|
||||
}
|
||||
else {
|
||||
$hublist[] = $hub['hubloc_host'] . ' ' . $hub['hubloc_network'];
|
||||
$dhubs[] = $hub;
|
||||
}
|
||||
$urls[] = $hub['hubloc_url'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Zotlabs\Identity\BasicId;
|
||||
namespace Zotlabs\Identity;
|
||||
|
||||
class BasicId {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
namespace Zotlabs\Identity\ProfilePhoto;
|
||||
namespace Zotlabs\Identity;
|
||||
|
||||
class ProfilePhoto {
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ class Activity {
|
||||
);
|
||||
if($r) {
|
||||
xchan_query($r,true);
|
||||
$r = fetch_post_tags($r,true);
|
||||
$r = fetch_post_tags($r);
|
||||
if (in_array($r[0]['verb'], ['Create', 'Invite']) && $r[0]['obj_type'] === ACTIVITY_OBJ_EVENT) {
|
||||
$r[0]['verb'] = 'Invite';
|
||||
return self::encode_activity($r[0]);
|
||||
@@ -713,7 +713,7 @@ class Activity {
|
||||
);
|
||||
if($p) {
|
||||
xchan_query($p,true);
|
||||
$p = fetch_post_tags($p,true);
|
||||
$p = fetch_post_tags($p);
|
||||
$i['obj'] = self::encode_item($p[0]);
|
||||
|
||||
// convert to zot6 emoji reaction encoding which uses the target object to indicate the
|
||||
@@ -800,7 +800,7 @@ class Activity {
|
||||
$is_directmessage = false;
|
||||
$recips = get_iconfig($i['parent'], 'activitypub', 'recips');
|
||||
|
||||
if(in_array($i['author']['xchan_url'], $recips['to'])) {
|
||||
if(array_path_exists('to', $recips) && in_array($i['author']['xchan_url'], $recips['to'])) {
|
||||
$reply_url = $d[0]['xchan_url'];
|
||||
$is_directmessage = true;
|
||||
}
|
||||
@@ -2143,7 +2143,7 @@ class Activity {
|
||||
if(! $s['edited'])
|
||||
$s['edited'] = $s['created'];
|
||||
|
||||
$s['title'] = self::bb_content($content,'name');
|
||||
$s['title'] = (($response_activity) ? EMPTY_STR : self::bb_content($content,'name'));
|
||||
$s['summary'] = self::bb_content($content,'summary');
|
||||
$s['body'] = ((self::bb_content($content,'bbcode') && (! $response_activity)) ? self::bb_content($content,'bbcode') : self::bb_content($content,'content'));
|
||||
|
||||
@@ -2648,7 +2648,7 @@ class Activity {
|
||||
$current_item = $item;
|
||||
|
||||
while($current_item['parent_mid'] !== $current_item['mid']) {
|
||||
$n = ActivityStreams::fetch($current_item['parent_mid'], $channel);
|
||||
$n = self::fetch($current_item['parent_mid'], $channel);
|
||||
if(! $n) {
|
||||
break;
|
||||
}
|
||||
@@ -2660,6 +2660,10 @@ class Activity {
|
||||
break;
|
||||
}
|
||||
|
||||
if (is_array($a->actor) && array_key_exists('id',$a->actor)) {
|
||||
self::actor_store($a->actor['id'],$a->actor);
|
||||
}
|
||||
|
||||
$replies = null;
|
||||
if(isset($a->obj['replies']['first']['items'])) {
|
||||
$replies = $a->obj['replies']['first']['items'];
|
||||
@@ -2725,7 +2729,7 @@ class Activity {
|
||||
|
||||
foreach($arr as $url) {
|
||||
|
||||
$n = ActivityStreams::fetch($url, $channel);
|
||||
$n = self::fetch($url, $channel);
|
||||
if(! $n) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -130,9 +130,6 @@ class Channel extends Controller {
|
||||
|
||||
$noscript_content = get_config('system', 'noscript_content', '1');
|
||||
|
||||
if($load)
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
|
||||
$category = $datequery = $datequery2 = '';
|
||||
|
||||
$mid = ((x($_REQUEST,'mid')) ? $_REQUEST['mid'] : '');
|
||||
@@ -152,7 +149,6 @@ class Channel extends Controller {
|
||||
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
|
||||
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
|
||||
$order = ((x($_GET,'order')) ? notags($_GET['order']) : 'post');
|
||||
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
|
||||
$search = ((x($_GET,'search')) ? $_GET['search'] : EMPTY_STR);
|
||||
|
||||
$groups = array();
|
||||
@@ -187,8 +183,6 @@ class Channel extends Controller {
|
||||
|
||||
nav_set_selected('Channel Home');
|
||||
|
||||
$static = channel_manual_conv_update(App::$profile['profile_uid']);
|
||||
|
||||
// search terms header
|
||||
if($search) {
|
||||
$o .= replace_macros(get_markup_template("section_title.tpl"),array(
|
||||
@@ -255,7 +249,9 @@ class Channel extends Controller {
|
||||
|
||||
$abook_uids = " and abook.abook_channel = " . intval(App::$profile['profile_uid']) . " ";
|
||||
|
||||
$simple_update = (($update) ? " AND item_unseen = 1 " : '');
|
||||
$simple_update = '';
|
||||
if($update && $_SESSION['loadtime'])
|
||||
$simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
|
||||
|
||||
if($search) {
|
||||
$search = escape_tags($search);
|
||||
@@ -270,7 +266,6 @@ class Channel extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
head_add_link([
|
||||
'rel' => 'alternate',
|
||||
'type' => 'application/json+oembed',
|
||||
@@ -278,14 +273,6 @@ class Channel extends Controller {
|
||||
'title' => 'oembed'
|
||||
]);
|
||||
|
||||
if($update && $_SESSION['loadtime'])
|
||||
$simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
|
||||
if($load)
|
||||
$simple_update = '';
|
||||
|
||||
if($static && $simple_update)
|
||||
$simple_update .= " and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
|
||||
|
||||
if(($update) && (! $load)) {
|
||||
|
||||
if($mid) {
|
||||
@@ -294,7 +281,6 @@ class Channel extends Controller {
|
||||
dbesc($mid . '%'),
|
||||
intval(App::$profile['profile_uid'])
|
||||
);
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
}
|
||||
else {
|
||||
$r = q("SELECT parent AS item_id from item
|
||||
@@ -306,9 +292,7 @@ class Channel extends Controller {
|
||||
ORDER BY created DESC",
|
||||
intval(App::$profile['profile_uid'])
|
||||
);
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -406,7 +390,7 @@ class Channel extends Controller {
|
||||
$o .= '<div id="live-channel"></div>' . "\r\n";
|
||||
$o .= "<script> var profile_uid = " . App::$profile['profile_uid']
|
||||
. "; var netargs = '?f='; var profile_page = " . App::$pager['page']
|
||||
. "; divmore_height = " . intval($maxheight) . "; </script>\r\n";
|
||||
. "; divmore_height = " . intval($maxheight) . ";</script>\r\n";
|
||||
|
||||
App::$page['htmlhead'] .= replace_macros(get_markup_template("build_query.tpl"),array(
|
||||
'$baseurl' => z_root(),
|
||||
@@ -424,7 +408,6 @@ class Channel extends Controller {
|
||||
'$wall' => '1',
|
||||
'$fh' => '0',
|
||||
'$dm' => '0',
|
||||
'$static' => $static,
|
||||
'$page' => ((App::$pager['page'] != 1) ? App::$pager['page'] : 1),
|
||||
'$search' => $search,
|
||||
'$xchan' => '',
|
||||
@@ -437,7 +420,8 @@ class Channel extends Controller {
|
||||
'$verb' => '',
|
||||
'$net' => '',
|
||||
'$dend' => $datequery,
|
||||
'$dbegin' => $datequery2
|
||||
'$dbegin' => $datequery2,
|
||||
'$conv_mode' => 'channel'
|
||||
));
|
||||
|
||||
}
|
||||
@@ -476,6 +460,8 @@ class Channel extends Controller {
|
||||
if($mid)
|
||||
$o .= '<div id="content-complete"></div>';
|
||||
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
|
||||
return $o;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,9 +22,6 @@ class Display extends \Zotlabs\Web\Controller {
|
||||
$module_format = 'html';
|
||||
}
|
||||
|
||||
if($load)
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
|
||||
if(observer_prohibited()) {
|
||||
notice( t('Public access denied.') . EOL);
|
||||
return;
|
||||
@@ -183,22 +180,11 @@ class Display extends \Zotlabs\Web\Controller {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
|
||||
|
||||
$simple_update = (($update) ? " AND item_unseen = 1 " : '');
|
||||
|
||||
$simple_update = '';
|
||||
if($update && $_SESSION['loadtime'])
|
||||
$simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
|
||||
if($load)
|
||||
$simple_update = '';
|
||||
|
||||
if($static && $simple_update)
|
||||
$simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
|
||||
|
||||
if((! $update) && (! $load)) {
|
||||
|
||||
$static = ((local_channel()) ? channel_manual_conv_update(local_channel()) : 1);
|
||||
if((! $update) && (! $load)) {
|
||||
|
||||
// if the target item is not a post (eg a like) we want to address its thread parent
|
||||
|
||||
@@ -229,7 +215,6 @@ class Display extends \Zotlabs\Web\Controller {
|
||||
'$dm' => '0',
|
||||
'$nouveau' => '0',
|
||||
'$wall' => '0',
|
||||
'$static' => $static,
|
||||
'$page' => ((\App::$pager['page'] != 1) ? \App::$pager['page'] : 1),
|
||||
'$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0),
|
||||
'$search' => '',
|
||||
@@ -315,7 +300,6 @@ class Display extends \Zotlabs\Web\Controller {
|
||||
dbesc($target_item['parent_mid'])
|
||||
);
|
||||
}
|
||||
|
||||
if($r === null) {
|
||||
// in case somebody turned off public access to sys channel content using permissions
|
||||
// make that content unsearchable by ensuring the owner_xchan can't match
|
||||
@@ -335,7 +319,6 @@ class Display extends \Zotlabs\Web\Controller {
|
||||
intval($sysid)
|
||||
);
|
||||
}
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
}
|
||||
|
||||
else {
|
||||
@@ -448,6 +431,8 @@ class Display extends \Zotlabs\Web\Controller {
|
||||
|
||||
}
|
||||
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
|
||||
return $o;
|
||||
|
||||
}
|
||||
|
||||
@@ -31,7 +31,8 @@ class Filer extends \Zotlabs\Web\Controller {
|
||||
intval(local_channel())
|
||||
);
|
||||
if($r) {
|
||||
$x = q("update item set item_retained = 1 where id = %d and uid = %d",
|
||||
$x = q("update item set item_retained = 1, changed = '%s' where id = %d and uid = %d",
|
||||
dbesc(datetime_convert()),
|
||||
intval($r[0]['parent']),
|
||||
intval(local_channel())
|
||||
);
|
||||
|
||||
@@ -28,10 +28,14 @@ class Filerm extends \Zotlabs\Web\Controller {
|
||||
intval($item_id),
|
||||
dbesc($term)
|
||||
);
|
||||
|
||||
$x = q("update item set item_retained = 0, changed = '%s' where id = %d and uid = %d",
|
||||
dbesc(datetime_convert()),
|
||||
intval($item_id),
|
||||
intval(local_channel())
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
if(x($_SESSION,'return_url'))
|
||||
goaway(z_root() . '/' . $_SESSION['return_url']);
|
||||
|
||||
killme();
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
use Zotlabs\Web\HTTPSig;
|
||||
use Zotlabs\Lib\Libzot;
|
||||
|
||||
/**
|
||||
* module: getfile
|
||||
@@ -54,11 +55,11 @@ class Getfile extends \Zotlabs\Web\Controller {
|
||||
|
||||
if($keyId) {
|
||||
$r = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash
|
||||
where hubloc_addr = '%s' limit 1",
|
||||
where hubloc_addr = '%s'",
|
||||
dbesc(str_replace('acct:','',$keyId))
|
||||
);
|
||||
if($r) {
|
||||
$hubloc = $r[0];
|
||||
$hubloc = Libzot::zot_record_preferred($r);
|
||||
$verified = HTTPSig::verify('',$hubloc['xchan_pubkey']);
|
||||
if($verified && $verified['header_signed'] && $verified['header_valid'] && $hash == $hubloc['hubloc_hash']) {
|
||||
$header_verified = true;
|
||||
|
||||
@@ -38,9 +38,6 @@ class Hq extends \Zotlabs\Web\Controller {
|
||||
if(!local_channel())
|
||||
return;
|
||||
|
||||
if($load)
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
|
||||
if(argc() > 1 && argv(1) !== 'load') {
|
||||
$item_hash = argv(1);
|
||||
}
|
||||
@@ -87,15 +84,9 @@ class Hq extends \Zotlabs\Web\Controller {
|
||||
goaway(z_root() . '/moderate/' . $target_item['id']);
|
||||
}
|
||||
|
||||
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
|
||||
|
||||
$simple_update = (($update) ? " AND item_unseen = 1 " : '');
|
||||
|
||||
$simple_update = '';
|
||||
if($update && $_SESSION['loadtime'])
|
||||
$simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
|
||||
|
||||
if($static && $simple_update)
|
||||
$simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
|
||||
|
||||
$sys = get_sys_channel();
|
||||
$sql_extra = item_permissions_sql($sys['channel_id']);
|
||||
@@ -148,8 +139,6 @@ class Hq extends \Zotlabs\Web\Controller {
|
||||
|
||||
nav_set_selected('HQ');
|
||||
|
||||
$static = ((local_channel()) ? channel_manual_conv_update(local_channel()) : 1);
|
||||
|
||||
if($target_item) {
|
||||
// if the target item is not a post (eg a like) we want to address its thread parent
|
||||
//$mid = ((($target_item['verb'] == ACTIVITY_LIKE) || ($target_item['verb'] == ACTIVITY_DISLIKE)) ? $target_item['thr_parent'] : $target_item['mid']);
|
||||
@@ -182,8 +171,7 @@ class Hq extends \Zotlabs\Web\Controller {
|
||||
'$dm' => '0',
|
||||
'$nouveau' => '0',
|
||||
'$wall' => '0',
|
||||
'$static' => $static,
|
||||
'$page' => 1,
|
||||
'$page' => '1',
|
||||
'$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0),
|
||||
'$search' => '',
|
||||
'$xchan' => '',
|
||||
@@ -249,8 +237,6 @@ class Hq extends \Zotlabs\Web\Controller {
|
||||
intval($sys['channel_id'])
|
||||
);
|
||||
}
|
||||
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
}
|
||||
else {
|
||||
$r = [];
|
||||
@@ -275,6 +261,8 @@ class Hq extends \Zotlabs\Web\Controller {
|
||||
|
||||
$o .= '<div id="content-complete"></div>';
|
||||
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
|
||||
return $o;
|
||||
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ use App;
|
||||
require_once('include/crypto.php');
|
||||
require_once('include/items.php');
|
||||
require_once('include/security.php');
|
||||
require_once('include/conversation.php');
|
||||
|
||||
|
||||
/**
|
||||
@@ -300,6 +301,7 @@ class Item extends Controller {
|
||||
|
||||
$parent = ((x($_REQUEST,'parent')) ? intval($_REQUEST['parent']) : 0);
|
||||
$parent_mid = ((x($_REQUEST,'parent_mid')) ? trim($_REQUEST['parent_mid']) : '');
|
||||
$mode = (($_REQUEST['conv_mode'] === 'channel') ? 'channel' : 'network');
|
||||
|
||||
$remote_xchan = ((x($_REQUEST,'remote_xchan')) ? trim($_REQUEST['remote_xchan']) : false);
|
||||
$r = q("select * from xchan where xchan_hash = '%s' limit 1",
|
||||
@@ -1373,8 +1375,21 @@ class Item extends Controller {
|
||||
if($return_path) {
|
||||
goaway(z_root() . "/" . $return_path);
|
||||
}
|
||||
|
||||
$json = array('success' => 1);
|
||||
|
||||
if($mode === 'channel')
|
||||
profile_load($channel['channel_address']);
|
||||
|
||||
$item[] = $datarray;
|
||||
$item[0]['owner'] = $owner_xchan;
|
||||
$item[0]['author'] = $observer;
|
||||
$item[0]['attach'] = json_encode($datarray['attach']);
|
||||
|
||||
$json = [
|
||||
'success' => 1,
|
||||
'id' => $post_id,
|
||||
'html' => conversation($item,$mode,true,'r_preview'),
|
||||
];
|
||||
|
||||
if(x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload']))
|
||||
$json['reload'] = z_root() . '/' . $_REQUEST['jsreload'];
|
||||
|
||||
|
||||
@@ -7,13 +7,10 @@ use Zotlabs\Lib\Libsync;
|
||||
require_once('include/security.php');
|
||||
require_once('include/bbcode.php');
|
||||
require_once('include/items.php');
|
||||
|
||||
|
||||
require_once('include/conversation.php');
|
||||
|
||||
class Like extends \Zotlabs\Web\Controller {
|
||||
|
||||
|
||||
|
||||
private function reaction_to_activity($reaction) {
|
||||
|
||||
$acts = [
|
||||
@@ -42,7 +39,46 @@ class Like extends \Zotlabs\Web\Controller {
|
||||
|
||||
}
|
||||
|
||||
private function like_response($arr) {
|
||||
|
||||
if($arr['conv_mode'] === 'channel') {
|
||||
$parts = explode('@', $arr['owner_xchan']['xchan_addr']);
|
||||
profile_load($parts[0]);
|
||||
}
|
||||
|
||||
|
||||
$item_normal = item_normal();
|
||||
|
||||
$activities = q("SELECT item.*, item.id AS item_id FROM item
|
||||
WHERE uid = %d $item_normal
|
||||
AND thr_parent = '%s'
|
||||
AND verb IN ('%s', '%s', '%s', '%s', '%s')",
|
||||
intval($arr['item']['uid']),
|
||||
dbesc($arr['item']['mid']),
|
||||
dbesc(ACTIVITY_LIKE),
|
||||
dbesc(ACTIVITY_DISLIKE),
|
||||
dbesc(ACTIVITY_ATTEND),
|
||||
dbesc(ACTIVITY_ATTENDNO),
|
||||
dbesc(ACTIVITY_ATTENDMAYBE)
|
||||
);
|
||||
|
||||
xchan_query($activities,true);
|
||||
|
||||
$convitems[] = $arr['item'];
|
||||
$convitems = array_merge($convitems, $activities);
|
||||
|
||||
$convitems = fetch_post_tags($convitems,true);
|
||||
|
||||
$ret = [
|
||||
'success' => 1,
|
||||
'orig_id' => $arr['orig_item_id'], //this is required for pubstream items where $item_id != $item['id']
|
||||
'id' => $arr['item']['id'],
|
||||
'html' => conversation($convitems, $arr['conv_mode'], true, 'r_preview'),
|
||||
];
|
||||
|
||||
return $ret;
|
||||
|
||||
}
|
||||
|
||||
public function get() {
|
||||
|
||||
@@ -66,7 +102,8 @@ class Like extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
|
||||
$verb = notags(trim($_GET['verb']));
|
||||
|
||||
$mode = (($_GET['conv_mode'] === 'channel') ? 'channel' : 'network');
|
||||
|
||||
if(! $verb)
|
||||
$verb = 'like';
|
||||
|
||||
@@ -304,7 +341,7 @@ class Like extends \Zotlabs\Web\Controller {
|
||||
$thread_owner = $r[0];
|
||||
else
|
||||
killme();
|
||||
|
||||
|
||||
$r = q("select * from xchan where xchan_hash = '%s' limit 1",
|
||||
dbesc($item['author_xchan'])
|
||||
);
|
||||
@@ -312,8 +349,7 @@ class Like extends \Zotlabs\Web\Controller {
|
||||
$item_author = $r[0];
|
||||
else
|
||||
killme();
|
||||
|
||||
|
||||
|
||||
$verbs = " '".dbesc($activity)."' ";
|
||||
|
||||
$multi_undo = false;
|
||||
@@ -357,16 +393,27 @@ class Like extends \Zotlabs\Web\Controller {
|
||||
|
||||
// drop_item was not done interactively, so we need to invoke the notifier
|
||||
// in order to push the changes to connections
|
||||
|
||||
|
||||
\Zotlabs\Daemon\Master::Summon(array('Notifier','drop',$rr['id']));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if($interactive)
|
||||
return;
|
||||
|
||||
if(! $multi_undo)
|
||||
killme();
|
||||
if(! $multi_undo) {
|
||||
$ret = self::like_response([
|
||||
'item' => $item,
|
||||
'orig_item_id' => $item_id,
|
||||
'owner_xchan' => $thread_owner,
|
||||
'conv_mode' => $mode
|
||||
]);
|
||||
json_return_and_die($ret);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -501,7 +548,6 @@ class Like extends \Zotlabs\Web\Controller {
|
||||
|
||||
call_hooks('post_local',$arr);
|
||||
|
||||
|
||||
$post = item_store($arr);
|
||||
$post_id = $post['item_id'];
|
||||
|
||||
@@ -540,7 +586,6 @@ class Like extends \Zotlabs\Web\Controller {
|
||||
|
||||
}
|
||||
|
||||
|
||||
\Zotlabs\Daemon\Master::Summon(array('Notifier','like',$post_id));
|
||||
|
||||
if($interactive) {
|
||||
@@ -548,10 +593,15 @@ class Like extends \Zotlabs\Web\Controller {
|
||||
$o .= t('Thank you.');
|
||||
return $o;
|
||||
}
|
||||
|
||||
killme();
|
||||
|
||||
$ret = self::like_response([
|
||||
'item' => $item,
|
||||
'orig_item_id' => $item_id,
|
||||
'owner_xchan' => $thread_owner,
|
||||
'conv_mode' => $mode
|
||||
]);
|
||||
json_return_and_die($ret);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,55 +8,65 @@ use Zotlabs\Daemon\Master;
|
||||
class Locs extends Controller {
|
||||
|
||||
function post() {
|
||||
|
||||
|
||||
if(! local_channel())
|
||||
return;
|
||||
|
||||
|
||||
$channel = App::get_channel();
|
||||
|
||||
|
||||
if($_REQUEST['primary']) {
|
||||
$hubloc_id = intval($_REQUEST['primary']);
|
||||
if($hubloc_id) {
|
||||
|
||||
|
||||
$r = q("select * from hubloc where hubloc_id = %d and hubloc_hash = '%s' limit 1",
|
||||
intval($hubloc_id),
|
||||
dbesc($channel['channel_hash'])
|
||||
);
|
||||
|
||||
|
||||
if(! $r) {
|
||||
notice( t('Location not found.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
q("UPDATE hubloc SET hubloc_primary = 0 WHERE hubloc_primary = 1 AND (hubloc_hash = '%s' OR hubloc_hash = '%s')",
|
||||
dbesc($channel['channel_hash']),
|
||||
dbesc($channel['channel_portable_id'])
|
||||
);
|
||||
|
||||
q("UPDATE hubloc SET hubloc_primary = 1 WHERE hubloc_id = %d AND hubloc_hash = '%s'",
|
||||
intval($hubloc_id),
|
||||
dbesc($channel['channel_hash'])
|
||||
);
|
||||
|
||||
$x = q("select * from hubloc where hubloc_id = %d and hubloc_hash = '%s' ",
|
||||
intval($hubloc_id),
|
||||
dbesc($channel['channel_hash'])
|
||||
);
|
||||
|
||||
if ($x) {
|
||||
hubloc_change_primary($x[0]);
|
||||
}
|
||||
|
||||
Master::Summon( [ 'Notifier', 'refresh_all', $channel['channel_id'] ] );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($_REQUEST['drop']) {
|
||||
$hubloc_id = intval($_REQUEST['drop']);
|
||||
|
||||
|
||||
if($hubloc_id) {
|
||||
$r = q("select * from hubloc where hubloc_id = %d and hubloc_url != '%s' and hubloc_hash = '%s' limit 1",
|
||||
intval($hubloc_id),
|
||||
dbesc(z_root()),
|
||||
dbesc($channel['channel_hash'])
|
||||
);
|
||||
|
||||
|
||||
if(! $r) {
|
||||
notice( t('Location not found.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
if(intval($r[0]['hubloc_primary'])) {
|
||||
$x = q("select hubloc_id from hubloc where hubloc_primary = 1 and hubloc_hash = '%s'",
|
||||
dbesc($channel['channel_hash'])
|
||||
@@ -70,7 +80,7 @@ class Locs extends Controller {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
q("UPDATE hubloc SET hubloc_deleted = 1 WHERE hubloc_id_url = '%s' AND (hubloc_hash = '%s' OR hubloc_hash = '%s')",
|
||||
dbesc($r[0]['hubloc_id_url']),
|
||||
dbesc($channel['channel_hash']),
|
||||
@@ -78,44 +88,41 @@ class Locs extends Controller {
|
||||
);
|
||||
Master::Summon( [ 'Notifier', 'refresh_all', $channel['channel_id'] ] );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function get() {
|
||||
|
||||
|
||||
|
||||
if(! local_channel()) {
|
||||
notice( t('Permission denied.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$channel = App::get_channel();
|
||||
|
||||
|
||||
if($_REQUEST['sync']) {
|
||||
Master::Summon( [ 'Notifier', 'refresh_all', $channel['channel_id'] ] );
|
||||
info( t('Syncing locations') . EOL);
|
||||
goaway(z_root() . '/locs');
|
||||
}
|
||||
|
||||
|
||||
|
||||
$r = q("select * from hubloc where hubloc_hash = '%s'",
|
||||
dbesc($channel['channel_hash'])
|
||||
);
|
||||
|
||||
|
||||
if(! $r) {
|
||||
notice( t('No locations found.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
for($x = 0; $x < count($r); $x ++) {
|
||||
$r[$x]['primary'] = (intval($r[$x]['hubloc_primary']) ? true : false);
|
||||
$r[$x]['deleted'] = (intval($r[$x]['hubloc_deleted']) ? true : false);
|
||||
}
|
||||
|
||||
|
||||
$o = replace_macros(get_markup_template('locmanage.tpl'), array(
|
||||
'$header' => t('Manage Channel Locations'),
|
||||
'$loc' => t('Location'),
|
||||
@@ -129,8 +136,8 @@ class Locs extends Controller {
|
||||
'$last_resort' => t('Use this form to drop the location if the hub is no longer operating.'),
|
||||
'$hubs' => $r
|
||||
));
|
||||
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -44,10 +44,6 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
|
||||
$o = '';
|
||||
|
||||
if($load) {
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
}
|
||||
|
||||
$arr = array('query' => App::$query_string);
|
||||
|
||||
call_hooks('network_content_init', $arr);
|
||||
@@ -64,7 +60,6 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
|
||||
$datequery = ((x($_GET,'dend') && is_a_date_arg($_GET['dend'])) ? notags($_GET['dend']) : '');
|
||||
$datequery2 = ((x($_GET,'dbegin') && is_a_date_arg($_GET['dbegin'])) ? notags($_GET['dbegin']) : '');
|
||||
$static = ((x($_GET,'static')) ? intval($_GET['static']) : 0);
|
||||
$gid = ((x($_GET,'gid')) ? intval($_GET['gid']) : 0);
|
||||
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
|
||||
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
|
||||
@@ -213,8 +208,6 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
$status_editor = status_editor($a,$x,false,'Network');
|
||||
$o .= $status_editor;
|
||||
|
||||
$static = channel_manual_conv_update(local_channel());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -370,7 +363,6 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
'$dm' => (($dm) ? $dm : '0'),
|
||||
'$nouveau' => (($nouveau) ? $nouveau : '0'),
|
||||
'$wall' => '0',
|
||||
'$static' => $static,
|
||||
'$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0),
|
||||
'$page' => ((App::$pager['page'] != 1) ? App::$pager['page'] : 1),
|
||||
'$search' => (($search) ? urlencode($search) : ''),
|
||||
@@ -494,8 +486,6 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
|
||||
$parents_str = '';
|
||||
|
||||
$simple_update = (($update) ? " and item_unseen = 1 " : '');
|
||||
|
||||
// This fixes a very subtle bug so I'd better explain it. You wake up in the morning or return after a day
|
||||
// or three and look at your matrix page - after opening up your browser. The first page loads just as it
|
||||
// should. All of a sudden a few seconds later, page 2 will get inserted at the beginning of the page
|
||||
@@ -507,16 +497,11 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
// which "arrived as you were reading page 1". We're going to do this
|
||||
// by storing in your session the current UTC time whenever you LOAD a network page, and only UPDATE items
|
||||
// which are both ITEM_UNSEEN and have "changed" since that time. Cross fingers...
|
||||
|
||||
|
||||
$simple_update = '';
|
||||
if($update && $_SESSION['loadtime'])
|
||||
$simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
|
||||
|
||||
if($load)
|
||||
$simple_update = '';
|
||||
|
||||
if($static && $simple_update)
|
||||
$simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
|
||||
|
||||
if($nouveau && $load) {
|
||||
// "New Item View" - show all items unthreaded in reverse created date order
|
||||
$items = q("SELECT item.*, item.id AS item_id, created FROM item
|
||||
@@ -524,7 +509,6 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
$net_query
|
||||
WHERE true $uids $item_normal
|
||||
and (abook.abook_blocked = 0 or abook.abook_flags is null)
|
||||
$simple_update
|
||||
$sql_extra $sql_options $sql_nets
|
||||
$net_query2
|
||||
ORDER BY item.created DESC $pager_sql "
|
||||
@@ -570,7 +554,6 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
and (abook.abook_blocked = 0 or abook.abook_flags is null)
|
||||
$sql_extra3 $sql_extra $sql_options $sql_nets $net_query2"
|
||||
);
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
}
|
||||
|
||||
// Then fetch all the children of the parents that are on this page
|
||||
@@ -605,6 +588,8 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
|
||||
if(($items) && (! $update))
|
||||
$o .= alt_pager(count($items));
|
||||
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
@@ -23,9 +23,6 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
}
|
||||
|
||||
if($load)
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
|
||||
if((observer_prohibited(true))) {
|
||||
return login();
|
||||
}
|
||||
@@ -59,7 +56,6 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
||||
$item_normal = item_normal();
|
||||
$item_normal_update = item_normal_update();
|
||||
|
||||
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
|
||||
$net = ((array_key_exists('net',$_REQUEST)) ? escape_tags($_REQUEST['net']) : '');
|
||||
|
||||
$title = replace_macros(get_markup_template("section_title.tpl"),array(
|
||||
@@ -103,11 +99,6 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
||||
$o .= status_editor($a,$x,false,'Pubstream');
|
||||
$o .= '</div>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(! $update && !$load) {
|
||||
|
||||
@@ -116,8 +107,6 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
||||
if(!$mid)
|
||||
$_SESSION['static_loadtime'] = datetime_convert();
|
||||
|
||||
$static = ((local_channel()) ? channel_manual_conv_update(local_channel()) : 1);
|
||||
|
||||
$maxheight = get_config('system','home_divmore_height');
|
||||
if(! $maxheight)
|
||||
$maxheight = 400;
|
||||
@@ -148,7 +137,6 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
||||
'$nouveau' => '0',
|
||||
'$wall' => '0',
|
||||
'$list' => '0',
|
||||
'$static' => $static,
|
||||
'$page' => ((\App::$pager['page'] != 1) ? \App::$pager['page'] : 1),
|
||||
'$search' => '',
|
||||
'$xchan' => '',
|
||||
@@ -200,14 +188,10 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
||||
$net_query2 = (($net) ? " and xchan_network = '" . protect_sprintf(dbesc($net)) . "' " : '');
|
||||
|
||||
$abook_uids = " and abook.abook_channel = " . intval(\App::$profile['profile_uid']) . " ";
|
||||
|
||||
$simple_update = (($_SESSION['loadtime']) ? " AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' " : '');
|
||||
|
||||
if($load)
|
||||
$simple_update = '';
|
||||
|
||||
if($static && $simple_update)
|
||||
$simple_update .= " and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
|
||||
$simple_update = '';
|
||||
if($update && $_SESSION['loadtime'])
|
||||
$simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
|
||||
|
||||
//logger('update: ' . $update . ' load: ' . $load);
|
||||
|
||||
@@ -220,10 +204,10 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
||||
$r = q("SELECT parent AS item_id FROM item
|
||||
left join abook on item.author_xchan = abook.abook_xchan
|
||||
$net_query
|
||||
WHERE mid like '%s' $uids $item_normal
|
||||
WHERE mid = '%s' $uids $item_normal
|
||||
and (abook.abook_blocked = 0 or abook.abook_flags is null)
|
||||
$sql_extra3 $sql_extra $sql_nets $net_query2 LIMIT 1",
|
||||
dbesc($mid . '%')
|
||||
$sql_extra3 $sql_extra $sql_nets $net_query2",
|
||||
dbesc($mid)
|
||||
);
|
||||
}
|
||||
else {
|
||||
@@ -243,10 +227,10 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
||||
$r = q("SELECT parent AS item_id FROM item
|
||||
left join abook on item.author_xchan = abook.abook_xchan
|
||||
$net_query
|
||||
WHERE mid like '%s' $uids $item_normal_update $simple_update
|
||||
WHERE mid = '%s' $uids $item_normal_update $simple_update
|
||||
and (abook.abook_blocked = 0 or abook.abook_flags is null)
|
||||
$sql_extra3 $sql_extra $sql_nets $net_query2 LIMIT 1",
|
||||
dbesc($mid . '%')
|
||||
$sql_extra3 $sql_extra $sql_nets $net_query2",
|
||||
dbesc($mid)
|
||||
);
|
||||
}
|
||||
else {
|
||||
@@ -259,7 +243,6 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
||||
$sql_extra3 $sql_extra $sql_nets $net_query2"
|
||||
);
|
||||
}
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
}
|
||||
|
||||
// Then fetch all the children of the parents that are on this page
|
||||
@@ -291,7 +274,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
||||
|
||||
// fake it
|
||||
$mode = (($hashtags) ? 'search' : 'pubstream');
|
||||
|
||||
|
||||
$o .= conversation($items,$mode,$update,$page_mode);
|
||||
|
||||
if($mid)
|
||||
@@ -300,6 +283,8 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
||||
if(($items) && (! $update))
|
||||
$o .= alt_pager(count($items));
|
||||
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
|
||||
return $o;
|
||||
|
||||
}
|
||||
|
||||
@@ -19,9 +19,6 @@ class Search extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
}
|
||||
|
||||
if($load)
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
|
||||
nav_set_selected('Search');
|
||||
|
||||
require_once("include/bbcode.php");
|
||||
@@ -54,8 +51,6 @@ class Search extends \Zotlabs\Web\Controller {
|
||||
$search = ((x($_GET,'tag')) ? trim(escape_tags(rawurldecode($_GET['tag']))) : '');
|
||||
}
|
||||
|
||||
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
|
||||
|
||||
$o .= search($search,'search-box','/search',((local_channel()) ? true : false));
|
||||
|
||||
if(strpos($search,'#') === 0) {
|
||||
@@ -105,9 +100,6 @@ class Search extends \Zotlabs\Web\Controller {
|
||||
|
||||
if((! $update) && (! $load)) {
|
||||
|
||||
$static = ((local_channel()) ? channel_manual_conv_update(local_channel()) : 0);
|
||||
|
||||
|
||||
// This is ugly, but we can't pass the profile_uid through the session to the ajax updater,
|
||||
// because browser prefetching might change it on us. We have to deliver it with the page.
|
||||
|
||||
@@ -131,7 +123,6 @@ class Search extends \Zotlabs\Web\Controller {
|
||||
'$dm' => '0',
|
||||
'$nouveau' => '0',
|
||||
'$wall' => '0',
|
||||
'$static' => $static,
|
||||
'$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0),
|
||||
'$page' => ((\App::$pager['page'] != 1) ? \App::$pager['page'] : 1),
|
||||
'$search' => (($tag) ? urlencode('#') : '') . $search,
|
||||
|
||||
@@ -28,7 +28,6 @@ class Display {
|
||||
$user_scalable = ((x($_POST,'user_scalable')) ? intval($_POST['user_scalable']) : 0);
|
||||
$nosmile = ((x($_POST,'nosmile')) ? intval($_POST['nosmile']) : 0);
|
||||
$title_tosource = ((x($_POST,'title_tosource')) ? intval($_POST['title_tosource']) : 0);
|
||||
$manual_update = ((array_key_exists('manual_update',$_POST)) ? intval($_POST['manual_update']) : 0);
|
||||
$start_menu = ((x($_POST,'start_menu')) ? intval($_POST['start_menu']) : 0);
|
||||
|
||||
$browser_update = ((x($_POST,'browser_update')) ? intval($_POST['browser_update']) : 0);
|
||||
@@ -47,7 +46,6 @@ class Display {
|
||||
set_pconfig(local_channel(),'system','itemspage', $itemspage);
|
||||
set_pconfig(local_channel(),'system','no_smilies',1-intval($nosmile));
|
||||
set_pconfig(local_channel(),'system','title_tosource',$title_tosource);
|
||||
set_pconfig(local_channel(),'system','manual_conversation_update', $manual_update);
|
||||
set_pconfig(local_channel(),'system','channel_menu', $channel_menu);
|
||||
set_pconfig(local_channel(),'system','start_menu', $start_menu);
|
||||
|
||||
@@ -200,7 +198,6 @@ class Display {
|
||||
'$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 30 items')),
|
||||
'$nosmile' => array('nosmile', t("Show emoticons (smilies) as images"), 1-intval($nosmile), '', $yes_no),
|
||||
'$channel_menu' => [ 'channel_menu', t('Provide channel menu in navigation bar'), get_pconfig(local_channel(),'system','channel_menu',get_config('system','channel_menu',0)), t('Default: channel menu located in app menu'),$yes_no ],
|
||||
'$manual_update' => array('manual_update', t('Manual conversation updates'), channel_manual_conv_update(local_channel()), t('Default is on, turning this off may increase screen jumping'), $yes_no),
|
||||
'$title_tosource' => array('title_tosource', t("Link post titles to source"), $title_tosource, '', $yes_no),
|
||||
'$theme_config' => $theme_config,
|
||||
'$start_menu' => ['start_menu', t('New Member Links'), $start_menu, t('Display new member quick links menu'), $yes_no]
|
||||
|
||||
@@ -212,6 +212,9 @@ class HTTPSig {
|
||||
|
||||
static function get_key($key,$keytype,$id) {
|
||||
|
||||
if(is_array($key))
|
||||
btlogger('key is array: ' . print_r($key,true));
|
||||
|
||||
if($key) {
|
||||
if(function_exists($key)) {
|
||||
return $key($id);
|
||||
|
||||
2
boot.php
2
boot.php
@@ -50,7 +50,7 @@ require_once('include/attach.php');
|
||||
require_once('include/bbcode.php');
|
||||
|
||||
define ( 'PLATFORM_NAME', 'hubzilla' );
|
||||
define ( 'STD_VERSION', '5.0.2' );
|
||||
define ( 'STD_VERSION', '5.0.5' );
|
||||
define ( 'ZOT_REVISION', '6.0' );
|
||||
|
||||
define ( 'DB_UPDATE_VERSION', 1239 );
|
||||
|
||||
152
composer.json
152
composer.json
@@ -1,76 +1,80 @@
|
||||
{
|
||||
"name" : "zotlabs/hubzilla",
|
||||
"type" : "application",
|
||||
"description" : "Hubzilla is a powerful platform for creating interconnected websites featuring a decentralized identity, communications, and permissions framework built using common webserver technology.",
|
||||
"keywords" : [
|
||||
"CMS",
|
||||
"identity",
|
||||
"decentralisation",
|
||||
"permission",
|
||||
"SSO",
|
||||
"ZOT"
|
||||
],
|
||||
"homepage" : "http://framagit.org/hubzilla/core/",
|
||||
"license" : "MIT",
|
||||
"authors" : [{
|
||||
"name" : "Mike Macgirvin",
|
||||
"role" : "founder"
|
||||
}
|
||||
],
|
||||
"support" : {
|
||||
"issues" : "https://framagit.org/hubzilla/core/issues",
|
||||
"source" : "https://framagit.org/hubzilla/core/"
|
||||
},
|
||||
"require" : {
|
||||
"php" : ">=5.5",
|
||||
"ext-curl" : "*",
|
||||
"ext-gd" : "*",
|
||||
"ext-mbstring" : "*",
|
||||
"ext-xml" : "*",
|
||||
"ext-openssl" : "*",
|
||||
"sabre/dav" : "^4.0",
|
||||
"michelf/php-markdown" : "^1.7",
|
||||
"bshaffer/oauth2-server-php": "^1.9",
|
||||
"ezyang/htmlpurifier": "^4.9",
|
||||
"simplepie/simplepie": "~1.5",
|
||||
"league/html-to-markdown": "^4.4",
|
||||
"pear/text_languagedetect": "^1.0",
|
||||
"commerceguys/intl": "~1.0.5",
|
||||
"lukasreschke/id3parser": "^0.0.3",
|
||||
"smarty/smarty": "~3.1",
|
||||
"ramsey/uuid": "^3.8",
|
||||
"twbs/bootstrap": "^4.3.1",
|
||||
"blueimp/jquery-file-upload": "^10.3",
|
||||
"desandro/imagesloaded": "^4.1"
|
||||
},
|
||||
"require-dev" : {
|
||||
"phpunit/phpunit" : "@stable",
|
||||
"behat/behat" : "@stable",
|
||||
"behat/mink-extension": "@stable",
|
||||
"behat/mink-goutte-driver": "@stable",
|
||||
"php-mock/php-mock-phpunit": "@stable",
|
||||
"phpunit/dbunit": "@stable",
|
||||
"phpmd/phpmd": "^2.6",
|
||||
"squizlabs/php_codesniffer": "*"
|
||||
},
|
||||
"autoload" : {
|
||||
"psr-4" : {
|
||||
"Hubzilla\\" : "include/",
|
||||
"Zotlabs\\" : "Zotlabs/"
|
||||
}
|
||||
},
|
||||
"autoload-dev" : {
|
||||
"psr-4" : {
|
||||
"Zotlabs\\Tests\\Unit\\" : "tests/unit"
|
||||
}
|
||||
},
|
||||
"minimum-stability" : "stable",
|
||||
"config" : {
|
||||
"notify-on-install" : false,
|
||||
"optimize-autoloader" : true
|
||||
},
|
||||
"repositories": [{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/simplepie/simplepie"
|
||||
}]
|
||||
"name": "zotlabs/hubzilla",
|
||||
"type": "application",
|
||||
"description": "Hubzilla is a powerful platform for creating interconnected websites featuring a decentralized identity, communications, and permissions framework built using common webserver technology.",
|
||||
"keywords": [
|
||||
"CMS",
|
||||
"identity",
|
||||
"decentralisation",
|
||||
"permission",
|
||||
"SSO",
|
||||
"ZOT"
|
||||
],
|
||||
"homepage": "http://framagit.org/hubzilla/core/",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mike Macgirvin",
|
||||
"role": "founder"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://framagit.org/hubzilla/core/issues",
|
||||
"source": "https://framagit.org/hubzilla/core/"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5",
|
||||
"ext-curl": "*",
|
||||
"ext-gd": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-xml": "*",
|
||||
"ext-openssl": "*",
|
||||
"sabre/dav": "^4.0",
|
||||
"michelf/php-markdown": "^1.7",
|
||||
"bshaffer/oauth2-server-php": "^1.9",
|
||||
"ezyang/htmlpurifier": "^4.9",
|
||||
"simplepie/simplepie": "~1.5",
|
||||
"league/html-to-markdown": "^4.4",
|
||||
"pear/text_languagedetect": "^1.0",
|
||||
"commerceguys/intl": "~1.0.5",
|
||||
"lukasreschke/id3parser": "^0.0.3",
|
||||
"smarty/smarty": "~3.1",
|
||||
"ramsey/uuid": "^3.8",
|
||||
"twbs/bootstrap": "^4.3.1",
|
||||
"blueimp/jquery-file-upload": "^10.3",
|
||||
"desandro/imagesloaded": "^4.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.4",
|
||||
"behat/behat": "@stable",
|
||||
"behat/mink-extension": "@stable",
|
||||
"behat/mink-goutte-driver": "@stable",
|
||||
"php-mock/php-mock-phpunit": "^2.6",
|
||||
"phpmd/phpmd": "^2.6",
|
||||
"squizlabs/php_codesniffer": "*",
|
||||
"php-mock/php-mock": "^2.2",
|
||||
"dms/phpunit-arraysubset-asserts": "^0.2.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Hubzilla\\": "include/",
|
||||
"Zotlabs\\": "Zotlabs/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Zotlabs\\Tests\\Unit\\": "tests/unit"
|
||||
}
|
||||
},
|
||||
"minimum-stability": "stable",
|
||||
"config": {
|
||||
"notify-on-install": false,
|
||||
"optimize-autoloader": true
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/simplepie/simplepie"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
1638
composer.lock
generated
1638
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -2573,26 +2573,6 @@ function channel_reddress($channel) {
|
||||
return strtolower($channel['channel_address'] . '@' . App::get_hostname());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get manual channel conversation update config.
|
||||
*
|
||||
* Check the channel config \e manual_conversation_update, if not set fall back
|
||||
* to global system config, defaults to 1 if nothing set.
|
||||
*
|
||||
* @param int $channel_id
|
||||
* @return int
|
||||
*/
|
||||
function channel_manual_conv_update($channel_id) {
|
||||
|
||||
$x = get_pconfig($channel_id, 'system', 'manual_conversation_update');
|
||||
if($x === false)
|
||||
$x = get_config('system', 'manual_conversation_update', 1);
|
||||
|
||||
return intval($x);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Return parsed HTML remote_login template.
|
||||
*
|
||||
|
||||
@@ -511,6 +511,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa
|
||||
$jsreload = '';
|
||||
|
||||
$preview = (($page_mode === 'preview') ? true : false);
|
||||
$r_preview = (($page_mode === 'r_preview') ? true : false);
|
||||
$previewing = (($preview) ? ' preview ' : '');
|
||||
$preview_lbl = t('This is an unsaved preview');
|
||||
|
||||
@@ -873,11 +874,13 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa
|
||||
}
|
||||
|
||||
|
||||
|
||||
$item['pagedrop'] = $page_dropping;
|
||||
|
||||
if($item['id'] == $item['parent']) {
|
||||
if($item['id'] == $item['parent'] || $r_preview) {
|
||||
|
||||
$item_object = new Zotlabs\Lib\ThreadItem($item);
|
||||
|
||||
$conv->add_thread($item_object);
|
||||
if(($page_mode === 'list') || ($page_mode === 'pager_list')) {
|
||||
$item_object->set_template('conv_list.tpl');
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
* @param array $params associative array which configures the feed
|
||||
* @return string with an atom feed
|
||||
*/
|
||||
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
|
||||
|
||||
function get_public_feed($channel, $params) {
|
||||
|
||||
if(! $params)
|
||||
@@ -431,6 +435,13 @@ function get_atom_elements($feed, $item) {
|
||||
$res['plink'] = unxmlify($item->get_link(0));
|
||||
$res['item_rss'] = 1;
|
||||
|
||||
try {
|
||||
$uuid = Uuid::uuid5(Uuid::NAMESPACE_URL, $res['plink'])->toString();
|
||||
} catch (UnsatisfiedDependencyException $e) {
|
||||
$uuid = md5($res['plink']);
|
||||
}
|
||||
|
||||
$res['uuid'] = $uuid;
|
||||
|
||||
$summary = unxmlify($item->get_description(true));
|
||||
|
||||
@@ -1516,6 +1527,7 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -527,12 +527,12 @@ function sync_apps($channel, $apps) {
|
||||
|
||||
/**
|
||||
* @brief Import system apps.
|
||||
* System apps from the original server may not exist on this system
|
||||
* System apps from the original server may not exist on this system
|
||||
* (e.g. apps associated with addons that are not installed here).
|
||||
* Check the system apps that were provided in the import file to see if they
|
||||
* exist here and if so, install them locally. Preserve categories that
|
||||
* might have been added by this channel on the other server.
|
||||
* Do not use any paths from the original as they will point to a different server.
|
||||
* Do not use any paths from the original as they will point to a different server.
|
||||
* @param array $channel
|
||||
* @param array $apps
|
||||
*/
|
||||
@@ -1373,7 +1373,7 @@ function sync_files($channel, $files) {
|
||||
logger('attachment store failed',LOGGER_NORMAL,LOG_ERR);
|
||||
}
|
||||
if($f['photo']) {
|
||||
|
||||
|
||||
foreach($f['photo'] as $p) {
|
||||
unset($p['id']);
|
||||
$p['aid'] = $channel['channel_account_id'];
|
||||
@@ -1446,7 +1446,7 @@ function sync_files($channel, $files) {
|
||||
|
||||
$x = z_post_url($fetch_url,$parr,$redirects,[ 'filep' => $fp, 'headers' => $headers]);
|
||||
fclose($fp);
|
||||
|
||||
|
||||
// Override remote hub thumbnails storage settings
|
||||
if(! boolval(get_config('system','filesystem_storage_thumbnails', 0))) {
|
||||
$p['os_storage'] = 0;
|
||||
@@ -1488,12 +1488,12 @@ function sync_files($channel, $files) {
|
||||
create_table_from_array('photo',$p, [ 'content' ] );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Set xchan photo date to prevent thumbnails fetch for clones on profile update packet recieve
|
||||
if(isset($update_xchan)) {
|
||||
|
||||
|
||||
$x = q("UPDATE xchan SET xchan_photo_date = '%s' WHERE xchan_hash = '%s'",
|
||||
dbescdate($update_xchan),
|
||||
dbesc($channel['channel_hash'])
|
||||
@@ -1522,13 +1522,13 @@ function sync_addressbook($channel, $data) {
|
||||
|
||||
if(! \Zotlabs\Lib\Apps::system_app_installed($channel['channel_id'], 'CardDAV'))
|
||||
return;
|
||||
|
||||
|
||||
logger("debug: " . print_r($data,true), LOGGER_DEBUG);
|
||||
|
||||
require_once('include/cdav.php');
|
||||
|
||||
$principalUri = 'principals/' . $channel['channel_address'];
|
||||
|
||||
|
||||
if($data['action'] !== 'create') {
|
||||
$id = get_cdav_id($principalUri, $data['uri'], 'addressbooks');
|
||||
if(! $id)
|
||||
@@ -1630,7 +1630,7 @@ function sync_calendar($channel, $data) {
|
||||
break;
|
||||
|
||||
case 'update_card':
|
||||
$caldavBackend->updateCalendarObject($id, $data['carduri'], $data['card']);
|
||||
$caldavBackend->updateCalendarObject($id, $data['carduri'], $data['card']);
|
||||
break;
|
||||
|
||||
case 'switch':
|
||||
|
||||
@@ -2502,7 +2502,7 @@ function item_update_parent_commented($item) {
|
||||
);
|
||||
|
||||
q("UPDATE item set commented = '%s', changed = '%s' WHERE id = %d",
|
||||
dbesc(($z) ? $z[0]['commented'] : datetime_convert()),
|
||||
dbesc(($z[0]['commented']) ? $z[0]['commented'] : datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
intval($item['parent'])
|
||||
);
|
||||
@@ -3179,8 +3179,18 @@ function start_delivery_chain($channel, $item, $item_id, $parent, $group = false
|
||||
if($rewrite_author) {
|
||||
$item['author_xchan'] = $channel['channel_hash'];
|
||||
|
||||
$r = q("update item set author_xchan = '%s' where id = %d",
|
||||
//if it's a toplevel rss item we will also rewrite the mid to something fetchable
|
||||
if($item['item_rss'] && $item['item_thread_top']) {
|
||||
$item['mid'] = z_root() . '/item/' . $item['uuid'];
|
||||
$item['parent_mid'] = $item['mid'];
|
||||
$item['thr_parent'] = $item['mid'];
|
||||
}
|
||||
|
||||
$r = q("UPDATE item SET author_xchan = '%s', mid = '%s', parent_mid = '%s', thr_parent = '%s' WHERE id = %d",
|
||||
dbesc($item['author_xchan']),
|
||||
dbesc($item['mid']),
|
||||
dbesc($item['parent_mid']),
|
||||
dbesc($item['thr_parent']),
|
||||
intval($item_id)
|
||||
);
|
||||
}
|
||||
@@ -3235,7 +3245,6 @@ function start_delivery_chain($channel, $item, $item_id, $parent, $group = false
|
||||
|
||||
$arr['item_origin'] = 1;
|
||||
$arr['item_wall'] = 1;
|
||||
|
||||
$arr['item_thread_top'] = 1;
|
||||
|
||||
if (strpos($item['body'], "[/share]") !== false) {
|
||||
@@ -3299,7 +3308,7 @@ function start_delivery_chain($channel, $item, $item_id, $parent, $group = false
|
||||
$private = 1;
|
||||
|
||||
$item_wall = 1;
|
||||
$item_origin = 1;
|
||||
$item_origin = (($item['item_deleted']) ? 0 : 1); // item_origin for deleted items is set to 0 in delete_imported_item() to prevent looping. In this case we probably should not set it back to 1 here.
|
||||
$item_uplink = 0;
|
||||
$item_nocomment = 0;
|
||||
|
||||
@@ -3315,7 +3324,7 @@ function start_delivery_chain($channel, $item, $item_id, $parent, $group = false
|
||||
);
|
||||
}
|
||||
else {
|
||||
$item_uplink = 1;
|
||||
$item_uplink = (($item['item_rss']) ? 0 : 1); // Do not set item_uplink for rss items - we can not send anything to them.
|
||||
|
||||
// if this is an edit, item_store_update() will have already updated the item
|
||||
// with the correct value for source_xchan (by ignoring it). We cannot set to owner_xchan
|
||||
@@ -4063,11 +4072,6 @@ function delete_item_lowlevel($item, $stage = DROPITEM_NORMAL) {
|
||||
if($stage == DROPITEM_PHASE1)
|
||||
return true;
|
||||
|
||||
$r = q("delete from term where otype = %d and oid = %d",
|
||||
intval(TERM_OBJ_POST),
|
||||
intval($item['id'])
|
||||
);
|
||||
|
||||
q("delete from iconfig where iid = %d",
|
||||
intval($item['id'])
|
||||
);
|
||||
|
||||
@@ -271,6 +271,7 @@ function suggestion_query($uid, $myxchan, $start = 0, $limit = 80) {
|
||||
and xchan_hidden = 0
|
||||
and xchan_deleted = 0
|
||||
and xlink_static = 0
|
||||
and xchan_network = 'zot6'
|
||||
group by xchan_hash order by total desc limit %d offset %d ",
|
||||
intval($uid),
|
||||
intval($uid),
|
||||
@@ -290,6 +291,7 @@ function suggestion_query($uid, $myxchan, $start = 0, $limit = 80) {
|
||||
and xchan_hidden = 0
|
||||
and xchan_deleted = 0
|
||||
and xlink_static = 0
|
||||
and xchan_network = 'zot6'
|
||||
group by xchan_hash order by total desc limit %d offset %d ",
|
||||
intval($uid),
|
||||
intval($uid),
|
||||
|
||||
@@ -1667,7 +1667,7 @@ function format_filer(&$item) {
|
||||
if(! trim($term))
|
||||
continue;
|
||||
$removelink = z_root() . '/filerm/' . $item['id'] . '?f=&term=' . urlencode($t['term']);
|
||||
$categories[] = array('term' => $term, 'removelink' => $removelink);
|
||||
$categories[] = array('term' => $term, 'removelink' => $removelink, 'id' => $item['id']);
|
||||
}
|
||||
|
||||
$s = replace_macros(get_markup_template('item_filer.tpl'),array(
|
||||
|
||||
@@ -1,49 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.5/phpunit.xsd"
|
||||
bootstrap="../boot.php"
|
||||
forceCoversAnnotation="false"
|
||||
beStrictAboutCoversAnnotation="true"
|
||||
beStrictAboutOutputDuringTests="true"
|
||||
beStrictAboutTodoAnnotatedTests="true"
|
||||
verbose="true">
|
||||
<testsuites>
|
||||
<testsuite name="Hubzilla default Test Suite">
|
||||
<directory suffix="Test.php">./unit/</directory>
|
||||
</testsuite>
|
||||
<testsuite name="API Test Suite">
|
||||
<directory suffix="Test.php" prefix="API">./unit/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<groups>
|
||||
<exclude>
|
||||
<group>mysql</group>
|
||||
</exclude>
|
||||
</groups>
|
||||
<!--coverage reporting-->
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">../Zotlabs/</directory>
|
||||
<directory suffix=".php">../include/</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<logging>
|
||||
<log type="junit" target="./results/junit.xml"/>
|
||||
<!--<log type="coverage-clover" target="./results/coverage-clover.xml"/>-->
|
||||
<log type="coverage-html" target="./results/coverage-report/" lowUpperBound="35"
|
||||
highLowerBound="70"/>
|
||||
<!--<log type="testdox-text" target="./results/testdox.txt"/>-->
|
||||
<log type="testdox-html" target="./results/testdox.html"/>
|
||||
</logging>
|
||||
<php>
|
||||
<!-- Default test database config, only used if no environment variables
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="../boot.php" forceCoversAnnotation="false" beStrictAboutCoversAnnotation="true" beStrictAboutOutputDuringTests="true" beStrictAboutTodoAnnotatedTests="true" verbose="true">
|
||||
<coverage processUncoveredFiles="true">
|
||||
<include>
|
||||
<directory suffix=".php">../Zotlabs/</directory>
|
||||
<directory suffix=".php">../include/</directory>
|
||||
</include>
|
||||
<report>
|
||||
<html outputDirectory="./results/coverage-report/" lowUpperBound="35" highLowerBound="70"/>
|
||||
</report>
|
||||
</coverage>
|
||||
<testsuites>
|
||||
<testsuite name="Hubzilla default Test Suite">
|
||||
<directory suffix="Test.php">./unit/</directory>
|
||||
</testsuite>
|
||||
<testsuite name="API Test Suite">
|
||||
<directory suffix="Test.php" prefix="API">./unit/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<groups>
|
||||
<exclude>
|
||||
<group>mysql</group>
|
||||
</exclude>
|
||||
</groups>
|
||||
<!--coverage reporting-->
|
||||
<logging>
|
||||
<junit outputFile="./results/junit.xml"/>
|
||||
<!--<log type="coverage-clover" target="./results/coverage-clover.xml"/>-->
|
||||
<!--<log type="testdox-text" target="./results/testdox.txt"/>-->
|
||||
<testdoxHtml outputFile="./results/testdox.html"/>
|
||||
</logging>
|
||||
<php>
|
||||
<!-- Default test database config, only used if no environment variables
|
||||
with same names are set.
|
||||
!!! Never run against a real database, it will truncate all tables -->
|
||||
<env name="hz_db_server" value="postgres"/>
|
||||
<env name="hz_db_scheme" value="pgsql"/>
|
||||
<env name="hz_db_port" value="5432"/>
|
||||
<env name="hz_db_user" value="ci-user"/>
|
||||
<env name="hz_db_pass" value="ci-pass"/>
|
||||
<env name="hz_db_database" value="ci-db"/>
|
||||
</php>
|
||||
<env name="hz_db_server" value="postgres"/>
|
||||
<env name="hz_db_scheme" value="pgsql"/>
|
||||
<env name="hz_db_port" value="5432"/>
|
||||
<env name="hz_db_user" value="ci-user"/>
|
||||
<env name="hz_db_pass" value="ci-pass"/>
|
||||
<env name="hz_db_database" value="ci-db"/>
|
||||
</php>
|
||||
</phpunit>
|
||||
|
||||
@@ -1,42 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<phpunit bootstrap="../boot.php" colors="true">
|
||||
<php>
|
||||
<var name="db_dsn" value="mysql:dbname=gitlab_ci_hubzilla;host=mysql"/>
|
||||
<var name="db_username" value="root"/>
|
||||
<var name="db_password" value="mysql"/>
|
||||
|
||||
<env name="hz_db_server" value="mysql"/>
|
||||
<env name="hz_db_scheme" value="mysql"/>
|
||||
<env name="hz_db_port" value=""/>
|
||||
<env name="hz_db_user" value="root"/>
|
||||
<env name="hz_db_pass" value="mysql"/>
|
||||
<env name="hz_db_database" value="hello_world_test"/>
|
||||
</php>
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="Hubzilla default Test Suite">
|
||||
<directory suffix="Test.php">./unit/</directory>
|
||||
</testsuite>
|
||||
<testsuite name="API Test Suite">
|
||||
<directory suffix="Test.php" prefix="API">./unit/</directory>
|
||||
</testsuite>
|
||||
<testsuite name="Ex-/Import Test Suite">
|
||||
<!--<directory suffix="Test.php">./unit/eximport/</directory>-->
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<groups>
|
||||
<exclude>
|
||||
<group>postgresql</group>
|
||||
</exclude>
|
||||
</groups>
|
||||
<!--cover reporting-->
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">../Zotlabs/</directory>
|
||||
<directory suffix=".php">../include/</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="../boot.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
|
||||
<coverage processUncoveredFiles="false" includeUncoveredFiles="false">
|
||||
<include>
|
||||
<directory suffix=".php">../Zotlabs/</directory>
|
||||
<directory suffix=".php">../include/</directory>
|
||||
</include>
|
||||
</coverage>
|
||||
<php>
|
||||
<var name="db_dsn" value="mysql:dbname=gitlab_ci_hubzilla;host=mysql"/>
|
||||
<var name="db_username" value="root"/>
|
||||
<var name="db_password" value="mysql"/>
|
||||
<env name="hz_db_server" value="mysql"/>
|
||||
<env name="hz_db_scheme" value="mysql"/>
|
||||
<env name="hz_db_port" value=""/>
|
||||
<env name="hz_db_user" value="root"/>
|
||||
<env name="hz_db_pass" value="mysql"/>
|
||||
<env name="hz_db_database" value="hello_world_test"/>
|
||||
</php>
|
||||
<testsuites>
|
||||
<testsuite name="Hubzilla default Test Suite">
|
||||
<directory suffix="Test.php">./unit/</directory>
|
||||
</testsuite>
|
||||
<testsuite name="API Test Suite">
|
||||
<directory suffix="Test.php" prefix="API">./unit/</directory>
|
||||
</testsuite>
|
||||
<testsuite name="Ex-/Import Test Suite">
|
||||
<!--<directory suffix="Test.php">./Unit/eximport/</directory>-->
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<groups>
|
||||
<exclude>
|
||||
<group>postgresql</group>
|
||||
</exclude>
|
||||
</groups>
|
||||
<!--cover reporting-->
|
||||
</phpunit>
|
||||
|
||||
|
||||
@@ -63,11 +63,12 @@ class AccessListTest extends UnitTestCase {
|
||||
/**
|
||||
* @expectedException PHPUnit\Framework\Error\Error
|
||||
*/
|
||||
/*
|
||||
public function testPHPErrorOnInvalidConstructor() {
|
||||
$accessList = new AccessList('invalid');
|
||||
// Causes: "Illegal string offset 'channel_allow_cid'"
|
||||
}
|
||||
|
||||
*/
|
||||
public function testDefaultGetExplicit() {
|
||||
$accessList = new AccessList([]);
|
||||
|
||||
@@ -112,12 +113,14 @@ class AccessListTest extends UnitTestCase {
|
||||
/**
|
||||
* @expectedException PHPUnit\Framework\Error\Error
|
||||
*/
|
||||
/*
|
||||
public function testPHPErrorOnInvalidSet() {
|
||||
$accessList = new AccessList([]);
|
||||
|
||||
$accessList->set('invalid');
|
||||
// Causes: "Illegal string offset 'allow_cid'"
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* set_from_array() calls some other functions, too which are not yet unit tested.
|
||||
@@ -188,4 +191,4 @@ class AccessListTest extends UnitTestCase {
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace Zotlabs\Tests\Unit\Access;
|
||||
use Zotlabs\Tests\Unit\UnitTestCase;
|
||||
use Zotlabs\Access\PermissionRoles;
|
||||
use phpmock\phpunit\PHPMock;
|
||||
use DMS\PHPUnitExtensions\ArraySubset\Assert;
|
||||
|
||||
/**
|
||||
* @brief Unit Test case for PermissionRoles class.
|
||||
@@ -68,7 +69,7 @@ class PermissionRolesTest extends UnitTestCase {
|
||||
'social_private' => 'Social - Private'
|
||||
];
|
||||
|
||||
$this->assertArraySubset(['Social Networking' => $socialNetworking], $roles);
|
||||
Assert::assertArraySubset(['Social Networking' => $socialNetworking], $roles);
|
||||
$this->assertEquals($socialNetworking, $roles['Social Networking']);
|
||||
|
||||
$this->assertCount(5, $roles, 'There should be 5 permission groups.');
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (c) 2017 Hubzilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
namespace Zotlabs\Tests\Unit;
|
||||
|
||||
use PHPUnit\DbUnit\TestCaseTrait;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @brief Base class for our Database Unit Tests.
|
||||
*
|
||||
* @warning Never run these tests against a production database, because all
|
||||
* tables will get truncated and there is no way to recover without a backup.
|
||||
*
|
||||
* @author Klaus Weidenbach
|
||||
*/
|
||||
abstract class DatabaseTestCase extends TestCase {
|
||||
|
||||
use TestCaseTrait;
|
||||
|
||||
/**
|
||||
* Only instantiate PDO once for test clean-up/fixture load.
|
||||
*
|
||||
* @var \PDO
|
||||
*/
|
||||
static private $pdo = null;
|
||||
|
||||
/**
|
||||
* Only instantiate \PHPUnit\DbUnit\Database\Connection once per test.
|
||||
*
|
||||
* @var \PHPUnit\DbUnit\Database\Connection
|
||||
*/
|
||||
private $conn = null;
|
||||
|
||||
|
||||
final public function getConnection() {
|
||||
if ($this->conn === null) {
|
||||
if (self::$pdo === null) {
|
||||
$dsn = \getenv('hz_db_scheme') . ':host=' . \getenv('hz_db_server')
|
||||
. ';port=' . \getenv('hz_db_port') . ';dbname=' . \getenv('hz_db_database');
|
||||
|
||||
self::$pdo = new \PDO($dsn, \getenv('hz_db_user'), \getenv('hz_db_pass'));
|
||||
}
|
||||
$this->conn = $this->createDefaultDBConnection(self::$pdo, \getenv('hz_db_database'));
|
||||
}
|
||||
|
||||
return $this->conn;
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ use Zotlabs\Web\HTTPSig;
|
||||
*
|
||||
* @covers Zotlabs\Web\HTTPSig
|
||||
*/
|
||||
class PermissionDescriptionTest extends UnitTestCase {
|
||||
class HttpSigTest extends UnitTestCase {
|
||||
|
||||
use PHPMock;
|
||||
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (c) 2017 Hubzilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
namespace Zotlabs\Tests\Unit\includes;
|
||||
|
||||
use Zotlabs\Tests\Unit\UnitTestCase;
|
||||
|
||||
// required because of process isolation and no autoloading
|
||||
require_once 'include/dba/dba_driver.php';
|
||||
|
||||
/**
|
||||
* @brief Unit Test case for include/dba/DBA.php file.
|
||||
*
|
||||
* This test needs process isolation because of static \DBA.
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class DBATest extends UnitTestCase {
|
||||
|
||||
public function testDbaFactoryMysql() {
|
||||
$this->assertNull(\DBA::$dba);
|
||||
|
||||
$ret = \DBA::dba_factory('server', 'port', 'user', 'pass', 'db', '0');
|
||||
$this->assertInstanceOf('dba_pdo', $ret);
|
||||
$this->assertFalse($ret->connected);
|
||||
|
||||
$this->assertSame('mysql', \DBA::$scheme);
|
||||
$this->assertSame('schema_mysql.sql', \DBA::$install_script);
|
||||
$this->assertSame('0001-01-01 00:00:00', \DBA::$null_date);
|
||||
$this->assertSame('UTC_TIMESTAMP()', \DBA::$utc_now);
|
||||
$this->assertSame('`', \DBA::$tquot);
|
||||
}
|
||||
|
||||
public function testDbaFactoryPostgresql() {
|
||||
$this->assertNull(\DBA::$dba);
|
||||
|
||||
$ret = \DBA::dba_factory('server', 'port', 'user', 'pass', 'db', '1');
|
||||
$this->assertInstanceOf('dba_pdo', $ret);
|
||||
$this->assertFalse($ret->connected);
|
||||
|
||||
$this->assertSame('pgsql', \DBA::$scheme);
|
||||
$this->assertSame('schema_postgres.sql', \DBA::$install_script);
|
||||
$this->assertSame('0001-01-01 00:00:00', \DBA::$null_date);
|
||||
$this->assertSame("now() at time zone 'UTC'", \DBA::$utc_now);
|
||||
$this->assertSame('"', \DBA::$tquot);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,189 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (c) 2017 Hubzilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
namespace Zotlabs\Tests\Unit\includes;
|
||||
|
||||
use Zotlabs\Tests\Unit\DatabaseTestCase;
|
||||
use PHPUnit\DbUnit\TestCaseTrait;
|
||||
use PHPUnit\DbUnit\DataSet\YamlDataSet;
|
||||
|
||||
require_once 'include/dba/dba_pdo.php';
|
||||
|
||||
/**
|
||||
* @brief Unit Test case for include/dba/dba_pdo.php file.
|
||||
*
|
||||
* Some very basic tests to see if our database layer can connect to a real
|
||||
* database.
|
||||
*/
|
||||
class dba_pdoTest extends DatabaseTestCase {
|
||||
|
||||
use TestCaseTrait;
|
||||
|
||||
/**
|
||||
* @var \dba_driver
|
||||
*/
|
||||
protected $dba;
|
||||
|
||||
|
||||
/**
|
||||
* Set initial state of the database before each test is executed.
|
||||
* Load database fixtures.
|
||||
*
|
||||
* @return \PHPUnit\DbUnit\DataSet\IDataSet
|
||||
*/
|
||||
public function getDataSet() {
|
||||
return new YamlDataSet(dirname(__FILE__) . '/_files/account.yml');
|
||||
}
|
||||
|
||||
protected function setUp(): void {
|
||||
// Will invoke getDataSet() to load fixtures into DB
|
||||
parent::setUp();
|
||||
|
||||
$this->dba = new \dba_pdo(
|
||||
\getenv('hz_db_server'),
|
||||
\getenv('hz_db_scheme'),
|
||||
\getenv('hz_db_port'),
|
||||
\getenv('hz_db_user'),
|
||||
\getenv('hz_db_pass'),
|
||||
\getenv('hz_db_database')
|
||||
);
|
||||
}
|
||||
protected function assertPreConditions() {
|
||||
$this->assertSame('pdo', $this->dba->getdriver(), "Driver is expected to be 'pdo'.");
|
||||
$this->assertInstanceOf('dba_driver', $this->dba);
|
||||
$this->assertTrue($this->dba->connected, 'Pre condition failed, DB is not connected.');
|
||||
$this->assertInstanceOf('PDO', $this->dba->db);
|
||||
}
|
||||
protected function tearDown(): void {
|
||||
$this->dba = null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @group mysql
|
||||
*/
|
||||
public function testQuoteintervalOnMysql() {
|
||||
$this->assertSame('value', $this->dba->quote_interval('value'));
|
||||
}
|
||||
/**
|
||||
* @group postgresql
|
||||
*/
|
||||
public function testQuoteintervalOnPostgresql() {
|
||||
$this->assertSame("'value'", $this->dba->quote_interval('value'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @group mysql
|
||||
*/
|
||||
public function testGenerateMysqlConcatSql() {
|
||||
$this->assertSame('GROUP_CONCAT(DISTINCT field SEPARATOR \';\')', $this->dba->concat('field', ';'));
|
||||
$this->assertSame('GROUP_CONCAT(DISTINCT field2 SEPARATOR \' \')', $this->dba->concat('field2', ' '));
|
||||
}
|
||||
/**
|
||||
* @group postgresql
|
||||
*/
|
||||
public function testGeneratePostgresqlConcatSql() {
|
||||
$this->assertSame('string_agg(field,\';\')', $this->dba->concat('field', ';'));
|
||||
$this->assertSame('string_agg(field2,\' \')', $this->dba->concat('field2', ' '));
|
||||
}
|
||||
|
||||
|
||||
public function testConnectToSqlServer() {
|
||||
// connect() is done in dba_pdo constructor which is called in setUp()
|
||||
$this->assertTrue($this->dba->connected);
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testConnectToSqlServer
|
||||
*/
|
||||
public function testCloseSqlServerConnection() {
|
||||
$this->dba->close();
|
||||
|
||||
$this->assertNull($this->dba->db);
|
||||
$this->assertFalse($this->dba->connected);
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testConnectToSqlServer
|
||||
*/
|
||||
public function testSelectQueryShouldReturnArray() {
|
||||
$ret = $this->dba->q('SELECT * FROM account');
|
||||
|
||||
$this->assertTrue(is_array($ret));
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testConnectToSqlServer
|
||||
*/
|
||||
public function testInsertQueryShouldReturnPdostatement() {
|
||||
// Fixture account.yml adds two entries to account table
|
||||
$this->assertEquals(2, $this->getConnection()->getRowCount('account'), 'Pre-Condition');
|
||||
|
||||
$ret = $this->dba->q('INSERT INTO account
|
||||
(account_id, account_email, account_language)
|
||||
VALUES (100, \'insert@example.com\', \'de\')
|
||||
');
|
||||
$this->assertInstanceOf('PDOStatement', $ret);
|
||||
|
||||
$this->assertEquals(3, $this->getConnection()->getRowCount('account'), 'Inserting failed');
|
||||
}
|
||||
|
||||
|
||||
public function testConnectToWrongSqlServer() {
|
||||
$nodba = new \dba_pdo('wrongserver',
|
||||
\getenv('hz_db_scheme'), \getenv('hz_db_port'),
|
||||
\getenv('hz_db_user'), \getenv('hz_db_pass'),
|
||||
\getenv('hz_db_database')
|
||||
);
|
||||
|
||||
$this->assertSame('pdo', $nodba->getdriver());
|
||||
$this->assertInstanceOf('dba_pdo', $nodba);
|
||||
$this->assertFalse($nodba->connected);
|
||||
$this->assertNull($nodba->db);
|
||||
|
||||
$this->assertFalse($nodba->q('SELECT * FROM account'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testConnectToSqlServer
|
||||
*/
|
||||
public function testSelectQueryToNonExistentTableShouldReturnFalse() {
|
||||
$ret = $this->dba->q('SELECT * FROM non_existent_table');
|
||||
|
||||
$this->assertFalse($ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testConnectToSqlServer
|
||||
*/
|
||||
public function testInsertQueryToNonExistentTableShouldReturnEmptyArray() {
|
||||
$ret = $this->dba->q('INSERT INTO non_existent_table
|
||||
(account_email, account_language)
|
||||
VALUES (\'email@example.com\', \'en\')
|
||||
');
|
||||
|
||||
$this->assertNotInstanceOf('PDOStatement', $ret);
|
||||
$this->isEmpty($ret);
|
||||
}
|
||||
|
||||
}
|
||||
4
vendor/composer/ClassLoader.php
vendored
4
vendor/composer/ClassLoader.php
vendored
@@ -37,8 +37,8 @@ namespace Composer\Autoload;
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
* @see http://www.php-fig.org/psr/psr-0/
|
||||
* @see http://www.php-fig.org/psr/psr-4/
|
||||
* @see https://www.php-fig.org/psr/psr-0/
|
||||
* @see https://www.php-fig.org/psr/psr-4/
|
||||
*/
|
||||
class ClassLoader
|
||||
{
|
||||
|
||||
421
vendor/composer/InstalledVersions.php
vendored
Normal file
421
vendor/composer/InstalledVersions.php
vendored
Normal file
@@ -0,0 +1,421 @@
|
||||
<?php
|
||||
|
||||
namespace Composer;
|
||||
|
||||
use Composer\Semver\VersionParser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class InstalledVersions
|
||||
{
|
||||
private static $installed = array (
|
||||
'root' =>
|
||||
array (
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '188975ccbd3a9c584238c35dd8c5a8fda7718199',
|
||||
'name' => 'zotlabs/hubzilla',
|
||||
),
|
||||
'versions' =>
|
||||
array (
|
||||
'blueimp/jquery-file-upload' =>
|
||||
array (
|
||||
'pretty_version' => 'v10.31.0',
|
||||
'version' => '10.31.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '0740f81829698b84efe17e72501e0f420ea0d611',
|
||||
),
|
||||
'bshaffer/oauth2-server-php' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.11.1',
|
||||
'version' => '1.11.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '5a0c8000d4763b276919e2106f54eddda6bc50fa',
|
||||
),
|
||||
'commerceguys/intl' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.0.6',
|
||||
'version' => '1.0.6.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '47d5d6d60d0cc25f867e337ce229a228bf6be6f8',
|
||||
),
|
||||
'desandro/imagesloaded' =>
|
||||
array (
|
||||
'pretty_version' => 'v4.1.4',
|
||||
'version' => '4.1.4.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '67c4e57453120935180c45c6820e7d3fbd2ea1f9',
|
||||
),
|
||||
'ezyang/htmlpurifier' =>
|
||||
array (
|
||||
'pretty_version' => 'v4.13.0',
|
||||
'version' => '4.13.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '08e27c97e4c6ed02f37c5b2b20488046c8d90d75',
|
||||
),
|
||||
'league/html-to-markdown' =>
|
||||
array (
|
||||
'pretty_version' => '4.10.0',
|
||||
'version' => '4.10.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '0868ae7a552e809e5cd8f93ba022071640408e88',
|
||||
),
|
||||
'lukasreschke/id3parser' =>
|
||||
array (
|
||||
'pretty_version' => 'v0.0.3',
|
||||
'version' => '0.0.3.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '62f4de76d4eaa9ea13c66dacc1f22977dace6638',
|
||||
),
|
||||
'michelf/php-markdown' =>
|
||||
array (
|
||||
'pretty_version' => '1.9.0',
|
||||
'version' => '1.9.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'c83178d49e372ca967d1a8c77ae4e051b3a3c75c',
|
||||
),
|
||||
'paragonie/random_compat' =>
|
||||
array (
|
||||
'pretty_version' => 'v9.99.99',
|
||||
'version' => '9.99.99.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95',
|
||||
),
|
||||
'pear/text_languagedetect' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.0.0',
|
||||
'version' => '1.0.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'bb9ff6f4970f686fac59081e916b456021fe7ba6',
|
||||
),
|
||||
'psr/log' =>
|
||||
array (
|
||||
'pretty_version' => '1.1.3',
|
||||
'version' => '1.1.3.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '0f73288fd15629204f9d42b7055f72dacbe811fc',
|
||||
),
|
||||
'ramsey/uuid' =>
|
||||
array (
|
||||
'pretty_version' => '3.9.3',
|
||||
'version' => '3.9.3.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '7e1633a6964b48589b142d60542f9ed31bd37a92',
|
||||
),
|
||||
'rhumsaa/uuid' =>
|
||||
array (
|
||||
'replaced' =>
|
||||
array (
|
||||
0 => '3.9.3',
|
||||
),
|
||||
),
|
||||
'sabre/dav' =>
|
||||
array (
|
||||
'pretty_version' => '4.1.1',
|
||||
'version' => '4.1.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '5736f943c90d8d73d04cd8944d8c913811dc7360',
|
||||
),
|
||||
'sabre/event' =>
|
||||
array (
|
||||
'pretty_version' => '5.1.0',
|
||||
'version' => '5.1.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'd00a17507af0e7544cfe17096372f5d733e3b276',
|
||||
),
|
||||
'sabre/http' =>
|
||||
array (
|
||||
'pretty_version' => '5.1.0',
|
||||
'version' => '5.1.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '23446999f1f6e62892bbd89745070aa902dd3539',
|
||||
),
|
||||
'sabre/uri' =>
|
||||
array (
|
||||
'pretty_version' => '2.2.0',
|
||||
'version' => '2.2.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '059d11012603be2e32ddb7543602965563ddbb09',
|
||||
),
|
||||
'sabre/vobject' =>
|
||||
array (
|
||||
'pretty_version' => '4.3.1',
|
||||
'version' => '4.3.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'a7feca8311462e5da16952454e420b92c20d3586',
|
||||
),
|
||||
'sabre/xml' =>
|
||||
array (
|
||||
'pretty_version' => '2.2.1',
|
||||
'version' => '2.2.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '41c6ba148966b10cafd31d1a4e5feb1e2138d95c',
|
||||
),
|
||||
'simplepie/simplepie' =>
|
||||
array (
|
||||
'pretty_version' => '1.5.5',
|
||||
'version' => '1.5.5.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'ae49e2201b6da9c808e5dac437aca356a11831b4',
|
||||
),
|
||||
'smarty/smarty' =>
|
||||
array (
|
||||
'pretty_version' => 'v3.1.36',
|
||||
'version' => '3.1.36.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'fd148f7ade295014fff77f89ee3d5b20d9d55451',
|
||||
),
|
||||
'symfony/polyfill-ctype' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.20.0',
|
||||
'version' => '1.20.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'f4ba089a5b6366e453971d3aad5fe8e897b37f41',
|
||||
),
|
||||
'twbs/bootstrap' =>
|
||||
array (
|
||||
'pretty_version' => 'v4.5.2',
|
||||
'version' => '4.5.2.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '5f2480a90ab911babc53039835fe78c6fc12646d',
|
||||
),
|
||||
'twitter/bootstrap' =>
|
||||
array (
|
||||
'replaced' =>
|
||||
array (
|
||||
0 => 'v4.5.2',
|
||||
),
|
||||
),
|
||||
'zotlabs/hubzilla' =>
|
||||
array (
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '188975ccbd3a9c584238c35dd8c5a8fda7718199',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getInstalledPackages()
|
||||
{
|
||||
return array_keys(self::$installed['versions']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function isInstalled($packageName)
|
||||
{
|
||||
return isset(self::$installed['versions'][$packageName]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
||||
{
|
||||
$constraint = $parser->parseConstraints($constraint);
|
||||
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
||||
|
||||
return $provided->matches($constraint);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getVersionRanges($packageName)
|
||||
{
|
||||
if (!isset(self::$installed['versions'][$packageName])) {
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
$ranges = array();
|
||||
if (isset(self::$installed['versions'][$packageName]['pretty_version'])) {
|
||||
$ranges[] = self::$installed['versions'][$packageName]['pretty_version'];
|
||||
}
|
||||
if (array_key_exists('aliases', self::$installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']);
|
||||
}
|
||||
if (array_key_exists('replaced', self::$installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']);
|
||||
}
|
||||
if (array_key_exists('provided', self::$installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']);
|
||||
}
|
||||
|
||||
return implode(' || ', $ranges);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getVersion($packageName)
|
||||
{
|
||||
if (!isset(self::$installed['versions'][$packageName])) {
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
if (!isset(self::$installed['versions'][$packageName]['version'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return self::$installed['versions'][$packageName]['version'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getPrettyVersion($packageName)
|
||||
{
|
||||
if (!isset(self::$installed['versions'][$packageName])) {
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return self::$installed['versions'][$packageName]['pretty_version'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getReference($packageName)
|
||||
{
|
||||
if (!isset(self::$installed['versions'][$packageName])) {
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
if (!isset(self::$installed['versions'][$packageName]['reference'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return self::$installed['versions'][$packageName]['reference'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getRootPackage()
|
||||
{
|
||||
return self::$installed['root'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getRawData()
|
||||
{
|
||||
return self::$installed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function reload($data)
|
||||
{
|
||||
self::$installed = $data;
|
||||
}
|
||||
}
|
||||
12
vendor/composer/autoload_classmap.php
vendored
12
vendor/composer/autoload_classmap.php
vendored
@@ -28,6 +28,7 @@ return array(
|
||||
'CommerceGuys\\Intl\\NumberFormat\\NumberFormat' => $vendorDir . '/commerceguys/intl/src/NumberFormat/NumberFormat.php',
|
||||
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatRepository' => $vendorDir . '/commerceguys/intl/src/NumberFormat/NumberFormatRepository.php',
|
||||
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatRepositoryInterface' => $vendorDir . '/commerceguys/intl/src/NumberFormat/NumberFormatRepositoryInterface.php',
|
||||
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
||||
'HTMLPurifier' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.php',
|
||||
'HTMLPurifier_Arborize' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Arborize.php',
|
||||
'HTMLPurifier_AttrCollections' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php',
|
||||
@@ -206,9 +207,6 @@ return array(
|
||||
'HTMLPurifier_Printer' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer.php',
|
||||
'HTMLPurifier_Printer_CSSDefinition' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/CSSDefinition.php',
|
||||
'HTMLPurifier_Printer_ConfigForm' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
|
||||
'HTMLPurifier_Printer_ConfigForm_NullDecorator' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
|
||||
'HTMLPurifier_Printer_ConfigForm_bool' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
|
||||
'HTMLPurifier_Printer_ConfigForm_default' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
|
||||
'HTMLPurifier_Printer_HTMLDefinition' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php',
|
||||
'HTMLPurifier_PropertyList' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/PropertyList.php',
|
||||
'HTMLPurifier_PropertyListIterator' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php',
|
||||
@@ -264,7 +262,6 @@ return array(
|
||||
'ID3Parser\\ID3Parser' => $vendorDir . '/lukasreschke/id3parser/src/ID3Parser.php',
|
||||
'ID3Parser\\getID3\\Tags\\getid3_id3v1' => $vendorDir . '/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v1.php',
|
||||
'ID3Parser\\getID3\\Tags\\getid3_id3v2' => $vendorDir . '/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php',
|
||||
'ID3Parser\\getID3\\getID3' => $vendorDir . '/lukasreschke/id3parser/src/getID3/getid3.php',
|
||||
'ID3Parser\\getID3\\getid3_exception' => $vendorDir . '/lukasreschke/id3parser/src/getID3/getid3_exception.php',
|
||||
'ID3Parser\\getID3\\getid3_handler' => $vendorDir . '/lukasreschke/id3parser/src/getID3/getid3_handler.php',
|
||||
'ID3Parser\\getID3\\getid3_lib' => $vendorDir . '/lukasreschke/id3parser/src/getID3/getid3_lib.php',
|
||||
@@ -1009,10 +1006,10 @@ return array(
|
||||
'Zotlabs\\Extend\\Hook' => $baseDir . '/Zotlabs/Extend/Hook.php',
|
||||
'Zotlabs\\Extend\\Route' => $baseDir . '/Zotlabs/Extend/Route.php',
|
||||
'Zotlabs\\Extend\\Widget' => $baseDir . '/Zotlabs/Extend/Widget.php',
|
||||
'Zotlabs\\Identity\\BasicId\\BasicId' => $baseDir . '/Zotlabs/Identity/BasicId.php',
|
||||
'Zotlabs\\Identity\\BasicId' => $baseDir . '/Zotlabs/Identity/BasicId.php',
|
||||
'Zotlabs\\Identity\\OAuth2Server' => $baseDir . '/Zotlabs/Identity/OAuth2Server.php',
|
||||
'Zotlabs\\Identity\\OAuth2Storage' => $baseDir . '/Zotlabs/Identity/OAuth2Storage.php',
|
||||
'Zotlabs\\Identity\\ProfilePhoto\\ProfilePhoto' => $baseDir . '/Zotlabs/Identity/ProfilePhoto.php',
|
||||
'Zotlabs\\Identity\\ProfilePhoto' => $baseDir . '/Zotlabs/Identity/ProfilePhoto.php',
|
||||
'Zotlabs\\Lib\\AConfig' => $baseDir . '/Zotlabs/Lib/AConfig.php',
|
||||
'Zotlabs\\Lib\\AbConfig' => $baseDir . '/Zotlabs/Lib/AbConfig.php',
|
||||
'Zotlabs\\Lib\\AccessList' => $baseDir . '/Zotlabs/Lib/AccessList.php',
|
||||
@@ -1169,7 +1166,7 @@ return array(
|
||||
'Zotlabs\\Module\\Notes' => $baseDir . '/Zotlabs/Module/Notes.php',
|
||||
'Zotlabs\\Module\\Notifications' => $baseDir . '/Zotlabs/Module/Notifications.php',
|
||||
'Zotlabs\\Module\\Notify' => $baseDir . '/Zotlabs/Module/Notify.php',
|
||||
'Zotlabs\\Module\\OAuth2TestVehicle' => $baseDir . '/Zotlabs/Module/Oauth2testvehicle.php',
|
||||
'Zotlabs\\Module\\OAuth2TestVehicle' => $baseDir . '/Zotlabs/Module/OAuth2TestVehicle.php',
|
||||
'Zotlabs\\Module\\Oauth' => $baseDir . '/Zotlabs/Module/Oauth.php',
|
||||
'Zotlabs\\Module\\Oauth2' => $baseDir . '/Zotlabs/Module/Oauth2.php',
|
||||
'Zotlabs\\Module\\Oauthinfo' => $baseDir . '/Zotlabs/Module/Oauthinfo.php',
|
||||
@@ -1544,6 +1541,7 @@ return array(
|
||||
'Zotlabs\\Update\\_1236' => $baseDir . '/Zotlabs/Update/_1236.php',
|
||||
'Zotlabs\\Update\\_1237' => $baseDir . '/Zotlabs/Update/_1237.php',
|
||||
'Zotlabs\\Update\\_1238' => $baseDir . '/Zotlabs/Update/_1238.php',
|
||||
'Zotlabs\\Update\\_1239' => $baseDir . '/Zotlabs/Update/_1239.php',
|
||||
'Zotlabs\\Web\\Controller' => $baseDir . '/Zotlabs/Web/Controller.php',
|
||||
'Zotlabs\\Web\\HTTPHeaders' => $baseDir . '/Zotlabs/Web/HTTPHeaders.php',
|
||||
'Zotlabs\\Web\\HTTPSig' => $baseDir . '/Zotlabs/Web/HTTPSig.php',
|
||||
|
||||
4
vendor/composer/autoload_real.php
vendored
4
vendor/composer/autoload_real.php
vendored
@@ -22,6 +22,8 @@ class ComposerAutoloaderInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
require __DIR__ . '/platform_check.php';
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit7b34d7e50a62201ec5d5e526a5b8b35d', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit7b34d7e50a62201ec5d5e526a5b8b35d', 'loadClassLoader'));
|
||||
@@ -32,7 +34,7 @@ class ComposerAutoloaderInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require_once __DIR__ . '/autoload_static.php';
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d::getInitializer($loader));
|
||||
} else {
|
||||
|
||||
12
vendor/composer/autoload_static.php
vendored
12
vendor/composer/autoload_static.php
vendored
@@ -196,6 +196,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||
'CommerceGuys\\Intl\\NumberFormat\\NumberFormat' => __DIR__ . '/..' . '/commerceguys/intl/src/NumberFormat/NumberFormat.php',
|
||||
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatRepository' => __DIR__ . '/..' . '/commerceguys/intl/src/NumberFormat/NumberFormatRepository.php',
|
||||
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatRepositoryInterface' => __DIR__ . '/..' . '/commerceguys/intl/src/NumberFormat/NumberFormatRepositoryInterface.php',
|
||||
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
||||
'HTMLPurifier' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.php',
|
||||
'HTMLPurifier_Arborize' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Arborize.php',
|
||||
'HTMLPurifier_AttrCollections' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php',
|
||||
@@ -374,9 +375,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||
'HTMLPurifier_Printer' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer.php',
|
||||
'HTMLPurifier_Printer_CSSDefinition' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/CSSDefinition.php',
|
||||
'HTMLPurifier_Printer_ConfigForm' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
|
||||
'HTMLPurifier_Printer_ConfigForm_NullDecorator' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
|
||||
'HTMLPurifier_Printer_ConfigForm_bool' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
|
||||
'HTMLPurifier_Printer_ConfigForm_default' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
|
||||
'HTMLPurifier_Printer_HTMLDefinition' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php',
|
||||
'HTMLPurifier_PropertyList' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/PropertyList.php',
|
||||
'HTMLPurifier_PropertyListIterator' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php',
|
||||
@@ -432,7 +430,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||
'ID3Parser\\ID3Parser' => __DIR__ . '/..' . '/lukasreschke/id3parser/src/ID3Parser.php',
|
||||
'ID3Parser\\getID3\\Tags\\getid3_id3v1' => __DIR__ . '/..' . '/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v1.php',
|
||||
'ID3Parser\\getID3\\Tags\\getid3_id3v2' => __DIR__ . '/..' . '/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php',
|
||||
'ID3Parser\\getID3\\getID3' => __DIR__ . '/..' . '/lukasreschke/id3parser/src/getID3/getid3.php',
|
||||
'ID3Parser\\getID3\\getid3_exception' => __DIR__ . '/..' . '/lukasreschke/id3parser/src/getID3/getid3_exception.php',
|
||||
'ID3Parser\\getID3\\getid3_handler' => __DIR__ . '/..' . '/lukasreschke/id3parser/src/getID3/getid3_handler.php',
|
||||
'ID3Parser\\getID3\\getid3_lib' => __DIR__ . '/..' . '/lukasreschke/id3parser/src/getID3/getid3_lib.php',
|
||||
@@ -1177,10 +1174,10 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||
'Zotlabs\\Extend\\Hook' => __DIR__ . '/../..' . '/Zotlabs/Extend/Hook.php',
|
||||
'Zotlabs\\Extend\\Route' => __DIR__ . '/../..' . '/Zotlabs/Extend/Route.php',
|
||||
'Zotlabs\\Extend\\Widget' => __DIR__ . '/../..' . '/Zotlabs/Extend/Widget.php',
|
||||
'Zotlabs\\Identity\\BasicId\\BasicId' => __DIR__ . '/../..' . '/Zotlabs/Identity/BasicId.php',
|
||||
'Zotlabs\\Identity\\BasicId' => __DIR__ . '/../..' . '/Zotlabs/Identity/BasicId.php',
|
||||
'Zotlabs\\Identity\\OAuth2Server' => __DIR__ . '/../..' . '/Zotlabs/Identity/OAuth2Server.php',
|
||||
'Zotlabs\\Identity\\OAuth2Storage' => __DIR__ . '/../..' . '/Zotlabs/Identity/OAuth2Storage.php',
|
||||
'Zotlabs\\Identity\\ProfilePhoto\\ProfilePhoto' => __DIR__ . '/../..' . '/Zotlabs/Identity/ProfilePhoto.php',
|
||||
'Zotlabs\\Identity\\ProfilePhoto' => __DIR__ . '/../..' . '/Zotlabs/Identity/ProfilePhoto.php',
|
||||
'Zotlabs\\Lib\\AConfig' => __DIR__ . '/../..' . '/Zotlabs/Lib/AConfig.php',
|
||||
'Zotlabs\\Lib\\AbConfig' => __DIR__ . '/../..' . '/Zotlabs/Lib/AbConfig.php',
|
||||
'Zotlabs\\Lib\\AccessList' => __DIR__ . '/../..' . '/Zotlabs/Lib/AccessList.php',
|
||||
@@ -1337,7 +1334,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||
'Zotlabs\\Module\\Notes' => __DIR__ . '/../..' . '/Zotlabs/Module/Notes.php',
|
||||
'Zotlabs\\Module\\Notifications' => __DIR__ . '/../..' . '/Zotlabs/Module/Notifications.php',
|
||||
'Zotlabs\\Module\\Notify' => __DIR__ . '/../..' . '/Zotlabs/Module/Notify.php',
|
||||
'Zotlabs\\Module\\OAuth2TestVehicle' => __DIR__ . '/../..' . '/Zotlabs/Module/Oauth2testvehicle.php',
|
||||
'Zotlabs\\Module\\OAuth2TestVehicle' => __DIR__ . '/../..' . '/Zotlabs/Module/OAuth2TestVehicle.php',
|
||||
'Zotlabs\\Module\\Oauth' => __DIR__ . '/../..' . '/Zotlabs/Module/Oauth.php',
|
||||
'Zotlabs\\Module\\Oauth2' => __DIR__ . '/../..' . '/Zotlabs/Module/Oauth2.php',
|
||||
'Zotlabs\\Module\\Oauthinfo' => __DIR__ . '/../..' . '/Zotlabs/Module/Oauthinfo.php',
|
||||
@@ -1712,6 +1709,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||
'Zotlabs\\Update\\_1236' => __DIR__ . '/../..' . '/Zotlabs/Update/_1236.php',
|
||||
'Zotlabs\\Update\\_1237' => __DIR__ . '/../..' . '/Zotlabs/Update/_1237.php',
|
||||
'Zotlabs\\Update\\_1238' => __DIR__ . '/../..' . '/Zotlabs/Update/_1238.php',
|
||||
'Zotlabs\\Update\\_1239' => __DIR__ . '/../..' . '/Zotlabs/Update/_1239.php',
|
||||
'Zotlabs\\Web\\Controller' => __DIR__ . '/../..' . '/Zotlabs/Web/Controller.php',
|
||||
'Zotlabs\\Web\\HTTPHeaders' => __DIR__ . '/../..' . '/Zotlabs/Web/HTTPHeaders.php',
|
||||
'Zotlabs\\Web\\HTTPSig' => __DIR__ . '/../..' . '/Zotlabs/Web/HTTPSig.php',
|
||||
|
||||
2715
vendor/composer/installed.json
vendored
2715
vendor/composer/installed.json
vendored
File diff suppressed because it is too large
Load Diff
236
vendor/composer/installed.php
vendored
Normal file
236
vendor/composer/installed.php
vendored
Normal file
@@ -0,0 +1,236 @@
|
||||
<?php return array (
|
||||
'root' =>
|
||||
array (
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '188975ccbd3a9c584238c35dd8c5a8fda7718199',
|
||||
'name' => 'zotlabs/hubzilla',
|
||||
),
|
||||
'versions' =>
|
||||
array (
|
||||
'blueimp/jquery-file-upload' =>
|
||||
array (
|
||||
'pretty_version' => 'v10.31.0',
|
||||
'version' => '10.31.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '0740f81829698b84efe17e72501e0f420ea0d611',
|
||||
),
|
||||
'bshaffer/oauth2-server-php' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.11.1',
|
||||
'version' => '1.11.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '5a0c8000d4763b276919e2106f54eddda6bc50fa',
|
||||
),
|
||||
'commerceguys/intl' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.0.6',
|
||||
'version' => '1.0.6.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '47d5d6d60d0cc25f867e337ce229a228bf6be6f8',
|
||||
),
|
||||
'desandro/imagesloaded' =>
|
||||
array (
|
||||
'pretty_version' => 'v4.1.4',
|
||||
'version' => '4.1.4.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '67c4e57453120935180c45c6820e7d3fbd2ea1f9',
|
||||
),
|
||||
'ezyang/htmlpurifier' =>
|
||||
array (
|
||||
'pretty_version' => 'v4.13.0',
|
||||
'version' => '4.13.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '08e27c97e4c6ed02f37c5b2b20488046c8d90d75',
|
||||
),
|
||||
'league/html-to-markdown' =>
|
||||
array (
|
||||
'pretty_version' => '4.10.0',
|
||||
'version' => '4.10.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '0868ae7a552e809e5cd8f93ba022071640408e88',
|
||||
),
|
||||
'lukasreschke/id3parser' =>
|
||||
array (
|
||||
'pretty_version' => 'v0.0.3',
|
||||
'version' => '0.0.3.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '62f4de76d4eaa9ea13c66dacc1f22977dace6638',
|
||||
),
|
||||
'michelf/php-markdown' =>
|
||||
array (
|
||||
'pretty_version' => '1.9.0',
|
||||
'version' => '1.9.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'c83178d49e372ca967d1a8c77ae4e051b3a3c75c',
|
||||
),
|
||||
'paragonie/random_compat' =>
|
||||
array (
|
||||
'pretty_version' => 'v9.99.99',
|
||||
'version' => '9.99.99.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95',
|
||||
),
|
||||
'pear/text_languagedetect' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.0.0',
|
||||
'version' => '1.0.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'bb9ff6f4970f686fac59081e916b456021fe7ba6',
|
||||
),
|
||||
'psr/log' =>
|
||||
array (
|
||||
'pretty_version' => '1.1.3',
|
||||
'version' => '1.1.3.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '0f73288fd15629204f9d42b7055f72dacbe811fc',
|
||||
),
|
||||
'ramsey/uuid' =>
|
||||
array (
|
||||
'pretty_version' => '3.9.3',
|
||||
'version' => '3.9.3.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '7e1633a6964b48589b142d60542f9ed31bd37a92',
|
||||
),
|
||||
'rhumsaa/uuid' =>
|
||||
array (
|
||||
'replaced' =>
|
||||
array (
|
||||
0 => '3.9.3',
|
||||
),
|
||||
),
|
||||
'sabre/dav' =>
|
||||
array (
|
||||
'pretty_version' => '4.1.1',
|
||||
'version' => '4.1.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '5736f943c90d8d73d04cd8944d8c913811dc7360',
|
||||
),
|
||||
'sabre/event' =>
|
||||
array (
|
||||
'pretty_version' => '5.1.0',
|
||||
'version' => '5.1.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'd00a17507af0e7544cfe17096372f5d733e3b276',
|
||||
),
|
||||
'sabre/http' =>
|
||||
array (
|
||||
'pretty_version' => '5.1.0',
|
||||
'version' => '5.1.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '23446999f1f6e62892bbd89745070aa902dd3539',
|
||||
),
|
||||
'sabre/uri' =>
|
||||
array (
|
||||
'pretty_version' => '2.2.0',
|
||||
'version' => '2.2.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '059d11012603be2e32ddb7543602965563ddbb09',
|
||||
),
|
||||
'sabre/vobject' =>
|
||||
array (
|
||||
'pretty_version' => '4.3.1',
|
||||
'version' => '4.3.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'a7feca8311462e5da16952454e420b92c20d3586',
|
||||
),
|
||||
'sabre/xml' =>
|
||||
array (
|
||||
'pretty_version' => '2.2.1',
|
||||
'version' => '2.2.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '41c6ba148966b10cafd31d1a4e5feb1e2138d95c',
|
||||
),
|
||||
'simplepie/simplepie' =>
|
||||
array (
|
||||
'pretty_version' => '1.5.5',
|
||||
'version' => '1.5.5.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'ae49e2201b6da9c808e5dac437aca356a11831b4',
|
||||
),
|
||||
'smarty/smarty' =>
|
||||
array (
|
||||
'pretty_version' => 'v3.1.36',
|
||||
'version' => '3.1.36.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'fd148f7ade295014fff77f89ee3d5b20d9d55451',
|
||||
),
|
||||
'symfony/polyfill-ctype' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.20.0',
|
||||
'version' => '1.20.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'f4ba089a5b6366e453971d3aad5fe8e897b37f41',
|
||||
),
|
||||
'twbs/bootstrap' =>
|
||||
array (
|
||||
'pretty_version' => 'v4.5.2',
|
||||
'version' => '4.5.2.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '5f2480a90ab911babc53039835fe78c6fc12646d',
|
||||
),
|
||||
'twitter/bootstrap' =>
|
||||
array (
|
||||
'replaced' =>
|
||||
array (
|
||||
0 => 'v4.5.2',
|
||||
),
|
||||
),
|
||||
'zotlabs/hubzilla' =>
|
||||
array (
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '188975ccbd3a9c584238c35dd8c5a8fda7718199',
|
||||
),
|
||||
),
|
||||
);
|
||||
26
vendor/composer/platform_check.php
vendored
Normal file
26
vendor/composer/platform_check.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
// platform_check.php @generated by Composer
|
||||
|
||||
$issues = array();
|
||||
|
||||
if (!(PHP_VERSION_ID >= 70100)) {
|
||||
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.';
|
||||
}
|
||||
|
||||
if ($issues) {
|
||||
if (!headers_sent()) {
|
||||
header('HTTP/1.1 500 Internal Server Error');
|
||||
}
|
||||
if (!ini_get('display_errors')) {
|
||||
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
||||
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
|
||||
} elseif (!headers_sent()) {
|
||||
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
|
||||
}
|
||||
}
|
||||
trigger_error(
|
||||
'Composer detected issues in your platform: ' . implode(' ', $issues),
|
||||
E_USER_ERROR
|
||||
);
|
||||
}
|
||||
42
vendor/symfony/polyfill-ctype/bootstrap.php
vendored
42
vendor/symfony/polyfill-ctype/bootstrap.php
vendored
@@ -12,15 +12,35 @@
|
||||
use Symfony\Polyfill\Ctype as p;
|
||||
|
||||
if (!function_exists('ctype_alnum')) {
|
||||
function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); }
|
||||
function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); }
|
||||
function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); }
|
||||
function ctype_digit($text) { return p\Ctype::ctype_digit($text); }
|
||||
function ctype_graph($text) { return p\Ctype::ctype_graph($text); }
|
||||
function ctype_lower($text) { return p\Ctype::ctype_lower($text); }
|
||||
function ctype_print($text) { return p\Ctype::ctype_print($text); }
|
||||
function ctype_punct($text) { return p\Ctype::ctype_punct($text); }
|
||||
function ctype_space($text) { return p\Ctype::ctype_space($text); }
|
||||
function ctype_upper($text) { return p\Ctype::ctype_upper($text); }
|
||||
function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); }
|
||||
function ctype_alnum($input) { return p\Ctype::ctype_alnum($input); }
|
||||
}
|
||||
if (!function_exists('ctype_alpha')) {
|
||||
function ctype_alpha($input) { return p\Ctype::ctype_alpha($input); }
|
||||
}
|
||||
if (!function_exists('ctype_cntrl')) {
|
||||
function ctype_cntrl($input) { return p\Ctype::ctype_cntrl($input); }
|
||||
}
|
||||
if (!function_exists('ctype_digit')) {
|
||||
function ctype_digit($input) { return p\Ctype::ctype_digit($input); }
|
||||
}
|
||||
if (!function_exists('ctype_graph')) {
|
||||
function ctype_graph($input) { return p\Ctype::ctype_graph($input); }
|
||||
}
|
||||
if (!function_exists('ctype_lower')) {
|
||||
function ctype_lower($input) { return p\Ctype::ctype_lower($input); }
|
||||
}
|
||||
if (!function_exists('ctype_print')) {
|
||||
function ctype_print($input) { return p\Ctype::ctype_print($input); }
|
||||
}
|
||||
if (!function_exists('ctype_punct')) {
|
||||
function ctype_punct($input) { return p\Ctype::ctype_punct($input); }
|
||||
}
|
||||
if (!function_exists('ctype_space')) {
|
||||
function ctype_space($input) { return p\Ctype::ctype_space($input); }
|
||||
}
|
||||
if (!function_exists('ctype_upper')) {
|
||||
function ctype_upper($input) { return p\Ctype::ctype_upper($input); }
|
||||
}
|
||||
if (!function_exists('ctype_xdigit')) {
|
||||
function ctype_xdigit($input) { return p\Ctype::ctype_xdigit($input); }
|
||||
}
|
||||
|
||||
8
vendor/symfony/polyfill-ctype/composer.json
vendored
8
vendor/symfony/polyfill-ctype/composer.json
vendored
@@ -16,7 +16,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Polyfill\\Ctype\\": "" },
|
||||
@@ -28,7 +28,11 @@
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.13-dev"
|
||||
"dev-main": "1.20-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
198
view/js/main.js
198
view/js/main.js
@@ -20,11 +20,11 @@ var pageHasMoreContent = true;
|
||||
var divmore_height = 400;
|
||||
var last_filestorage_id = null;
|
||||
var mediaPlaying = false;
|
||||
var contentHeightDiff = 0;
|
||||
var liveRecurse = 0;
|
||||
var savedTitle = '';
|
||||
var followUpPageLoad = false;
|
||||
var window_needs_alert = true;
|
||||
var expanded_items = [];
|
||||
|
||||
var sse_bs_active = false;
|
||||
var sse_offset = 0;
|
||||
@@ -69,6 +69,13 @@ $(document).ready(function() {
|
||||
|
||||
this.autocomplete_handled = true;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(document).on('keydown', '.comment-edit-form textarea.expanded', function (e) {
|
||||
if (e.ctrlKey && e.keyCode === 13) {
|
||||
post_comment(this.id.replace('comment-edit-text-',''));
|
||||
}
|
||||
});
|
||||
|
||||
var tf = new Function('n', 's', 'var k = s.split("/")['+aStr['plural_func']+']; return (k ? k : s);');
|
||||
@@ -95,7 +102,6 @@ $(document).ready(function() {
|
||||
|
||||
jQuery.timeago.settings.allowFuture = true;
|
||||
|
||||
|
||||
if(sse_enabled) {
|
||||
if(typeof(window.SharedWorker) === 'undefined') {
|
||||
// notifications with multiple tabs open will not work very well in this scenario
|
||||
@@ -208,33 +214,6 @@ $(document).ready(function() {
|
||||
|
||||
updateInit();
|
||||
|
||||
// Allow folks to stop the ajax page updates with the pause/break key
|
||||
$(document).keydown(function(event) {
|
||||
if(event.keyCode == '8') {
|
||||
var target = event.target || event.srcElement;
|
||||
if (!/input|textarea/i.test(target.nodeName)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(event.keyCode == '19' || (event.ctrlKey && event.which == '32')) {
|
||||
event.preventDefault();
|
||||
if(stopped === false) {
|
||||
stopped = true;
|
||||
if (event.ctrlKey) {
|
||||
totStopped = true;
|
||||
}
|
||||
$('#pause').html('<img src="images/pause.gif" alt="pause" style="border: 1px solid black;" />');
|
||||
} else {
|
||||
unpause();
|
||||
}
|
||||
} else {
|
||||
if (!totStopped) {
|
||||
unpause();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var e = document.getElementById('content-complete');
|
||||
if(e)
|
||||
pageHasMoreContent = false;
|
||||
@@ -244,8 +223,6 @@ $(document).ready(function() {
|
||||
cache_next_page();
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
function getConversationSettings() {
|
||||
@@ -310,6 +287,7 @@ function handle_comment_form(e) {
|
||||
|
||||
// handle clicked form
|
||||
var form = $(this);
|
||||
|
||||
var fields = form.find(':input[type=text], textarea');
|
||||
var fields_empty = true;
|
||||
|
||||
@@ -324,8 +302,9 @@ function handle_comment_form(e) {
|
||||
form.find(':not(:visible)').show();
|
||||
}
|
||||
|
||||
|
||||
// handle click outside of form (close empty forms)
|
||||
$(document).on('click', function(e) {
|
||||
$(document).one('click', function(e) {
|
||||
fields.each(function() {
|
||||
if($(this).val() != '')
|
||||
fields_empty = false;
|
||||
@@ -344,18 +323,19 @@ function handle_comment_form(e) {
|
||||
form.find(':button[type=submit]').prop('title', '');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var commentSaveTimer = null;
|
||||
var emptyCommentElm = form.find('.comment-edit-text').attr('id');
|
||||
var convId = emptyCommentElm.replace('comment-edit-text-','');
|
||||
$(document).on('focusout','#' + emptyCommentElm,function(e){
|
||||
$('#' + emptyCommentElm).on('focusout',function(e){
|
||||
if(commentSaveTimer)
|
||||
clearTimeout(commentSaveTimer);
|
||||
commentSaveChanges(convId,true);
|
||||
commentSaveTimer = null;
|
||||
$('#' + emptyCommentElm).off();
|
||||
});
|
||||
|
||||
$(document).on('focusin','#' + emptyCommentElm,function(e){
|
||||
$('#' + emptyCommentElm).on('focusin', function (e){
|
||||
commentSaveTimer = setTimeout(function () {
|
||||
commentSaveChanges(convId,false);
|
||||
},10000);
|
||||
@@ -379,11 +359,13 @@ function handle_comment_form(e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function commentClose(obj, id) {
|
||||
if(obj.value === '') {
|
||||
obj.value = aStr.comment;
|
||||
$("#comment-edit-text-" + id).removeClass("expanded");
|
||||
$("#mod-cmnt-wrap-" + id).hide();
|
||||
$("#comment-tools-" + id).hide();
|
||||
@@ -638,7 +620,10 @@ function updatePageItems(mode, data) {
|
||||
|
||||
function updateConvItems(mode,data) {
|
||||
|
||||
$(document).trigger('hz:updateConvItems');
|
||||
var scroll_position = $(window).scrollTop();
|
||||
|
||||
if(mode !== 'update')
|
||||
$(document).trigger('hz:updateConvItems');
|
||||
|
||||
if(mode === 'update' || mode === 'replace') {
|
||||
prev = 'threads-begin';
|
||||
@@ -648,12 +633,11 @@ function updateConvItems(mode,data) {
|
||||
}
|
||||
|
||||
if(mode === 'replace') {
|
||||
$('.thread-wrapper').remove(); // clear existing content
|
||||
$('.thread-parent').remove(); // clear existing content
|
||||
}
|
||||
|
||||
$('.thread-wrapper', data).each(function() {
|
||||
if(this.classList.contains('toplevel_item')) {
|
||||
|
||||
var ident = this.id;
|
||||
var convId = ident.replace('thread-wrapper-','');
|
||||
var commentWrap = $('#'+ident+' .collapsed-comments').attr('id');
|
||||
@@ -768,6 +752,8 @@ function updateConvItems(mode,data) {
|
||||
|
||||
});
|
||||
|
||||
$(window).scrollTop(scroll_position);
|
||||
|
||||
if(followUpPageLoad)
|
||||
sse_bs_counts();
|
||||
else
|
||||
@@ -863,25 +849,16 @@ function scrollToItem() {
|
||||
}
|
||||
|
||||
function collapseHeight() {
|
||||
var origContentHeight = Math.ceil($("#region_2").height());
|
||||
var cDiff = 0;
|
||||
var i = 0;
|
||||
var position = $(window).scrollTop();
|
||||
|
||||
$(".wall-item-content, .directory-collapse").each(function() {
|
||||
var orgHeight = $(this).outerHeight(true);
|
||||
var id = $(this).attr('id')
|
||||
var open = ((expanded_items.indexOf($(this).attr('id')) === -1) ? false : true);
|
||||
if(orgHeight > divmore_height) {
|
||||
if(! $(this).hasClass('divmore') && $(this).has('div.no-collapse').length == 0) {
|
||||
|
||||
// check if we will collapse some content above the visible content and compensate the diff later
|
||||
if($(this).offset().top + divmore_height - $(window).scrollTop() + cDiff - ($(".divgrow-showmore").outerHeight() * i) < 65) {
|
||||
diff = orgHeight - divmore_height;
|
||||
cDiff = cDiff + diff;
|
||||
i++;
|
||||
}
|
||||
|
||||
$(this).readmore({
|
||||
speed: 0,
|
||||
startOpen: open,
|
||||
heightMargin: 50,
|
||||
collapsedHeight: divmore_height,
|
||||
moreLink: '<a href="#" class="divgrow-showmore fakelink">' + aStr.divgrowmore + '</a>',
|
||||
@@ -891,6 +868,10 @@ function collapseHeight() {
|
||||
if((($(element).offset().top + divmore_height) - $(window).scrollTop()) < 65 ) {
|
||||
$(window).scrollTop($(window).scrollTop() - ($(element).outerHeight(true) - divmore_height));
|
||||
}
|
||||
expanded_items = expanded_items.filter(expanded_items => expanded_items !== id);
|
||||
}
|
||||
else {
|
||||
expanded_items.push(id);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -899,15 +880,6 @@ function collapseHeight() {
|
||||
}
|
||||
});
|
||||
|
||||
var collapsedContentHeight = Math.ceil($("#region_2").height());
|
||||
contentHeightDiff = liking ? 0 : origContentHeight - collapsedContentHeight;
|
||||
console.log('collapseHeight() - contentHeightDiff: ' + contentHeightDiff + 'px');
|
||||
|
||||
if(i && !liking){
|
||||
var sval = position - cDiff + ($(".divgrow-showmore").outerHeight() * i);
|
||||
console.log('collapsed above viewport count: ' + i);
|
||||
$(window).scrollTop(sval);
|
||||
}
|
||||
}
|
||||
|
||||
function updateInit() {
|
||||
@@ -942,12 +914,7 @@ function liveUpdate(notify_id) {
|
||||
|
||||
if((src === null) || (stopped) || (! profile_uid)) { $('.like-rotator').hide(); return; }
|
||||
|
||||
// if auto updates are enabled and a comment box is open,
|
||||
// prevent live updates until the comment is submitted
|
||||
|
||||
var lockUpdates = (($('.comment-edit-text.expanded').length && (! bParam_static)) ? true : false);
|
||||
|
||||
if(lockUpdates || in_progress || mediaPlaying) {
|
||||
if(in_progress || mediaPlaying) {
|
||||
if(livetime) {
|
||||
clearTimeout(livetime);
|
||||
}
|
||||
@@ -1049,11 +1016,6 @@ function liveUpdate(notify_id) {
|
||||
scroll_next = false;
|
||||
updateConvItems(update_mode,data);
|
||||
|
||||
// adjust scroll position if new content was added above viewport
|
||||
if(update_mode === 'update' && !justifiedGalleryActive) {
|
||||
$(window).scrollTop($(window).scrollTop() + $("#region_2").height() - orgHeight + contentHeightDiff);
|
||||
}
|
||||
|
||||
in_progress = false;
|
||||
$('#image_counter').html('');
|
||||
|
||||
@@ -1184,19 +1146,30 @@ function justifyPhotosAjax(id) {
|
||||
$('#' + id).justifiedGallery('norewind').on('jg.complete', function(e){ justifiedGalleryActive = false; });
|
||||
}
|
||||
|
||||
// Since our ajax calls are asynchronous, we will give a few
|
||||
// seconds for the first ajax call (setting like/dislike), then
|
||||
// run the updater to pick up any changes and display on the page.
|
||||
// The updater will turn any rotators off when it's done.
|
||||
// This function will have returned long before any of these
|
||||
// events have completed and therefore there won't be any
|
||||
// visible feedback that anything changed without all this
|
||||
// trickery. This still could cause confusion if the "like" ajax call
|
||||
// is delayed and updateInit runs before it completes.
|
||||
function dolike(ident, verb) {
|
||||
unpause();
|
||||
$('#like-rotator-' + ident.toString()).show();
|
||||
$.get('like/' + ident.toString() + '?verb=' + verb, updateInit );
|
||||
|
||||
if(typeof conv_mode == typeof undefined)
|
||||
conv_mode = '';
|
||||
|
||||
$.get('like/' + ident.toString() + '?verb=' + verb + '&conv_mode=' + conv_mode, function (data) {
|
||||
if(data.success) {
|
||||
// this is a bit tricky since the top level thread wrapper wraps the whole thread
|
||||
if($('#thread-wrapper-' + data.orig_id).hasClass('toplevel_item')) {
|
||||
var wrapper = $('<div></div>').html( data.html ).find('#wall-item-outside-wrapper-' + data.id);
|
||||
$('#wall-item-outside-wrapper-' + data.orig_id).html(wrapper[0].innerHTML);
|
||||
// those were not replaced - swap the id
|
||||
$('#thread-wrapper-' + data.orig_id).attr('id', 'thread-wrapper-' + data.id);
|
||||
$('#wall-item-outside-wrapper-' + data.orig_id).attr('id', 'wall-item-outside-wrapper-' + data.id);
|
||||
}
|
||||
else {
|
||||
$('#thread-wrapper-' + data.orig_id).replaceWith(data.html);
|
||||
}
|
||||
$('#wall-item-ago-' + data.id + ' .autotime').timeago();
|
||||
collapseHeight();
|
||||
liking = 0;
|
||||
}
|
||||
});
|
||||
liking = 1;
|
||||
}
|
||||
|
||||
@@ -1301,14 +1274,12 @@ function dropItem(url, object) {
|
||||
}
|
||||
|
||||
function dosubthread(ident) {
|
||||
unpause();
|
||||
$('#like-rotator-' + ident.toString()).show();
|
||||
$.get('subthread/sub/' + ident.toString(), updateInit );
|
||||
liking = 1;
|
||||
}
|
||||
|
||||
function dounsubthread(ident) {
|
||||
unpause();
|
||||
$('#like-rotator-' + ident.toString()).show();
|
||||
$.get('subthread/unsub/' + ident.toString(), updateInit );
|
||||
liking = 1;
|
||||
@@ -1387,44 +1358,53 @@ function submitPoll(id) {
|
||||
function(data) {
|
||||
$.jGrowl(data.message, { sticky: false, theme: ((data.success) ? 'info' : 'notice'), life: 10000 });
|
||||
if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(updateInit,1500);
|
||||
timer = setTimeout(updateInit, 500);
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function post_comment(id) {
|
||||
unpause();
|
||||
|
||||
commentBusy = true;
|
||||
$('body').css('cursor', 'wait');
|
||||
$("#comment-preview-inp-" + id).val("0");
|
||||
|
||||
if(typeof conv_mode == typeof undefined)
|
||||
conv_mode = '';
|
||||
|
||||
var form_data = $("#comment-edit-form-" + id).serialize();
|
||||
|
||||
$.post(
|
||||
"item",
|
||||
$("#comment-edit-form-" + id).serialize(),
|
||||
form_data + '&conv_mode=' + conv_mode,
|
||||
function(data) {
|
||||
if(data.success) {
|
||||
localStorage.removeItem("comment_body-" + id);
|
||||
$("#comment-edit-preview-" + id).hide();
|
||||
$("#comment-edit-wrapper-" + id).hide();
|
||||
$("#comment-edit-text-" + id).val('');
|
||||
$("#comment-edit-text-" + id).val('').blur().attr('placeholder', aStr.comment);
|
||||
$('#wall-item-comment-wrapper-' + id).before(data.html);
|
||||
$('#wall-item-ago-' + data.id + ' .autotime').timeago();
|
||||
$('body').css('cursor', 'unset');
|
||||
collapseHeight();
|
||||
commentBusy = false;
|
||||
|
||||
var tarea = document.getElementById("comment-edit-text-" + id);
|
||||
if(tarea) {
|
||||
commentClose(tarea, id);
|
||||
$(document).unbind( "click.commentOpen");
|
||||
$(document).off( "click.commentOpen");
|
||||
}
|
||||
if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(updateInit,1500);
|
||||
}
|
||||
if(data.reload) {
|
||||
window.location.href=data.reload;
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function preview_comment(id) {
|
||||
$("#comment-preview-inp-" + id).val("1");
|
||||
$("#comment-edit-preview-" + id).show();
|
||||
@@ -1492,13 +1472,6 @@ function preview_mail() {
|
||||
return true;
|
||||
}
|
||||
|
||||
function unpause() {
|
||||
// unpause auto reloads if they are currently stopped
|
||||
totStopped = false;
|
||||
stopped = false;
|
||||
$('#pause').html('');
|
||||
}
|
||||
|
||||
function bin2hex(s) {
|
||||
// Converts the binary representation of data to hex
|
||||
//
|
||||
@@ -1595,7 +1568,6 @@ function zFormError(elm,x) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(window).scroll(function () {
|
||||
if(typeof buildCmd == 'function') {
|
||||
// This is a content page with items and/or conversations
|
||||
@@ -1621,22 +1593,6 @@ $(window).scroll(function () {
|
||||
}
|
||||
});
|
||||
|
||||
var chanviewFullSize = false;
|
||||
|
||||
function chanviewFull() {
|
||||
if(chanviewFullSize) {
|
||||
chanviewFullSize = false;
|
||||
$('#chanview-iframe-border').css({ 'position' : 'relative', 'z-index' : '10' });
|
||||
$('#remote-channel').css({ 'position' : 'relative' , 'z-index' : '10' });
|
||||
}
|
||||
else {
|
||||
chanviewFullSize = true;
|
||||
$('#chanview-iframe-border').css({ 'position' : 'fixed', 'top' : '0', 'left' : '0', 'z-index' : '150001' });
|
||||
$('#remote-channel').css({ 'position' : 'fixed', 'top' : '0', 'left' : '0', 'z-index' : '150000' });
|
||||
resize_iframe();
|
||||
}
|
||||
}
|
||||
|
||||
function addhtmltext(data) {
|
||||
data = h2b(data);
|
||||
addeditortext(data);
|
||||
@@ -1867,8 +1823,6 @@ function sse_bs_notifications(e, replace, followup) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sse_handleNotifications(obj, replace, followup) {
|
||||
|
||||
var primary_notifications = ['dm', 'home', 'intros', 'register', 'mail', 'notify', 'files'];
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
var bParam_cmd = "{{$baseurl}}/update/{{$pgtype}}";
|
||||
|
||||
{{if $conv_mode}}
|
||||
var conv_mode = '{{$conv_mode}}';
|
||||
{{/if}}
|
||||
|
||||
var bParam_uid = {{$uid}};
|
||||
var bParam_gid = {{$gid}};
|
||||
@@ -18,7 +21,6 @@
|
||||
var bParam_list = {{$list}};
|
||||
var bParam_fh = {{$fh}};
|
||||
var bParam_dm = {{$dm}};
|
||||
var bParam_static = {{$static}};
|
||||
|
||||
var bParam_search = "{{$search}}";
|
||||
var bParam_xchan = "{{$xchan}}";
|
||||
@@ -42,7 +44,6 @@
|
||||
if(bParam_cmax != (-1)) bCmd = bCmd + "&cmax=" + bParam_cmax;
|
||||
if(bParam_gid != 0) { bCmd = bCmd + "&gid=" + bParam_gid; } else
|
||||
if(bParam_cid != 0) { bCmd = bCmd + "&cid=" + bParam_cid; }
|
||||
if(bParam_static != 0) { bCmd = bCmd + "&static=" + bParam_static; }
|
||||
if(bParam_star != 0) bCmd = bCmd + "&star=" + bParam_star;
|
||||
if(bParam_liked != 0) bCmd = bCmd + "&liked=" + bParam_liked;
|
||||
if(bParam_conv!= 0) bCmd = bCmd + "&conv=" + bParam_conv;
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if $item.comment}}
|
||||
<div class="p-2 wall-item-comment-wrapper{{if $item.children}} wall-item-comment-wrapper-wc{{/if}}" >
|
||||
<div id="wall-item-comment-wrapper-{{$item.id}}" class="p-2 wall-item-comment-wrapper{{if $item.children}} wall-item-comment-wrapper-wc{{/if}}" >
|
||||
{{$item.comment}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
var zid = {{if $zid}}'{{$zid}}'{{else}}null{{/if}};
|
||||
var justifiedGalleryActive = false;
|
||||
{{if $channel_hash}}var channelHash = '{{$channel_hash}}';{{/if}}
|
||||
{{if $channel_id}}var channelId = '{{$channel_id}}';{{/if}}{{* Used in e.g. autocomplete *}}
|
||||
var channelId = {{if $channel_id}}{{$channel_id}}{{else}}false{{/if}};{{* Used in e.g. autocomplete *}}
|
||||
var preloadImages = {{$preload_images}};
|
||||
var auto_save_draft = {{$auto_save_draft}};
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{if $categories}}
|
||||
<!--div class="filesavetags"-->
|
||||
{{foreach $categories as $cat}}
|
||||
<span class="item-category badge badge-pill badge-danger"><i class="fa fa-folder-o"></i> {{$cat.term}} <a href="{{$cat.removelink}}" class="text-white" title="{{$remove}}"><i class="fa fa-close"></i></a></span>
|
||||
<span class="item-category badge badge-pill badge-danger"><i class="fa fa-folder-o"></i> {{$cat.term}} <a href="{{$cat.removelink}}" class="text-white" title="{{$remove}}" onClick="itemFilerRm({{$cat.id}}, '{{$cat.term}}'); return false;"><i class="fa fa-close"></i></a></span>
|
||||
{{/foreach}}
|
||||
<!--/div-->
|
||||
{{/if}}
|
||||
|
||||
@@ -61,13 +61,11 @@ var activeCommentText = '';
|
||||
$('#jot-add-option').on('click', jotAddOption);
|
||||
$(document).on('click', '.poll-option-close', jotRemoveOption);
|
||||
|
||||
function jotSetMime() {
|
||||
var mtype = $('#id_mimetype').val();
|
||||
if(mtype == 'text/bbcode')
|
||||
$('#profile-jot-submit-left').show();
|
||||
else
|
||||
$('#profile-jot-submit-left').hide();
|
||||
}
|
||||
$('#profile-jot-form').keydown(function(e) {
|
||||
if (e.ctrlKey && e.keyCode === 13) {
|
||||
$(this).trigger('submit');
|
||||
}
|
||||
});
|
||||
|
||||
$('#invisible-wall-file-upload').fileupload({
|
||||
url: 'wall_attach/{{$nickname}}',
|
||||
@@ -91,11 +89,10 @@ var activeCommentText = '';
|
||||
$('#wall-file-upload').click(function(event) { event.preventDefault(); $('#invisible-wall-file-upload').trigger('click'); return false;});
|
||||
$('#wall-file-upload-sub').click(function(event) { event.preventDefault(); $('#invisible-wall-file-upload').trigger('click'); return false;});
|
||||
|
||||
// call initialization file
|
||||
if (window.File && window.FileList && window.FileReader) {
|
||||
DragDropUploadInit();
|
||||
}
|
||||
|
||||
// call initialization file
|
||||
if (window.File && window.FileList && window.FileReader) {
|
||||
DragDropUploadInit();
|
||||
}
|
||||
|
||||
$('#invisible-comment-upload').fileupload({
|
||||
url: 'wall_attach/{{$nickname}}',
|
||||
@@ -128,6 +125,14 @@ var activeCommentText = '';
|
||||
|
||||
});
|
||||
|
||||
function jotSetMime() {
|
||||
var mtype = $('#id_mimetype').val();
|
||||
if(mtype == 'text/bbcode')
|
||||
$('#profile-jot-submit-left').show();
|
||||
else
|
||||
$('#profile-jot-submit-left').hide();
|
||||
}
|
||||
|
||||
function deleteCheckedItems() {
|
||||
var checkedstr = '';
|
||||
|
||||
@@ -298,13 +303,9 @@ var activeCommentText = '';
|
||||
if(reply && reply.length) {
|
||||
reply = reply.replace('#','');
|
||||
if(reply.length) {
|
||||
|
||||
commentBusy = true;
|
||||
$('body').css('cursor', 'wait');
|
||||
|
||||
$.get('{{$baseurl}}/tagger/' + id + '?term=' + reply);
|
||||
if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(updateInit,3000);
|
||||
$.get('{{$baseurl}}/tagger/' + id + '?term=' + reply, updateInit);
|
||||
liking = 1;
|
||||
}
|
||||
}
|
||||
@@ -353,6 +354,13 @@ var activeCommentText = '';
|
||||
|
||||
}
|
||||
|
||||
function itemFilerRm(id, term) {
|
||||
commentBusy = true;
|
||||
$('body').css('cursor', 'wait');
|
||||
$.get('{{$baseurl}}/filerm/' + id + '?f=&term=' + term, updateInit);
|
||||
liking = 1;
|
||||
}
|
||||
|
||||
function itemBookmark(id) {
|
||||
$.get('{{$baseurl}}/bookmarks?f=&item=' + id);
|
||||
if(timer) clearTimeout(timer);
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
{{include file="field_checkbox.tpl" field=$title_tosource}}
|
||||
{{include file="field_checkbox.tpl" field=$user_scalable}}
|
||||
{{include file="field_checkbox.tpl" field=$preload_images}}
|
||||
{{include file="field_checkbox.tpl" field=$manual_update}}
|
||||
{{include file="field_checkbox.tpl" field=$start_menu}}
|
||||
<div class="settings-submit-wrapper" >
|
||||
<button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button>
|
||||
|
||||
Reference in New Issue
Block a user