mirror of
https://github.com/YunoHost-Apps/hubzilla_ynh.git
synced 2024-09-03 19:26:21 +02:00
Updated to Hubzilla and addons to 1.4
This commit is contained in:
parent
41508bf83b
commit
e1a891bd15
678 changed files with 73705 additions and 70078 deletions
|
@ -1,3 +1,36 @@
|
|||
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).]
|
||||
|
||||
Implement channel move operation for UNO configuration
|
||||
Remove bookmark references in UNO (which has no bookmarks by default)
|
||||
UI cleanup profiles/chat/manage
|
||||
Refactor webfinger probes and salmon backend for GNU-social federation
|
||||
SECURITY: DAV authentication exploit
|
||||
Context help added
|
||||
More help pages
|
||||
Provide 'posts only' feed
|
||||
Refactor App to remove globals
|
||||
Refactor Session to remove globals
|
||||
provide a fullscreen mode for selected modules and functions
|
||||
Regression: some addon routes broken
|
||||
fix "remember me"
|
||||
Autocomplete tool extended to bbcode/comanche
|
||||
Clone sync of file/photo updates
|
||||
system rename (e.g. http to https or DNS name change) missing some connection photos
|
||||
calendar module not blocked to public whhen block_public enabled
|
||||
Use timeago.js in reshare content so that timestamps will be correct on federated reshares
|
||||
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
|
||||
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
|
||||
|
|
|
@ -3,26 +3,26 @@
|
|||
Hubzilla - Community Server
|
||||
===========================
|
||||
|
||||
Help us redefine the web - using integrated and united community websites.
|
||||
--------------------------------------------------------------------------
|
||||
Connected and linked web communities.
|
||||
-------------------------------------
|
||||
|
||||
<p align="center" markdown="1">
|
||||
<em><a href="https://github.com/redmatrix/hubzilla/blob/master/install/INSTALL.txt">Installing Hubzilla</a></em>
|
||||
</p>
|
||||
|
||||
**What are Hubs?**
|
||||
**What are Hubz?**
|
||||
|
||||
Hubs are independent general-purpose websites that not only connect with their associated members and viewers, but also connect together to exchange personal communications and other information with each other.
|
||||
Hubz are independent general-purpose websites that not only connect with their associated members and viewers, but also connect together to exchange personal communications and other information with each other.
|
||||
This allows hub members on any hub to securely and privately share anything; with anybody, on any hub - anywhere; or share stuff publicly with anybody on the internet if desired.
|
||||
|
||||
**Hubzilla** is the server software which makes this possible. It is a sophisticated and unique combination of an open source content management system and a decentralised identity, communications, and permissions framework and protocol suite, built using common webserver technology (PHP/MySQL/Apache, although Mariadb or Postgres and Nginx could also be used - we're pretty easy). The end result is a level of systems integration, privacy control, and communications features that you wouldn't think are possible in either a content management system or a decentralised communications network. It also brings a new level of cooperation and privacy to the web and introduces the concept of personally owned "single sign-on" to web services across the entire internet.
|
||||
**Hubzilla** is the server software which makes this possible. It is a sophisticated and unique combination of an open source content management system and a decentralised identity, communications, and permissions framework and protocol suite, built using common webserver technology (PHP/MySQL/Apache and popular variants). The end result is a level of systems integration, privacy control, and communications features that you wouldn't think are possible in either a content management system or a decentralised communications network. It also brings a new level of cooperation and privacy to the web and introduces the concept of personally owned "single sign-on" to web services across the entire internet.
|
||||
|
||||
Hubzilla hubs are
|
||||
Hubzilla hubz are
|
||||
|
||||
* decentralised
|
||||
* inherently social
|
||||
* optionally inter-networked with other hubs
|
||||
* privacy-enabled (privacy exclusions work across the entire internet to any registered identity on any compatible hubs)
|
||||
* optionally inter-networked with other hubz
|
||||
* privacy-enabled (privacy exclusions work across the entire internet to any registered identity on any compatible hubz)
|
||||
|
||||
Possible website applications include
|
||||
|
||||
|
|
|
@ -5,38 +5,39 @@ namespace Zotlabs\Project;
|
|||
class System {
|
||||
|
||||
function get_platform_name() {
|
||||
$a = get_app();
|
||||
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['platform_name'])
|
||||
return $a->config['system']['platform_name'];
|
||||
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['platform_name'])
|
||||
return \App::$config['system']['platform_name'];
|
||||
return PLATFORM_NAME;
|
||||
}
|
||||
|
||||
function get_site_name() {
|
||||
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['sitename'])
|
||||
return \App::$config['system']['sitename'];
|
||||
return '';
|
||||
}
|
||||
|
||||
function get_project_version() {
|
||||
$a = get_app();
|
||||
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['hide_version'])
|
||||
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['hide_version'])
|
||||
return '';
|
||||
return RED_VERSION;
|
||||
}
|
||||
|
||||
function get_update_version() {
|
||||
$a = get_app();
|
||||
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['hide_version'])
|
||||
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['hide_version'])
|
||||
return '';
|
||||
return DB_UPDATE_VERSION;
|
||||
}
|
||||
|
||||
|
||||
function get_notify_icon() {
|
||||
$a = get_app();
|
||||
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['email_notify_icon_url'])
|
||||
return $a->config['system']['email_notify_icon_url'];
|
||||
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['email_notify_icon_url'])
|
||||
return \App::$config['system']['email_notify_icon_url'];
|
||||
return z_root() . '/images/hz-white-32.png';
|
||||
}
|
||||
|
||||
function get_site_icon() {
|
||||
$a = get_app();
|
||||
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['site_icon_url'])
|
||||
return $a->config['system']['site_icon_url'];
|
||||
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['site_icon_url'])
|
||||
return \App::$config['system']['site_icon_url'];
|
||||
return z_root() . '/images/hz-32.png';
|
||||
}
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ class Browser extends DAV\Browser\Plugin {
|
|||
));
|
||||
|
||||
$a = get_app();
|
||||
$a->page['content'] = $html;
|
||||
\App::$page['content'] = $html;
|
||||
load_pdl($a);
|
||||
|
||||
$theme_info_file = "view/theme/" . current_theme() . "/php/theme.php";
|
||||
|
|
|
@ -53,7 +53,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
|
|||
logger('directory ' . $ext_path, LOGGER_DATA);
|
||||
$this->ext_path = $ext_path;
|
||||
// remove "/cloud" from the beginning of the path
|
||||
$modulename = get_app()->module;
|
||||
$modulename = \App::$module;
|
||||
$this->red_path = ((strpos($ext_path, '/' . $modulename) === 0) ? substr($ext_path, strlen($modulename) + 1) : $ext_path);
|
||||
if (! $this->red_path) {
|
||||
$this->red_path = '/';
|
||||
|
@ -114,7 +114,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
|
|||
throw new DAV\Exception\Forbidden('Permission denied.');
|
||||
}
|
||||
|
||||
$modulename = get_app()->module;
|
||||
$modulename = \App::$module;
|
||||
if ($this->red_path === '/' && $name === $modulename) {
|
||||
return new Directory('/' . $modulename, $this->auth);
|
||||
}
|
||||
|
@ -168,6 +168,14 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
|
|||
intval($this->auth->owner_id)
|
||||
);
|
||||
|
||||
|
||||
$ch = channelx_by_n($this->auth->owner_id);
|
||||
if($ch) {
|
||||
$sync = attach_export_data($ch,$this->folder_hash);
|
||||
if($sync)
|
||||
build_sync_packet($ch['channel_id'],array('file' => array($sync)));
|
||||
}
|
||||
|
||||
$this->red_path = $new_path;
|
||||
}
|
||||
|
||||
|
@ -332,9 +340,15 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
|
|||
|
||||
require_once('include/photos.php');
|
||||
$args = array( 'resource_id' => $hash, 'album' => $album, 'os_path' => $f, 'filename' => $name, 'getimagesize' => $x, 'directory' => $direct);
|
||||
$p = photo_upload($c[0],get_app()->get_observer(),$args);
|
||||
$p = photo_upload($c[0],\App::get_observer(),$args);
|
||||
}
|
||||
|
||||
$sync = attach_export_data($c[0],$hash);
|
||||
|
||||
if($sync)
|
||||
build_sync_packet($c[0]['channel_id'],array('file' => array($sync)));
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -356,7 +370,14 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
|
|||
|
||||
if ($r) {
|
||||
$result = attach_mkdir($r[0], $this->auth->observer, array('filename' => $name, 'folder' => $this->folder_hash));
|
||||
if (! $result['success']) {
|
||||
|
||||
if($result['success']) {
|
||||
$sync = attach_export_data($r[0],$ret['data']['hash']);
|
||||
if($sync) {
|
||||
build_sync_packet($r[0]['channel_id'],array('file' => array($sync)));
|
||||
}
|
||||
}
|
||||
else {
|
||||
logger('error ' . print_r($result, true), LOGGER_DEBUG);
|
||||
}
|
||||
}
|
||||
|
@ -380,6 +401,15 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
|
|||
}
|
||||
|
||||
attach_delete($this->auth->owner_id, $this->folder_hash);
|
||||
|
||||
$ch = channelx_by_n($this->auth->owner_id);
|
||||
if($ch) {
|
||||
$sync = attach_export_data($ch,$this->folder_hash,true);
|
||||
if($sync)
|
||||
build_sync_packet($ch['channel_id'],array('file' => array($sync)));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -393,7 +423,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
|
|||
public function childExists($name) {
|
||||
// On /cloud we show a list of available channels.
|
||||
// @todo what happens if no channels are available?
|
||||
$modulename = get_app()->module;
|
||||
$modulename = \App::$module;
|
||||
if ($this->red_path === '/' && $name === $modulename) {
|
||||
//logger('We are at ' $modulename . ' show a channel list', LOGGER_DEBUG);
|
||||
return true;
|
||||
|
@ -417,7 +447,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
|
|||
|
||||
logger('GetDir: ' . $this->ext_path, LOGGER_DEBUG);
|
||||
$this->auth->log();
|
||||
$modulename = get_app()->module;
|
||||
$modulename = \App::$module;
|
||||
|
||||
$file = $this->ext_path;
|
||||
|
||||
|
|
|
@ -84,6 +84,20 @@ class File extends DAV\Node implements DAV\IFile {
|
|||
dbesc($this->data['hash']),
|
||||
intval($this->data['id'])
|
||||
);
|
||||
|
||||
if($this->data->is_photo) {
|
||||
$r = q("update photo set filename = '%s' where resource_id = '%s' and uid = %d",
|
||||
dbesc($newName),
|
||||
dbesc($this->data['hash']),
|
||||
intval($this->auth->owner_id)
|
||||
);
|
||||
}
|
||||
$ch = channelx_by_n($this->auth->owner_id);
|
||||
if($ch) {
|
||||
$sync = attach_export_data($ch,$this->data['hash']);
|
||||
if($sync)
|
||||
build_sync_packet($ch['channel_id'],array('file' => array($sync)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -173,7 +187,7 @@ class File extends DAV\Node implements DAV\IFile {
|
|||
if($is_photo) {
|
||||
require_once('include/photos.php');
|
||||
$args = array( 'resource_id' => $this->data['hash'], 'album' => $album, 'os_path' => $f, 'filename' => $r[0]['filename'], 'getimagesize' => $gis, 'directory' => $direct );
|
||||
$p = photo_upload($c[0],get_app()->get_observer(),$args);
|
||||
$p = photo_upload($c[0],\App::get_observer(),$args);
|
||||
}
|
||||
|
||||
// update the folder's lastmodified timestamp
|
||||
|
@ -205,6 +219,12 @@ class File extends DAV\Node implements DAV\IFile {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$sync = attach_export_data($c[0],$this->data['hash']);
|
||||
|
||||
if($sync)
|
||||
build_sync_packet($c[0]['channel_id'],array('file' => array($sync)));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -318,5 +338,12 @@ class File extends DAV\Node implements DAV\IFile {
|
|||
}
|
||||
|
||||
attach_delete($this->auth->owner_id, $this->data['hash']);
|
||||
|
||||
$ch = channelx_by_n($this->auth->owner_id);
|
||||
if($ch) {
|
||||
$sync = attach_export_data($ch,$this->data['hash'],true);
|
||||
if($sync)
|
||||
build_sync_packet($ch['channel_id'],array('file' => array($sync)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
36
sources/Zotlabs/Web/CheckJS.php
Normal file
36
sources/Zotlabs/Web/CheckJS.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
namespace Zotlabs\Web;
|
||||
|
||||
|
||||
class CheckJS {
|
||||
|
||||
private static $jsdisabled = 0;
|
||||
|
||||
function __construct($test = 0) {
|
||||
if(intval($_REQUEST['jsdisabled']))
|
||||
$this->jsdisabled = 1;
|
||||
if(intval($_COOKIE['jsdisabled']))
|
||||
$this->jsdisabled = 1;
|
||||
|
||||
if(! $this->jsdisabled) {
|
||||
$page = urlencode(\App::$query_string);
|
||||
|
||||
if($test) {
|
||||
\App::$page['htmlhead'] .= "\r\n" . '<meta http-equiv="refresh" content="0; url=' . z_root() . '/nojs?f=&redir=' . $page . '">' . "\r\n";
|
||||
}
|
||||
else {
|
||||
\App::$page['htmlhead'] .= "\r\n" . '<noscript><meta http-equiv="refresh" content="0; url=' . z_root() . '/nojs?f=&redir=' . $page . '"></noscript>' . "\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function disabled() {
|
||||
return self::$jsdisabled;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -9,9 +9,9 @@ class Router {
|
|||
|
||||
/**
|
||||
*
|
||||
* We have already parsed the server path into $a->argc and $a->argv
|
||||
* We have already parsed the server path into App::$argc and App::$argv
|
||||
*
|
||||
* $a->argv[0] is our module name. We will load the file mod/{$a->argv[0]}.php
|
||||
* App::$argv[0] is our module name. We will load the file mod/{App::$argv[0]}.php
|
||||
* and use it for handling our URL request.
|
||||
* The module file contains a few functions that we call in various circumstances
|
||||
* and in the following order:
|
||||
|
@ -25,7 +25,9 @@ class Router {
|
|||
* further processing.
|
||||
*/
|
||||
|
||||
if(strlen($a->module)) {
|
||||
$module = \App::$module;
|
||||
|
||||
if(strlen($module)) {
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -34,14 +36,14 @@ class Router {
|
|||
*
|
||||
*/
|
||||
|
||||
if(is_array($a->plugins) && in_array($a->module,$a->plugins) && file_exists("addon/{$a->module}/{$a->module}.php")) {
|
||||
include_once("addon/{$a->module}/{$a->module}.php");
|
||||
if(function_exists($a->module . '_module'))
|
||||
$a->module_loaded = true;
|
||||
if(is_array(\App::$plugins) && in_array($module,\App::$plugins) && file_exists("addon/{$module}/{$module}.php")) {
|
||||
include_once("addon/{$module}/{$module}.php");
|
||||
if(function_exists($module . '_module'))
|
||||
\App::$module_loaded = true;
|
||||
}
|
||||
|
||||
if((strpos($a->module,'admin') === 0) && (! is_site_admin())) {
|
||||
$a->module_loaded = false;
|
||||
if((strpos($module,'admin') === 0) && (! is_site_admin())) {
|
||||
\App::$module_loaded = false;
|
||||
notice( t('Permission denied.') . EOL);
|
||||
goaway(z_root());
|
||||
}
|
||||
|
@ -51,17 +53,19 @@ class Router {
|
|||
* Otherwise, look for the standard program module in the 'mod' directory
|
||||
*/
|
||||
|
||||
if(! $a->module_loaded) {
|
||||
if(file_exists("mod/site/{$a->module}.php")) {
|
||||
include_once("mod/site/{$a->module}.php");
|
||||
$a->module_loaded = true;
|
||||
if(! (\App::$module_loaded)) {
|
||||
if(file_exists("mod/site/{$module}.php")) {
|
||||
include_once("mod/site/{$module}.php");
|
||||
\App::$module_loaded = true;
|
||||
}
|
||||
elseif(file_exists("mod/{$a->module}.php")) {
|
||||
include_once("mod/{$a->module}.php");
|
||||
$a->module_loaded = true;
|
||||
elseif(file_exists("mod/{$module}.php")) {
|
||||
include_once("mod/{$module}.php");
|
||||
\App::$module_loaded = true;
|
||||
}
|
||||
else logger("mod/{$module}.php not found.");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This provides a place for plugins to register module handlers which don't otherwise exist on the system.
|
||||
* If the plugin sets 'installed' to true we won't throw a 404 error for the specified module even if
|
||||
|
@ -69,10 +73,10 @@ class Router {
|
|||
* The plugin should catch at least one of the module hooks for this URL.
|
||||
*/
|
||||
|
||||
$x = array('module' => $a->module, 'installed' => false);
|
||||
$x = array('module' => $module, 'installed' => false);
|
||||
call_hooks('module_loaded', $x);
|
||||
if($x['installed'])
|
||||
$a->module_loaded = true;
|
||||
\App::$module_loaded = true;
|
||||
|
||||
/**
|
||||
* The URL provided does not resolve to a valid module.
|
||||
|
@ -85,28 +89,28 @@ class Router {
|
|||
* Otherwise we are going to emit a 404 not found.
|
||||
*/
|
||||
|
||||
if(! $a->module_loaded) {
|
||||
if(! (\App::$module_loaded)) {
|
||||
|
||||
// Stupid browser tried to pre-fetch our Javascript img template. Don't log the event or return anything - just quietly exit.
|
||||
if((x($_SERVER, 'QUERY_STRING')) && preg_match('/{[0-9]}/', $_SERVER['QUERY_STRING']) !== 0) {
|
||||
killme();
|
||||
}
|
||||
|
||||
if((x($_SERVER, 'QUERY_STRING')) && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html') && $a->config['system']['dreamhost_error_hack']) {
|
||||
if((x($_SERVER, 'QUERY_STRING')) && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html') && \App::$config['system']['dreamhost_error_hack']) {
|
||||
logger('index.php: dreamhost_error_hack invoked. Original URI =' . $_SERVER['REQUEST_URI']);
|
||||
goaway($a->get_baseurl() . $_SERVER['REQUEST_URI']);
|
||||
goaway(z_root() . $_SERVER['REQUEST_URI']);
|
||||
}
|
||||
|
||||
logger('index.php: page not found: ' . $_SERVER['REQUEST_URI'] . ' ADDRESS: ' . $_SERVER['REMOTE_ADDR'] . ' QUERY: ' . $_SERVER['QUERY_STRING'], LOGGER_DEBUG);
|
||||
header($_SERVER['SERVER_PROTOCOL'] . ' 404 ' . t('Not Found'));
|
||||
$tpl = get_markup_template('404.tpl');
|
||||
$a->page['content'] = replace_macros($tpl, array(
|
||||
\App::$page['content'] = replace_macros($tpl, array(
|
||||
'$message' => t('Page not found.')
|
||||
));
|
||||
|
||||
// pretend this is a module so it will initialise the theme
|
||||
$a->module = '404';
|
||||
$a->module_loaded = true;
|
||||
\App::$module = '404';
|
||||
\App::$module_loaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -118,8 +122,8 @@ class Router {
|
|||
* Call module functions
|
||||
*/
|
||||
|
||||
if($a->module_loaded) {
|
||||
$a->page['page_title'] = $a->module;
|
||||
if(\App::$module_loaded) {
|
||||
\App::$page['page_title'] = \App::$module;
|
||||
$placeholder = '';
|
||||
|
||||
/**
|
||||
|
@ -129,11 +133,11 @@ class Router {
|
|||
* to over-ride them.
|
||||
*/
|
||||
|
||||
if(function_exists($a->module . '_init')) {
|
||||
if(function_exists(\App::$module . '_init')) {
|
||||
$arr = array('init' => true, 'replace' => false);
|
||||
call_hooks($a->module . '_mod_init', $arr);
|
||||
call_hooks(\App::$module . '_mod_init', $arr);
|
||||
if(! $arr['replace']) {
|
||||
$func = $a->module . '_init';
|
||||
$func = \App::$module . '_init';
|
||||
$func($a);
|
||||
}
|
||||
}
|
||||
|
@ -167,32 +171,32 @@ class Router {
|
|||
$func = str_replace('-', '_', current_theme()) . '_init';
|
||||
$func($a);
|
||||
}
|
||||
elseif (x($a->theme_info, 'extends') && file_exists('view/theme/' . $a->theme_info['extends'] . '/php/theme.php')) {
|
||||
require_once('view/theme/' . $a->theme_info['extends'] . '/php/theme.php');
|
||||
if(function_exists(str_replace('-', '_', $a->theme_info['extends']) . '_init')) {
|
||||
$func = str_replace('-', '_', $a->theme_info['extends']) . '_init';
|
||||
elseif (x(\App::$theme_info, 'extends') && file_exists('view/theme/' . \App::$theme_info['extends'] . '/php/theme.php')) {
|
||||
require_once('view/theme/' . \App::$theme_info['extends'] . '/php/theme.php');
|
||||
if(function_exists(str_replace('-', '_', \App::$theme_info['extends']) . '_init')) {
|
||||
$func = str_replace('-', '_', \App::$theme_info['extends']) . '_init';
|
||||
$func($a);
|
||||
}
|
||||
}
|
||||
|
||||
if(($_SERVER['REQUEST_METHOD'] === 'POST') && (! $a->error)
|
||||
&& (function_exists($a->module . '_post'))
|
||||
if(($_SERVER['REQUEST_METHOD'] === 'POST') && (! \App::$error)
|
||||
&& (function_exists(\App::$module . '_post'))
|
||||
&& (! x($_POST, 'auth-params'))) {
|
||||
call_hooks($a->module . '_mod_post', $_POST);
|
||||
$func = $a->module . '_post';
|
||||
call_hooks(\App::$module . '_mod_post', $_POST);
|
||||
$func = \App::$module . '_post';
|
||||
$func($a);
|
||||
}
|
||||
|
||||
if((! $a->error) && (function_exists($a->module . '_content'))) {
|
||||
$arr = array('content' => $a->page['content'], 'replace' => false);
|
||||
call_hooks($a->module . '_mod_content', $arr);
|
||||
$a->page['content'] = $arr['content'];
|
||||
if((! \App::$error) && (function_exists(\App::$module . '_content'))) {
|
||||
$arr = array('content' => \App::$page['content'], 'replace' => false);
|
||||
call_hooks(\App::$module . '_mod_content', $arr);
|
||||
\App::$page['content'] = $arr['content'];
|
||||
if(! $arr['replace']) {
|
||||
$func = $a->module . '_content';
|
||||
$func = \App::$module . '_content';
|
||||
$arr = array('content' => $func($a));
|
||||
}
|
||||
call_hooks($a->module . '_mod_aftercontent', $arr);
|
||||
$a->page['content'] .= $arr['content'];
|
||||
call_hooks(\App::$module . '_mod_aftercontent', $arr);
|
||||
\App::$page['content'] .= $arr['content'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
160
sources/Zotlabs/Web/Session.php
Normal file
160
sources/Zotlabs/Web/Session.php
Normal file
|
@ -0,0 +1,160 @@
|
|||
<?php
|
||||
|
||||
namespace Zotlabs\Web;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief This file includes session related functions.
|
||||
*
|
||||
* Session management functions. These provide database storage of PHP
|
||||
* session info.
|
||||
*/
|
||||
|
||||
|
||||
class Session {
|
||||
|
||||
private static $handler = null;
|
||||
private static $session_started = false;
|
||||
|
||||
function init() {
|
||||
|
||||
$gc_probability = 50;
|
||||
|
||||
ini_set('session.gc_probability', $gc_probability);
|
||||
ini_set('session.use_only_cookies', 1);
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
|
||||
/*
|
||||
* Set our session storage functions.
|
||||
*/
|
||||
|
||||
$handler = new \Zotlabs\Web\SessionHandler();
|
||||
self::$handler = $handler;
|
||||
|
||||
$x = session_set_save_handler($handler,true);
|
||||
if(! $x)
|
||||
logger('Session save handler initialisation failed.',LOGGER_NORMAL,LOG_ERR);
|
||||
|
||||
// Force cookies to be secure (https only) if this site is SSL enabled.
|
||||
// Must be done before session_start().
|
||||
|
||||
$arr = session_get_cookie_params();
|
||||
session_set_cookie_params(
|
||||
((isset($arr['lifetime'])) ? $arr['lifetime'] : 0),
|
||||
((isset($arr['path'])) ? $arr['path'] : '/'),
|
||||
((isset($arr['domain'])) ? $arr['domain'] : App::get_hostname()),
|
||||
((isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? true : false),
|
||||
((isset($arr['httponly'])) ? $arr['httponly'] : true)
|
||||
);
|
||||
}
|
||||
|
||||
function start() {
|
||||
session_start();
|
||||
self::$session_started = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Resets the current session.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function nuke() {
|
||||
self::new_cookie(0); // 0 means delete on browser exit
|
||||
if($_SESSION && count($_SESSION)) {
|
||||
foreach($_SESSION as $k => $v) {
|
||||
unset($_SESSION[$k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function new_cookie($xtime) {
|
||||
|
||||
$newxtime = (($xtime> 0) ? (time() + $xtime) : 0);
|
||||
|
||||
$old_sid = session_id();
|
||||
|
||||
if(self::$handler && self::$session_started) {
|
||||
session_regenerate_id(true);
|
||||
|
||||
// force SessionHandler record creation with the new session_id
|
||||
// which occurs as a side effect of read()
|
||||
|
||||
self::$handler->read(session_id());
|
||||
}
|
||||
else
|
||||
logger('no session handler');
|
||||
|
||||
if (x($_COOKIE, 'jsdisabled')) {
|
||||
setcookie('jsdisabled', $_COOKIE['jsdisabled'], $newxtime);
|
||||
}
|
||||
setcookie(session_name(),session_id(),$newxtime);
|
||||
|
||||
$arr = array('expire' => $xtime);
|
||||
call_hooks('new_cookie', $arr);
|
||||
|
||||
}
|
||||
|
||||
function extend_cookie() {
|
||||
|
||||
// if there's a long-term cookie, extend it
|
||||
|
||||
$xtime = (($_SESSION['remember_me']) ? (60 * 60 * 24 * 365) : 0 );
|
||||
|
||||
if($xtime)
|
||||
setcookie(session_name(),session_id(),(time() + $xtime));
|
||||
$arr = array('expire' => $xtime);
|
||||
call_hooks('extend_cookie', $arr);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function return_check() {
|
||||
|
||||
// check a returning visitor against IP changes.
|
||||
// If the change results in being blocked from re-entry with the current cookie
|
||||
// nuke the session and logout.
|
||||
// Returning at all indicates the session is still valid.
|
||||
|
||||
// first check if we're enforcing that sessions can't change IP address
|
||||
// @todo what to do with IPv6 addresses
|
||||
|
||||
if($_SESSION['addr'] && $_SESSION['addr'] != $_SERVER['REMOTE_ADDR']) {
|
||||
logger('SECURITY: Session IP address changed: ' . $_SESSION['addr'] . ' != ' . $_SERVER['REMOTE_ADDR']);
|
||||
|
||||
$partial1 = substr($_SESSION['addr'], 0, strrpos($_SESSION['addr'], '.'));
|
||||
$partial2 = substr($_SERVER['REMOTE_ADDR'], 0, strrpos($_SERVER['REMOTE_ADDR'], '.'));
|
||||
|
||||
$paranoia = intval(get_pconfig($_SESSION['uid'], 'system', 'paranoia'));
|
||||
|
||||
if(! $paranoia)
|
||||
$paranoia = intval(get_config('system', 'paranoia'));
|
||||
|
||||
switch($paranoia) {
|
||||
case 0:
|
||||
// no IP checking
|
||||
break;
|
||||
case 2:
|
||||
// check 2 octets
|
||||
$partial1 = substr($partial1, 0, strrpos($partial1, '.'));
|
||||
$partial2 = substr($partial2, 0, strrpos($partial2, '.'));
|
||||
if($partial1 == $partial2)
|
||||
break;
|
||||
case 1:
|
||||
// check 3 octets
|
||||
if($partial1 == $partial2)
|
||||
break;
|
||||
case 3:
|
||||
default:
|
||||
// check any difference at all
|
||||
logger('Session address changed. Paranoid setting in effect, blocking session. '
|
||||
. $_SESSION['addr'] . ' != ' . $_SERVER['REMOTE_ADDR']);
|
||||
self::nuke();
|
||||
goaway(z_root());
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
88
sources/Zotlabs/Web/SessionHandler.php
Normal file
88
sources/Zotlabs/Web/SessionHandler.php
Normal file
|
@ -0,0 +1,88 @@
|
|||
<?php
|
||||
|
||||
namespace Zotlabs\Web;
|
||||
|
||||
|
||||
class SessionHandler implements \SessionHandlerInterface {
|
||||
|
||||
|
||||
function open ($s, $n) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// IMPORTANT: if we read the session and it doesn't exist, create an empty record.
|
||||
// We rely on this due to differing PHP implementation of session_regenerate_id()
|
||||
// some which call read explicitly and some that do not. So we call it explicitly
|
||||
// just after sid regeneration to force a record to exist.
|
||||
|
||||
function read ($id) {
|
||||
|
||||
if($id) {
|
||||
$r = q("SELECT `data` FROM `session` WHERE `sid`= '%s'", dbesc($id));
|
||||
|
||||
if($r) {
|
||||
return $r[0]['data'];
|
||||
}
|
||||
else {
|
||||
q("INSERT INTO `session` (sid, expire) values ('%s', '%s')",
|
||||
dbesc($id),
|
||||
dbesc(time() + 300)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
function write ($id, $data) {
|
||||
|
||||
if(! $id || ! $data) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Unless we authenticate somehow, only keep a session for 5 minutes
|
||||
// The viewer can extend this by performing any web action using the
|
||||
// original cookie, but this allows us to cleanup the hundreds or
|
||||
// thousands of empty sessions left around from web crawlers which are
|
||||
// assigned cookies on each page that they never use.
|
||||
|
||||
$expire = time() + 300;
|
||||
|
||||
if($_SESSION) {
|
||||
if(array_key_exists('remember_me',$_SESSION) && intval($_SESSION['remember_me']))
|
||||
$expire = time() + (60 * 60 * 24 * 365);
|
||||
elseif(local_channel())
|
||||
$expire = time() + (60 * 60 * 24 * 3);
|
||||
elseif(remote_channel())
|
||||
$expire = time() + (60 * 60 * 24 * 1);
|
||||
}
|
||||
|
||||
q("UPDATE `session`
|
||||
SET `data` = '%s', `expire` = '%s' WHERE `sid` = '%s'",
|
||||
dbesc($data),
|
||||
dbesc($expire),
|
||||
dbesc($id)
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function close() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function destroy ($id) {
|
||||
q("DELETE FROM `session` WHERE `sid` = '%s'", dbesc($id));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function gc($expire) {
|
||||
q("DELETE FROM session WHERE expire < %d", dbesc(time()));
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -132,7 +132,7 @@ class Auth {
|
|||
// tell them to logout if they're logged in locally as anything but the target remote account
|
||||
// in which case just shut up because they don't need to be doing this at all.
|
||||
|
||||
if (get_app()->channel['channel_hash'] == $hubloc['xchan_hash']) {
|
||||
if (\App::$channel['channel_hash'] == $hubloc['xchan_hash']) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
@ -242,9 +242,9 @@ class Auth {
|
|||
|
||||
$arr = array('xchan' => $hubloc, 'url' => $this->desturl, 'session' => $_SESSION);
|
||||
call_hooks('magic_auth_success',$arr);
|
||||
get_app()->set_observer($hubloc);
|
||||
\App::set_observer($hubloc);
|
||||
require_once('include/security.php');
|
||||
get_app()->set_groups(init_groups_visitor($_SESSION['visitor_id']));
|
||||
\App::set_groups(init_groups_visitor($_SESSION['visitor_id']));
|
||||
info(sprintf( t('Welcome %s. Remote authentication successful.'),$hubloc['xchan_name']));
|
||||
logger('mod_zot: auth success from ' . $hubloc['xchan_addr']);
|
||||
$this->success = true;
|
||||
|
@ -341,5 +341,5 @@ class Auth {
|
|||
* Service_class can be used by cooperating sites to provide different access rights based on account rights and subscription plans. It is
|
||||
* a string whose contents are not defined by protocol. Example: "basic" or "gold".
|
||||
*
|
||||
* @param[in,out] App &$a
|
||||
* @param[in,out] \App &$a
|
||||
*/
|
||||
|
|
42
sources/Zotlabs/Zot/Verify.php
Normal file
42
sources/Zotlabs/Zot/Verify.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace Zotlabs\Zot;
|
||||
|
||||
|
||||
class Verify {
|
||||
|
||||
function create($type,$channel_id,$token,$meta) {
|
||||
return q("insert into verify ( type, channel, token, meta, created ) values ( '%s', %d, '%s', '%s', '%s' )",
|
||||
dbesc($type),
|
||||
intval($channel_id),
|
||||
dbesc($token),
|
||||
dbesc($meta),
|
||||
dbesc(datetime_convert())
|
||||
);
|
||||
}
|
||||
|
||||
function match($type,$channel_id,$token,$meta) {
|
||||
$r = q("select id from verify where type = '%s' and channel = %d and token = '%s' and meta = '%s' limit 1",
|
||||
dbesc($type),
|
||||
intval($channel_id),
|
||||
dbesc($token),
|
||||
dbesc($meta)
|
||||
);
|
||||
if($r) {
|
||||
q("delete from verify where id = %d",
|
||||
intval($r[0]['id'])
|
||||
);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function purge($type,$interval) {
|
||||
q("delete from verify where type = '%s' and created < %s - INTERVAL %s",
|
||||
dbesc($type),
|
||||
db_utcnow(),
|
||||
db_quoteinterval($interval)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -28,7 +28,7 @@ function bookmarker_prepare_body(&$a,&$b) {
|
|||
if(! strpos($b['html'],'bookmark-identifier'))
|
||||
return;
|
||||
|
||||
if(function_exists('redbasic_init') || get_app()->theme_info['extends'] == 'redbasic')
|
||||
if(function_exists('redbasic_init') || App::$theme_info['extends'] == 'redbasic')
|
||||
$bookmarkicon = '<i class="icon-bookmark"></i>';
|
||||
else
|
||||
$bookmarkicon = '<img src="addon/bookmarker/bookmarker.png" width="19px" height="20px" alt="#^" />';
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Report Bug"] = "Informar de problema";
|
||||
App::$strings["Report Bug"] = "Informar de problema";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Report Bug"] = "Nahlásit chybu";
|
||||
App::$strings["Report Bug"] = "Nahlásit chybu";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Report Bug"] = "Fehlerreport erstellen";
|
||||
App::$strings["Report Bug"] = "Fehlerreport erstellen";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Report Bug"] = "Skribi cimraporton";
|
||||
App::$strings["Report Bug"] = "Skribi cimraporton";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Report Bug"] = "Informe de errores";
|
||||
App::$strings["Report Bug"] = "Informe de errores";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Report Bug"] = "Signaler un bug";
|
||||
App::$strings["Report Bug"] = "Signaler un bug";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Report Bug"] = "Tilkynna bilun";
|
||||
App::$strings["Report Bug"] = "Tilkynna bilun";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Report Bug"] = "Segnala un Bug";
|
||||
App::$strings["Report Bug"] = "Segnala un Bug";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Report Bug"] = "";
|
||||
App::$strings["Report Bug"] = "";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Report Bug"] = "Zgłoś problem";
|
||||
App::$strings["Report Bug"] = "Zgłoś problem";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Report Bug"] = "Relate um Bug";
|
||||
App::$strings["Report Bug"] = "Relate um Bug";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Report Bug"] = "Сообщить об ошибке";
|
||||
App::$strings["Report Bug"] = "Сообщить об ошибке";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Report Bug"] = "报案程序错误";
|
||||
App::$strings["Report Bug"] = "报案程序错误";
|
||||
|
|
|
@ -285,7 +285,7 @@ id.value = ""
|
|||
</script>
|
||||
|
||||
EOT;
|
||||
$a->page['htmlhead'] .= $x;
|
||||
App::$page['htmlhead'] .= $x;
|
||||
}
|
||||
|
||||
function calc_content($app) {
|
||||
|
|
|
@ -24,7 +24,7 @@ logger('dfedfix: ' . print_r($b,true));
|
|||
$x = str_replace('</Subject>','</Subject>
|
||||
<Alias>' . z_root() . '/channel/' . $b['user']['channel_address'] . '</Alias>',$x);
|
||||
$x = str_replace('.AQAB" />','.AQAB "/>
|
||||
<Link rel="salmon" href="' . z_root() . '/receive/users/' . $b['user']['channel_guid'] . str_replace('.','',$a->get_hostname()) . '"/>',$x);
|
||||
<Link rel="salmon" href="' . z_root() . '/receive/users/' . $b['user']['channel_guid'] . str_replace('.','',App::get_hostname()) . '"/>',$x);
|
||||
$b['xml'] = $x;
|
||||
|
||||
}
|
||||
|
|
|
@ -142,51 +142,53 @@ function diaspora_dispatch($importer,$msg) {
|
|||
$msg['message']);
|
||||
|
||||
|
||||
$parsed_xml = parse_xml_string($msg['message'],false);
|
||||
// $parsed_xml = parse_xml_string($msg['message'],false);
|
||||
|
||||
$xmlbase = $parsed_xml->post;
|
||||
$parsed_xml = xml2array($msg['message'],false,0,'tag');
|
||||
|
||||
$xmlbase = $parsed_xml['post'];
|
||||
|
||||
// logger('diaspora_dispatch: ' . print_r($xmlbase,true), LOGGER_DATA);
|
||||
|
||||
|
||||
if($xmlbase->request) {
|
||||
$ret = diaspora_request($importer,$xmlbase->request);
|
||||
if($xmlbase['request']) {
|
||||
$ret = diaspora_request($importer,$xmlbase['request']);
|
||||
}
|
||||
elseif($xmlbase->status_message) {
|
||||
$ret = diaspora_post($importer,$xmlbase->status_message,$msg);
|
||||
elseif($xmlbase['status_message']) {
|
||||
$ret = diaspora_post($importer,$xmlbase['status_message'],$msg);
|
||||
}
|
||||
elseif($xmlbase->profile) {
|
||||
$ret = diaspora_profile($importer,$xmlbase->profile,$msg);
|
||||
elseif($xmlbase['profile']) {
|
||||
$ret = diaspora_profile($importer,$xmlbase['profile'],$msg);
|
||||
}
|
||||
elseif($xmlbase->comment) {
|
||||
$ret = diaspora_comment($importer,$xmlbase->comment,$msg);
|
||||
elseif($xmlbase['comment']) {
|
||||
$ret = diaspora_comment($importer,$xmlbase['comment'],$msg);
|
||||
}
|
||||
elseif($xmlbase->like) {
|
||||
$ret = diaspora_like($importer,$xmlbase->like,$msg);
|
||||
elseif($xmlbase['like']) {
|
||||
$ret = diaspora_like($importer,$xmlbase['like'],$msg);
|
||||
}
|
||||
elseif($xmlbase->asphoto) {
|
||||
$ret = diaspora_asphoto($importer,$xmlbase->asphoto,$msg);
|
||||
elseif($xmlbase['asphoto']) {
|
||||
$ret = diaspora_asphoto($importer,$xmlbase['asphoto'],$msg);
|
||||
}
|
||||
elseif($xmlbase->reshare) {
|
||||
$ret = diaspora_reshare($importer,$xmlbase->reshare,$msg);
|
||||
elseif($xmlbase['reshare']) {
|
||||
$ret = diaspora_reshare($importer,$xmlbase['reshare'],$msg);
|
||||
}
|
||||
elseif($xmlbase->retraction) {
|
||||
$ret = diaspora_retraction($importer,$xmlbase->retraction,$msg);
|
||||
elseif($xmlbase['retraction']) {
|
||||
$ret = diaspora_retraction($importer,$xmlbase['retraction'],$msg);
|
||||
}
|
||||
elseif($xmlbase->signed_retraction) {
|
||||
$ret = diaspora_signed_retraction($importer,$xmlbase->signed_retraction,$msg);
|
||||
elseif($xmlbase['signed_retraction']) {
|
||||
$ret = diaspora_signed_retraction($importer,$xmlbase['signed_retraction'],$msg);
|
||||
}
|
||||
elseif($xmlbase->relayable_retraction) {
|
||||
$ret = diaspora_signed_retraction($importer,$xmlbase->relayable_retraction,$msg);
|
||||
elseif($xmlbase['relayable_retraction']) {
|
||||
$ret = diaspora_signed_retraction($importer,$xmlbase['relayable_retraction'],$msg);
|
||||
}
|
||||
elseif($xmlbase->photo) {
|
||||
$ret = diaspora_photo($importer,$xmlbase->photo,$msg);
|
||||
elseif($xmlbase['photo']) {
|
||||
$ret = diaspora_photo($importer,$xmlbase['photo'],$msg);
|
||||
}
|
||||
elseif($xmlbase->conversation) {
|
||||
$ret = diaspora_conversation($importer,$xmlbase->conversation,$msg);
|
||||
elseif($xmlbase['conversation']) {
|
||||
$ret = diaspora_conversation($importer,$xmlbase['conversation'],$msg);
|
||||
}
|
||||
elseif($xmlbase->message) {
|
||||
$ret = diaspora_message($importer,$xmlbase->message,$msg);
|
||||
elseif($xmlbase['message']) {
|
||||
$ret = diaspora_message($importer,$xmlbase['message'],$msg);
|
||||
}
|
||||
else {
|
||||
logger('diaspora_dispatch: unknown message type: ' . print_r($xmlbase,true));
|
||||
|
@ -496,7 +498,7 @@ function diaspora_pubmsg_build($msg,$channel,$contact,$prvkey,$pubkey) {
|
|||
|
||||
logger('diaspora_pubmsg_build: ' . $msg, LOGGER_DATA, LOG_DEBUG);
|
||||
|
||||
$handle = $channel['channel_address'] . '@' . get_app()->get_hostname();
|
||||
$handle = $channel['channel_address'] . '@' . App::get_hostname();
|
||||
|
||||
|
||||
$b64url_data = base64url_encode($msg,false);
|
||||
|
@ -561,7 +563,7 @@ function diaspora_msg_build($msg,$channel,$contact,$prvkey,$pubkey,$public = fal
|
|||
$outer_iv = random_string(16);
|
||||
$b_outer_iv = base64_encode($outer_iv);
|
||||
|
||||
$handle = $channel['channel_address'] . '@' . get_app()->get_hostname();
|
||||
$handle = $channel['channel_address'] . '@' . App::get_hostname();
|
||||
|
||||
$padded_data = pkcs5_pad($msg,16);
|
||||
$inner_encrypted = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $inner_aes_key, $padded_data, MCRYPT_MODE_CBC, $inner_iv);
|
||||
|
@ -797,8 +799,8 @@ function diaspora_request($importer,$xml) {
|
|||
|
||||
$a = get_app();
|
||||
|
||||
$sender_handle = unxmlify($xml->sender_handle);
|
||||
$recipient_handle = unxmlify($xml->recipient_handle);
|
||||
$sender_handle = unxmlify($xml['sender_handle']);
|
||||
$recipient_handle = unxmlify($xml['recipient_handle']);
|
||||
|
||||
if(! $sender_handle || ! $recipient_handle)
|
||||
return;
|
||||
|
@ -845,7 +847,7 @@ function diaspora_request($importer,$xml) {
|
|||
//FIXME
|
||||
/*
|
||||
if(feature_enabled($channel['channel_id'],'premium_channel')) {
|
||||
$myaddr = $importer['channel_address'] . '@' . get_app()->get_hostname();
|
||||
$myaddr = $importer['channel_address'] . '@' . App::get_hostname();
|
||||
$cnv = random_string();
|
||||
$mid = random_string();
|
||||
|
||||
|
@ -996,9 +998,9 @@ function diaspora_request($importer,$xml) {
|
|||
function diaspora_post($importer,$xml,$msg) {
|
||||
|
||||
$a = get_app();
|
||||
$guid = notags(unxmlify($xml->guid));
|
||||
$diaspora_handle = notags(unxmlify($xml->diaspora_handle));
|
||||
$app = notags(xmlify($xml->provider_display_name));
|
||||
$guid = notags(unxmlify($xml['guid']));
|
||||
$diaspora_handle = notags(unxmlify($xml['diaspora_handle']));
|
||||
$app = notags(xmlify($xml['provider_display_name']));
|
||||
|
||||
|
||||
if($diaspora_handle != $msg['author']) {
|
||||
|
@ -1033,13 +1035,13 @@ function diaspora_post($importer,$xml,$msg) {
|
|||
return;
|
||||
}
|
||||
|
||||
$created = unxmlify($xml->created_at);
|
||||
$private = ((unxmlify($xml->public) == 'false') ? 1 : 0);
|
||||
$created = unxmlify($xml['created_at']);
|
||||
$private = ((unxmlify($xml['public']) == 'false') ? 1 : 0);
|
||||
|
||||
$body = diaspora2bb($xml->raw_message);
|
||||
$body = diaspora2bb($xml['raw_message']);
|
||||
|
||||
if($xml->photo) {
|
||||
$body = '[img]' . $xml->photo->remote_photo_path . $xml->photo->remote_photo_name . '[/img]' . "\n\n" . $body;
|
||||
if($xml['photo']) {
|
||||
$body = '[img]' . $xml['photo']['remote_photo_path'] . $xml['photo']['remote_photo_name'] . '[/img]' . "\n\n" . $body;
|
||||
$body = scale_external_images($body);
|
||||
}
|
||||
|
||||
|
@ -1164,27 +1166,29 @@ function get_diaspora_reshare_xml($url,$recurse = 0) {
|
|||
}
|
||||
logger('get_diaspora_reshare_xml: source: ' . $x['body'], LOGGER_DEBUG);
|
||||
|
||||
$source_xml = parse_xml_string($x['body'],false);
|
||||
// $source_xml = parse_xml_string($x['body'],false);
|
||||
|
||||
$source_xml = xml2array($x['body'],false,0,'tag');
|
||||
|
||||
if(! $source_xml) {
|
||||
logger('get_diaspora_reshare_xml: unparseable result from ' . $url);
|
||||
return '';
|
||||
}
|
||||
|
||||
if($source_xml->post->status_message) {
|
||||
if($source_xml['post']['status_message']) {
|
||||
return $source_xml;
|
||||
}
|
||||
|
||||
// see if it's a reshare of a reshare
|
||||
|
||||
if($source_xml->post->reshare)
|
||||
$xml = $source_xml->post->reshare;
|
||||
if($source_xml['post']['reshare'])
|
||||
$xml = $source_xml['post']['reshare'];
|
||||
else
|
||||
return false;
|
||||
|
||||
if($xml->root_diaspora_id && $xml->root_guid && $recurse < 15) {
|
||||
$orig_author = notags(unxmlify($xml->root_diaspora_id));
|
||||
$orig_guid = notags(unxmlify($xml->root_guid));
|
||||
if($xml['root_diaspora_id'] && $xml['root_guid'] && $recurse < 15) {
|
||||
$orig_author = notags(unxmlify($xml['root_diaspora_id']));
|
||||
$orig_guid = notags(unxmlify($xml['root_guid']));
|
||||
$source_url = 'https://' . substr($orig_author,strpos($orig_author,'@')+1) . '/p/' . $orig_guid . '.xml';
|
||||
$y = get_diaspora_reshare_xml($source_url,$recurse+1);
|
||||
if($y)
|
||||
|
@ -1200,8 +1204,8 @@ function diaspora_reshare($importer,$xml,$msg) {
|
|||
logger('diaspora_reshare: init: ' . print_r($xml,true), LOGGER_DATA);
|
||||
|
||||
$a = get_app();
|
||||
$guid = notags(unxmlify($xml->guid));
|
||||
$diaspora_handle = notags(unxmlify($xml->diaspora_handle));
|
||||
$guid = notags(unxmlify($xml['guid']));
|
||||
$diaspora_handle = notags(unxmlify($xml['diaspora_handle']));
|
||||
|
||||
|
||||
if($diaspora_handle != $msg['author']) {
|
||||
|
@ -1223,27 +1227,27 @@ function diaspora_reshare($importer,$xml,$msg) {
|
|||
return;
|
||||
}
|
||||
|
||||
$orig_author = notags(unxmlify($xml->root_diaspora_id));
|
||||
$orig_guid = notags(unxmlify($xml->root_guid));
|
||||
$orig_author = notags(unxmlify($xml['root_diaspora_id']));
|
||||
$orig_guid = notags(unxmlify($xml['root_guid']));
|
||||
|
||||
$source_url = 'https://' . substr($orig_author,strpos($orig_author,'@')+1) . '/p/' . $orig_guid . '.xml';
|
||||
$orig_url = 'https://'.substr($orig_author,strpos($orig_author,'@')+1).'/posts/'.$orig_guid;
|
||||
|
||||
$source_xml = get_diaspora_reshare_xml($source_url);
|
||||
|
||||
if($source_xml->post->status_message) {
|
||||
$body = diaspora2bb($source_xml->post->status_message->raw_message);
|
||||
if($source_xml['post']['status_message']) {
|
||||
$body = diaspora2bb($source_xml['post']['status_message']['raw_message']);
|
||||
|
||||
$orig_author = notags(unxmlify($source_xml->post->status_message->diaspora_handle));
|
||||
$orig_guid = notags(unxmlify($source_xml->post->status_message->guid));
|
||||
$orig_author = notags(unxmlify($source_xml['post']['status_message']['diaspora_handle']));
|
||||
$orig_guid = notags(unxmlify($source_xml['post']['status_message']['guid']));
|
||||
|
||||
|
||||
// Checking for embedded pictures
|
||||
if($source_xml->post->status_message->photo->remote_photo_path &&
|
||||
$source_xml->post->status_message->photo->remote_photo_name) {
|
||||
if($source_xml['post']['status_message']['photo']['remote_photo_path'] &&
|
||||
$source_xml['post']['status_message']['photo']['remote_photo_name']) {
|
||||
|
||||
$remote_photo_path = notags(unxmlify($source_xml->post->status_message->photo->remote_photo_path));
|
||||
$remote_photo_name = notags(unxmlify($source_xml->post->status_message->photo->remote_photo_name));
|
||||
$remote_photo_path = notags(unxmlify($source_xml['post']['status_message']['photo']['remote_photo_path']));
|
||||
$remote_photo_name = notags(unxmlify($source_xml['post']['status_message']['photo']['remote_photo_name']));
|
||||
|
||||
$body = '[img]'.$remote_photo_path.$remote_photo_name.'[/img]'."\n".$body;
|
||||
|
||||
|
@ -1278,8 +1282,8 @@ function diaspora_reshare($importer,$xml,$msg) {
|
|||
}
|
||||
|
||||
|
||||
$created = unxmlify($xml->created_at);
|
||||
$private = ((unxmlify($xml->public) == 'false') ? 1 : 0);
|
||||
$created = unxmlify($xml['created_at']);
|
||||
$private = ((unxmlify($xml['public']) == 'false') ? 1 : 0);
|
||||
|
||||
$datarray = array();
|
||||
|
||||
|
@ -1339,8 +1343,8 @@ function diaspora_reshare($importer,$xml,$msg) {
|
|||
. "' profile='" . $orig_author_link
|
||||
. "' avatar='" . $orig_author_photo
|
||||
. "' link='" . $orig_url
|
||||
. "' posted='" . datetime_convert('UTC','UTC',unxmlify($source_xml->post->status_message->created_at))
|
||||
. "' message_id='" . unxmlify($source_xml->post->status_message->guid)
|
||||
. "' posted='" . datetime_convert('UTC','UTC',unxmlify($source_xml['post']['status_message']['created_at']))
|
||||
. "' message_id='" . unxmlify($source_xml['post']['status_message']['guid'])
|
||||
. "']" . $body . "[/share]";
|
||||
|
||||
|
||||
|
@ -1381,8 +1385,8 @@ function diaspora_asphoto($importer,$xml,$msg) {
|
|||
logger('diaspora_asphoto called');
|
||||
|
||||
$a = get_app();
|
||||
$guid = notags(unxmlify($xml->guid));
|
||||
$diaspora_handle = notags(unxmlify($xml->diaspora_handle));
|
||||
$guid = notags(unxmlify($xml['guid']));
|
||||
$diaspora_handle = notags(unxmlify($xml['diaspora_handle']));
|
||||
|
||||
if($diaspora_handle != $msg['author']) {
|
||||
logger('diaspora_post: Potential forgery. Message handle is not the same as envelope sender.');
|
||||
|
@ -1421,15 +1425,15 @@ function diaspora_asphoto($importer,$xml,$msg) {
|
|||
);
|
||||
}
|
||||
|
||||
$created = unxmlify($xml->created_at);
|
||||
$private = ((unxmlify($xml->public) == 'false') ? 1 : 0);
|
||||
$created = unxmlify($xml['created_at']);
|
||||
$private = ((unxmlify($xml['public']) == 'false') ? 1 : 0);
|
||||
|
||||
if(strlen($xml->objectId) && ($xml->objectId != 0) && ($xml->image_url)) {
|
||||
$body = '[url=' . notags(unxmlify($xml->image_url)) . '][img]' . notags(unxmlify($xml->objectId)) . '[/img][/url]' . "\n";
|
||||
if(strlen($xml['objectId']) && ($xml['objectId'] != 0) && ($xml['image_url'])) {
|
||||
$body = '[url=' . notags(unxmlify($xml['image_url'])) . '][img]' . notags(unxmlify($xml['objectId'])) . '[/img][/url]' . "\n";
|
||||
$body = scale_external_images($body,false);
|
||||
}
|
||||
elseif($xml->image_url) {
|
||||
$body = '[img]' . notags(unxmlify($xml->image_url)) . '[/img]' . "\n";
|
||||
elseif($xml['image_url']) {
|
||||
$body = '[img]' . notags(unxmlify($xml['image_url'])) . '[/img]' . "\n";
|
||||
$body = scale_external_images($body);
|
||||
}
|
||||
else {
|
||||
|
@ -1466,7 +1470,7 @@ function diaspora_asphoto($importer,$xml,$msg) {
|
|||
|
||||
//if($message_id) {
|
||||
// q("update item set plink = '%s' where id = %d",
|
||||
// dbesc($a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $message_id),
|
||||
// dbesc(z_root() . '/display/' . $importer['nickname'] . '/' . $message_id),
|
||||
// intval($message_id)
|
||||
// );
|
||||
//}
|
||||
|
@ -1483,14 +1487,14 @@ function diaspora_asphoto($importer,$xml,$msg) {
|
|||
function diaspora_comment($importer,$xml,$msg) {
|
||||
|
||||
$a = get_app();
|
||||
$guid = notags(unxmlify($xml->guid));
|
||||
$parent_guid = notags(unxmlify($xml->parent_guid));
|
||||
$diaspora_handle = notags(unxmlify($xml->diaspora_handle));
|
||||
$target_type = notags(unxmlify($xml->target_type));
|
||||
$text = unxmlify($xml->text);
|
||||
$author_signature = notags(unxmlify($xml->author_signature));
|
||||
$guid = notags(unxmlify($xml['guid']));
|
||||
$parent_guid = notags(unxmlify($xml['parent_guid']));
|
||||
$diaspora_handle = notags(unxmlify($xml['diaspora_handle']));
|
||||
$target_type = notags(unxmlify($xml['target_type']));
|
||||
$text = unxmlify($xml['text']);
|
||||
$author_signature = notags(unxmlify($xml['author_signature']));
|
||||
|
||||
$parent_author_signature = (($xml->parent_author_signature) ? notags(unxmlify($xml->parent_author_signature)) : '');
|
||||
$parent_author_signature = (($xml['parent_author_signature']) ? notags(unxmlify($xml['parent_author_signature'])) : '');
|
||||
|
||||
$contact = diaspora_get_contact_by_handle($importer['channel_id'],$msg['author']);
|
||||
if(! $contact) {
|
||||
|
@ -1748,15 +1752,15 @@ function diaspora_conversation($importer,$xml,$msg) {
|
|||
|
||||
$a = get_app();
|
||||
|
||||
$guid = notags(unxmlify($xml->guid));
|
||||
$subject = notags(unxmlify($xml->subject));
|
||||
$diaspora_handle = notags(unxmlify($xml->diaspora_handle));
|
||||
$participant_handles = notags(unxmlify($xml->participant_handles));
|
||||
$created_at = datetime_convert('UTC','UTC',notags(unxmlify($xml->created_at)));
|
||||
$guid = notags(unxmlify($xml['guid']));
|
||||
$subject = notags(unxmlify($xml['subject']));
|
||||
$diaspora_handle = notags(unxmlify($xml['diaspora_handle']));
|
||||
$participant_handles = notags(unxmlify($xml['participant_handles']));
|
||||
$created_at = datetime_convert('UTC','UTC',notags(unxmlify($xml['created_at'])));
|
||||
|
||||
$parent_uri = $guid;
|
||||
|
||||
$messages = $xml->message;
|
||||
$messages = $xml['message'];
|
||||
|
||||
if(! count($messages)) {
|
||||
logger('diaspora_conversation: empty conversation');
|
||||
|
@ -1815,14 +1819,14 @@ function diaspora_conversation($importer,$xml,$msg) {
|
|||
|
||||
$reply = 0;
|
||||
|
||||
$msg_guid = notags(unxmlify($mesg->guid));
|
||||
$msg_parent_guid = notags(unxmlify($mesg->parent_guid));
|
||||
$msg_parent_author_signature = notags(unxmlify($mesg->parent_author_signature));
|
||||
$msg_author_signature = notags(unxmlify($mesg->author_signature));
|
||||
$msg_text = unxmlify($mesg->text);
|
||||
$msg_created_at = datetime_convert('UTC','UTC',notags(unxmlify($mesg->created_at)));
|
||||
$msg_diaspora_handle = notags(unxmlify($mesg->diaspora_handle));
|
||||
$msg_conversation_guid = notags(unxmlify($mesg->conversation_guid));
|
||||
$msg_guid = notags(unxmlify($mesg['guid']));
|
||||
$msg_parent_guid = notags(unxmlify($mesg['parent_guid']));
|
||||
$msg_parent_author_signature = notags(unxmlify($mesg['parent_author_signature']));
|
||||
$msg_author_signature = notags(unxmlify($mesg['author_signature']));
|
||||
$msg_text = unxmlify($mesg['text']);
|
||||
$msg_created_at = datetime_convert('UTC','UTC',notags(unxmlify($mesg['created_at'])));
|
||||
$msg_diaspora_handle = notags(unxmlify($mesg['diaspora_handle']));
|
||||
$msg_conversation_guid = notags(unxmlify($mesg['conversation_guid']));
|
||||
if($msg_conversation_guid != $guid) {
|
||||
logger('diaspora_conversation: message conversation guid does not belong to the current conversation. ' . $xml);
|
||||
continue;
|
||||
|
@ -1839,7 +1843,7 @@ function diaspora_conversation($importer,$xml,$msg) {
|
|||
}
|
||||
|
||||
|
||||
$author_signed_data = $msg_guid . ';' . $msg_parent_guid . ';' . $msg_text . ';' . unxmlify($mesg->created_at) . ';' . $msg_diaspora_handle . ';' . $msg_conversation_guid;
|
||||
$author_signed_data = $msg_guid . ';' . $msg_parent_guid . ';' . $msg_text . ';' . unxmlify($mesg['created_at']) . ';' . $msg_diaspora_handle . ';' . $msg_conversation_guid;
|
||||
|
||||
$author_signature = base64_decode($msg_author_signature);
|
||||
|
||||
|
@ -1864,7 +1868,7 @@ function diaspora_conversation($importer,$xml,$msg) {
|
|||
}
|
||||
|
||||
if($msg_parent_author_signature) {
|
||||
$owner_signed_data = $msg_guid . ';' . $msg_parent_guid . ';' . $msg_text . ';' . unxmlify($mesg->created_at) . ';' . $msg_diaspora_handle . ';' . $msg_conversation_guid;
|
||||
$owner_signed_data = $msg_guid . ';' . $msg_parent_guid . ';' . $msg_text . ';' . unxmlify($mesg['created_at']) . ';' . $msg_diaspora_handle . ';' . $msg_conversation_guid;
|
||||
|
||||
$parent_author_signature = base64_decode($msg_parent_author_signature);
|
||||
|
||||
|
@ -1934,14 +1938,14 @@ function diaspora_message($importer,$xml,$msg) {
|
|||
|
||||
$a = get_app();
|
||||
|
||||
$msg_guid = notags(unxmlify($xml->guid));
|
||||
$msg_parent_guid = notags(unxmlify($xml->parent_guid));
|
||||
$msg_parent_author_signature = notags(unxmlify($xml->parent_author_signature));
|
||||
$msg_author_signature = notags(unxmlify($xml->author_signature));
|
||||
$msg_text = unxmlify($xml->text);
|
||||
$msg_created_at = datetime_convert('UTC','UTC',notags(unxmlify($xml->created_at)));
|
||||
$msg_diaspora_handle = notags(unxmlify($xml->diaspora_handle));
|
||||
$msg_conversation_guid = notags(unxmlify($xml->conversation_guid));
|
||||
$msg_guid = notags(unxmlify($xml['guid']));
|
||||
$msg_parent_guid = notags(unxmlify($xml['parent_guid']));
|
||||
$msg_parent_author_signature = notags(unxmlify($xml['parent_author_signature']));
|
||||
$msg_author_signature = notags(unxmlify($xml['author_signature']));
|
||||
$msg_text = unxmlify($xml['text']);
|
||||
$msg_created_at = datetime_convert('UTC','UTC',notags(unxmlify($xml['created_at'])));
|
||||
$msg_diaspora_handle = notags(unxmlify($xml['diaspora_handle']));
|
||||
$msg_conversation_guid = notags(unxmlify($xml['conversation_guid']));
|
||||
|
||||
$parent_uri = $msg_parent_guid;
|
||||
|
||||
|
@ -1995,7 +1999,7 @@ function diaspora_message($importer,$xml,$msg) {
|
|||
}
|
||||
|
||||
|
||||
$author_signed_data = $msg_guid . ';' . $msg_parent_guid . ';' . $msg_text . ';' . unxmlify($xml->created_at) . ';' . $msg_diaspora_handle . ';' . $msg_conversation_guid;
|
||||
$author_signed_data = $msg_guid . ';' . $msg_parent_guid . ';' . $msg_text . ';' . unxmlify($xml['created_at']) . ';' . $msg_diaspora_handle . ';' . $msg_conversation_guid;
|
||||
|
||||
|
||||
$author_signature = base64_decode($msg_author_signature);
|
||||
|
@ -2074,19 +2078,19 @@ function diaspora_photo($importer,$xml,$msg) {
|
|||
|
||||
logger('diaspora_photo: init',LOGGER_DEBUG);
|
||||
|
||||
$remote_photo_path = notags(unxmlify($xml->remote_photo_path));
|
||||
$remote_photo_path = notags(unxmlify($xml['remote_photo_path']));
|
||||
|
||||
$remote_photo_name = notags(unxmlify($xml->remote_photo_name));
|
||||
$remote_photo_name = notags(unxmlify($xml['remote_photo_name']));
|
||||
|
||||
$status_message_guid = notags(unxmlify($xml->status_message_guid));
|
||||
$status_message_guid = notags(unxmlify($xml['status_message_guid']));
|
||||
|
||||
$guid = notags(unxmlify($xml->guid));
|
||||
$guid = notags(unxmlify($xml['guid']));
|
||||
|
||||
$diaspora_handle = notags(unxmlify($xml->diaspora_handle));
|
||||
$diaspora_handle = notags(unxmlify($xml['diaspora_handle']));
|
||||
|
||||
$public = notags(unxmlify($xml->public));
|
||||
$public = notags(unxmlify($xml['public']));
|
||||
|
||||
$created_at = notags(unxmlify($xml_created_at));
|
||||
$created_at = notags(unxmlify($xml['created_at']));
|
||||
|
||||
logger('diaspora_photo: status_message_guid: ' . $status_message_guid, LOGGER_DEBUG);
|
||||
|
||||
|
@ -2134,14 +2138,14 @@ function diaspora_photo($importer,$xml,$msg) {
|
|||
function diaspora_like($importer,$xml,$msg) {
|
||||
|
||||
$a = get_app();
|
||||
$guid = notags(unxmlify($xml->guid));
|
||||
$parent_guid = notags(unxmlify($xml->parent_guid));
|
||||
$diaspora_handle = notags(unxmlify($xml->diaspora_handle));
|
||||
$target_type = notags(unxmlify($xml->target_type));
|
||||
$positive = notags(unxmlify($xml->positive));
|
||||
$author_signature = notags(unxmlify($xml->author_signature));
|
||||
$guid = notags(unxmlify($xml['guid']));
|
||||
$parent_guid = notags(unxmlify($xml['parent_guid']));
|
||||
$diaspora_handle = notags(unxmlify($xml['diaspora_handle']));
|
||||
$target_type = notags(unxmlify($xml['target_type']));
|
||||
$positive = notags(unxmlify($xml['positive']));
|
||||
$author_signature = notags(unxmlify($xml['author_signature']));
|
||||
|
||||
$parent_author_signature = (($xml->parent_author_signature) ? notags(unxmlify($xml->parent_author_signature)) : '');
|
||||
$parent_author_signature = (($xml['parent_author_signature']) ? notags(unxmlify($xml['parent_author_signature'])) : '');
|
||||
|
||||
// likes on comments not supported here and likes on photos not supported by Diaspora
|
||||
|
||||
|
@ -2362,9 +2366,9 @@ function diaspora_like($importer,$xml,$msg) {
|
|||
function diaspora_retraction($importer,$xml) {
|
||||
|
||||
|
||||
$guid = notags(unxmlify($xml->guid));
|
||||
$diaspora_handle = notags(unxmlify($xml->diaspora_handle));
|
||||
$type = notags(unxmlify($xml->type));
|
||||
$guid = notags(unxmlify($xml['guid']));
|
||||
$diaspora_handle = notags(unxmlify($xml['diaspora_handle']));
|
||||
$type = notags(unxmlify($xml['type']));
|
||||
|
||||
$contact = diaspora_get_contact_by_handle($importer['channel_id'],$diaspora_handle);
|
||||
if(! $contact)
|
||||
|
@ -2393,12 +2397,12 @@ function diaspora_retraction($importer,$xml) {
|
|||
function diaspora_signed_retraction($importer,$xml,$msg) {
|
||||
|
||||
|
||||
$guid = notags(unxmlify($xml->target_guid));
|
||||
$diaspora_handle = notags(unxmlify($xml->sender_handle));
|
||||
$type = notags(unxmlify($xml->target_type));
|
||||
$sig = notags(unxmlify($xml->target_author_signature));
|
||||
$guid = notags(unxmlify($xml['target_guid']));
|
||||
$diaspora_handle = notags(unxmlify($xml['sender_handle']));
|
||||
$type = notags(unxmlify($xml['target_type']));
|
||||
$sig = notags(unxmlify($xml['target_author_signature']));
|
||||
|
||||
$parent_author_signature = (($xml->parent_author_signature) ? notags(unxmlify($xml->parent_author_signature)) : '');
|
||||
$parent_author_signature = (($xml['parent_author_signature']) ? notags(unxmlify($xml['parent_author_signature'])) : '');
|
||||
|
||||
$contact = diaspora_get_contact_by_handle($importer['channel_id'],$diaspora_handle);
|
||||
if(! $contact) {
|
||||
|
@ -2484,7 +2488,7 @@ function diaspora_signed_retraction($importer,$xml,$msg) {
|
|||
function diaspora_profile($importer,$xml,$msg) {
|
||||
|
||||
$a = get_app();
|
||||
$diaspora_handle = notags(unxmlify($xml->diaspora_handle));
|
||||
$diaspora_handle = notags(unxmlify($xml['diaspora_handle']));
|
||||
|
||||
|
||||
if($diaspora_handle != $msg['author']) {
|
||||
|
@ -2501,9 +2505,9 @@ function diaspora_profile($importer,$xml,$msg) {
|
|||
return 202;
|
||||
}
|
||||
|
||||
$name = unxmlify($xml->first_name) . ((strlen($xml->last_name)) ? ' ' . unxmlify($xml->last_name) : '');
|
||||
$image_url = unxmlify($xml->image_url);
|
||||
$birthday = unxmlify($xml->birthday);
|
||||
$name = unxmlify($xml['first_name']) . ((strlen($xml['last_name'])) ? ' ' . unxmlify($xml['last_name']) : '');
|
||||
$image_url = unxmlify($xml['image_url']);
|
||||
$birthday = unxmlify($xml['birthday']);
|
||||
|
||||
|
||||
$handle_parts = explode("@", $diaspora_handle);
|
||||
|
@ -2560,7 +2564,7 @@ function diaspora_share($owner,$contact) {
|
|||
|
||||
|
||||
|
||||
$myaddr = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
|
||||
$myaddr = $owner['channel_address'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3);
|
||||
|
||||
if(! array_key_exists('hubloc_hash',$contact)) {
|
||||
$c = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where xchan_hash = '%s' limit 1",
|
||||
|
@ -2588,11 +2592,11 @@ function diaspora_share($owner,$contact) {
|
|||
function diaspora_unshare($owner,$contact) {
|
||||
|
||||
$a = get_app();
|
||||
$myaddr = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
|
||||
$myaddr = $owner['channel_address'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3);
|
||||
|
||||
$tpl = get_markup_template('diaspora_retract.tpl','addon/diaspora');
|
||||
$msg = replace_macros($tpl, array(
|
||||
'$guid' => $owner['channel_guid'] . str_replace('.','',get_app()->get_hostname()),
|
||||
'$guid' => $owner['channel_guid'] . str_replace('.','',App::get_hostname()),
|
||||
'$type' => 'Person',
|
||||
'$handle' => $myaddr
|
||||
));
|
||||
|
@ -2606,7 +2610,7 @@ function diaspora_unshare($owner,$contact) {
|
|||
function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
|
||||
|
||||
$a = get_app();
|
||||
$myaddr = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
|
||||
$myaddr = $owner['channel_address'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3);
|
||||
|
||||
if(intval($item['id']) != intval($item['parent'])) {
|
||||
logger('attempted to send a comment as a top-level post');
|
||||
|
@ -2769,7 +2773,7 @@ function diaspora_send_images($item,$owner,$contact,$images,$public_batch = fals
|
|||
$a = get_app();
|
||||
if(! count($images))
|
||||
return;
|
||||
$mysite = substr($a->get_baseurl(),strpos($a->get_baseurl(),'://') + 3) . '/photo';
|
||||
$mysite = substr(z_root(),strpos(z_root(),'://') + 3) . '/photo';
|
||||
|
||||
$qi = array();
|
||||
|
||||
|
@ -2810,7 +2814,7 @@ function diaspora_send_images($item,$owner,$contact,$images,$public_batch = fals
|
|||
function diaspora_send_followup($item,$owner,$contact,$public_batch = false) {
|
||||
|
||||
$a = get_app();
|
||||
$myaddr = $owner['channel_address'] . '@' . get_app()->get_hostname();
|
||||
$myaddr = $owner['channel_address'] . '@' . App::get_hostname();
|
||||
$theiraddr = $contact['xchan_addr'];
|
||||
|
||||
// Diaspora doesn't support threaded comments, but some
|
||||
|
@ -2902,7 +2906,7 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
|
|||
|
||||
|
||||
$a = get_app();
|
||||
$myaddr = $owner['channel_address'] . '@' . get_app()->get_hostname();
|
||||
$myaddr = $owner['channel_address'] . '@' . App::get_hostname();
|
||||
|
||||
$text = bb2diaspora_itembody($item);
|
||||
|
||||
|
@ -2995,7 +2999,7 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
|
|||
// bug - nomadic identity may/will affect diaspora_handle_from_contact
|
||||
if(! $handle) {
|
||||
if($item['author_xchan'] === $owner['channel_hash'])
|
||||
$handle = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
|
||||
$handle = $owner['channel_address'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3);
|
||||
else
|
||||
$handle = diaspora_handle_from_contact($item['author_xchan']);
|
||||
}
|
||||
|
@ -3053,7 +3057,7 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
|
|||
function diaspora_send_retraction($item,$owner,$contact,$public_batch = false) {
|
||||
|
||||
$a = get_app();
|
||||
$myaddr = $owner['channel_address'] . '@' . get_app()->get_hostname();
|
||||
$myaddr = $owner['channel_address'] . '@' . App::get_hostname();
|
||||
|
||||
// Check whether the retraction is for a top-level post or whether it's a relayable
|
||||
if( $item['mid'] !== $item['parent_mid'] ) {
|
||||
|
@ -3084,7 +3088,7 @@ function diaspora_send_retraction($item,$owner,$contact,$public_batch = false) {
|
|||
function diaspora_send_mail($item,$owner,$contact) {
|
||||
|
||||
$a = get_app();
|
||||
$myaddr = $owner['channel_address'] . '@' . get_app()->get_hostname();
|
||||
$myaddr = $owner['channel_address'] . '@' . App::get_hostname();
|
||||
|
||||
$r = q("select * from conv where guid = '%s' and uid = %d limit 1",
|
||||
dbesc($item['conv_guid']),
|
||||
|
@ -3503,7 +3507,7 @@ function diaspora_profile_change($channel,$recip,$public_batch = false) {
|
|||
return;
|
||||
$profile = $r[0];
|
||||
|
||||
$handle = xmlify($channel['channel_address'] . '@' . get_app()->get_hostname());
|
||||
$handle = xmlify($channel['channel_address'] . '@' . App::get_hostname());
|
||||
$first = xmlify(((strpos($profile['channel_name'],' '))
|
||||
? trim(substr($profile['channel_name'],0,strpos($profile['channel_name'],' '))) : $profile['channel_name']));
|
||||
$last = xmlify((($first === $profile['channel_name']) ? '' : trim(substr($profile['channel_name'],strlen($first)))));
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
<?php
|
||||
|
||||
;
|
||||
$a->strings["\$projectname"] = "\$projectname";
|
||||
$a->strings["photo"] = "foto";
|
||||
$a->strings["status"] = "status";
|
||||
$a->strings["%1\$s likes %2\$s's %3\$s"] = "%1\$s vindt %2\$s's %3\$s leuk";
|
||||
$a->strings["Please choose"] = "Maak een keuze";
|
||||
$a->strings["Agree"] = "Eens";
|
||||
$a->strings["Disagree"] = "Oneens";
|
||||
$a->strings["Abstain"] = "Onthouding";
|
||||
$a->strings["I will attend"] = "Aanwezig";
|
||||
$a->strings["I will not attend"] = "Niet aanwezig";
|
||||
$a->strings["I may attend"] = "Mogelijk aanwezig";
|
||||
$a->strings["Diaspora Protocol Settings updated."] = "Diaspora-protocol-instellingen bijgewerkt.";
|
||||
$a->strings["Enable the (experimental) Diaspora protocol for this channel"] = "Het (experimentele) Diaspora-protocol voor dit kanaal inschakelen";
|
||||
$a->strings["Allow any Diaspora member to comment on your public posts"] = "Geef elk Diaspora-lid toestemming om op jouw openbare berichten te reageren";
|
||||
$a->strings["Prevent your hashtags from being redirected to other sites"] = "Voorkom dat jouw hashtags naar andere websites worden doorverwezen";
|
||||
$a->strings["Diaspora Protocol Settings"] = "Diaspora-protocol (compatibiliteit, incl Friendica)";
|
||||
$a->strings["Submit"] = "Opslaan";
|
||||
App::$strings["\$projectname"] = "\$projectname";
|
||||
App::$strings["photo"] = "foto";
|
||||
App::$strings["status"] = "status";
|
||||
App::$strings["%1\$s likes %2\$s's %3\$s"] = "%1\$s vindt %2\$s's %3\$s leuk";
|
||||
App::$strings["Please choose"] = "Maak een keuze";
|
||||
App::$strings["Agree"] = "Eens";
|
||||
App::$strings["Disagree"] = "Oneens";
|
||||
App::$strings["Abstain"] = "Onthouding";
|
||||
App::$strings["I will attend"] = "Aanwezig";
|
||||
App::$strings["I will not attend"] = "Niet aanwezig";
|
||||
App::$strings["I may attend"] = "Mogelijk aanwezig";
|
||||
App::$strings["Diaspora Protocol Settings updated."] = "Diaspora-protocol-instellingen bijgewerkt.";
|
||||
App::$strings["Enable the (experimental) Diaspora protocol for this channel"] = "Het (experimentele) Diaspora-protocol voor dit kanaal inschakelen";
|
||||
App::$strings["Allow any Diaspora member to comment on your public posts"] = "Geef elk Diaspora-lid toestemming om op jouw openbare berichten te reageren";
|
||||
App::$strings["Prevent your hashtags from being redirected to other sites"] = "Voorkom dat jouw hashtags naar andere websites worden doorverwezen";
|
||||
App::$strings["Diaspora Protocol Settings"] = "Diaspora-protocol (compatibiliteit, incl Friendica)";
|
||||
App::$strings["Submit"] = "Opslaan";
|
||||
|
|
|
@ -28,7 +28,7 @@ function p_init(&$a) {
|
|||
if(! $c)
|
||||
http_status_exit(404);
|
||||
|
||||
$myaddr = $c[0]['channel_address'] . '@' . $a->get_hostname();
|
||||
$myaddr = $c[0]['channel_address'] . '@' . App::get_hostname();
|
||||
|
||||
$item = $r[0];
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ function receive_post(&$a) {
|
|||
|
||||
$public = false;
|
||||
|
||||
logger('diaspora_receive: ' . print_r($a->argv, true), LOGGER_DEBUG);
|
||||
logger('diaspora_receive: ' . print_r(App::$argv, true), LOGGER_DEBUG);
|
||||
|
||||
if((argc() == 2) && (argv(1) === 'public')) {
|
||||
$public = true;
|
||||
|
@ -23,7 +23,7 @@ function receive_post(&$a) {
|
|||
http_status_exit(500);
|
||||
|
||||
$guid = argv(2);
|
||||
$hn = str_replace('.','',$a->get_hostname());
|
||||
$hn = str_replace('.','',App::get_hostname());
|
||||
if(($x = strpos($guid,$hn)) > 0)
|
||||
$guid = substr($guid,0,$x);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ function diaspost_jot_nets(&$a,&$b) {
|
|||
}
|
||||
|
||||
function diaspost_queue_hook(&$a,&$b) {
|
||||
$hostname = $a->get_hostname();
|
||||
$hostname = App::get_hostname();
|
||||
|
||||
$qi = q("SELECT * FROM `queue` WHERE `network` = '%s'",
|
||||
dbesc(NETWORK_DIASPORA2)
|
||||
|
@ -115,7 +115,7 @@ function diaspost_settings(&$a,&$s) {
|
|||
|
||||
/* Add our stylesheet to the page so we can make our settings look nice */
|
||||
|
||||
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/diaspost/diaspost.css' . '" media="all" />' . "\r\n";
|
||||
//App::$page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/diaspost/diaspost.css' . '" media="all" />' . "\r\n";
|
||||
|
||||
/* Get the current state of our config variables */
|
||||
|
||||
|
@ -228,7 +228,7 @@ function diaspost_post_local(&$a,&$b) {
|
|||
|
||||
|
||||
function diaspost_send(&$a,&$b) {
|
||||
$hostname = 'hubzilla ' . '(' . $a->get_hostname() . ')';
|
||||
$hostname = 'hubzilla ' . '(' . App::get_hostname() . ')';
|
||||
|
||||
logger('diaspost_send: invoked',LOGGER_DEBUG);
|
||||
|
||||
|
@ -328,11 +328,11 @@ function diaspost_send(&$a,&$b) {
|
|||
|
||||
// $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `self`", $b['uid']);
|
||||
// if (count($r))
|
||||
// $a->contact = $r[0]["id"];
|
||||
// App::$contact = $r[0]["id"];
|
||||
|
||||
// $s = serialize(array('url' => $url, 'item' => $b['id'], 'post' => $body));
|
||||
// require_once('include/queue_fn.php');
|
||||
// add_to_queue($a->contact,NETWORK_DIASPORA2,$s);
|
||||
// add_to_queue(App::$contact,NETWORK_DIASPORA2,$s);
|
||||
// notice(t('Diaspost post failed. Queued for retry.').EOL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ function dirstats_content(&$a) {
|
|||
$chatrooms = get_config('dirstats','chatrooms');
|
||||
$tags = get_config('dirstats','tags');
|
||||
|
||||
$ob = $a->get_observer();
|
||||
$ob = App::get_observer();
|
||||
$observer = $ob['xchan_hash'];
|
||||
// Requested by Martin
|
||||
$fountainofyouth = get_xconfig($observer, 'dirstats', 'averageage');
|
||||
|
|
|
@ -51,7 +51,7 @@ function dwpost_settings(&$a,&$s) {
|
|||
|
||||
/* Add our stylesheet to the page so we can make our settings look nice */
|
||||
|
||||
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/dwpost/dwpost.css' . '" media="all" />' . "\r\n";
|
||||
//App::$page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/dwpost/dwpost.css' . '" media="all" />' . "\r\n";
|
||||
|
||||
/* Get the current state of our config variables */
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Dreamwidth"] = "Missatge a Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Configuració d'enviaments a Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Habilitat el plugin d'enviaments a Dreamwidth";
|
||||
$a->strings["dreamwidth username"] = "Nom d'usuari a Dreamwidth";
|
||||
$a->strings["dreamwidth password"] = "Contrasenya a Dreamwidth";
|
||||
$a->strings["Post to dreamwidth by default"] = "Enviar per defecte a Dreamwidth";
|
||||
$a->strings["Submit"] = "Enviar";
|
||||
App::$strings["Post to Dreamwidth"] = "Missatge a Dreamwidth";
|
||||
App::$strings["Dreamwidth Post Settings"] = "Configuració d'enviaments a Dreamwidth";
|
||||
App::$strings["Enable dreamwidth Post Plugin"] = "Habilitat el plugin d'enviaments a Dreamwidth";
|
||||
App::$strings["dreamwidth username"] = "Nom d'usuari a Dreamwidth";
|
||||
App::$strings["dreamwidth password"] = "Contrasenya a Dreamwidth";
|
||||
App::$strings["Post to dreamwidth by default"] = "Enviar per defecte a Dreamwidth";
|
||||
App::$strings["Submit"] = "Enviar";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Dreamwidth"] = "Poslat na Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Nastavení Dreamwidth příspěvků";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Povolit dreamwidth Plugin";
|
||||
$a->strings["dreamwidth username"] = "dreamwidth uživatelské jméno";
|
||||
$a->strings["dreamwidth password"] = "dreamwidth heslo";
|
||||
$a->strings["Post to dreamwidth by default"] = "Defaultně umístit na dreamwidth";
|
||||
$a->strings["Submit"] = "Odeslat";
|
||||
App::$strings["Post to Dreamwidth"] = "Poslat na Dreamwidth";
|
||||
App::$strings["Dreamwidth Post Settings"] = "Nastavení Dreamwidth příspěvků";
|
||||
App::$strings["Enable dreamwidth Post Plugin"] = "Povolit dreamwidth Plugin";
|
||||
App::$strings["dreamwidth username"] = "dreamwidth uživatelské jméno";
|
||||
App::$strings["dreamwidth password"] = "dreamwidth heslo";
|
||||
App::$strings["Post to dreamwidth by default"] = "Defaultně umístit na dreamwidth";
|
||||
App::$strings["Submit"] = "Odeslat";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Dreamwidth"] = "In Dreamwidth veröffentlichen";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Dreamwidth Veröffentlichungs-Einstellungen";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Dreamwidth Post Plugin aktivieren";
|
||||
$a->strings["dreamwidth username"] = "Dreamwidth Benutzername";
|
||||
$a->strings["dreamwidth password"] = "Dreamwidth Passwort";
|
||||
$a->strings["Post to dreamwidth by default"] = "Standardmäßig bei Dreamwidth veröffentlichen";
|
||||
$a->strings["Submit"] = "Senden";
|
||||
App::$strings["Post to Dreamwidth"] = "In Dreamwidth veröffentlichen";
|
||||
App::$strings["Dreamwidth Post Settings"] = "Dreamwidth Veröffentlichungs-Einstellungen";
|
||||
App::$strings["Enable dreamwidth Post Plugin"] = "Dreamwidth Post Plugin aktivieren";
|
||||
App::$strings["dreamwidth username"] = "Dreamwidth Benutzername";
|
||||
App::$strings["dreamwidth password"] = "Dreamwidth Passwort";
|
||||
App::$strings["Post to dreamwidth by default"] = "Standardmäßig bei Dreamwidth veröffentlichen";
|
||||
App::$strings["Submit"] = "Senden";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Dreamwidth"] = "Afiŝi al Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Agordoj por Afiŝoj al Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Ŝalti la Dreamwidth Kromprogramon";
|
||||
$a->strings["dreamwidth username"] = "Dreamwidth salutnomo";
|
||||
$a->strings["dreamwidth password"] = "Dreamwidth pasvorto";
|
||||
$a->strings["Post to dreamwidth by default"] = "Defaŭlte afiŝi al Dreamwidth";
|
||||
$a->strings["Submit"] = "Sendi";
|
||||
App::$strings["Post to Dreamwidth"] = "Afiŝi al Dreamwidth";
|
||||
App::$strings["Dreamwidth Post Settings"] = "Agordoj por Afiŝoj al Dreamwidth";
|
||||
App::$strings["Enable dreamwidth Post Plugin"] = "Ŝalti la Dreamwidth Kromprogramon";
|
||||
App::$strings["dreamwidth username"] = "Dreamwidth salutnomo";
|
||||
App::$strings["dreamwidth password"] = "Dreamwidth pasvorto";
|
||||
App::$strings["Post to dreamwidth by default"] = "Defaŭlte afiŝi al Dreamwidth";
|
||||
App::$strings["Submit"] = "Sendi";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Dreamwidth"] = "Publicar en Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Configuración de las publicaciones en Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Activar el módulo de publicación en Dreamwidth";
|
||||
$a->strings["dreamwidth username"] = "Nombre de usuario de Dreamwidth";
|
||||
$a->strings["dreamwidth password"] = "Contraseña de Dreamwidth";
|
||||
$a->strings["Post to dreamwidth by default"] = "Publicar en Dreamwidth por defecto";
|
||||
$a->strings["Submit"] = "Envíar";
|
||||
App::$strings["Post to Dreamwidth"] = "Publicar en Dreamwidth";
|
||||
App::$strings["Dreamwidth Post Settings"] = "Configuración de las publicaciones en Dreamwidth";
|
||||
App::$strings["Enable dreamwidth Post Plugin"] = "Activar el módulo de publicación en Dreamwidth";
|
||||
App::$strings["dreamwidth username"] = "Nombre de usuario de Dreamwidth";
|
||||
App::$strings["dreamwidth password"] = "Contraseña de Dreamwidth";
|
||||
App::$strings["Post to dreamwidth by default"] = "Publicar en Dreamwidth por defecto";
|
||||
App::$strings["Submit"] = "Envíar";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Dreamwidth"] = "Poster vers Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Réglages Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Activer \"Poster vers Dreamwidth\"";
|
||||
$a->strings["dreamwidth username"] = "Nom d'utilisateur Dreamwidth";
|
||||
$a->strings["dreamwidth password"] = "Mot de passe";
|
||||
$a->strings["Post to dreamwidth by default"] = "Poster vers Dreamwidth par défaut";
|
||||
$a->strings["Submit"] = "Envoyer";
|
||||
App::$strings["Post to Dreamwidth"] = "Poster vers Dreamwidth";
|
||||
App::$strings["Dreamwidth Post Settings"] = "Réglages Dreamwidth";
|
||||
App::$strings["Enable dreamwidth Post Plugin"] = "Activer \"Poster vers Dreamwidth\"";
|
||||
App::$strings["dreamwidth username"] = "Nom d'utilisateur Dreamwidth";
|
||||
App::$strings["dreamwidth password"] = "Mot de passe";
|
||||
App::$strings["Post to dreamwidth by default"] = "Poster vers Dreamwidth par défaut";
|
||||
App::$strings["Submit"] = "Envoyer";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Dreamwidth"] = "";
|
||||
$a->strings["Dreamwidth Post Settings"] = "";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "";
|
||||
$a->strings["dreamwidth username"] = "";
|
||||
$a->strings["dreamwidth password"] = "";
|
||||
$a->strings["Post to dreamwidth by default"] = "";
|
||||
$a->strings["Submit"] = "Senda inn";
|
||||
App::$strings["Post to Dreamwidth"] = "";
|
||||
App::$strings["Dreamwidth Post Settings"] = "";
|
||||
App::$strings["Enable dreamwidth Post Plugin"] = "";
|
||||
App::$strings["dreamwidth username"] = "";
|
||||
App::$strings["dreamwidth password"] = "";
|
||||
App::$strings["Post to dreamwidth by default"] = "";
|
||||
App::$strings["Submit"] = "Senda inn";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Dreamwidth"] = "Posta su Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Impostazioni post Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Abilita il plugin dreamwidth";
|
||||
$a->strings["dreamwidth username"] = "dreamwidth username";
|
||||
$a->strings["dreamwidth password"] = "Password dreamwidth";
|
||||
$a->strings["Post to dreamwidth by default"] = "Invia a dreamwidth per impostazione predefinita";
|
||||
$a->strings["Submit"] = "Invia";
|
||||
App::$strings["Post to Dreamwidth"] = "Posta su Dreamwidth";
|
||||
App::$strings["Dreamwidth Post Settings"] = "Impostazioni post Dreamwidth";
|
||||
App::$strings["Enable dreamwidth Post Plugin"] = "Abilita il plugin dreamwidth";
|
||||
App::$strings["dreamwidth username"] = "dreamwidth username";
|
||||
App::$strings["dreamwidth password"] = "Password dreamwidth";
|
||||
App::$strings["Post to dreamwidth by default"] = "Invia a dreamwidth per impostazione predefinita";
|
||||
App::$strings["Submit"] = "Invia";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Dreamwidth"] = "";
|
||||
$a->strings["Dreamwidth Post Settings"] = "";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "";
|
||||
$a->strings["dreamwidth username"] = "";
|
||||
$a->strings["dreamwidth password"] = "";
|
||||
$a->strings["Post to dreamwidth by default"] = "";
|
||||
$a->strings["Submit"] = "Lagre";
|
||||
App::$strings["Post to Dreamwidth"] = "";
|
||||
App::$strings["Dreamwidth Post Settings"] = "";
|
||||
App::$strings["Enable dreamwidth Post Plugin"] = "";
|
||||
App::$strings["dreamwidth username"] = "";
|
||||
App::$strings["dreamwidth password"] = "";
|
||||
App::$strings["Post to dreamwidth by default"] = "";
|
||||
App::$strings["Submit"] = "Lagre";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Dreamwidth"] = "Opublikuj na Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "";
|
||||
$a->strings["dreamwidth username"] = "";
|
||||
$a->strings["dreamwidth password"] = "";
|
||||
$a->strings["Post to dreamwidth by default"] = "";
|
||||
$a->strings["Submit"] = "Potwierdź";
|
||||
App::$strings["Post to Dreamwidth"] = "Opublikuj na Dreamwidth";
|
||||
App::$strings["Dreamwidth Post Settings"] = "";
|
||||
App::$strings["Enable dreamwidth Post Plugin"] = "";
|
||||
App::$strings["dreamwidth username"] = "";
|
||||
App::$strings["dreamwidth password"] = "";
|
||||
App::$strings["Post to dreamwidth by default"] = "";
|
||||
App::$strings["Submit"] = "Potwierdź";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Dreamwidth"] = "Publicar no Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Configurações de publicação no Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Habilitar o plugin de publicação no Dreamwidth";
|
||||
$a->strings["dreamwidth username"] = "Nome de usuário do Dreamwidth";
|
||||
$a->strings["dreamwidth password"] = "Senha do Dreamwidth";
|
||||
$a->strings["Post to dreamwidth by default"] = "Publicar no Dreamwidth por padrão";
|
||||
$a->strings["Submit"] = "Enviar";
|
||||
App::$strings["Post to Dreamwidth"] = "Publicar no Dreamwidth";
|
||||
App::$strings["Dreamwidth Post Settings"] = "Configurações de publicação no Dreamwidth";
|
||||
App::$strings["Enable dreamwidth Post Plugin"] = "Habilitar o plugin de publicação no Dreamwidth";
|
||||
App::$strings["dreamwidth username"] = "Nome de usuário do Dreamwidth";
|
||||
App::$strings["dreamwidth password"] = "Senha do Dreamwidth";
|
||||
App::$strings["Post to dreamwidth by default"] = "Publicar no Dreamwidth por padrão";
|
||||
App::$strings["Submit"] = "Enviar";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Dreamwidth"] = "";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Dreamwidth настройки сообщений";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Включить dreamwidth плагин сообщений";
|
||||
$a->strings["dreamwidth username"] = "dreamwidth имя пользователя";
|
||||
$a->strings["dreamwidth password"] = "dreamwidth пароль";
|
||||
$a->strings["Post to dreamwidth by default"] = "";
|
||||
$a->strings["Submit"] = "Подтвердить";
|
||||
App::$strings["Post to Dreamwidth"] = "";
|
||||
App::$strings["Dreamwidth Post Settings"] = "Dreamwidth настройки сообщений";
|
||||
App::$strings["Enable dreamwidth Post Plugin"] = "Включить dreamwidth плагин сообщений";
|
||||
App::$strings["dreamwidth username"] = "dreamwidth имя пользователя";
|
||||
App::$strings["dreamwidth password"] = "dreamwidth пароль";
|
||||
App::$strings["Post to dreamwidth by default"] = "";
|
||||
App::$strings["Submit"] = "Подтвердить";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Submit"] = "Spara";
|
||||
App::$strings["Submit"] = "Spara";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Dreamwidth"] = "转播到Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Dreamwidth转播设置";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "使Dreamwidth转播插件可用";
|
||||
$a->strings["dreamwidth username"] = "Dreamwidth用户名";
|
||||
$a->strings["dreamwidth password"] = "Dreamwidth密码";
|
||||
$a->strings["Post to dreamwidth by default"] = "默认地转播到Dreamwidth";
|
||||
$a->strings["Submit"] = "提交";
|
||||
App::$strings["Post to Dreamwidth"] = "转播到Dreamwidth";
|
||||
App::$strings["Dreamwidth Post Settings"] = "Dreamwidth转播设置";
|
||||
App::$strings["Enable dreamwidth Post Plugin"] = "使Dreamwidth转播插件可用";
|
||||
App::$strings["dreamwidth username"] = "Dreamwidth用户名";
|
||||
App::$strings["dreamwidth password"] = "Dreamwidth密码";
|
||||
App::$strings["Post to dreamwidth by default"] = "默认地转播到Dreamwidth";
|
||||
App::$strings["Submit"] = "提交";
|
||||
|
|
|
@ -25,11 +25,11 @@ function flattrwidget_unload() {
|
|||
function flattrwidget_construct_page(&$a,&$b) {
|
||||
if (! $b['module']=='channel')
|
||||
return;
|
||||
$id = $a->profile['profile_uid'];
|
||||
$id = App::$profile['profile_uid'];
|
||||
$enable = intval(get_pconfig($id,'flattrwidget','enable'));
|
||||
if (! $enable)
|
||||
return;
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" href="'.$a->get_baseurl().'/addon/flattrwidget/style.css'.'" media="all" />';
|
||||
App::$page['htmlhead'] .= '<link rel="stylesheet" href="'.z_root().'/addon/flattrwidget/style.css'.'" media="all" />';
|
||||
// get alignment and static/dynamic from the settings
|
||||
// align is either "aside" or "right_aside"
|
||||
// sd is either static or dynamic
|
||||
|
@ -47,7 +47,7 @@ function flattrwidget_construct_page(&$a,&$b) {
|
|||
$link = 'https://flattr.com/submit/auto?user_id='.$user.'&url=' . rawurlencode($thing).'&title='.rawurlencode($ftitle);
|
||||
if ($sd == 'static') {
|
||||
// static button graphic from the img folder
|
||||
$img = $a->get_baseurl() .'/addon/flattrwidget/img/flattr-badge-large.png';
|
||||
$img = z_root() .'/addon/flattrwidget/img/flattr-badge-large.png';
|
||||
$code = '<a href="'.$link.'" target="_blank"><img src="'.$img.'" alt="'.$title.'" title="'.$title.'" border="0"></a>';
|
||||
} else {
|
||||
$code = '<script id=\'fbdu5zs\'>(function(i){var f,s=document.getElementById(i);f=document.createElement(\'iframe\');f.src=\'//api.flattr.com/button/view/?uid='.$user.'&url='.rawurlencode($thing).'&title='.rawurlencode($ftitle).'\';f.title=\''.$title.'\';f.height=72;f.width=65;f.style.borderWidth=0;s.parentNode.insertBefore(f,s);})(\'fbdu5zs\');</script>';
|
||||
|
@ -65,12 +65,12 @@ function flattrwidget_construct_page(&$a,&$b) {
|
|||
function flattrwidget_settings_post($a,$s) {
|
||||
if(! local_channel() || (! x($_POST,'flattrwidget-submit')))
|
||||
return;
|
||||
$c = $a->get_channel();
|
||||
$c = App::get_channel();
|
||||
set_pconfig( local_channel(), 'flattrwidget', 'align', $_POST['flattrwidget-align'] );
|
||||
set_pconfig( local_channel(), 'flattrwidget', 'sd', $_POST['flattrwidget-static'] );
|
||||
$thing = $_POST['flattrwidget-thing'];
|
||||
if ($thing == '') {
|
||||
$thing = $a->get_baseurl().'/channel/'.$c['channel_address'];
|
||||
$thing = z_root().'/channel/'.$c['channel_address'];
|
||||
}
|
||||
set_pconfig( local_channel(), 'flattrwidget', 'thing', $thing);
|
||||
set_pconfig( local_channel(), 'flattrwidget', 'user', $_POST['flattrwidget-user']);
|
||||
|
@ -87,7 +87,7 @@ function flattrwidget_settings(&$a,&$s) {
|
|||
if (! $id)
|
||||
return;
|
||||
|
||||
//$a->page['htmlhead'] .= '<link rel="stylesheet" href="'.$a->get_baseurl().'/addon/flattrwidget/style.css'.'" media="all" />';
|
||||
//App::$page['htmlhead'] .= '<link rel="stylesheet" href="'.z_root().'/addon/flattrwidget/style.css'.'" media="all" />';
|
||||
$lr = get_pconfig( $id, 'flattrwidget', 'align');
|
||||
$sd = get_pconfig( $id, 'flattrwidget', 'sd');
|
||||
$thing = get_pconfig( $id, 'flattrwidget', 'thing');
|
||||
|
|
|
@ -26,8 +26,8 @@ function fortunate_fetch(&$a,&$b) {
|
|||
if(! $fort_server)
|
||||
return;
|
||||
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'
|
||||
. $a->get_baseurl() . '/addon/fortunate/fortunate.css' . '" media="all" />' . "\r\n";
|
||||
App::$page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'
|
||||
. z_root() . '/addon/fortunate/fortunate.css' . '" media="all" />' . "\r\n";
|
||||
|
||||
$s = z_fetch_url('http://' . $fort_server . '/cookie.php?numlines=4&equal=1&rand=' . mt_rand());
|
||||
if($s['success'])
|
||||
|
|
|
@ -22,7 +22,7 @@ function frphotos_init(&$a) {
|
|||
if(intval(get_pconfig(local_channel(),'frphotos','complete')))
|
||||
return;
|
||||
|
||||
$channel = $a->get_channel();
|
||||
$channel = App::get_channel();
|
||||
|
||||
$fr_server = $_REQUEST['fr_server'];
|
||||
$fr_username = $_REQUEST['fr_username'];
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/**
|
||||
* Name: GNU-Social Protocol
|
||||
* Description: GNU-Social Protocol (Experimental, Not-finished, Unsupported)
|
||||
* Description: GNU-Social Protocol (Experimental, Unsupported)
|
||||
* Version: 1.0
|
||||
* Author: Mike Macgirvin
|
||||
* Maintainer: none
|
||||
|
@ -16,7 +16,6 @@ require_once('include/items.php');
|
|||
require_once('include/bb2diaspora.php');
|
||||
require_once('include/contact_selectors.php');
|
||||
require_once('include/queue_fn.php');
|
||||
require_once('include/salmon.php');
|
||||
|
||||
|
||||
function gnusoc_load() {
|
||||
|
@ -26,10 +25,15 @@ function gnusoc_load() {
|
|||
register_hook('follow_allow', 'addon/gnusoc/gnusoc.php', 'gnusoc_follow_allow');
|
||||
register_hook('feature_settings_post', 'addon/gnusoc/gnusoc.php', 'gnusoc_feature_settings_post');
|
||||
register_hook('feature_settings', 'addon/gnusoc/gnusoc.php', 'gnusoc_feature_settings');
|
||||
register_hook('follow', 'addon/gnusoc/gnusoc.php', 'gnusoc_follow_local');
|
||||
register_hook('permissions_create', 'addon/gnusoc/gnusoc.php', 'gnusoc_permissions_create');
|
||||
register_hook('queue_deliver', 'addon/gnusoc/gnusoc.php', 'gnusoc_queue_deliver');
|
||||
register_hook('notifier_process','addon/gnusoc/gnusoc.php','gnusoc_notifier_process');
|
||||
register_hook('follow_from_feed','addon/gnusoc/gnusoc.php','gnusoc_follow_from_feed');
|
||||
|
||||
|
||||
|
||||
// register_hook('notifier_hub', 'addon/gnusoc/gnusoc.php', 'gnusoc_process_outbound');
|
||||
// register_hook('permissions_create', 'addon/gnusoc/gnusoc.php', 'gnusoc_permissions_create');
|
||||
// register_hook('permissions_update', 'addon/gnusoc/gnusoc.php', 'gnusoc_permissions_update');
|
||||
|
||||
}
|
||||
|
@ -41,6 +45,11 @@ function gnusoc_unload() {
|
|||
unregister_hook('follow_allow', 'addon/gnusoc/gnusoc.php', 'gnusoc_follow_allow');
|
||||
unregister_hook('feature_settings_post', 'addon/gnusoc/gnusoc.php', 'gnusoc_feature_settings_post');
|
||||
unregister_hook('feature_settings', 'addon/gnusoc/gnusoc.php', 'gnusoc_feature_settings');
|
||||
unregister_hook('follow', 'addon/gnusoc/gnusoc.php', 'gnusoc_follow_local');
|
||||
unregister_hook('permissions_create', 'addon/gnusoc/gnusoc.php', 'gnusoc_permissions_create');
|
||||
unregister_hook('queue_deliver', 'addon/gnusoc/gnusoc.php', 'gnusoc_queue_deliver');
|
||||
unregister_hook('notifier_process','addon/gnusoc/gnusoc.php','gnusoc_notifier_process');
|
||||
unregister_hook('follow_from_feed','addon/gnusoc/gnusoc.php','gnusoc_follow_from_feed');
|
||||
|
||||
}
|
||||
|
||||
|
@ -58,11 +67,13 @@ function gnusoc_load_module(&$a, &$b) {
|
|||
|
||||
function gnusoc_webfinger(&$a,&$b) {
|
||||
$b['result']['links'][] = array('rel' => 'salmon', 'href' => z_root() . '/salmon/' . $b['channel']['channel_address']);
|
||||
$b['result']['links'][] = array('rel' => 'http://salmon-protocol.org/ns/salmon-replies', 'href' => z_root() . '/salmon/' . $b['channel']['channel_address']);
|
||||
$b['result']['links'][] = array('rel' => 'http://salmon-protocol.org/ns/salmon-mention', 'href' => z_root() . '/salmon/' . $b['channel']['channel_address']);
|
||||
}
|
||||
|
||||
function gnusoc_personal_xrd(&$a,&$b) {
|
||||
$b['xml'] = str_replace('</XRD>',
|
||||
'<Link rel="salmon" href="' . z_root() . '/salmon/' . $b['user']['channel_address'] . '" />' . "\r\n" . '</XRD>', $b['xml']);
|
||||
'<Link rel="salmon" href="' . z_root() . '/salmon/' . $b['user']['channel_address'] . '" />' . "\r\n" . '<Link rel="http://salmon-protocol.org/ns/salmon-replies" href="' . z_root() . '/salmon/' . $b['user']['channel_address'] . '" />' . "\r\n" . '<Link rel="http://salmon-protocol.org/ns/salmon-mention" href="' . z_root() . '/salmon/' . $b['user']['channel_address'] . '" />' . "\r\n" . '</XRD>', $b['xml']);
|
||||
|
||||
}
|
||||
|
||||
|
@ -80,6 +91,19 @@ function gnusoc_follow_allow(&$a, &$b) {
|
|||
}
|
||||
|
||||
|
||||
function gnusoc_follow_local(&$a,&$b) {
|
||||
|
||||
require_once('addon/pubsubhubbub/pubsubhubbub.php');
|
||||
|
||||
if($b['abook']['abook_xchan'] && $b['abook']['xchan_network'] === 'gnusoc') {
|
||||
$hubs = get_xconfig($b['abook']['abook_xchan'],'system','push_hubs');
|
||||
if($hubs) {
|
||||
foreach($hubs as $hub) {
|
||||
pubsubhubbub_subscribe($hub,$b['channel'],$b['abook'],'',$hubmode = 'subscribe');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function gnusoc_feature_settings_post(&$a,&$b) {
|
||||
|
@ -109,3 +133,427 @@ function gnusoc_feature_settings(&$a,&$s) {
|
|||
|
||||
}
|
||||
|
||||
function get_salmon_key($uri,$keyhash) {
|
||||
$ret = array();
|
||||
|
||||
logger('Fetching salmon key for ' . $uri, LOGGER_DEBUG, LOG_INFO);
|
||||
|
||||
$x = webfinger_rfc7033($uri,true);
|
||||
|
||||
logger('webfinger returns: ' . print_r($x,true), LOGGER_DATA, LOG_DEBUG);
|
||||
|
||||
if($x && array_key_exists('links',$x) && $x['links']) {
|
||||
foreach($x['links'] as $link) {
|
||||
if(array_key_exists('rel',$link) && $link['rel'] === 'magic-public-key') {
|
||||
$ret[] = $link['href'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
$arr = old_webfinger($uri);
|
||||
|
||||
logger('old webfinger returns: ' . print_r($arr,true), LOGGER_DATA, LOG_DEBUG);
|
||||
|
||||
if(is_array($arr)) {
|
||||
foreach($arr as $a) {
|
||||
if($a['@attributes']['rel'] === 'magic-public-key') {
|
||||
$ret[] = $a['@attributes']['href'];
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
// We have found at least one key URL
|
||||
// If it's inline, parse it - otherwise get the key
|
||||
|
||||
if(count($ret)) {
|
||||
for($x = 0; $x < count($ret); $x ++) {
|
||||
if(substr($ret[$x],0,5) === 'data:') {
|
||||
$ret[$x] = convert_salmon_key($ret[$x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
logger('Key located: ' . print_r($ret,true), LOGGER_DEBUG, LOG_INFO);
|
||||
|
||||
if(count($ret) == 1) {
|
||||
|
||||
// We only found one one key so we don't care if the hash matches.
|
||||
// If it's the wrong key we'll find out soon enough because
|
||||
// message verification will fail. This also covers some older
|
||||
// software which don't supply a keyhash. As long as they only
|
||||
// have one key we'll be right.
|
||||
|
||||
return $ret[0];
|
||||
}
|
||||
else {
|
||||
foreach($ret as $a) {
|
||||
$hash = base64url_encode(hash('sha256',$a));
|
||||
if($hash == $keyhash)
|
||||
return $a;
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
function slapper($owner,$url,$slap) {
|
||||
|
||||
// does contact have a salmon endpoint?
|
||||
|
||||
if(! strlen($url))
|
||||
return;
|
||||
|
||||
if(! $owner['channel_prvkey']) {
|
||||
logger(sprintf("channel '%s' (%d) does not have a salmon private key. Send failed.",
|
||||
$owner['channel_address'],$owner['channel_id']));
|
||||
return;
|
||||
}
|
||||
|
||||
logger('slapper called for ' .$url . '. Data: ' . $slap, LOGGER_DATA, LOG_DEBUG);
|
||||
|
||||
// create a magic envelope
|
||||
|
||||
|
||||
$data = base64url_encode($slap, false); // do not strip padding
|
||||
$data_type = 'application/atom+xml';
|
||||
$encoding = 'base64url';
|
||||
$algorithm = 'RSA-SHA256';
|
||||
$keyhash = base64url_encode(hash('sha256',salmon_key($owner['channel_pubkey'])),true);
|
||||
|
||||
$data = str_replace(array(" ","\t","\r","\n"),array("","","",""),$data);
|
||||
|
||||
// precomputed base64url encoding of data_type, encoding, algorithm concatenated with periods
|
||||
|
||||
$precomputed = '.YXBwbGljYXRpb24vYXRvbSt4bWw=.YmFzZTY0dXJs.UlNBLVNIQTI1Ng==';
|
||||
|
||||
$signature = base64url_encode(rsa_sign($data . $precomputed,$owner['channel_prvkey']));
|
||||
|
||||
$salmon_tpl = get_markup_template('magicsig.tpl','addon/gnusoc/');
|
||||
|
||||
$salmon = replace_macros($salmon_tpl,array(
|
||||
'$data' => $data,
|
||||
'$encoding' => $encoding,
|
||||
'$algorithm' => $algorithm,
|
||||
'$keyhash' => $keyhash,
|
||||
'$signature' => $signature
|
||||
));
|
||||
|
||||
logger('salmon: ' . $salmon, LOGGER_DATA);
|
||||
|
||||
$hash = random_string();
|
||||
|
||||
queue_insert(array(
|
||||
'hash' => $hash,
|
||||
'account_id' => $owner['channel_account_id'],
|
||||
'channel_id' => $owner['channel_id'],
|
||||
'driver' => 'slap',
|
||||
'posturl' => $url,
|
||||
'notify' => '',
|
||||
'msg' => $salmon,
|
||||
));
|
||||
|
||||
return $hash;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function gnusoc_queue_deliver(&$a,&$b) {
|
||||
$outq = $b['outq'];
|
||||
if($outq['outq_driver'] !== 'slap')
|
||||
return;
|
||||
|
||||
$b['handled'] = true;
|
||||
|
||||
$headers = array(
|
||||
'Content-type: application/magic-envelope+xml',
|
||||
'Content-length: ' . strlen($outq['outq_msg']));
|
||||
|
||||
$counter = 0;
|
||||
$result = z_post_url($outq['outq_posturl'], $outq['outq_msg'], $counter, array('headers' => $headers, 'novalidate' => true));
|
||||
if($result['success'] && $result['return_code'] < 300) {
|
||||
logger('slap_deliver: queue post success to ' . $outq['outq_posturl'], LOGGER_DEBUG);
|
||||
if($b['base']) {
|
||||
q("update site set site_update = '%s', site_dead = 0 where site_url = '%s' ",
|
||||
dbesc(datetime_convert()),
|
||||
dbesc($b['base'])
|
||||
);
|
||||
}
|
||||
q("update dreport set dreport_result = '%s', dreport_time = '%s' where dreport_queue = '%s' limit 1",
|
||||
dbesc('accepted for delivery'),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc($outq['outq_hash'])
|
||||
);
|
||||
|
||||
remove_queue_item($outq['outq_hash']);
|
||||
}
|
||||
else {
|
||||
logger('slap_deliver: queue post returned ' . $result['return_code']
|
||||
. ' from ' . $outq['outq_posturl'],LOGGER_DEBUG);
|
||||
update_queue_item($outq['outq_hash']);
|
||||
}
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function gnusoc_remote_follow($channel,$xchan) {
|
||||
|
||||
|
||||
$slap = replace_macros(get_markup_template('follow_slap.tpl','addon/gnusoc/'),array(
|
||||
'$name' => xmlify($channel['channel_name']),
|
||||
'$nick' => xmlify($channel['channel_address']),
|
||||
'$profile_page' => xmlify(z_root() . '/channel/' . $channel['channel_address']),
|
||||
'$thumb' => xmlify($channel['xchan_photo_l']),
|
||||
'$item_id' => z_root() . '/display/' . xmlify(random_string()),
|
||||
'$title' => xmlify(t('Follow')),
|
||||
'$published' => datetime_convert('UTC','UTC','now',ATOM_TIME),
|
||||
'$type' => 'html',
|
||||
'$content' => xmlify(sprintf( t('%1$s is now following %2$s'),$channel['channel_name'],$xchan['xchan_name'])),
|
||||
'$remote_profile' => xmlify($xchan['xchan_url']),
|
||||
'$remote_photo' => xmlify($xchan['xchan_photo_l']),
|
||||
'$remote_thumb' => xmlify($xchan['xchan_photo_m']),
|
||||
'$remote_nick' => xmlify(substr($xchan['xchan_addr'],0,strpos($xchan['xchan_addr'],'@'))),
|
||||
'$remote_name' => xmlify($xchan['xchan_name']),
|
||||
'$verb' => xmlify(ACTIVITY_FOLLOW),
|
||||
'$ostat_follow' => ''
|
||||
));
|
||||
|
||||
|
||||
logger('follow xml: ' . $slap, LOGGER_DATA);
|
||||
|
||||
$deliver = '';
|
||||
|
||||
$y = q("select * from hubloc where hubloc_hash = '%s'",
|
||||
dbesc($xchan['xchan_hash'])
|
||||
);
|
||||
|
||||
|
||||
if($y) {
|
||||
$deliver = slapper($channel,$y[0]['hubloc_callback'],$slap);
|
||||
}
|
||||
|
||||
return $deliver;
|
||||
}
|
||||
|
||||
function gnusoc_permissions_create(&$a,&$b) {
|
||||
if($b['recipient']['xchan_network'] === 'gnusoc') {
|
||||
$b['deliveries'] = gnusoc_remote_follow($b['sender'],$b['recipient']);
|
||||
if($b['deliveries'])
|
||||
$b['success'] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function gnusoc_notifier_process(&$a,&$b) {
|
||||
|
||||
logger('notifier process gnusoc');
|
||||
|
||||
if(! ($b['normal_mode'] || $b['relay_to_owner']))
|
||||
return;
|
||||
|
||||
if($b['private'] || $b['packet_type'] || $b['mail'])
|
||||
return;
|
||||
|
||||
if($b['target_item']['public_policy']) {
|
||||
logger('non-public post');
|
||||
return;
|
||||
}
|
||||
|
||||
if($b['top_level_post']) {
|
||||
// should have been processed by pubsubhubub
|
||||
logger('not a comment');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$channel = $b['channel'];
|
||||
|
||||
if(! perm_is_allowed($channel['channel_id'],'','view_stream'))
|
||||
return;
|
||||
|
||||
// find gnusoc subscribers following this $owner
|
||||
|
||||
$r = q("select * from abook left join hubloc on abook_xchan = hubloc_hash where hubloc_network = 'gnusoc' and abook_channel = %d",
|
||||
intval($channel['channel_id'])
|
||||
);
|
||||
if(! $r)
|
||||
return;
|
||||
|
||||
$recips = array();
|
||||
foreach($r as $rr) {
|
||||
if(perm_is_allowed($channel['channel_id'],$rr['hubloc_hash'],'view_stream'))
|
||||
$recips[] = $rr['hubloc_hash'];
|
||||
|
||||
}
|
||||
|
||||
if(! $recips)
|
||||
return;
|
||||
|
||||
$slap = get_atom_entry($target_item,'html',null,null,false);
|
||||
|
||||
$slap = str_replace('<entry>','<entry xmlns="http://www.w3.org/2005/Atom"
|
||||
xmlns:thr="http://purl.org/syndication/thread/1.0"
|
||||
xmlns:at="http://purl.org/atompub/tombstones/1.0"
|
||||
xmlns:media="http://purl.org/syndication/atommedia"
|
||||
xmlns:dfrn="http://purl.org/macgirvin/dfrn/1.0"
|
||||
xmlns:zot="http://purl.org/zot"
|
||||
xmlns:as="http://activitystrea.ms/spec/1.0/"
|
||||
xmlns:georss="http://www.georss.org/georss"
|
||||
xmlns:poco="http://portablecontacts.net/spec/1.0"
|
||||
xmlns:ostatus="http://ostatus.org/schema/1.0"
|
||||
xmlns:statusnet="http://status.net/schema/api/1/" >',$slap);
|
||||
|
||||
|
||||
foreach($recips as $recip) {
|
||||
$h = slapper($channel,$recip['hubloc_callback'],$slap);
|
||||
$b['queued'][] = $h;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function gnusoc_follow_from_feed(&$a,&$b) {
|
||||
|
||||
$item = $b['item'];
|
||||
$importer = $b['channel'];
|
||||
$xchan = $b['xchan'];
|
||||
$author = $b['author'];
|
||||
|
||||
$b['caught'] = true;
|
||||
|
||||
logger('follow activity received');
|
||||
|
||||
if(($author) && (! $xchan)) {
|
||||
|
||||
$r = q("select * from xchan where xchan_guid = '%s' limit 1",
|
||||
dbesc($author['author_link'])
|
||||
);
|
||||
if(! $r) {
|
||||
if(discover_by_webbie($author['author_link'])) {
|
||||
$r = q("select * from xchan where xchan_guid = '%s' limit 1",
|
||||
dbesc($author['author_link'])
|
||||
);
|
||||
if(! $r) {
|
||||
logger('discovery failed');
|
||||
return;
|
||||
}
|
||||
}
|
||||
$xchan = $r[0];
|
||||
}
|
||||
|
||||
$r = q("select * from abook where abook_channel = %d and abook_xchan = '%s' limit 1",
|
||||
intval($importer['channel_id']),
|
||||
dbesc($xchan['xchan_hash'])
|
||||
);
|
||||
|
||||
if($r) {
|
||||
$contact = $r[0];
|
||||
$newperms = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK|PERMS_W_STREAM|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT|PERMS_R_STORAGE|PERMS_R_PAGES;
|
||||
|
||||
$abook_instance = $contact['abook_instance'];
|
||||
if($abook_instance)
|
||||
$abook_instance .= ',';
|
||||
$abook_instance .= z_root();
|
||||
|
||||
|
||||
$r = q("update abook set abook_their_perms = %d, abook_instance = '%s' where abook_id = %d and abook_channel = %d",
|
||||
intval($newperms),
|
||||
dbesc($abook_instance),
|
||||
intval($contact['abook_id']),
|
||||
intval($importer['channel_id'])
|
||||
);
|
||||
}
|
||||
else {
|
||||
$role = get_pconfig($importer['channel_id'],'system','permissions_role');
|
||||
if($role) {
|
||||
$x = get_role_perms($role);
|
||||
if($x['perms_auto'])
|
||||
$default_perms = $x['perms_accept'];
|
||||
}
|
||||
if(! $default_perms)
|
||||
$default_perms = intval(get_pconfig($importer['channel_id'],'system','autoperms'));
|
||||
|
||||
$their_perms = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK|PERMS_W_STREAM|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT|PERMS_R_STORAGE|PERMS_R_PAGES;
|
||||
|
||||
|
||||
$closeness = get_pconfig($importer['channel_id'],'system','new_abook_closeness');
|
||||
if($closeness === false)
|
||||
$closeness = 80;
|
||||
|
||||
|
||||
$r = q("insert into abook ( abook_account, abook_channel, abook_xchan, abook_my_perms, abook_their_perms, abook_closeness, abook_created, abook_updated, abook_connected, abook_dob, abook_pending, abook_instance ) values ( %d, %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', %d, '%s' )",
|
||||
intval($importer['channel_account_id']),
|
||||
intval($importer['channel_id']),
|
||||
dbesc($xchan['xchan_hash']),
|
||||
intval($default_perms),
|
||||
intval($their_perms),
|
||||
intval($closeness),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(NULL_DATE),
|
||||
intval(($default_perms) ? 0 : 1),
|
||||
dbesc(z_root())
|
||||
);
|
||||
if($r) {
|
||||
logger("New GNU-Social follower received for {$importer['channel_name']}");
|
||||
|
||||
$new_connection = q("select * from abook left join xchan on abook_xchan = xchan_hash left join hubloc on hubloc_hash = xchan_hash where abook_channel = %d and abook_xchan = '%s' order by abook_created desc limit 1",
|
||||
intval($importer['channel_id']),
|
||||
dbesc($xchan['xchan_hash'])
|
||||
);
|
||||
|
||||
if($new_connection) {
|
||||
require_once('include/enotify.php');
|
||||
notification(array(
|
||||
'type' => NOTIFY_INTRO,
|
||||
'from_xchan' => $xchan['xchan_hash'],
|
||||
'to_xchan' => $importer['channel_hash'],
|
||||
'link' => z_root() . '/connedit/' . $new_connection[0]['abook_id'],
|
||||
));
|
||||
|
||||
if($default_perms) {
|
||||
// Send back a sharing notification to them
|
||||
$deliver = gnusoc_remote_follow($importer,$new_connection[0]);
|
||||
if($deliver)
|
||||
proc_run('php','include/deliver.php',$deliver);
|
||||
|
||||
}
|
||||
|
||||
$clone = array();
|
||||
foreach($new_connection[0] as $k => $v) {
|
||||
if(strpos($k,'abook_') === 0) {
|
||||
$clone[$k] = $v;
|
||||
}
|
||||
}
|
||||
unset($clone['abook_id']);
|
||||
unset($clone['abook_account']);
|
||||
unset($clone['abook_channel']);
|
||||
|
||||
$abconfig = load_abconfig($importer['channel_hash'],$clone['abook_xchan']);
|
||||
|
||||
if($abconfig)
|
||||
$clone['abconfig'] = $abconfig;
|
||||
|
||||
build_sync_packet($importer['channel_id'], array('abook' => array($clone)));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,32 +1,41 @@
|
|||
<?php
|
||||
|
||||
require_once('include/salmon.php');
|
||||
require_once('include/crypto.php');
|
||||
require_once('include/items.php');
|
||||
require_once('include/follow.php');
|
||||
require_once('include/Contact.php');
|
||||
|
||||
function salmon_return($val) {
|
||||
|
||||
if($val >= 400)
|
||||
$err = 'Error';
|
||||
if($val >= 200 && $val < 300)
|
||||
$err = 'OK';
|
||||
|
||||
logger('mod-salmon returns ' . $val);
|
||||
header($_SERVER["SERVER_PROTOCOL"] . ' ' . $val . ' ' . $err);
|
||||
killme();
|
||||
|
||||
if(defined('SALMON_TEST')) {
|
||||
function salmon_init(&$a) {
|
||||
$testing = ((argc() > 1 && argv(1) === 'test') ? true : false);
|
||||
if($testing) {
|
||||
App::$data['salmon_test'] = true;
|
||||
salmon_post($a);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function salmon_post(&$a) {
|
||||
|
||||
$xml = file_get_contents('php://input');
|
||||
$sys_disabled = true;
|
||||
|
||||
if(! get_config('system','disable_discover_tab')) {
|
||||
$sys_disabled = get_config('system','disable_diaspora_discover_tab');
|
||||
}
|
||||
$sys = (($sys_disabled) ? null : get_sys_channel());
|
||||
|
||||
if(App::$data['salmon_test']) {
|
||||
$xml = file_get_contents('test.xml');
|
||||
App::$argv[1] = 'gnusoc';
|
||||
}
|
||||
else {
|
||||
$xml = file_get_contents('php://input');
|
||||
}
|
||||
|
||||
logger('mod-salmon: new salmon ' . $xml, LOGGER_DATA);
|
||||
|
||||
$nick = ((argc() > 1) ? trim(argv(1)) : '');
|
||||
// $mentions = (($a->argc > 2 && $a->argv[2] === 'mention') ? true : false);
|
||||
// $mentions = ((App::$argc > 2 && App::$argv[2] === 'mention') ? true : false);
|
||||
|
||||
|
||||
$importer = channelx_by_nick($nick);
|
||||
|
@ -59,9 +68,13 @@ function salmon_post(&$a) {
|
|||
|
||||
// Stash the signature away for now. We have to find their key or it won't be good for anything.
|
||||
|
||||
logger('sig: ' . $base->sig);
|
||||
|
||||
$signature = base64url_decode($base->sig);
|
||||
|
||||
logger('sig: ' . $base->sig . ' decoded length: ' . strlen($signature));
|
||||
|
||||
|
||||
// unpack the data
|
||||
|
||||
// strip whitespace so our data element will return to one big base64 blob
|
||||
|
@ -80,7 +93,7 @@ function salmon_post(&$a) {
|
|||
|
||||
$stnet_signed_data = $data;
|
||||
|
||||
$signed_data = $data . '.' . base64url_encode($type) . '.' . base64url_encode($encoding) . '.' . base64url_encode($alg);
|
||||
$signed_data = $data . '.' . base64url_encode($type, false) . '.' . base64url_encode($encoding, false) . '.' . base64url_encode($alg, false);
|
||||
|
||||
$compliant_format = str_replace('=','',$signed_data);
|
||||
|
||||
|
@ -102,6 +115,7 @@ function salmon_post(&$a) {
|
|||
$datarray = process_salmon_feed($data,$importer);
|
||||
|
||||
$author_link = $datarray['author']['author_link'];
|
||||
$item = $datarray['item'];
|
||||
|
||||
if(! $author_link) {
|
||||
logger('mod-salmon: Could not retrieve author URI.');
|
||||
|
@ -121,30 +135,26 @@ function salmon_post(&$a) {
|
|||
|
||||
logger('mod-salmon: Fetching key for ' . $author_link);
|
||||
|
||||
$key = get_salmon_key($author_link,$keyhash);
|
||||
$pubkey = get_salmon_key($author_link,$keyhash);
|
||||
|
||||
if(! $key) {
|
||||
if(! $pubkey) {
|
||||
logger('mod-salmon: Could not retrieve author key.');
|
||||
http_status_exit(400);
|
||||
}
|
||||
|
||||
$key_info = explode('.',$key);
|
||||
logger('mod-salmon: key details: ' . print_r($pubkey,true), LOGGER_DEBUG);
|
||||
|
||||
$m = base64url_decode($key_info[1]);
|
||||
$e = base64url_decode($key_info[2]);
|
||||
|
||||
logger('mod-salmon: key details: ' . print_r($key_info,true), LOGGER_DEBUG);
|
||||
|
||||
$pubkey = metopem($m,$e);
|
||||
}
|
||||
|
||||
$pubkey = rtrim($pubkey);
|
||||
|
||||
// We should have everything we need now. Let's see if it verifies.
|
||||
|
||||
$verify = rsa_verify($compliant_format,$signature,$pubkey);
|
||||
$verify = rsa_verify($signed_data,$signature,$pubkey);
|
||||
|
||||
if(! $verify) {
|
||||
logger('mod-salmon: message did not verify using protocol. Trying padding hack.');
|
||||
$verify = rsa_verify($signed_data,$signature,$pubkey);
|
||||
$verify = rsa_verify($compliant_format,$signature,$pubkey);
|
||||
}
|
||||
|
||||
if(! $verify) {
|
||||
|
@ -159,10 +169,9 @@ function salmon_post(&$a) {
|
|||
|
||||
logger('mod-salmon: Message verified.');
|
||||
|
||||
|
||||
/* lookup the author */
|
||||
|
||||
if(! $datarray['author']['author_link'])
|
||||
if(! $datarray['author']['author_link']) {
|
||||
logger('unable to probe - no author identifier');
|
||||
http_status_exit(400);
|
||||
}
|
||||
|
@ -172,12 +181,13 @@ function salmon_post(&$a) {
|
|||
);
|
||||
if(! $r) {
|
||||
if(discover_by_webbie($datarray['author']['author_link'])) {
|
||||
$r = q("select xchan_hash from xchan where xchan_guid = '%s' limit 1",
|
||||
dbesc($datarray['author']['author_link'])
|
||||
);
|
||||
if(! $r) {
|
||||
logger('discovery failed');
|
||||
http_status_exit(400);
|
||||
$r = q("select * from xchan where xchan_guid = '%s' limit 1",
|
||||
dbesc($datarray['author']['author_link'])
|
||||
);
|
||||
if(! $r) {
|
||||
logger('discovery failed');
|
||||
http_status_exit(400);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,196 +202,135 @@ function salmon_post(&$a) {
|
|||
|
||||
// First check for and process follow activity
|
||||
|
||||
if(activity_match($datarray['verb'],ACTIVITY_FOLLOW) && $datarray['obj_type'] === ACTIVITY_OBJ_PERSON) {
|
||||
|
||||
$r = q("select * from abook where abook_channel = %d and abook_hash = '%s' limit 1",
|
||||
intval($importer['channel_id']),
|
||||
dbesc($xchan['xchan_hash'])
|
||||
);
|
||||
|
||||
if($r) {
|
||||
$contact = $r[0];
|
||||
$newperms = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK|PERMS_W_STREAM|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT|PERMS_R_STORAGE|PERMS_R_PAGES;
|
||||
|
||||
$abook_instance = $contact['abook_instance'];
|
||||
if($abook_instance)
|
||||
$abook_instance .= ',';
|
||||
$abook_instance .= z_root();
|
||||
|
||||
|
||||
$r = q("update abook set abook_their_perms = %d, abook_instance = '%s' where abook_id = %d and abook_channel = %d",
|
||||
intval($newperms),
|
||||
dbesc($abook_instance),
|
||||
intval($contact['abook_id']),
|
||||
intval($importer['channel_id'])
|
||||
);
|
||||
}
|
||||
else {
|
||||
$role = get_pconfig($importer['channel_id'],'system','permissions_role');
|
||||
if($role) {
|
||||
$x = get_role_perms($role);
|
||||
if($x['perms_auto'])
|
||||
$default_perms = $x['perms_accept'];
|
||||
}
|
||||
if(! $default_perms)
|
||||
$default_perms = intval(get_pconfig($importer['channel_id'],'system','autoperms'));
|
||||
|
||||
$their_perms = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK|PERMS_W_STREAM|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT|PERMS_R_STORAGE|PERMS_R_PAGES;
|
||||
|
||||
|
||||
$closeness = get_pconfig($importer['channel_id'],'system','new_abook_closeness');
|
||||
if($closeness === false)
|
||||
$closeness = 80;
|
||||
|
||||
|
||||
$r = q("insert into abook ( abook_account, abook_channel, abook_xchan, abook_my_perms, abook_their_perms, abook_closeness, abook_created, abook_updated, abook_connected, abook_dob, abook_pending, abook_instance ) values ( %d, %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', %d, '%s' )",
|
||||
intval($importer['channel_account_id']),
|
||||
intval($importer['channel_id']),
|
||||
dbesc($contact['xchan_hash']),
|
||||
intval($default_perms),
|
||||
intval($their_perms),
|
||||
intval($closeness),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(NULL_DATE),
|
||||
intval(($default_perms) ? 0 : 1),
|
||||
dbesc(z_root())
|
||||
);
|
||||
if($r) {
|
||||
logger("New GNU-Social follower received for {$importer['channel_name']}");
|
||||
|
||||
$new_connection = q("select * from abook left join xchan on abook_xchan = xchan_hash left join hubloc on hubloc_hash = xchan_hash where abook_channel = %d and abook_xchan = '%s' order by abook_created desc limit 1",
|
||||
intval($importer['channel_id']),
|
||||
dbesc($xchan['xchan_hash'])
|
||||
);
|
||||
|
||||
if($new_connection) {
|
||||
require_once('include/enotify.php');
|
||||
notification(array(
|
||||
'type' => NOTIFY_INTRO,
|
||||
'from_xchan' => $xchan['xchan_hash'],
|
||||
'to_xchan' => $importer['channel_hash'],
|
||||
'link' => z_root() . '/connedit/' . $new_connection[0]['abook_id'],
|
||||
));
|
||||
|
||||
if($default_perms) {
|
||||
// @fixme!!!
|
||||
// Send back a sharing notification to them
|
||||
$x = gnusoc_follow($importer,$new_connection[0]);
|
||||
if($x)
|
||||
proc_run('php','include/deliver.php',$x);
|
||||
|
||||
}
|
||||
|
||||
$clone = array();
|
||||
foreach($new_connection[0] as $k => $v) {
|
||||
if(strpos($k,'abook_') === 0) {
|
||||
$clone[$k] = $v;
|
||||
}
|
||||
}
|
||||
unset($clone['abook_id']);
|
||||
unset($clone['abook_account']);
|
||||
unset($clone['abook_channel']);
|
||||
|
||||
$abconfig = load_abconfig($importer['channel_hash'],$clone['abook_xchan']);
|
||||
|
||||
if($abconfig)
|
||||
$clone['abconfig'] = $abconfig;
|
||||
|
||||
build_sync_packet($importer['channel_id'], array('abook' => array($clone)));
|
||||
|
||||
}
|
||||
if(activity_match($item['verb'],ACTIVITY_FOLLOW) && $item['obj_type'] === ACTIVITY_OBJ_PERSON) {
|
||||
|
||||
$cb = array('item' => $item,'channel' => $importer, 'xchan' => $xchan, 'author' => $datarray['author'], 'caught' => false);
|
||||
call_hooks('follow_from_feed',$cb);
|
||||
if($cb['caught'])
|
||||
http_status_exit(200);
|
||||
|
||||
}
|
||||
|
||||
|
||||
$m = parse_url($xchan['xchan_url']);
|
||||
if($m) {
|
||||
$host = $m['scheme'] . '://' . $m['host'];
|
||||
|
||||
q("update site set site_dead = 0, site_update = '%s' where site_type = %d and site_url = '%s'",
|
||||
dbesc(datetime_convert()),
|
||||
intval(SITE_TYPE_NOTZOT),
|
||||
dbesc($url)
|
||||
);
|
||||
if(! check_siteallowed($host)) {
|
||||
logger('blacklisted site: ' . $host);
|
||||
http_status_exit(403, 'permission denied.');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//
|
||||
// ... fixme
|
||||
|
||||
|
||||
// Otherwise check general permissions
|
||||
|
||||
if(! perm_is_allowed($importer['channel_id'],$xchan['xchan_hash'],'send_stream')) {
|
||||
|
||||
// check for and process ostatus autofriend
|
||||
|
||||
|
||||
// ... fixme
|
||||
|
||||
|
||||
|
||||
// otherwise
|
||||
|
||||
logger('mod-salmon: Ignoring this author.');
|
||||
http_status_exit(202);
|
||||
// NOTREACHED
|
||||
$importer_arr = array($importer);
|
||||
if(! $sys_disabled) {
|
||||
$sys['system'] = true;
|
||||
$importer_arr[] = $sys;
|
||||
}
|
||||
|
||||
unset($datarray['author']);
|
||||
|
||||
$parent_item = null;
|
||||
if($datarray['parent_mid']) {
|
||||
$r = q("select * from item where mid = '%s' and uid = %d limit 1",
|
||||
dbesc($datarray['parent_mid']),
|
||||
// we will only set and return the status code for operations
|
||||
// on an importer channel and not for the sys channel
|
||||
|
||||
$status = 200;
|
||||
|
||||
foreach($importer_arr as $importer) {
|
||||
|
||||
if(! $importer['system']) {
|
||||
$allowed = get_pconfig($importer['channel_id'],'system','gnusoc_allowed');
|
||||
if(! intval($allowed)) {
|
||||
logger('mod-salmon: disallowed for channel ' . $importer['channel_name']);
|
||||
$status = 202;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Otherwise check general permissions
|
||||
|
||||
if((! perm_is_allowed($importer['channel_id'],$xchan['xchan_hash'],'send_stream')) && (! $importer['system'])) {
|
||||
|
||||
// check for and process ostatus autofriend
|
||||
|
||||
|
||||
// ... fixme
|
||||
|
||||
// otherwise
|
||||
|
||||
logger('mod-salmon: Ignoring this author.');
|
||||
$status = 202;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$parent_item = null;
|
||||
if($item['parent_mid']) {
|
||||
$r = q("select * from item where mid = '%s' and uid = %d limit 1",
|
||||
dbesc($item['parent_mid']),
|
||||
intval($importer['channel_id'])
|
||||
);
|
||||
if(! $r) {
|
||||
logger('mod-salmon: parent item not found.');
|
||||
if(! $importer['system'])
|
||||
$status = 202;
|
||||
continue;
|
||||
}
|
||||
$parent_item = $r[0];
|
||||
}
|
||||
|
||||
|
||||
if(! $item['author_xchan'])
|
||||
$item['author_xchan'] = $xchan['xchan_hash'];
|
||||
|
||||
$item['owner_xchan'] = (($parent_item) ? $parent_item['owner_xchan'] : $xchan['xchan_hash']);
|
||||
|
||||
|
||||
$r = q("SELECT edited FROM item WHERE mid = '%s' AND uid = %d LIMIT 1",
|
||||
dbesc($item['mid']),
|
||||
intval($importer['channel_id'])
|
||||
);
|
||||
if(! $r) {
|
||||
logger('mod-salmon: parent item not found.');
|
||||
http_status_exit(202);
|
||||
|
||||
|
||||
// Update content if 'updated' changes
|
||||
// currently a no-op @fixme
|
||||
|
||||
if($r) {
|
||||
if((x($item,'edited') !== false)
|
||||
&& (datetime_convert('UTC','UTC',$item['edited']) !== $r[0]['edited'])) {
|
||||
// do not accept (ignore) an earlier edit than one we currently have.
|
||||
if(datetime_convert('UTC','UTC',$item['edited']) > $r[0]['edited'])
|
||||
update_feed_item($importer['channel_id'],$item);
|
||||
}
|
||||
if(! $importer['system'])
|
||||
$status = 200;
|
||||
continue;
|
||||
}
|
||||
$parent_item = $r[0];
|
||||
|
||||
if(! $item['parent_mid'])
|
||||
$item['parent_mid'] = $item['mid'];
|
||||
|
||||
$item['aid'] = $importer['channel_account_id'];
|
||||
$item['uid'] = $importer['channel_id'];
|
||||
|
||||
logger('consume_feed: ' . print_r($item,true),LOGGER_DATA);
|
||||
|
||||
$xx = item_store($item);
|
||||
$r = $xx['item_id'];
|
||||
|
||||
if(! $importer['system'])
|
||||
$status = 200;
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if(! $datarray['author_xchan'])
|
||||
$datarray['author_xchan'] = $xchan['xchan_hash'];
|
||||
|
||||
$datarray['owner_xchan'] = (($parent_item) ? $parent_item['owner_xchan'] : $xchan['xchan_hash']);
|
||||
|
||||
|
||||
|
||||
$r = q("SELECT edited FROM item WHERE mid = '%s' AND uid = %d LIMIT 1",
|
||||
dbesc($datarray['mid']),
|
||||
intval($importer['channel_id'])
|
||||
);
|
||||
|
||||
|
||||
// Update content if 'updated' changes
|
||||
// currently a no-op @fixme
|
||||
|
||||
if($r) {
|
||||
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
|
||||
// do not accept (ignore) an earlier edit than one we currently have.
|
||||
if(datetime_convert('UTC','UTC',$datarray['edited']) > $r[0]['edited'])
|
||||
update_feed_item($importer['channel_id'],$datarray);
|
||||
}
|
||||
http_status_exit(200);
|
||||
}
|
||||
|
||||
if(! $datarray['parent_mid'])
|
||||
$datarray['parent_mid'] = $datarray['mid'];
|
||||
|
||||
$datarray['aid'] = $importer['channel_account_id'];
|
||||
$datarray['uid'] = $importer['channel_id'];
|
||||
|
||||
logger('consume_feed: ' . print_r($datarray,true),LOGGER_DATA);
|
||||
|
||||
$xx = item_store($datarray);
|
||||
$r = $xx['item_id'];
|
||||
|
||||
// if this is a reply, do a relay?
|
||||
|
||||
http_status_exit(200);
|
||||
}
|
||||
|
||||
|
||||
function gnusoc_follow($importer,$xchan) {
|
||||
|
||||
|
||||
http_status_exit($status);
|
||||
|
||||
}
|
||||
|
||||
|
|
27
sources/addons/gnusoc/view/tpl/follow_slap.tpl
Normal file
27
sources/addons/gnusoc/view/tpl/follow_slap.tpl
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:as="http://activitystrea.ms/spec/1.0/" xmlns:georss="http://www.georss.org/georss" xmlns:ostatus="http://ostatus.org/schema/1.0" xmlns:poco="http://portablecontacts.net/spec/1.0" xmlns:media="http://purl.org/syndication/atommedia" xmlns:statusnet="http://status.net/schema/api/1/">
|
||||
<author>
|
||||
<name>{{$name}}</name>
|
||||
<uri>{{$profile_page}}</uri>
|
||||
<link rel="photo" type="image/jpeg" media:width="300" media:height="300" href="{{$thumb}}" />
|
||||
<link rel="avatar" type="image/jpeg" media:width="300" media:height="300" href="{{$thumb}}" />
|
||||
<poco:preferredUsername>{{$nick}}</poco:preferredUsername>
|
||||
<poco:displayName>{{$name}}</poco:displayName>
|
||||
</author>
|
||||
|
||||
<id>{{$item_id}}</id>
|
||||
<title>{{$title}}</title>
|
||||
<published>{{$published}}</published>
|
||||
<content type="{{$type}}" >{{$content}}</content>
|
||||
<as:verb>{{$verb}}</as:verb>
|
||||
|
||||
<as:object>
|
||||
<as:object-type>http://activitystrea.ms/schema/1.0/person</as:object-type>
|
||||
<id>{{$remote_profile}}</id>
|
||||
<title>{{$remote_name}}</title>
|
||||
<link rel="avatar" type="image/jpeg" media:width="175" media:height="175" href="{{$remote_photo}}"/>
|
||||
<link rel="avatar" type="image/jpeg" media:width="80" media:height="80" href="{{$remote_thumb}}"/>
|
||||
<poco:preferredUsername>{{$remote_nick}}</poco:preferredUsername>
|
||||
<poco:displayName>{{$remote_name}}</poco:displayName>
|
||||
</as:object>
|
||||
</entry>
|
9
sources/addons/gnusoc/view/tpl/magicsig.tpl
Normal file
9
sources/addons/gnusoc/view/tpl/magicsig.tpl
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<me:env xmlns:me="http://salmon-protocol.org/ns/magic-env">
|
||||
<me:data type="application/atom+xml">
|
||||
{{$data}}
|
||||
</me:data>
|
||||
<me:encoding>{{$encoding}}</me:encoding>
|
||||
<me:alg>{{$algorithm}}</me:alg>
|
||||
<me:sig key_id="{{$keyhash}}">{{$signature}}</me:sig>
|
||||
</me:env>
|
|
@ -3,18 +3,29 @@
|
|||
/**
|
||||
*
|
||||
* Name: Hubwall
|
||||
* Description: Send admin email message to all account holders
|
||||
* Description: Send admin email message to all account holders. <b>-><a href=/hubwall TARGET = "_blank">send now!</a><-</b>
|
||||
* Version: 1.0
|
||||
* Author: Mike Macgirvin
|
||||
* Maintainer: none
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('include/enotify.php');
|
||||
|
||||
function hubwall_module() {}
|
||||
|
||||
|
||||
|
||||
function hubwall_plugin_admin(&$a, &$o) {
|
||||
|
||||
$o = '<div></div> <a href="' . z_root() . '/hubwall">' . t('Send email to all members') . '</a></br/>';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function hubwall_post(&$a) {
|
||||
if(! is_site_admin())
|
||||
return;
|
||||
|
@ -24,7 +35,7 @@ function hubwall_post(&$a) {
|
|||
return;
|
||||
|
||||
$sender_name = t('Hub Administrator');
|
||||
$sender_email = 'sys@' . $a->get_hostname();
|
||||
$sender_email = 'sys@' . App::get_hostname();
|
||||
|
||||
$subject = $_REQUEST['subject'];
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ function ijpost_settings(&$a,&$s) {
|
|||
|
||||
/* Add our stylesheet to the page so we can make our settings look nice */
|
||||
|
||||
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/ijpost/ijpost.css' . '" media="all" />' . "\r\n";
|
||||
//App::$page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/ijpost/ijpost.css' . '" media="all" />' . "\r\n";
|
||||
|
||||
/* Get the current state of our config variables */
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Insanejournal"] = "Enviament a Insanejournal";
|
||||
$a->strings["InsaneJournal Post Settings"] = "Ajustos d'Enviament a Insanejournal";
|
||||
$a->strings["Enable InsaneJournal Post Plugin"] = "Habilita el Plugin d'Enviaments a Insanejournal";
|
||||
$a->strings["InsaneJournal username"] = "Nom d'usuari de Insanejournal";
|
||||
$a->strings["InsaneJournal password"] = "Contrasenya de Insanejournal";
|
||||
$a->strings["Post to InsaneJournal by default"] = "Enviar per defecte a Insanejournal";
|
||||
$a->strings["Submit"] = "Enviar";
|
||||
App::$strings["Post to Insanejournal"] = "Enviament a Insanejournal";
|
||||
App::$strings["InsaneJournal Post Settings"] = "Ajustos d'Enviament a Insanejournal";
|
||||
App::$strings["Enable InsaneJournal Post Plugin"] = "Habilita el Plugin d'Enviaments a Insanejournal";
|
||||
App::$strings["InsaneJournal username"] = "Nom d'usuari de Insanejournal";
|
||||
App::$strings["InsaneJournal password"] = "Contrasenya de Insanejournal";
|
||||
App::$strings["Post to InsaneJournal by default"] = "Enviar per defecte a Insanejournal";
|
||||
App::$strings["Submit"] = "Enviar";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Insanejournal"] = "Odeslat na Insanejournal";
|
||||
$a->strings["InsaneJournal Post Settings"] = "Nastavení příspěvků pro InsaneJournal";
|
||||
$a->strings["Enable InsaneJournal Post Plugin"] = "Povolit Insanejournal plugin";
|
||||
$a->strings["InsaneJournal username"] = "Insanejournal uživatelské jméno";
|
||||
$a->strings["InsaneJournal password"] = "Insanejournal heslo";
|
||||
$a->strings["Post to InsaneJournal by default"] = "Defaultně zasílat příspěvky na InsaneJournal";
|
||||
$a->strings["Submit"] = "Odeslat";
|
||||
App::$strings["Post to Insanejournal"] = "Odeslat na Insanejournal";
|
||||
App::$strings["InsaneJournal Post Settings"] = "Nastavení příspěvků pro InsaneJournal";
|
||||
App::$strings["Enable InsaneJournal Post Plugin"] = "Povolit Insanejournal plugin";
|
||||
App::$strings["InsaneJournal username"] = "Insanejournal uživatelské jméno";
|
||||
App::$strings["InsaneJournal password"] = "Insanejournal heslo";
|
||||
App::$strings["Post to InsaneJournal by default"] = "Defaultně zasílat příspěvky na InsaneJournal";
|
||||
App::$strings["Submit"] = "Odeslat";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Insanejournal"] = "Auf InsaneJournal posten.";
|
||||
$a->strings["InsaneJournal Post Settings"] = "InsaneJournal Beitrags-Einstellungen";
|
||||
$a->strings["Enable InsaneJournal Post Plugin"] = "InsaneJournal Plugin aktivieren";
|
||||
$a->strings["InsaneJournal username"] = "InsaneJournal Benutzername";
|
||||
$a->strings["InsaneJournal password"] = "InsaneJournal Passwort";
|
||||
$a->strings["Post to InsaneJournal by default"] = "Standardmäßig auf InsaneJournal posten.";
|
||||
$a->strings["Submit"] = "Senden";
|
||||
App::$strings["Post to Insanejournal"] = "Auf InsaneJournal posten.";
|
||||
App::$strings["InsaneJournal Post Settings"] = "InsaneJournal Beitrags-Einstellungen";
|
||||
App::$strings["Enable InsaneJournal Post Plugin"] = "InsaneJournal Plugin aktivieren";
|
||||
App::$strings["InsaneJournal username"] = "InsaneJournal Benutzername";
|
||||
App::$strings["InsaneJournal password"] = "InsaneJournal Passwort";
|
||||
App::$strings["Post to InsaneJournal by default"] = "Standardmäßig auf InsaneJournal posten.";
|
||||
App::$strings["Submit"] = "Senden";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Insanejournal"] = "Afiŝi al Insanejournal";
|
||||
$a->strings["InsaneJournal Post Settings"] = "Agordoj pri Insaenejournal Afiŝoj";
|
||||
$a->strings["Enable InsaneJournal Post Plugin"] = "Ŝalti la InsaneJournal afiŝo kromprogramon.";
|
||||
$a->strings["InsaneJournal username"] = "Salutnomo ĉe InsaneJournal";
|
||||
$a->strings["InsaneJournal password"] = "Pasvorto ĉe InsaneJournal";
|
||||
$a->strings["Post to InsaneJournal by default"] = "Defaŭlte afiŝi ĉe InsaneJournal";
|
||||
$a->strings["Submit"] = "Sendi";
|
||||
App::$strings["Post to Insanejournal"] = "Afiŝi al Insanejournal";
|
||||
App::$strings["InsaneJournal Post Settings"] = "Agordoj pri Insaenejournal Afiŝoj";
|
||||
App::$strings["Enable InsaneJournal Post Plugin"] = "Ŝalti la InsaneJournal afiŝo kromprogramon.";
|
||||
App::$strings["InsaneJournal username"] = "Salutnomo ĉe InsaneJournal";
|
||||
App::$strings["InsaneJournal password"] = "Pasvorto ĉe InsaneJournal";
|
||||
App::$strings["Post to InsaneJournal by default"] = "Defaŭlte afiŝi ĉe InsaneJournal";
|
||||
App::$strings["Submit"] = "Sendi";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Insanejournal"] = "Publicar en Insanejournal";
|
||||
$a->strings["InsaneJournal Post Settings"] = "Configuración de publicación en Insanejournal";
|
||||
$a->strings["Enable InsaneJournal Post Plugin"] = "Activar el módulo de publicación en Insanejournal";
|
||||
$a->strings["InsaneJournal username"] = "Nombre de usuario de Insanejournal";
|
||||
$a->strings["InsaneJournal password"] = "Contraseña de Insanejournal";
|
||||
$a->strings["Post to InsaneJournal by default"] = "Publicar en Insanejournal por defecto";
|
||||
$a->strings["Submit"] = "Envíar";
|
||||
App::$strings["Post to Insanejournal"] = "Publicar en Insanejournal";
|
||||
App::$strings["InsaneJournal Post Settings"] = "Configuración de publicación en Insanejournal";
|
||||
App::$strings["Enable InsaneJournal Post Plugin"] = "Activar el módulo de publicación en Insanejournal";
|
||||
App::$strings["InsaneJournal username"] = "Nombre de usuario de Insanejournal";
|
||||
App::$strings["InsaneJournal password"] = "Contraseña de Insanejournal";
|
||||
App::$strings["Post to InsaneJournal by default"] = "Publicar en Insanejournal por defecto";
|
||||
App::$strings["Submit"] = "Envíar";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Insanejournal"] = "Publier vers InsaneJournal";
|
||||
$a->strings["InsaneJournal Post Settings"] = "Réglages InsaneJournal";
|
||||
$a->strings["Enable InsaneJournal Post Plugin"] = "Activer le connecteur InsaneJournal";
|
||||
$a->strings["InsaneJournal username"] = "Utilisateur InsaneJournal";
|
||||
$a->strings["InsaneJournal password"] = "Mot de passe InsaneJournal";
|
||||
$a->strings["Post to InsaneJournal by default"] = "Publier sur InsaneJournal par défaut";
|
||||
$a->strings["Submit"] = "Envoyer";
|
||||
App::$strings["Post to Insanejournal"] = "Publier vers InsaneJournal";
|
||||
App::$strings["InsaneJournal Post Settings"] = "Réglages InsaneJournal";
|
||||
App::$strings["Enable InsaneJournal Post Plugin"] = "Activer le connecteur InsaneJournal";
|
||||
App::$strings["InsaneJournal username"] = "Utilisateur InsaneJournal";
|
||||
App::$strings["InsaneJournal password"] = "Mot de passe InsaneJournal";
|
||||
App::$strings["Post to InsaneJournal by default"] = "Publier sur InsaneJournal par défaut";
|
||||
App::$strings["Submit"] = "Envoyer";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Insanejournal"] = "";
|
||||
$a->strings["InsaneJournal Post Settings"] = "";
|
||||
$a->strings["Enable InsaneJournal Post Plugin"] = "";
|
||||
$a->strings["InsaneJournal username"] = "";
|
||||
$a->strings["InsaneJournal password"] = "";
|
||||
$a->strings["Post to InsaneJournal by default"] = "";
|
||||
$a->strings["Submit"] = "Senda inn";
|
||||
App::$strings["Post to Insanejournal"] = "";
|
||||
App::$strings["InsaneJournal Post Settings"] = "";
|
||||
App::$strings["Enable InsaneJournal Post Plugin"] = "";
|
||||
App::$strings["InsaneJournal username"] = "";
|
||||
App::$strings["InsaneJournal password"] = "";
|
||||
App::$strings["Post to InsaneJournal by default"] = "";
|
||||
App::$strings["Submit"] = "Senda inn";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Insanejournal"] = "Invia a Insanejournal";
|
||||
$a->strings["InsaneJournal Post Settings"] = "Impostazioni Invio a InsaneJournal ";
|
||||
$a->strings["Enable InsaneJournal Post Plugin"] = "Abilita il plugin Invio a InsaneJournal";
|
||||
$a->strings["InsaneJournal username"] = "Nome utente InsaneJournal";
|
||||
$a->strings["InsaneJournal password"] = "Password InsaneJournal";
|
||||
$a->strings["Post to InsaneJournal by default"] = "Invia sempre a InsaneJournal";
|
||||
$a->strings["Submit"] = "Invia";
|
||||
App::$strings["Post to Insanejournal"] = "Invia a Insanejournal";
|
||||
App::$strings["InsaneJournal Post Settings"] = "Impostazioni Invio a InsaneJournal ";
|
||||
App::$strings["Enable InsaneJournal Post Plugin"] = "Abilita il plugin Invio a InsaneJournal";
|
||||
App::$strings["InsaneJournal username"] = "Nome utente InsaneJournal";
|
||||
App::$strings["InsaneJournal password"] = "Password InsaneJournal";
|
||||
App::$strings["Post to InsaneJournal by default"] = "Invia sempre a InsaneJournal";
|
||||
App::$strings["Submit"] = "Invia";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Insanejournal"] = "";
|
||||
$a->strings["InsaneJournal Post Settings"] = "";
|
||||
$a->strings["Enable InsaneJournal Post Plugin"] = "";
|
||||
$a->strings["InsaneJournal username"] = "";
|
||||
$a->strings["InsaneJournal password"] = "";
|
||||
$a->strings["Post to InsaneJournal by default"] = "";
|
||||
$a->strings["Submit"] = "Lagre";
|
||||
App::$strings["Post to Insanejournal"] = "";
|
||||
App::$strings["InsaneJournal Post Settings"] = "";
|
||||
App::$strings["Enable InsaneJournal Post Plugin"] = "";
|
||||
App::$strings["InsaneJournal username"] = "";
|
||||
App::$strings["InsaneJournal password"] = "";
|
||||
App::$strings["Post to InsaneJournal by default"] = "";
|
||||
App::$strings["Submit"] = "Lagre";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Insanejournal"] = "Doorplaatsen naar InsaneJournal";
|
||||
$a->strings["InsaneJournal Post Settings"] = "InsaneJournal (berichten doorplaatsen)";
|
||||
$a->strings["Enable InsaneJournal Post Plugin"] = "Doorplaatsen naar InsaneJournal inschakelen";
|
||||
$a->strings["InsaneJournal username"] = "Gebruikersnaam InsaneJournal";
|
||||
$a->strings["InsaneJournal password"] = "Wachtwoord InsaneJournal";
|
||||
$a->strings["Post to InsaneJournal by default"] = "Berichten standaard naar InsaneJournal doorplaatsen";
|
||||
$a->strings["Submit"] = "Opslaan";
|
||||
App::$strings["Post to Insanejournal"] = "Doorplaatsen naar InsaneJournal";
|
||||
App::$strings["InsaneJournal Post Settings"] = "InsaneJournal (berichten doorplaatsen)";
|
||||
App::$strings["Enable InsaneJournal Post Plugin"] = "Doorplaatsen naar InsaneJournal inschakelen";
|
||||
App::$strings["InsaneJournal username"] = "Gebruikersnaam InsaneJournal";
|
||||
App::$strings["InsaneJournal password"] = "Wachtwoord InsaneJournal";
|
||||
App::$strings["Post to InsaneJournal by default"] = "Berichten standaard naar InsaneJournal doorplaatsen";
|
||||
App::$strings["Submit"] = "Opslaan";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Insanejournal"] = "Opublikuj na Insanejournal";
|
||||
$a->strings["InsaneJournal Post Settings"] = "";
|
||||
$a->strings["Enable InsaneJournal Post Plugin"] = "";
|
||||
$a->strings["InsaneJournal username"] = "";
|
||||
$a->strings["InsaneJournal password"] = "";
|
||||
$a->strings["Post to InsaneJournal by default"] = "";
|
||||
$a->strings["Submit"] = "Potwierdź";
|
||||
App::$strings["Post to Insanejournal"] = "Opublikuj na Insanejournal";
|
||||
App::$strings["InsaneJournal Post Settings"] = "";
|
||||
App::$strings["Enable InsaneJournal Post Plugin"] = "";
|
||||
App::$strings["InsaneJournal username"] = "";
|
||||
App::$strings["InsaneJournal password"] = "";
|
||||
App::$strings["Post to InsaneJournal by default"] = "";
|
||||
App::$strings["Submit"] = "Potwierdź";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Insanejournal"] = "Publicar no InsaneJournal";
|
||||
$a->strings["InsaneJournal Post Settings"] = "Configurações da publicação no InsaneJournal";
|
||||
$a->strings["Enable InsaneJournal Post Plugin"] = "Habilitar o plugin de publicação no InsaneJournal";
|
||||
$a->strings["InsaneJournal username"] = "Nome de usuário do InsaneJournal";
|
||||
$a->strings["InsaneJournal password"] = "Senha do InsaneJournal";
|
||||
$a->strings["Post to InsaneJournal by default"] = "Publicar no InsaneJournal por padrão";
|
||||
$a->strings["Submit"] = "Enviar";
|
||||
App::$strings["Post to Insanejournal"] = "Publicar no InsaneJournal";
|
||||
App::$strings["InsaneJournal Post Settings"] = "Configurações da publicação no InsaneJournal";
|
||||
App::$strings["Enable InsaneJournal Post Plugin"] = "Habilitar o plugin de publicação no InsaneJournal";
|
||||
App::$strings["InsaneJournal username"] = "Nome de usuário do InsaneJournal";
|
||||
App::$strings["InsaneJournal password"] = "Senha do InsaneJournal";
|
||||
App::$strings["Post to InsaneJournal by default"] = "Publicar no InsaneJournal por padrão";
|
||||
App::$strings["Submit"] = "Enviar";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Insanejournal"] = "";
|
||||
$a->strings["InsaneJournal Post Settings"] = "";
|
||||
$a->strings["Enable InsaneJournal Post Plugin"] = "Включить InsaneJournal плагин сообщений";
|
||||
$a->strings["InsaneJournal username"] = "";
|
||||
$a->strings["InsaneJournal password"] = "";
|
||||
$a->strings["Post to InsaneJournal by default"] = "";
|
||||
$a->strings["Submit"] = "Подтвердить";
|
||||
App::$strings["Post to Insanejournal"] = "";
|
||||
App::$strings["InsaneJournal Post Settings"] = "";
|
||||
App::$strings["Enable InsaneJournal Post Plugin"] = "Включить InsaneJournal плагин сообщений";
|
||||
App::$strings["InsaneJournal username"] = "";
|
||||
App::$strings["InsaneJournal password"] = "";
|
||||
App::$strings["Post to InsaneJournal by default"] = "";
|
||||
App::$strings["Submit"] = "Подтвердить";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Submit"] = "Spara";
|
||||
App::$strings["Submit"] = "Spara";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Post to Insanejournal"] = "转播到Insanejournal";
|
||||
$a->strings["InsaneJournal Post Settings"] = "Insanejournal转播设置";
|
||||
$a->strings["Enable InsaneJournal Post Plugin"] = "使InsaneJournal转播插件可用";
|
||||
$a->strings["InsaneJournal username"] = "InsaneJournal用户名";
|
||||
$a->strings["InsaneJournal password"] = "InsaneJournal密码";
|
||||
$a->strings["Post to InsaneJournal by default"] = "默认地转播到InsaneJournal";
|
||||
$a->strings["Submit"] = "提交";
|
||||
App::$strings["Post to Insanejournal"] = "转播到Insanejournal";
|
||||
App::$strings["InsaneJournal Post Settings"] = "Insanejournal转播设置";
|
||||
App::$strings["Enable InsaneJournal Post Plugin"] = "使InsaneJournal转播插件可用";
|
||||
App::$strings["InsaneJournal username"] = "InsaneJournal用户名";
|
||||
App::$strings["InsaneJournal password"] = "InsaneJournal密码";
|
||||
App::$strings["Post to InsaneJournal by default"] = "默认地转播到InsaneJournal";
|
||||
App::$strings["Submit"] = "提交";
|
||||
|
|
|
@ -35,7 +35,7 @@ function irc_addon_settings(&$a,&$s) {
|
|||
|
||||
/* Add our stylesheet to the page so we can make our settings look nice */
|
||||
|
||||
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/irc/irc.css' . '" media="all" />' . "\r\n";
|
||||
//App::$page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/irc/irc.css' . '" media="all" />' . "\r\n";
|
||||
|
||||
/* setting popular channels, auto connect channels */
|
||||
$sitechats = get_config('irc','sitechats'); /* popular channels */
|
||||
|
@ -82,7 +82,7 @@ return;
|
|||
|
||||
function irc_content(&$a) {
|
||||
|
||||
$baseurl = $a->get_baseurl() . '/addon/irc';
|
||||
$baseurl = z_root() . '/addon/irc';
|
||||
$o = '';
|
||||
|
||||
/* set the list of popular channels */
|
||||
|
@ -93,11 +93,11 @@ function irc_content(&$a) {
|
|||
$chats = array('hubzilla','friendica','chat','chatback','hottub','ircbar','dateroom','debian');
|
||||
|
||||
|
||||
$a->page['aside'] .= '<div class="widget"><h3>' . t('Popular Channels') . '</h3><ul>';
|
||||
App::$page['aside'] .= '<div class="widget"><h3>' . t('Popular Channels') . '</h3><ul>';
|
||||
foreach($chats as $chat) {
|
||||
$a->page['aside'] .= '<li><a href="' . $a->get_baseurl() . '/irc?channels=' . $chat . '" >' . '#' . $chat . '</a></li>';
|
||||
App::$page['aside'] .= '<li><a href="' . z_root() . '/irc?channels=' . $chat . '" >' . '#' . $chat . '</a></li>';
|
||||
}
|
||||
$a->page['aside'] .= '</ul></div>';
|
||||
App::$page['aside'] .= '</ul></div>';
|
||||
|
||||
/* setting the channel(s) to auto connect */
|
||||
$autochans = get_config('irc','autochans');
|
||||
|
|
|
@ -274,7 +274,7 @@ function jappixmini_settings(&$a, &$s) {
|
|||
$server = get_config("jappixmini", "default_server");
|
||||
|
||||
if (($username == "") and get_config("jappixmini", "default_user"))
|
||||
$username = $a->user["nickname"];
|
||||
$username = App::$user["nickname"];
|
||||
|
||||
$info_text = get_config("jappixmini", "infotext");
|
||||
$info_text = htmlentities($info_text);
|
||||
|
@ -297,9 +297,9 @@ function jappixmini_settings(&$a, &$s) {
|
|||
|
||||
if (!$activate) {
|
||||
// load scripts if not yet activated so that password can be saved
|
||||
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/jappix/php/get.php?t=js&g=mini.xml"></script>'."\r\n";
|
||||
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/jappix/php/get.php?t=js&f=presence.js~caps.js~name.js~roster.js"></script>'."\r\n";
|
||||
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/lib.js"></script>'."\r\n";
|
||||
App::$page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/addon/jappixmini/jappix/php/get.php?t=js&g=mini.xml"></script>'."\r\n";
|
||||
App::$page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/addon/jappixmini/jappix/php/get.php?t=js&f=presence.js~caps.js~name.js~roster.js"></script>'."\r\n";
|
||||
App::$page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/addon/jappixmini/lib.js"></script>'."\r\n";
|
||||
}
|
||||
|
||||
$sc .= '<div class="section-content-info-wrapper form-group">';
|
||||
|
@ -373,7 +373,7 @@ function jappixmini_settings(&$a, &$s) {
|
|||
'$content' => $sc
|
||||
));
|
||||
|
||||
$a->page['htmlhead'] .= "<script type=\"text/javascript\">
|
||||
App::$page['htmlhead'] .= "<script type=\"text/javascript\">
|
||||
function jappixmini_set_password() {
|
||||
encrypt = document.getElementById('id_jappixmini-encrypt').checked;
|
||||
password = document.getElementById('jappixmini-password');
|
||||
|
@ -490,10 +490,10 @@ function jappixmini_script(&$a,&$s) {
|
|||
if (!$activate or $dontinsertchat) {
|
||||
return;
|
||||
}
|
||||
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/jappix/php/get.php?t=js&g=mini.xml"></script>'."\r\n";
|
||||
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/jappix/php/get.php?t=js&f=presence.js~caps.js~name.js~roster.js"></script>'."\r\n";
|
||||
App::$page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/addon/jappixmini/jappix/php/get.php?t=js&g=mini.xml"></script>'."\r\n";
|
||||
App::$page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/addon/jappixmini/jappix/php/get.php?t=js&f=presence.js~caps.js~name.js~roster.js"></script>'."\r\n";
|
||||
|
||||
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/lib.js"></script>'."\r\n";
|
||||
App::$page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/addon/jappixmini/lib.js"></script>'."\r\n";
|
||||
|
||||
$username = get_pconfig(local_channel(),'jappixmini','username');
|
||||
$username = str_replace("'", "\\'", $username);
|
||||
|
@ -514,7 +514,7 @@ function jappixmini_script(&$a,&$s) {
|
|||
// set proxy if necessary
|
||||
$use_proxy = get_config('jappixmini','bosh_proxy');
|
||||
if ($use_proxy) {
|
||||
$proxy = $a->get_baseurl().'/addon/jappixmini/proxy.php';
|
||||
$proxy = z_root().'/addon/jappixmini/proxy.php';
|
||||
}
|
||||
else {
|
||||
$proxy = "";
|
||||
|
@ -555,7 +555,7 @@ function jappixmini_script(&$a,&$s) {
|
|||
}
|
||||
|
||||
// add javascript to start Jappix Mini
|
||||
$a->page['htmlhead'] .= "<script type=\"text/javascript\">
|
||||
App::$page['htmlhead'] .= "<script type=\"text/javascript\">
|
||||
jQuery(document).ready(function() {
|
||||
jappixmini_addon_start('$server', '$username', '$proxy', '$bosh', $encrypt, '$password', $nickname, $contacts_json, '$contacts_hash', $autoapprove, $autosubscribe, $groupchats);
|
||||
});
|
||||
|
@ -568,10 +568,10 @@ function jappixmini_login(&$a, &$o) {
|
|||
// create client secret on login to be able to encrypt jabber passwords
|
||||
|
||||
// for setDB and str_sha1, needed by jappixmini_addon_set_client_secret
|
||||
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/jappix/php/get.php?t=js&f=datastore.js~jsjac.js"></script>'."\r\n";
|
||||
App::$page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/addon/jappixmini/jappix/php/get.php?t=js&f=datastore.js~jsjac.js"></script>'."\r\n";
|
||||
|
||||
// for jappixmini_addon_set_client_secret
|
||||
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/lib.js"></script>'."\r\n";
|
||||
App::$page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/addon/jappixmini/lib.js"></script>'."\r\n";
|
||||
|
||||
// save hash of password
|
||||
$o = str_replace("<form ", "<form onsubmit=\"jappixmini_addon_set_client_secret(this.elements['id_password'].value);return true;\" ", $o);
|
||||
|
@ -699,6 +699,6 @@ function jappixmini_download_source(&$a,&$b) {
|
|||
// Jappix Mini source download link on About page
|
||||
|
||||
$b .= '<h1>Jappix Mini</h1>';
|
||||
$b .= '<p>This site uses the jappixmini addon, which includes Jappix Mini by the <a href="'.$a->get_baseurl().'/addon/jappixmini/jappix/AUTHORS">Jappix authors</a> and is distributed under the terms of the <a href="'.$a->get_baseurl().'/addon/jappixmini/jappix/COPYING">GNU Affero General Public License</a>.</p>';
|
||||
$b .= '<p>You can download the <a href="'.$a->get_baseurl().'/addon/jappixmini.tgz">source code of the addon</a>. The rest of Hubzilla is distributed under compatible licenses and can be retrieved from <a href="https://github.com/friendica/red">https://github.com/friendica/red</a> and <a href="https://github.com/friendica/red-addons">https://github.com/friendica/red-addons</a></p>';
|
||||
$b .= '<p>This site uses the jappixmini addon, which includes Jappix Mini by the <a href="'.z_root().'/addon/jappixmini/jappix/AUTHORS">Jappix authors</a> and is distributed under the terms of the <a href="'.z_root().'/addon/jappixmini/jappix/COPYING">GNU Affero General Public License</a>.</p>';
|
||||
$b .= '<p>You can download the <a href="'.z_root().'/addon/jappixmini.tgz">source code of the addon</a>. The rest of Hubzilla is distributed under compatible licenses and can be retrieved from <a href="https://github.com/friendica/red">https://github.com/friendica/red</a> and <a href="https://github.com/friendica/red-addons">https://github.com/friendica/red-addons</a></p>';
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Jappix Mini addon settings"] = "";
|
||||
$a->strings["Activate addon"] = "";
|
||||
$a->strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
$a->strings["Jabber username"] = "";
|
||||
$a->strings["Jabber server"] = "";
|
||||
$a->strings["Jabber BOSH host"] = "";
|
||||
$a->strings["Jabber password"] = "";
|
||||
$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
$a->strings["Friendica password"] = "";
|
||||
$a->strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
$a->strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
$a->strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
$a->strings["Submit"] = "Enviar";
|
||||
$a->strings["Add contact"] = "";
|
||||
App::$strings["Jappix Mini addon settings"] = "";
|
||||
App::$strings["Activate addon"] = "";
|
||||
App::$strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
App::$strings["Jabber username"] = "";
|
||||
App::$strings["Jabber server"] = "";
|
||||
App::$strings["Jabber BOSH host"] = "";
|
||||
App::$strings["Jabber password"] = "";
|
||||
App::$strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
App::$strings["Friendica password"] = "";
|
||||
App::$strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
App::$strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
App::$strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
App::$strings["Submit"] = "Enviar";
|
||||
App::$strings["Add contact"] = "";
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Jappix Mini addon settings"] = "Nastavení rozšíření Jappix Mini";
|
||||
$a->strings["Activate addon"] = "Aktivovat rozšíření";
|
||||
$a->strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "<em>Nevlkádejte</em> Jappixmini Chat-Widget do webového rozhraní";
|
||||
$a->strings["Jabber username"] = "Jabber uživatelské jméno";
|
||||
$a->strings["Jabber server"] = "Jabber server";
|
||||
$a->strings["Jabber BOSH host"] = "Jabber BOSH host";
|
||||
$a->strings["Jabber password"] = "Jabber heslo";
|
||||
$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "Zašifrovat Jabber heslo s heslem Friendica (doporučeno)";
|
||||
$a->strings["Friendica password"] = "Friendica heslo";
|
||||
$a->strings["Approve subscription requests from Friendica contacts automatically"] = "Automaticky schválit požadavek na členství od Friedica kontaktů.";
|
||||
$a->strings["Subscribe to Friendica contacts automatically"] = "Automaticky zaslat požadavek na členství Friedica kontaktům.";
|
||||
$a->strings["Purge internal list of jabber addresses of contacts"] = "Očistit interní seznam jabber adres kontaktů";
|
||||
$a->strings["Submit"] = "Odeslat";
|
||||
$a->strings["Add contact"] = "Přidat kontakt";
|
||||
App::$strings["Jappix Mini addon settings"] = "Nastavení rozšíření Jappix Mini";
|
||||
App::$strings["Activate addon"] = "Aktivovat rozšíření";
|
||||
App::$strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "<em>Nevlkádejte</em> Jappixmini Chat-Widget do webového rozhraní";
|
||||
App::$strings["Jabber username"] = "Jabber uživatelské jméno";
|
||||
App::$strings["Jabber server"] = "Jabber server";
|
||||
App::$strings["Jabber BOSH host"] = "Jabber BOSH host";
|
||||
App::$strings["Jabber password"] = "Jabber heslo";
|
||||
App::$strings["Encrypt Jabber password with Friendica password (recommended)"] = "Zašifrovat Jabber heslo s heslem Friendica (doporučeno)";
|
||||
App::$strings["Friendica password"] = "Friendica heslo";
|
||||
App::$strings["Approve subscription requests from Friendica contacts automatically"] = "Automaticky schválit požadavek na členství od Friedica kontaktů.";
|
||||
App::$strings["Subscribe to Friendica contacts automatically"] = "Automaticky zaslat požadavek na členství Friedica kontaktům.";
|
||||
App::$strings["Purge internal list of jabber addresses of contacts"] = "Očistit interní seznam jabber adres kontaktů";
|
||||
App::$strings["Submit"] = "Odeslat";
|
||||
App::$strings["Add contact"] = "Přidat kontakt";
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Jappix Mini addon settings"] = "Jappix Mini Addon Einstellungen";
|
||||
$a->strings["Activate addon"] = "Addon aktivieren";
|
||||
$a->strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "Füge das Jappix Mini Chat Widget <em>nicht</em> zum Webinterface hinzu";
|
||||
$a->strings["Jabber username"] = "Jabber Nutzername";
|
||||
$a->strings["Jabber server"] = "Jabber Server";
|
||||
$a->strings["Jabber BOSH host"] = "Jabber BOSH Host";
|
||||
$a->strings["Jabber password"] = "Japper Passwort";
|
||||
$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "Verschlüssele das Jabber Passwort mit dem Friendica Passwort (empfohlen)";
|
||||
$a->strings["Friendica password"] = "Friendica Passwort";
|
||||
$a->strings["Approve subscription requests from Friendica contacts automatically"] = "Kontaktanfragen von Friendica Kontakten automatisch akzeptieren";
|
||||
$a->strings["Subscribe to Friendica contacts automatically"] = "Automatisch Friendica Kontakten bei Jabber folgen";
|
||||
$a->strings["Purge internal list of jabber addresses of contacts"] = "Lösche die interne Liste der Jabber Adressen der Kontakte";
|
||||
$a->strings["Submit"] = "Senden";
|
||||
$a->strings["Add contact"] = "Kontakt hinzufügen";
|
||||
App::$strings["Jappix Mini addon settings"] = "Jappix Mini Addon Einstellungen";
|
||||
App::$strings["Activate addon"] = "Addon aktivieren";
|
||||
App::$strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "Füge das Jappix Mini Chat Widget <em>nicht</em> zum Webinterface hinzu";
|
||||
App::$strings["Jabber username"] = "Jabber Nutzername";
|
||||
App::$strings["Jabber server"] = "Jabber Server";
|
||||
App::$strings["Jabber BOSH host"] = "Jabber BOSH Host";
|
||||
App::$strings["Jabber password"] = "Japper Passwort";
|
||||
App::$strings["Encrypt Jabber password with Friendica password (recommended)"] = "Verschlüssele das Jabber Passwort mit dem Friendica Passwort (empfohlen)";
|
||||
App::$strings["Friendica password"] = "Friendica Passwort";
|
||||
App::$strings["Approve subscription requests from Friendica contacts automatically"] = "Kontaktanfragen von Friendica Kontakten automatisch akzeptieren";
|
||||
App::$strings["Subscribe to Friendica contacts automatically"] = "Automatisch Friendica Kontakten bei Jabber folgen";
|
||||
App::$strings["Purge internal list of jabber addresses of contacts"] = "Lösche die interne Liste der Jabber Adressen der Kontakte";
|
||||
App::$strings["Submit"] = "Senden";
|
||||
App::$strings["Add contact"] = "Kontakt hinzufügen";
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Jappix Mini addon settings"] = "";
|
||||
$a->strings["Activate addon"] = "";
|
||||
$a->strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
$a->strings["Jabber username"] = "";
|
||||
$a->strings["Jabber server"] = "";
|
||||
$a->strings["Jabber BOSH host"] = "";
|
||||
$a->strings["Jabber password"] = "";
|
||||
$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
$a->strings["Friendica password"] = "";
|
||||
$a->strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
$a->strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
$a->strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
$a->strings["Submit"] = "Sendi";
|
||||
$a->strings["Add contact"] = "";
|
||||
App::$strings["Jappix Mini addon settings"] = "";
|
||||
App::$strings["Activate addon"] = "";
|
||||
App::$strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
App::$strings["Jabber username"] = "";
|
||||
App::$strings["Jabber server"] = "";
|
||||
App::$strings["Jabber BOSH host"] = "";
|
||||
App::$strings["Jabber password"] = "";
|
||||
App::$strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
App::$strings["Friendica password"] = "";
|
||||
App::$strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
App::$strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
App::$strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
App::$strings["Submit"] = "Sendi";
|
||||
App::$strings["Add contact"] = "";
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Jappix Mini addon settings"] = "Ajustes de complemento Jappix Mini";
|
||||
$a->strings["Activate addon"] = "Activar complemento";
|
||||
$a->strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "<em>No</em> insertar la aplicación de chat Jappixmini en la interfaz web";
|
||||
$a->strings["Jabber username"] = "Nombre de usuario de Jabber";
|
||||
$a->strings["Jabber server"] = "Servidor de Jabber";
|
||||
$a->strings["Jabber BOSH host"] = "Anfitrión BOSH de Jabber";
|
||||
$a->strings["Jabber password"] = "Contraseña de Jabber";
|
||||
$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "Encriptar contraseña de Jabber con la contraseña de Friendica (recomendado)";
|
||||
$a->strings["Friendica password"] = "Contraseña de Friendica";
|
||||
$a->strings["Approve subscription requests from Friendica contacts automatically"] = "Aprobar peticiones de suscripción de contactos de Friendica automáticamente";
|
||||
$a->strings["Subscribe to Friendica contacts automatically"] = "Suscribirse a contactos de Friendica automáticamente";
|
||||
$a->strings["Purge internal list of jabber addresses of contacts"] = "Purgar los contactos de la lista interna de direcciones de Jabber";
|
||||
$a->strings["Submit"] = "Envíar";
|
||||
$a->strings["Add contact"] = "Añadir contacto";
|
||||
App::$strings["Jappix Mini addon settings"] = "Ajustes de complemento Jappix Mini";
|
||||
App::$strings["Activate addon"] = "Activar complemento";
|
||||
App::$strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "<em>No</em> insertar la aplicación de chat Jappixmini en la interfaz web";
|
||||
App::$strings["Jabber username"] = "Nombre de usuario de Jabber";
|
||||
App::$strings["Jabber server"] = "Servidor de Jabber";
|
||||
App::$strings["Jabber BOSH host"] = "Anfitrión BOSH de Jabber";
|
||||
App::$strings["Jabber password"] = "Contraseña de Jabber";
|
||||
App::$strings["Encrypt Jabber password with Friendica password (recommended)"] = "Encriptar contraseña de Jabber con la contraseña de Friendica (recomendado)";
|
||||
App::$strings["Friendica password"] = "Contraseña de Friendica";
|
||||
App::$strings["Approve subscription requests from Friendica contacts automatically"] = "Aprobar peticiones de suscripción de contactos de Friendica automáticamente";
|
||||
App::$strings["Subscribe to Friendica contacts automatically"] = "Suscribirse a contactos de Friendica automáticamente";
|
||||
App::$strings["Purge internal list of jabber addresses of contacts"] = "Purgar los contactos de la lista interna de direcciones de Jabber";
|
||||
App::$strings["Submit"] = "Envíar";
|
||||
App::$strings["Add contact"] = "Añadir contacto";
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Jappix Mini addon settings"] = "Jappix Mini";
|
||||
$a->strings["Activate addon"] = "Activer";
|
||||
$a->strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "Ne <em>pas</em> insérer le widget JappixMini dans l'interface web";
|
||||
$a->strings["Jabber username"] = "Utilisateur Jabber";
|
||||
$a->strings["Jabber server"] = "Serveur Jabber";
|
||||
$a->strings["Jabber BOSH host"] = "Hôte BOSH (proxy) Jabber";
|
||||
$a->strings["Jabber password"] = "Mot de passe Jabber";
|
||||
$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "Chiffrer le mot de passe Jabber avec le mot de passe Friendica (recommandé)";
|
||||
$a->strings["Friendica password"] = "Mot de passe Friendica";
|
||||
$a->strings["Approve subscription requests from Friendica contacts automatically"] = "Approuver les contacts Friendica automatiquement";
|
||||
$a->strings["Subscribe to Friendica contacts automatically"] = "S'inscrire aux contacts Friendica automatiquement";
|
||||
$a->strings["Purge internal list of jabber addresses of contacts"] = "Purger la liste interne d'adresses Jabber";
|
||||
$a->strings["Submit"] = "Envoyer";
|
||||
$a->strings["Add contact"] = "Ajouter un contact";
|
||||
App::$strings["Jappix Mini addon settings"] = "Jappix Mini";
|
||||
App::$strings["Activate addon"] = "Activer";
|
||||
App::$strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "Ne <em>pas</em> insérer le widget JappixMini dans l'interface web";
|
||||
App::$strings["Jabber username"] = "Utilisateur Jabber";
|
||||
App::$strings["Jabber server"] = "Serveur Jabber";
|
||||
App::$strings["Jabber BOSH host"] = "Hôte BOSH (proxy) Jabber";
|
||||
App::$strings["Jabber password"] = "Mot de passe Jabber";
|
||||
App::$strings["Encrypt Jabber password with Friendica password (recommended)"] = "Chiffrer le mot de passe Jabber avec le mot de passe Friendica (recommandé)";
|
||||
App::$strings["Friendica password"] = "Mot de passe Friendica";
|
||||
App::$strings["Approve subscription requests from Friendica contacts automatically"] = "Approuver les contacts Friendica automatiquement";
|
||||
App::$strings["Subscribe to Friendica contacts automatically"] = "S'inscrire aux contacts Friendica automatiquement";
|
||||
App::$strings["Purge internal list of jabber addresses of contacts"] = "Purger la liste interne d'adresses Jabber";
|
||||
App::$strings["Submit"] = "Envoyer";
|
||||
App::$strings["Add contact"] = "Ajouter un contact";
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Jappix Mini addon settings"] = "";
|
||||
$a->strings["Activate addon"] = "";
|
||||
$a->strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
$a->strings["Jabber username"] = "";
|
||||
$a->strings["Jabber server"] = "";
|
||||
$a->strings["Jabber BOSH host"] = "";
|
||||
$a->strings["Jabber password"] = "";
|
||||
$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
$a->strings["Friendica password"] = "";
|
||||
$a->strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
$a->strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
$a->strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
$a->strings["Submit"] = "Senda inn";
|
||||
$a->strings["Add contact"] = "";
|
||||
App::$strings["Jappix Mini addon settings"] = "";
|
||||
App::$strings["Activate addon"] = "";
|
||||
App::$strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
App::$strings["Jabber username"] = "";
|
||||
App::$strings["Jabber server"] = "";
|
||||
App::$strings["Jabber BOSH host"] = "";
|
||||
App::$strings["Jabber password"] = "";
|
||||
App::$strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
App::$strings["Friendica password"] = "";
|
||||
App::$strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
App::$strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
App::$strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
App::$strings["Submit"] = "Senda inn";
|
||||
App::$strings["Add contact"] = "";
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Jappix Mini addon settings"] = "";
|
||||
$a->strings["Activate addon"] = "";
|
||||
$a->strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
$a->strings["Jabber username"] = "";
|
||||
$a->strings["Jabber server"] = "";
|
||||
$a->strings["Jabber BOSH host"] = "";
|
||||
$a->strings["Jabber password"] = "";
|
||||
$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
$a->strings["Friendica password"] = "";
|
||||
$a->strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
$a->strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
$a->strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
$a->strings["Submit"] = "Invia";
|
||||
$a->strings["Add contact"] = "";
|
||||
App::$strings["Jappix Mini addon settings"] = "";
|
||||
App::$strings["Activate addon"] = "";
|
||||
App::$strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
App::$strings["Jabber username"] = "";
|
||||
App::$strings["Jabber server"] = "";
|
||||
App::$strings["Jabber BOSH host"] = "";
|
||||
App::$strings["Jabber password"] = "";
|
||||
App::$strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
App::$strings["Friendica password"] = "";
|
||||
App::$strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
App::$strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
App::$strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
App::$strings["Submit"] = "Invia";
|
||||
App::$strings["Add contact"] = "";
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Jappix Mini addon settings"] = "";
|
||||
$a->strings["Activate addon"] = "";
|
||||
$a->strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
$a->strings["Jabber username"] = "";
|
||||
$a->strings["Jabber server"] = "";
|
||||
$a->strings["Jabber BOSH host"] = "";
|
||||
$a->strings["Jabber password"] = "";
|
||||
$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
$a->strings["Friendica password"] = "";
|
||||
$a->strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
$a->strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
$a->strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
$a->strings["Submit"] = "Lagre";
|
||||
$a->strings["Add contact"] = "";
|
||||
App::$strings["Jappix Mini addon settings"] = "";
|
||||
App::$strings["Activate addon"] = "";
|
||||
App::$strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
App::$strings["Jabber username"] = "";
|
||||
App::$strings["Jabber server"] = "";
|
||||
App::$strings["Jabber BOSH host"] = "";
|
||||
App::$strings["Jabber password"] = "";
|
||||
App::$strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
App::$strings["Friendica password"] = "";
|
||||
App::$strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
App::$strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
App::$strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
App::$strings["Submit"] = "Lagre";
|
||||
App::$strings["Add contact"] = "";
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Jappix Mini addon settings"] = "";
|
||||
$a->strings["Activate addon"] = "";
|
||||
$a->strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
$a->strings["Jabber username"] = "";
|
||||
$a->strings["Jabber server"] = "";
|
||||
$a->strings["Jabber BOSH host"] = "";
|
||||
$a->strings["Jabber password"] = "Hasło Jabber";
|
||||
$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
$a->strings["Friendica password"] = "Hasło Friendica";
|
||||
$a->strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
$a->strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
$a->strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
$a->strings["Submit"] = "Potwierdź";
|
||||
$a->strings["Add contact"] = "Dodaj kontakt";
|
||||
App::$strings["Jappix Mini addon settings"] = "";
|
||||
App::$strings["Activate addon"] = "";
|
||||
App::$strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
App::$strings["Jabber username"] = "";
|
||||
App::$strings["Jabber server"] = "";
|
||||
App::$strings["Jabber BOSH host"] = "";
|
||||
App::$strings["Jabber password"] = "Hasło Jabber";
|
||||
App::$strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
App::$strings["Friendica password"] = "Hasło Friendica";
|
||||
App::$strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
App::$strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
App::$strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
App::$strings["Submit"] = "Potwierdź";
|
||||
App::$strings["Add contact"] = "Dodaj kontakt";
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Jappix Mini addon settings"] = "";
|
||||
$a->strings["Activate addon"] = "";
|
||||
$a->strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
$a->strings["Jabber username"] = "";
|
||||
$a->strings["Jabber server"] = "";
|
||||
$a->strings["Jabber BOSH host"] = "";
|
||||
$a->strings["Jabber password"] = "";
|
||||
$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
$a->strings["Friendica password"] = "";
|
||||
$a->strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
$a->strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
$a->strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
$a->strings["Submit"] = "Enviar";
|
||||
$a->strings["Add contact"] = "";
|
||||
App::$strings["Jappix Mini addon settings"] = "";
|
||||
App::$strings["Activate addon"] = "";
|
||||
App::$strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
App::$strings["Jabber username"] = "";
|
||||
App::$strings["Jabber server"] = "";
|
||||
App::$strings["Jabber BOSH host"] = "";
|
||||
App::$strings["Jabber password"] = "";
|
||||
App::$strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
App::$strings["Friendica password"] = "";
|
||||
App::$strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
App::$strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
App::$strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
App::$strings["Submit"] = "Enviar";
|
||||
App::$strings["Add contact"] = "";
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Jappix Mini addon settings"] = "";
|
||||
$a->strings["Activate addon"] = "";
|
||||
$a->strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
$a->strings["Jabber username"] = "";
|
||||
$a->strings["Jabber server"] = "";
|
||||
$a->strings["Jabber BOSH host"] = "";
|
||||
$a->strings["Jabber password"] = "";
|
||||
$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
$a->strings["Friendica password"] = "";
|
||||
$a->strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
$a->strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
$a->strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
$a->strings["Submit"] = "Подтвердить";
|
||||
$a->strings["Add contact"] = "";
|
||||
App::$strings["Jappix Mini addon settings"] = "";
|
||||
App::$strings["Activate addon"] = "";
|
||||
App::$strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "";
|
||||
App::$strings["Jabber username"] = "";
|
||||
App::$strings["Jabber server"] = "";
|
||||
App::$strings["Jabber BOSH host"] = "";
|
||||
App::$strings["Jabber password"] = "";
|
||||
App::$strings["Encrypt Jabber password with Friendica password (recommended)"] = "";
|
||||
App::$strings["Friendica password"] = "";
|
||||
App::$strings["Approve subscription requests from Friendica contacts automatically"] = "";
|
||||
App::$strings["Subscribe to Friendica contacts automatically"] = "";
|
||||
App::$strings["Purge internal list of jabber addresses of contacts"] = "";
|
||||
App::$strings["Submit"] = "Подтвердить";
|
||||
App::$strings["Add contact"] = "";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Submit"] = "Spara";
|
||||
App::$strings["Submit"] = "Spara";
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Jappix Mini addon settings"] = "Jappix Mini加件设置";
|
||||
$a->strings["Activate addon"] = "使加件可用";
|
||||
$a->strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "<em>别</em>把Jappixmini聊小窗插入网用户界面";
|
||||
$a->strings["Jabber username"] = "Jabber用户名";
|
||||
$a->strings["Jabber server"] = "Jabber服务器";
|
||||
$a->strings["Jabber BOSH host"] = "Jabber BOSH主机";
|
||||
$a->strings["Jabber password"] = "Jabber密码";
|
||||
$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "把Jabber密码跟Friendica密码加密(推荐的)";
|
||||
$a->strings["Friendica password"] = "Friendica密码";
|
||||
$a->strings["Approve subscription requests from Friendica contacts automatically"] = "自动地批准从Friendica熟人的订阅要求";
|
||||
$a->strings["Subscribe to Friendica contacts automatically"] = "自动地订阅Friendica熟人";
|
||||
$a->strings["Purge internal list of jabber addresses of contacts"] = "把熟人jabber地址从内部单";
|
||||
$a->strings["Submit"] = "提交";
|
||||
$a->strings["Add contact"] = "加熟人";
|
||||
App::$strings["Jappix Mini addon settings"] = "Jappix Mini加件设置";
|
||||
App::$strings["Activate addon"] = "使加件可用";
|
||||
App::$strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "<em>别</em>把Jappixmini聊小窗插入网用户界面";
|
||||
App::$strings["Jabber username"] = "Jabber用户名";
|
||||
App::$strings["Jabber server"] = "Jabber服务器";
|
||||
App::$strings["Jabber BOSH host"] = "Jabber BOSH主机";
|
||||
App::$strings["Jabber password"] = "Jabber密码";
|
||||
App::$strings["Encrypt Jabber password with Friendica password (recommended)"] = "把Jabber密码跟Friendica密码加密(推荐的)";
|
||||
App::$strings["Friendica password"] = "Friendica密码";
|
||||
App::$strings["Approve subscription requests from Friendica contacts automatically"] = "自动地批准从Friendica熟人的订阅要求";
|
||||
App::$strings["Subscribe to Friendica contacts automatically"] = "自动地订阅Friendica熟人";
|
||||
App::$strings["Purge internal list of jabber addresses of contacts"] = "把熟人jabber地址从内部单";
|
||||
App::$strings["Submit"] = "提交";
|
||||
App::$strings["Add contact"] = "加熟人";
|
||||
|
|
|
@ -38,8 +38,8 @@ function js_upload_form(&$a,&$b) {
|
|||
|
||||
$b['default_upload'] = false;
|
||||
|
||||
$b['addon_text'] .= '<link href="' . $a->get_baseurl() . '/addon/js_upload/file-uploader/client/fileuploader.css" rel="stylesheet" type="text/css">';
|
||||
$b['addon_text'] .= '<script src="' . $a->get_baseurl() . '/addon/js_upload/file-uploader/client/fileuploader.js" type="text/javascript"></script>';
|
||||
$b['addon_text'] .= '<link href="' . z_root() . '/addon/js_upload/file-uploader/client/fileuploader.css" rel="stylesheet" type="text/css">';
|
||||
$b['addon_text'] .= '<script src="' . z_root() . '/addon/js_upload/file-uploader/client/fileuploader.js" type="text/javascript"></script>';
|
||||
|
||||
$upload_msg = t('Upload a file');
|
||||
$drop_msg = t('Drop files here to upload');
|
||||
|
@ -143,7 +143,7 @@ function js_upload_post_init(&$a,&$b) {
|
|||
if((! array_key_exists('source',$_REQUEST)) || ($_REQUEST['source'] != 'photos'))
|
||||
return;
|
||||
|
||||
// $a->data['upload_plugin'] = $b['source'];
|
||||
// App::$data['upload_plugin'] = $b['source'];
|
||||
|
||||
// list of valid extensions, ex. array("jpeg", "xml", "bmp")
|
||||
|
||||
|
@ -159,7 +159,7 @@ function js_upload_post_init(&$a,&$b) {
|
|||
|
||||
|
||||
// to pass data through iframe you will need to encode all html tags
|
||||
$a->data['upload_jsonresponse'] = htmlspecialchars(json_encode($result), ENT_NOQUOTES);
|
||||
App::$data['upload_jsonresponse'] = htmlspecialchars(json_encode($result), ENT_NOQUOTES);
|
||||
|
||||
if(isset($result['error'])) {
|
||||
logger('mod/photos.php: photos_post(): error uploading photo: ' . $result['error'] , 'LOGGER_DEBUG');
|
||||
|
@ -167,7 +167,7 @@ function js_upload_post_init(&$a,&$b) {
|
|||
killme();
|
||||
}
|
||||
|
||||
$a->data['upload_result'] = $result;
|
||||
App::$data['upload_result'] = $result;
|
||||
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ function js_upload_post_file(&$a,&$b) {
|
|||
if((! array_key_exists('source',$_REQUEST)) || ($_REQUEST['source'] != 'photos'))
|
||||
return;
|
||||
|
||||
$result = $a->data['upload_result'];
|
||||
$result = App::$data['upload_result'];
|
||||
|
||||
$b['src'] = $result['path'];
|
||||
$b['filename'] = $result['filename'];
|
||||
|
@ -190,8 +190,8 @@ function js_upload_post_end(&$a,&$b) {
|
|||
if((! array_key_exists('source',$_REQUEST)) || ($_REQUEST['source'] != 'photos'))
|
||||
return;
|
||||
|
||||
if(x($a->data,'upload_jsonresponse')) {
|
||||
echo $a->data['upload_jsonresponse'];
|
||||
if(x(App::$data,'upload_jsonresponse')) {
|
||||
echo App::$data['upload_jsonresponse'];
|
||||
killme();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Upload a file"] = "Carrega un arxiu";
|
||||
$a->strings["Drop files here to upload"] = "Deixa aquí el arxiu a carregar";
|
||||
$a->strings["Cancel"] = "Cancel·lar";
|
||||
$a->strings["Failed"] = "Fracassar";
|
||||
$a->strings["No files were uploaded."] = "No hi ha arxius carregats.";
|
||||
$a->strings["Uploaded file is empty"] = "L'arxiu carregat està buit";
|
||||
$a->strings["Image exceeds size limit of "] = "La imatge excedeix el límit de ";
|
||||
$a->strings["File has an invalid extension, it should be one of "] = "Arxiu té una extensió no vàlida, ha de ser una de";
|
||||
$a->strings["Upload was cancelled, or server error encountered"] = "La pujada va ser cancel.lada, o es va trobar un error de servidor";
|
||||
App::$strings["Upload a file"] = "Carrega un arxiu";
|
||||
App::$strings["Drop files here to upload"] = "Deixa aquí el arxiu a carregar";
|
||||
App::$strings["Cancel"] = "Cancel·lar";
|
||||
App::$strings["Failed"] = "Fracassar";
|
||||
App::$strings["No files were uploaded."] = "No hi ha arxius carregats.";
|
||||
App::$strings["Uploaded file is empty"] = "L'arxiu carregat està buit";
|
||||
App::$strings["Image exceeds size limit of "] = "La imatge excedeix el límit de ";
|
||||
App::$strings["File has an invalid extension, it should be one of "] = "Arxiu té una extensió no vàlida, ha de ser una de";
|
||||
App::$strings["Upload was cancelled, or server error encountered"] = "La pujada va ser cancel.lada, o es va trobar un error de servidor";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Upload a file"] = "Nahrát soubor";
|
||||
$a->strings["Drop files here to upload"] = "Přeneste sem soubory k nahrání";
|
||||
$a->strings["Cancel"] = "Zrušit";
|
||||
$a->strings["Failed"] = "Neúspěch";
|
||||
$a->strings["No files were uploaded."] = "Žádné soubory nebyly nahrány.";
|
||||
$a->strings["Uploaded file is empty"] = "Nahraný soubor je prázdný";
|
||||
$a->strings["Image exceeds size limit of "] = "Velikost obrázku překračuje limit velikosti";
|
||||
$a->strings["File has an invalid extension, it should be one of "] = "Soubor má neplatnou příponu, ta by měla být jednou z";
|
||||
$a->strings["Upload was cancelled, or server error encountered"] = "Nahrávání bylo zrušeno nebo došlo k chybě na serveru";
|
||||
App::$strings["Upload a file"] = "Nahrát soubor";
|
||||
App::$strings["Drop files here to upload"] = "Přeneste sem soubory k nahrání";
|
||||
App::$strings["Cancel"] = "Zrušit";
|
||||
App::$strings["Failed"] = "Neúspěch";
|
||||
App::$strings["No files were uploaded."] = "Žádné soubory nebyly nahrány.";
|
||||
App::$strings["Uploaded file is empty"] = "Nahraný soubor je prázdný";
|
||||
App::$strings["Image exceeds size limit of "] = "Velikost obrázku překračuje limit velikosti";
|
||||
App::$strings["File has an invalid extension, it should be one of "] = "Soubor má neplatnou příponu, ta by měla být jednou z";
|
||||
App::$strings["Upload was cancelled, or server error encountered"] = "Nahrávání bylo zrušeno nebo došlo k chybě na serveru";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Upload a file"] = "Datei hochladen";
|
||||
$a->strings["Drop files here to upload"] = "Ziehe Dateien hierher, um sie hochzuladen";
|
||||
$a->strings["Cancel"] = "Abbrechen";
|
||||
$a->strings["Failed"] = "Fehlgeschlagen";
|
||||
$a->strings["No files were uploaded."] = "Keine Dateien hochgeladen.";
|
||||
$a->strings["Uploaded file is empty"] = "Hochgeladene Datei ist leer";
|
||||
$a->strings["Image exceeds size limit of "] = "Die Bildgröße übersteigt das Limit von ";
|
||||
$a->strings["File has an invalid extension, it should be one of "] = "Die Dateierweiterung ist nicht erlaubt, sie muss eine der folgenden sein ";
|
||||
$a->strings["Upload was cancelled, or server error encountered"] = "Upload abgebrochen oder Serverfehler aufgetreten";
|
||||
App::$strings["Upload a file"] = "Datei hochladen";
|
||||
App::$strings["Drop files here to upload"] = "Ziehe Dateien hierher, um sie hochzuladen";
|
||||
App::$strings["Cancel"] = "Abbrechen";
|
||||
App::$strings["Failed"] = "Fehlgeschlagen";
|
||||
App::$strings["No files were uploaded."] = "Keine Dateien hochgeladen.";
|
||||
App::$strings["Uploaded file is empty"] = "Hochgeladene Datei ist leer";
|
||||
App::$strings["Image exceeds size limit of "] = "Die Bildgröße übersteigt das Limit von ";
|
||||
App::$strings["File has an invalid extension, it should be one of "] = "Die Dateierweiterung ist nicht erlaubt, sie muss eine der folgenden sein ";
|
||||
App::$strings["Upload was cancelled, or server error encountered"] = "Upload abgebrochen oder Serverfehler aufgetreten";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Upload a file"] = "Alŝuti dosieron";
|
||||
$a->strings["Drop files here to upload"] = "Ŝovmeti dosierojn ĉi tie por alŝuti ilin.";
|
||||
$a->strings["Cancel"] = "Nuligi";
|
||||
$a->strings["Failed"] = "Malsukcesi";
|
||||
$a->strings["No files were uploaded."] = "Neniom da dosieroj alŝutita.";
|
||||
$a->strings["Uploaded file is empty"] = "Alŝutita dosiero estas malplena.";
|
||||
$a->strings["Image exceeds size limit of "] = "Bildo estas pli granda ol la limito de";
|
||||
$a->strings["File has an invalid extension, it should be one of "] = "Dosiero havas nevalidan sufikson. Ĝi estu unu de ";
|
||||
$a->strings["Upload was cancelled, or server error encountered"] = "Alŝutado estas nuligita aŭ okazis eraro sur la servilo";
|
||||
App::$strings["Upload a file"] = "Alŝuti dosieron";
|
||||
App::$strings["Drop files here to upload"] = "Ŝovmeti dosierojn ĉi tie por alŝuti ilin.";
|
||||
App::$strings["Cancel"] = "Nuligi";
|
||||
App::$strings["Failed"] = "Malsukcesi";
|
||||
App::$strings["No files were uploaded."] = "Neniom da dosieroj alŝutita.";
|
||||
App::$strings["Uploaded file is empty"] = "Alŝutita dosiero estas malplena.";
|
||||
App::$strings["Image exceeds size limit of "] = "Bildo estas pli granda ol la limito de";
|
||||
App::$strings["File has an invalid extension, it should be one of "] = "Dosiero havas nevalidan sufikson. Ĝi estu unu de ";
|
||||
App::$strings["Upload was cancelled, or server error encountered"] = "Alŝutado estas nuligita aŭ okazis eraro sur la servilo";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Upload a file"] = "Subir un archivo";
|
||||
$a->strings["Drop files here to upload"] = "Arrastra los archivos aquí para subirlos";
|
||||
$a->strings["Cancel"] = "Cancelar";
|
||||
$a->strings["Failed"] = "Falló";
|
||||
$a->strings["No files were uploaded."] = "No se han subido archivos aún.";
|
||||
$a->strings["Uploaded file is empty"] = "El archivo subido está vacío";
|
||||
$a->strings["Image exceeds size limit of "] = "La imagen supera tamaño límite de ";
|
||||
$a->strings["File has an invalid extension, it should be one of "] = "El archivo tiene una extensión no válida, debería ser una de ";
|
||||
$a->strings["Upload was cancelled, or server error encountered"] = "La subida ha sido cancelada, o se encontró un error del servidor";
|
||||
App::$strings["Upload a file"] = "Subir un archivo";
|
||||
App::$strings["Drop files here to upload"] = "Arrastra los archivos aquí para subirlos";
|
||||
App::$strings["Cancel"] = "Cancelar";
|
||||
App::$strings["Failed"] = "Falló";
|
||||
App::$strings["No files were uploaded."] = "No se han subido archivos aún.";
|
||||
App::$strings["Uploaded file is empty"] = "El archivo subido está vacío";
|
||||
App::$strings["Image exceeds size limit of "] = "La imagen supera tamaño límite de ";
|
||||
App::$strings["File has an invalid extension, it should be one of "] = "El archivo tiene una extensión no válida, debería ser una de ";
|
||||
App::$strings["Upload was cancelled, or server error encountered"] = "La subida ha sido cancelada, o se encontró un error del servidor";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Upload a file"] = "Téléverser un fichier";
|
||||
$a->strings["Drop files here to upload"] = "Déposer des fichiers ici pour les téléverser";
|
||||
$a->strings["Cancel"] = "Annuler";
|
||||
$a->strings["Failed"] = "Échec";
|
||||
$a->strings["No files were uploaded."] = "Aucun fichier n'a été téléversé.";
|
||||
$a->strings["Uploaded file is empty"] = "Le fichier téléversé est vide";
|
||||
$a->strings["Image exceeds size limit of "] = "L'image dépasse la taille maximale de ";
|
||||
$a->strings["File has an invalid extension, it should be one of "] = "Le fichier a une extension invalide, elle devrait être parmi ";
|
||||
$a->strings["Upload was cancelled, or server error encountered"] = "Téléversement annulé, ou erreur de serveur";
|
||||
App::$strings["Upload a file"] = "Téléverser un fichier";
|
||||
App::$strings["Drop files here to upload"] = "Déposer des fichiers ici pour les téléverser";
|
||||
App::$strings["Cancel"] = "Annuler";
|
||||
App::$strings["Failed"] = "Échec";
|
||||
App::$strings["No files were uploaded."] = "Aucun fichier n'a été téléversé.";
|
||||
App::$strings["Uploaded file is empty"] = "Le fichier téléversé est vide";
|
||||
App::$strings["Image exceeds size limit of "] = "L'image dépasse la taille maximale de ";
|
||||
App::$strings["File has an invalid extension, it should be one of "] = "Le fichier a une extension invalide, elle devrait être parmi ";
|
||||
App::$strings["Upload was cancelled, or server error encountered"] = "Téléversement annulé, ou erreur de serveur";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Upload a file"] = "Hlaða upp skrá";
|
||||
$a->strings["Drop files here to upload"] = "Slepptu skrám hér til að hala upp";
|
||||
$a->strings["Cancel"] = "Hætta við";
|
||||
$a->strings["Failed"] = "Mistókst";
|
||||
$a->strings["No files were uploaded."] = "Engum skráð hlaðið upp.";
|
||||
$a->strings["Uploaded file is empty"] = "Skrá sem var hlaðið upp er tóm";
|
||||
$a->strings["Image exceeds size limit of "] = "Mynd er yfir stærðamörkum";
|
||||
$a->strings["File has an invalid extension, it should be one of "] = "Skrá hefur ógilda skránafnsendingu, ætti að vera eitt af";
|
||||
$a->strings["Upload was cancelled, or server error encountered"] = "Hætt var við upphal eða kerfisvilla kom upp";
|
||||
App::$strings["Upload a file"] = "Hlaða upp skrá";
|
||||
App::$strings["Drop files here to upload"] = "Slepptu skrám hér til að hala upp";
|
||||
App::$strings["Cancel"] = "Hætta við";
|
||||
App::$strings["Failed"] = "Mistókst";
|
||||
App::$strings["No files were uploaded."] = "Engum skráð hlaðið upp.";
|
||||
App::$strings["Uploaded file is empty"] = "Skrá sem var hlaðið upp er tóm";
|
||||
App::$strings["Image exceeds size limit of "] = "Mynd er yfir stærðamörkum";
|
||||
App::$strings["File has an invalid extension, it should be one of "] = "Skrá hefur ógilda skránafnsendingu, ætti að vera eitt af";
|
||||
App::$strings["Upload was cancelled, or server error encountered"] = "Hætt var við upphal eða kerfisvilla kom upp";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Upload a file"] = "Carica un file";
|
||||
$a->strings["Drop files here to upload"] = "Trascina un file qui per caricarlo";
|
||||
$a->strings["Cancel"] = "Annulla";
|
||||
$a->strings["Failed"] = "Caricamento fallito";
|
||||
$a->strings["No files were uploaded."] = "Nessun file è stato caricato.";
|
||||
$a->strings["Uploaded file is empty"] = "Il file caricato è vuoto";
|
||||
$a->strings["Image exceeds size limit of "] = "L'immagine supera il limite di";
|
||||
$a->strings["File has an invalid extension, it should be one of "] = "Il file ha un'estensione non valida, dovrebbe essere una tra ";
|
||||
$a->strings["Upload was cancelled, or server error encountered"] = "Il caricamento è stato cancellato, o si è verificato un errore sul server";
|
||||
App::$strings["Upload a file"] = "Carica un file";
|
||||
App::$strings["Drop files here to upload"] = "Trascina un file qui per caricarlo";
|
||||
App::$strings["Cancel"] = "Annulla";
|
||||
App::$strings["Failed"] = "Caricamento fallito";
|
||||
App::$strings["No files were uploaded."] = "Nessun file è stato caricato.";
|
||||
App::$strings["Uploaded file is empty"] = "Il file caricato è vuoto";
|
||||
App::$strings["Image exceeds size limit of "] = "L'immagine supera il limite di";
|
||||
App::$strings["File has an invalid extension, it should be one of "] = "Il file ha un'estensione non valida, dovrebbe essere una tra ";
|
||||
App::$strings["Upload was cancelled, or server error encountered"] = "Il caricamento è stato cancellato, o si è verificato un errore sul server";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Upload a file"] = "Last opp en fil";
|
||||
$a->strings["Drop files here to upload"] = "Slipp filer her for å laste de opp";
|
||||
$a->strings["Cancel"] = "Avbryt";
|
||||
$a->strings["Failed"] = "Mislyktes";
|
||||
$a->strings["No files were uploaded."] = "Ingen filer ble lastet opp.";
|
||||
$a->strings["Uploaded file is empty"] = "Opplastet fil er tom";
|
||||
$a->strings["Image exceeds size limit of "] = "Bilde overstiger størrelsesbegrensningen på ";
|
||||
$a->strings["File has an invalid extension, it should be one of "] = "Filen har en ugyldig endelse, den må være en av ";
|
||||
$a->strings["Upload was cancelled, or server error encountered"] = "Opplasting avbrutt, eller det oppstod en feil på tjeneren";
|
||||
App::$strings["Upload a file"] = "Last opp en fil";
|
||||
App::$strings["Drop files here to upload"] = "Slipp filer her for å laste de opp";
|
||||
App::$strings["Cancel"] = "Avbryt";
|
||||
App::$strings["Failed"] = "Mislyktes";
|
||||
App::$strings["No files were uploaded."] = "Ingen filer ble lastet opp.";
|
||||
App::$strings["Uploaded file is empty"] = "Opplastet fil er tom";
|
||||
App::$strings["Image exceeds size limit of "] = "Bilde overstiger størrelsesbegrensningen på ";
|
||||
App::$strings["File has an invalid extension, it should be one of "] = "Filen har en ugyldig endelse, den må være en av ";
|
||||
App::$strings["Upload was cancelled, or server error encountered"] = "Opplasting avbrutt, eller det oppstod en feil på tjeneren";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
$a->strings["Upload a file"] = "Bestand uploaden";
|
||||
$a->strings["Drop files here to upload"] = "Sleep bestanden hier naartoe om te uploaden";
|
||||
$a->strings["Cancel"] = "Annuleren";
|
||||
$a->strings["Failed"] = "Mislukt";
|
||||
$a->strings["No files were uploaded."] = "Er zijn geen bestanden geüpload.";
|
||||
$a->strings["Uploaded file is empty"] = "Geüpload bestand is leeg";
|
||||
$a->strings["Image exceeds size limit of "] = "Bestandsgrootte afbeelding overschrijdt limiet van ";
|
||||
$a->strings["File has an invalid extension, it should be one of "] = "Het bestand heeft een ongeldige bestandsextensie, geldig zijn ";
|
||||
$a->strings["Upload was cancelled, or server error encountered"] = "Uploaden is geannuleerd of er is sprake van een serverfout";
|
||||
App::$strings["Upload a file"] = "Bestand uploaden";
|
||||
App::$strings["Drop files here to upload"] = "Sleep bestanden hier naartoe om te uploaden";
|
||||
App::$strings["Cancel"] = "Annuleren";
|
||||
App::$strings["Failed"] = "Mislukt";
|
||||
App::$strings["No files were uploaded."] = "Er zijn geen bestanden geüpload.";
|
||||
App::$strings["Uploaded file is empty"] = "Geüpload bestand is leeg";
|
||||
App::$strings["Image exceeds size limit of "] = "Bestandsgrootte afbeelding overschrijdt limiet van ";
|
||||
App::$strings["File has an invalid extension, it should be one of "] = "Het bestand heeft een ongeldige bestandsextensie, geldig zijn ";
|
||||
App::$strings["Upload was cancelled, or server error encountered"] = "Uploaden is geannuleerd of er is sprake van een serverfout";
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue