Merge https://github.com/friendica/friendica into pull
This commit is contained in:
commit
f88f0bf3f2
11
boot.php
11
boot.php
|
@ -472,6 +472,7 @@ if(! class_exists('App')) {
|
|||
$this->argc = count($this->argv);
|
||||
if((array_key_exists('0',$this->argv)) && strlen($this->argv[0])) {
|
||||
$this->module = str_replace(".", "_", $this->argv[0]);
|
||||
$this->module = str_replace("-", "_", $this->module);
|
||||
}
|
||||
else {
|
||||
$this->argc = 1;
|
||||
|
@ -479,16 +480,6 @@ if(! class_exists('App')) {
|
|||
$this->module = 'home';
|
||||
}
|
||||
|
||||
/**
|
||||
* Special handling for the webfinger/lrdd host XRD file
|
||||
*/
|
||||
|
||||
if($this->cmd === '.well-known/host-meta') {
|
||||
$this->argc = 1;
|
||||
$this->argv = array('hostxrd');
|
||||
$this->module = 'hostxrd';
|
||||
}
|
||||
|
||||
/**
|
||||
* See if there is any page number information, and initialise
|
||||
* pagination
|
||||
|
|
|
@ -68,7 +68,7 @@ function get_config($family, $key, $instore = false) {
|
|||
);
|
||||
if(count($ret)) {
|
||||
// manage array value
|
||||
$val = (preg_match("|^a:[0-9]+:{.*}$|", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']);
|
||||
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']);
|
||||
$a->config[$family][$key] = $val;
|
||||
return $val;
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ function get_pconfig($uid,$family, $key, $instore = false) {
|
|||
);
|
||||
|
||||
if(count($ret)) {
|
||||
$val = (preg_match("|^a:[0-9]+:{.*}$|", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']);
|
||||
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']);
|
||||
$a->config[$uid][$family][$key] = $val;
|
||||
return $val;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,9 @@ function uninstall_plugin($plugin){
|
|||
dbesc($plugin)
|
||||
);
|
||||
|
||||
// define THISPLUGIN, make life easy to plugin devs :-)
|
||||
define("THISPLUGIN", 'addon/' . $plugin . '/' . $plugin . '.php');
|
||||
|
||||
@include_once('addon/' . $plugin . '/' . $plugin . '.php');
|
||||
if(function_exists($plugin . '_uninstall')) {
|
||||
$func = $plugin . '_uninstall';
|
||||
|
@ -18,9 +21,11 @@ function uninstall_plugin($plugin){
|
|||
|
||||
if (! function_exists('install_plugin')){
|
||||
function install_plugin($plugin) {
|
||||
|
||||
// silently fail if plugin was removed
|
||||
|
||||
// define THISPLUGIN, make life easy to plugin devs :-)
|
||||
define("THISPLUGIN", 'addon/' . $plugin . '/' . $plugin . '.php');
|
||||
|
||||
if(! file_exists('addon/' . $plugin . '/' . $plugin . '.php'))
|
||||
return false;
|
||||
logger("Addons: installing " . $plugin);
|
||||
|
@ -78,6 +83,9 @@ function reload_plugins() {
|
|||
|
||||
$fname = 'addon/' . $pl . '/' . $pl . '.php';
|
||||
|
||||
// define THISPLUGIN, make life easy to plugin devs :-)
|
||||
define("THISPLUGIN", $fname);
|
||||
|
||||
if(file_exists($fname)) {
|
||||
$t = @filemtime($fname);
|
||||
foreach($installed as $i) {
|
||||
|
@ -163,6 +171,8 @@ function call_hooks($name, &$data = null) {
|
|||
|
||||
if((is_array($a->hooks)) && (array_key_exists($name,$a->hooks))) {
|
||||
foreach($a->hooks[$name] as $hook) {
|
||||
// define THISPLUGIN, make life easy to plugin devs :-)
|
||||
define("THISPLUGIN", $hook[0]);
|
||||
@include_once($hook[0]);
|
||||
if(function_exists($hook[1])) {
|
||||
$func = $hook[1];
|
||||
|
|
14
mod/_well_known.php
Normal file
14
mod/_well_known.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
require_once("hostxrd.php");
|
||||
|
||||
function _well_known_init(&$a){
|
||||
if ($a->argc > 1) {
|
||||
switch($a->argv[1]) {
|
||||
case "host-meta":
|
||||
hostxrd_init($a);
|
||||
break;
|
||||
}
|
||||
}
|
||||
http_status_exit(404);
|
||||
killme();
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{{ for $threads as $item }}
|
||||
|
||||
<div id="tread-wrapper-$item.id" class="tread-wrapper {{ if $item.threaded }}threaded{{ endif }}">
|
||||
<div id="tread-wrapper-$item.id" class="tread-wrapper {{ if $item.threaded }}threaded{{ endif }} $item.toplevel">
|
||||
|
||||
|
||||
{{ if $item.type == tag }}
|
||||
|
|
Loading…
Reference in a new issue