Merge branch 'dev' into sabre32
This commit is contained in:
commit
39b14b6b81
@ -62,7 +62,7 @@ class Photo extends \Zotlabs\Web\Controller {
|
||||
intval($uid),
|
||||
intval(PHOTO_PROFILE)
|
||||
);
|
||||
if(count($r)) {
|
||||
if($r) {
|
||||
$data = dbunescbin($r[0]['content']);
|
||||
$mimetype = $r[0]['mimetype'];
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||
|
||||
/* @brief Initalize the profile-photo edit view
|
||||
*
|
||||
* @param $a Current application
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
@ -72,6 +71,8 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
|
||||
|
||||
logger('profile: ' . $_REQUEST['profile']);
|
||||
|
||||
|
||||
// phase 2 - we have finished cropping
|
||||
|
||||
@ -270,10 +271,18 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||
return;
|
||||
};
|
||||
|
||||
// check_form_security_token_redirectOnErr('/profile_photo', 'profile_photo');
|
||||
|
||||
$resource_id = argv(2);
|
||||
|
||||
// When using an existing photo, we don't have a dialogue to offer a choice of profiles,
|
||||
// so it gets attached to the default
|
||||
|
||||
$p = q("select id from profile where is_default = 1 and uid = %d",
|
||||
intval(local_channel())
|
||||
);
|
||||
if($p) {
|
||||
$_REQUEST['profile'] = $p[0]['id'];
|
||||
}
|
||||
|
||||
|
||||
$r = q("SELECT id, album, imgscale FROM photo WHERE uid = %d AND resource_id = '%s' ORDER BY imgscale ASC",
|
||||
intval(local_channel()),
|
||||
@ -349,7 +358,7 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
}
|
||||
|
||||
profile_photo_crop_ui_head($a, $ph, $hash, $smallest);
|
||||
$this->profile_photo_crop_ui_head($a, $ph, $hash, $smallest);
|
||||
}
|
||||
|
||||
$profiles = q("select id, profile_name as name, is_default from profile where uid = %d",
|
||||
|
@ -862,7 +862,7 @@ function profile_load(&$a, $nickname, $profile = '') {
|
||||
);
|
||||
if($z) {
|
||||
$p[0]['picdate'] = $z[0]['xchan_photo_date'];
|
||||
$p[0]['reddress'] = str_replace('@','@',$z[0]['xchan_addr']);
|
||||
$p[0]['reddress'] = str_replace('@','@',$z[0]['xchan_addr']);
|
||||
}
|
||||
|
||||
// fetch user tags if this isn't the default profile
|
||||
|
@ -332,6 +332,9 @@ function q($sql) {
|
||||
else
|
||||
db_logger('dba: vsprintf error: ' . print_r(debug_backtrace(), true),LOGGER_NORMAL,LOG_CRIT);
|
||||
}
|
||||
if(\DBA::$dba->debug)
|
||||
db_logger('Sql: ' . $stmt, LOGGER_DEBUG, LOG_INFO);
|
||||
|
||||
return \DBA::$dba->q($stmt);
|
||||
}
|
||||
|
||||
|
@ -2089,9 +2089,9 @@ function xchan_query(&$items,$abook = true,$effective_uid = 0) {
|
||||
}
|
||||
|
||||
foreach($items as $item) {
|
||||
if($item['owner_xchan'] && (! in_array($item['owner_xchan'],$arr)))
|
||||
if($item['owner_xchan'] && (! in_array("'" . dbesc($item['owner_xchan']) . "'",$arr)))
|
||||
$arr[] = "'" . dbesc($item['owner_xchan']) . "'";
|
||||
if($item['author_xchan'] && (! in_array($item['author_xchan'],$arr)))
|
||||
if($item['author_xchan'] && (! in_array("'" . dbesc($item['author_xchan']) . "'",$arr)))
|
||||
$arr[] = "'" . dbesc($item['author_xchan']) . "'";
|
||||
}
|
||||
}
|
||||
@ -2124,9 +2124,9 @@ function xchan_mail_query(&$item) {
|
||||
$arr = array();
|
||||
$chans = null;
|
||||
if($item) {
|
||||
if($item['from_xchan'] && (! in_array($item['from_xchan'],$arr)))
|
||||
if($item['from_xchan'] && (! in_array("'" . dbesc($item['from_xchan']) . "'",$arr)))
|
||||
$arr[] = "'" . dbesc($item['from_xchan']) . "'";
|
||||
if($item['to_xchan'] && (! in_array($item['to_xchan'],$arr)))
|
||||
if($item['to_xchan'] && (! in_array("'" . dbesc($item['to_xchan']) . "'",$arr)))
|
||||
$arr[] = "'" . dbesc($item['to_xchan']) . "'";
|
||||
}
|
||||
|
||||
|
@ -1158,7 +1158,7 @@ function widget_cover_photo($arr) {
|
||||
if(array_key_exists('subtitle', $arr) && isset($arr['subtitle']))
|
||||
$subtitle = $arr['subtitle'];
|
||||
else
|
||||
$subtitle = $channel['xchan_addr'];
|
||||
$subtitle = str_replace('@','@',$channel['xchan_addr']);
|
||||
|
||||
$c = get_cover_photo($channel_id,'html');
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
</div>
|
||||
<div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: none;">
|
||||
{{/if}}
|
||||
<div id="thread-wrapper-{{$item.id}}" class="thread-wrapper{{if $item.toplevel}} {{$item.toplevel}} generic-content-wrapper{{/if}}">
|
||||
<div id="thread-wrapper-{{$item.id}}" class="thread-wrapper{{if $item.toplevel}} {{$item.toplevel}} generic-content-wrapper h-entry {{else}} u-comment h-cite {{/if}}">
|
||||
<a name="{{$item.id}}" ></a>
|
||||
<div class="wall-item-outside-wrapper {{$item.indent}}{{$item.previewing}}" id="wall-item-outside-wrapper-{{$item.id}}" >
|
||||
<div class="wall-item-content-wrapper {{$item.indent}}" id="wall-item-content-wrapper-{{$item.id}}" style="clear:both;">
|
||||
@ -20,8 +20,8 @@
|
||||
{{/if}}
|
||||
<div class="wall-item-head">
|
||||
<div class="wall-item-info" id="wall-item-info-{{$item.id}}" >
|
||||
<div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}}" id="wall-item-photo-wrapper-{{$item.id}}">
|
||||
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-photo-link" id="wall-item-photo-link-{{$item.id}}"><img src="{{$item.thumb}}" class="wall-item-photo{{$item.sparkle}}" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" /></a>
|
||||
<div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}} h-card" id="wall-item-photo-wrapper-{{$item.id}}">
|
||||
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-photo-link u-url" id="wall-item-photo-link-{{$item.id}}"><img src="{{$item.thumb}}" class="wall-item-photo{{$item.sparkle}} u-photo p-name" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" /></a>
|
||||
</div>
|
||||
<div class="wall-item-photo-end" style="clear:both"></div>
|
||||
</div>
|
||||
@ -39,14 +39,14 @@
|
||||
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a>{{if $item.owner_url}} {{$item.via}} <a href="{{$item.owner_url}}" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a>{{/if}}
|
||||
</div>
|
||||
<div class="wall-item-ago" id="wall-item-ago-{{$item.id}}">
|
||||
{{if $item.verified}}<i class="fa fa-check item-verified" title="{{$item.verified}}"></i> {{elseif $item.forged}}<i class="fa fa-exclamation item-forged" title="{{$item.forged}}"></i> {{/if}}{{if $item.location}}<span class="wall-item-location" id="wall-item-location-{{$item.id}}">{{$item.location}}, </span>{{/if}}<span class="autotime" title="{{$item.isotime}}">{{$item.localtime}}{{if $item.editedtime}} {{$item.editedtime}}{{/if}}{{if $item.expiretime}} {{$item.expiretime}}{{/if}}</span>{{if $item.editedtime}} <i class="fa fa-pencil"></i>{{/if}} {{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}
|
||||
{{if $item.verified}}<i class="fa fa-check item-verified" title="{{$item.verified}}"></i> {{elseif $item.forged}}<i class="fa fa-exclamation item-forged" title="{{$item.forged}}"></i> {{/if}}{{if $item.location}}<span class="wall-item-location p-location" id="wall-item-location-{{$item.id}}">{{$item.location}}, </span>{{/if}}<span class="autotime" title="{{$item.isotime}}"><time class="dt-published" datetime="{{$item.isotime}}">{{$item.localtime}}</time>{{if $item.editedtime}} {{$item.editedtime}}{{/if}}{{if $item.expiretime}} {{$item.expiretime}}{{/if}}</span>{{if $item.editedtime}} <i class="fa fa-pencil"></i>{{/if}} {{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
{{if $item.body}}
|
||||
<div class="wall-item-content" id="wall-item-content-{{$item.id}}">
|
||||
<div class="wall-item-body" id="wall-item-body-{{$item.id}}" >
|
||||
<div class="wall-item-body e-content" id="wall-item-body-{{$item.id}}" >
|
||||
{{$item.body}}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
@ -66,7 +66,7 @@
|
||||
{{/if}}
|
||||
{{if $item.categories}}
|
||||
<div class="body-tags" id="item-categories">
|
||||
<span class="tag">{{$item.categories}}</span>
|
||||
<span class="tag p-category">{{$item.categories}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if $item.folders}}
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
{{if ! $zcard}}
|
||||
<div class="fn p-name">{{$profile.fullname}}{{if $profile.online}} <i class="fa fa-asterisk online-now" title="{{$profile.online}}"></i>{{/if}}</div>
|
||||
{{if $reddress}}<div class="reddress" oncopy="return false;">{{$profile.reddress}}</div>{{/if}}
|
||||
{{if $reddress}}<div class="reddress">{{$profile.reddress}}</div>{{/if}}
|
||||
{{/if}}
|
||||
{{if $pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
|
||||
{{if $location}}
|
||||
|
Reference in New Issue
Block a user