Merge remote-tracking branch 'upstream/dev' into website-export

This commit is contained in:
Andrew Manning 2016-08-19 19:34:04 -04:00
commit cf93d9c3b4
11 changed files with 8724 additions and 8736 deletions

View File

@ -1028,7 +1028,7 @@ class Settings extends \Zotlabs\Web\Controller {
$theme_config = theme_content($a); $theme_config = theme_content($a);
} }
logger('schemas: ' . print_r($schemas,true)); // logger('schemas: ' . print_r($schemas,true));
$tpl = get_markup_template("settings_display.tpl"); $tpl = get_markup_template("settings_display.tpl");
$o = replace_macros($tpl, array( $o = replace_macros($tpl, array(

View File

@ -127,5 +127,12 @@ class Theme {
return('view/theme/' . $t . '/css/style.css'); return('view/theme/' . $t . '/css/style.css');
} }
function debug() {
logger('system_theme: ' . self::$system_theme);
logger('session_theme: ' . self::$session_theme);
}
} }

View File

@ -2211,6 +2211,9 @@ function construct_page(&$a) {
$current_theme = Zotlabs\Render\Theme::current(); $current_theme = Zotlabs\Render\Theme::current();
// logger('current_theme: ' . print_r($current_theme,true));
// Zotlabs\Render\Theme::debug();
if (($p = theme_include($current_theme[0] . '.js')) != '') if (($p = theme_include($current_theme[0] . '.js')) != '')
head_add_js($p); head_add_js($p);

View File

@ -118,11 +118,7 @@ require_once('include/api_auth.php');
break; break;
case "json": case "json":
header ("Content-Type: application/json"); header ("Content-Type: application/json");
foreach($r as $rr) { $json = json_encode((is_array($r[0])) ? $r[0] : array());
if(! $rr)
$rr = array();
$json = json_encode($rr);
}
// Lookup JSONP to understand these lines. They provide cross-domain AJAX ability. // Lookup JSONP to understand these lines. They provide cross-domain AJAX ability.
if ($_GET['callback']) if ($_GET['callback'])
$json = $_GET['callback'] . '(' . $json . ')' ; $json = $_GET['callback'] . '(' . $json . ')' ;
@ -137,9 +133,6 @@ require_once('include/api_auth.php');
return '<?xml version="1.0" encoding="UTF-8"?>'."\n".$r; return '<?xml version="1.0" encoding="UTF-8"?>'."\n".$r;
break; break;
case "as": case "as":
//header ("Content-Type: application/json");
//foreach($r as $rr)
// return json_encode($rr);
return json_encode($r); return json_encode($r);
break; break;

View File

@ -936,7 +936,7 @@ function profile_load($nickname, $profile = '') {
* load/reload current theme info * load/reload current theme info
*/ */
$_SESSION['theme'] = $p[0]['channel_theme']; // $_SESSION['theme'] = $p[0]['channel_theme'];
} }

View File

@ -695,8 +695,9 @@ function get_item_elements($x,$allow_code = false) {
// hub and verify that they are legit - or else we're going to toss the post. We only need to do this // hub and verify that they are legit - or else we're going to toss the post. We only need to do this
// once, and after that your hub knows them. Sure some info is in the post, but it's only a transit identifier // once, and after that your hub knows them. Sure some info is in the post, but it's only a transit identifier
// and not enough info to be able to look you up from your hash - which is the only thing stored with the post. // and not enough info to be able to look you up from your hash - which is the only thing stored with the post.
if(($xchan_hash = import_author_xchan($x['author'])) !== false) $xchan_hash = import_author_xchan($x['author']);
if($xchan_hash)
$arr['author_xchan'] = $xchan_hash; $arr['author_xchan'] = $xchan_hash;
else else
return array(); return array();
@ -705,7 +706,8 @@ function get_item_elements($x,$allow_code = false) {
if($arr['author_xchan'] === make_xchan_hash($x['owner']['guid'],$x['owner']['guid_sig'])) if($arr['author_xchan'] === make_xchan_hash($x['owner']['guid'],$x['owner']['guid_sig']))
$arr['owner_xchan'] = $arr['author_xchan']; $arr['owner_xchan'] = $arr['author_xchan'];
else { else {
if(($xchan_hash = import_author_xchan($x['owner'])) !== false) $xchan_hash = import_author_xchan($x['owner']);
if($xchan_hash)
$arr['owner_xchan'] = $xchan_hash; $arr['owner_xchan'] = $xchan_hash;
else else
return array(); return array();
@ -1166,7 +1168,7 @@ function encode_item_xchan($xchan) {
$ret['name'] = $xchan['xchan_name']; $ret['name'] = $xchan['xchan_name'];
$ret['address'] = $xchan['xchan_addr']; $ret['address'] = $xchan['xchan_addr'];
$ret['url'] = (($xchan['hubloc_url']) ? $xchan['hubloc_url'] : $xchan['xchan_url']); $ret['url'] = $xchan['xchan_url'];
$ret['network'] = $xchan['xchan_network']; $ret['network'] = $xchan['xchan_network'];
$ret['photo'] = array('mimetype' => $xchan['xchan_photo_mimetype'], 'src' => $xchan['xchan_photo_m']); $ret['photo'] = array('mimetype' => $xchan['xchan_photo_mimetype'], 'src' => $xchan['xchan_photo_m']);
$ret['guid'] = $xchan['xchan_guid']; $ret['guid'] = $xchan['xchan_guid'];

View File

@ -5,16 +5,16 @@ if [ $# -lt 2 ]; then
exit 1 exit 1
fi fi
if [[ $1 != *"//github.com/redmatrix"* && $3 != 'insecure' ]]; then #if [[ $1 != *"//github.com/redmatrix"* && $3 != 'insecure' ]]; then
echo ""; # echo "";
echo "This is NOT an official project repository."; # echo "This is NOT an official project repository.";
echo "In order to protect you from unverified and"; # echo "In order to protect you from unverified and";
echo "possibly malicious content, this repository"; # echo "possibly malicious content, this repository";
echo "will not be linked to your site unless you"; # echo "will not be linked to your site unless you";
echo "append the word 'insecure' to the command."; # echo "append the word 'insecure' to the command.";
echo ""; # echo "";
exit 1 # exit 1
fi #fi
mkdir -p extend/addon/$2 mkdir -p extend/addon/$2
mkdir addon > /dev/null 2>&1 mkdir addon > /dev/null 2>&1

View File

@ -5,16 +5,16 @@ if [ $# -lt 2 ]; then
exit 1 exit 1
fi fi
if [[ $1 != *"//github.com/redmatrix"* && $3 != 'insecure' ]]; then #if [[ $1 != *"//github.com/redmatrix"* && $3 != 'insecure' ]]; then
echo ""; # echo "";
echo "This is NOT an official project repository."; # echo "This is NOT an official project repository.";
echo "In order to protect you from unverified and"; # echo "In order to protect you from unverified and";
echo "possibly malicious content, this repository"; # echo "possibly malicious content, this repository";
echo "will not be linked to your site unless you"; # echo "will not be linked to your site unless you";
echo "append the word 'insecure' to the command."; # echo "append the word 'insecure' to the command.";
echo ""; # echo "";
exit 1 # exit 1
fi #fi
mkdir -p extend/theme/$2 mkdir -p extend/theme/$2
git clone $1 extend/theme/$2 git clone $1 extend/theme/$2

View File

@ -5,16 +5,16 @@ if [ $# -lt 2 ]; then
exit 1 exit 1
fi fi
if [[ $1 != *"//github.com/redmatrix"* && $3 != 'insecure' ]]; then #if [[ $1 != *"//github.com/redmatrix"* && $3 != 'insecure' ]]; then
echo ""; # echo "";
echo "This is NOT an official project repository."; # echo "This is NOT an official project repository.";
echo "In order to protect you from unverified and"; # echo "In order to protect you from unverified and";
echo "possibly malicious content, this repository"; # echo "possibly malicious content, this repository";
echo "will not be linked to your site unless you"; # echo "will not be linked to your site unless you";
echo "append the word 'insecure' to the command."; # echo "append the word 'insecure' to the command.";
echo ""; # echo "";
exit 1 # exit 1
fi #fi
mkdir -p extend/widget/$2 mkdir -p extend/widget/$2
mkdir widget > /dev/null 2>&1 mkdir widget > /dev/null 2>&1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff