set_baseurl issue, more cleanup

This commit is contained in:
friendica 2012-12-19 16:48:17 -08:00
parent 44e70bdca3
commit 893ba371a9
6 changed files with 16 additions and 22 deletions

View File

@ -638,7 +638,7 @@ if(! class_exists('App')) {
$scheme = 'http';
}
}
$this->baseurl = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' );
return $this->baseurl;
}
@ -647,7 +647,7 @@ if(! class_exists('App')) {
if(is_array($this->config) && array_key_exists('system',$this->config) &&
array_key_exists('baseurl',$this->config['system']) && strlen($this->config['system']['baseurl'])) {
$url = $a->config['system']['baseurl'];
$url = $this->config['system']['baseurl'];
}
$parsed = @parse_url($url);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -284,7 +284,7 @@ function zot_refresh($them,$channel = null) {
intval($default_perms),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
intval(($default_perms) ? 0 : ABOOK_FLAG_BLOCKED|ABOOK_FLAG_IGNORED|ABOOK_FLAG_PENDING)
intval(($default_perms) ? 0 : ABOOK_FLAG_PENDING)
);
if($y) {
logger("New introduction received for {$channel['channel_name']}");

View File

@ -180,24 +180,15 @@ function ping_init(&$a) {
$t2 = dba_timer();
$intros1 = q("SELECT `intro`.`id`, `intro`.`datetime`,
`fcontact`.`name`, `fcontact`.`url`, `fcontact`.`photo`
FROM `intro` LEFT JOIN `fcontact` ON `intro`.`fid` = `fcontact`.`id`
WHERE `intro`.`uid` = %d AND `intro`.`blocked` = 0 AND `intro`.`ignore` = 0 AND `intro`.`fid`!=0",
$intr = q("select count(abook_id) as total from abook where (abook_flags & %d) and abook_channel = %d",
intval(ABOOK_FLAG_PENDING),
intval(local_user())
);
$t3 = dba_timer();
$intros2 = q("SELECT `intro`.`id`, `intro`.`datetime`,
`contact`.`name`, `contact`.`url`, `contact`.`photo`
FROM `intro` LEFT JOIN `contact` ON `intro`.`contact-id` = `contact`.`id`
WHERE `intro`.`uid` = %d AND `intro`.`blocked` = 0 AND `intro`.`ignore` = 0 AND `intro`.`contact-id`!=0",
intval(local_user())
);
$intros = count($intros1) + count($intros2);
$result['intros'] = intval($intros);
if($intr)
$result['intros'] = intval($intr[0]['total']);
$t4 = dba_timer();
$channel = get_app()->get_channel();

View File

@ -1 +1 @@
2012-12-18.173
2012-12-19.174

View File

@ -4,20 +4,23 @@
<input type='hidden' name='form_security_token' value='$form_security_token'>
<div id="profile-photo-upload-wrapper">
<label id="profile-photo-upload-label" for="profile-photo-upload">$lbl_upfile </label>
<input name="userfile" type="file" id="profile-photo-upload" size="48" />
</div>
<label id="profile-photo-profiles-label" for="profile-photo-profiles">$lbl_profiles </label>
<select name="profile" id="profile-photo-profiles" />
<label id="profile-photo-upload-label" class="form-label" for="profile-photo-upload">$lbl_upfile</label>
<input name="userfile" class="form-input" type="file" id="profile-photo-upload" size="48" />
<div class="clear"></div>
<label id="profile-photo-profiles-label" class="form-label" for="profile-photo-profiles">$lbl_profiles</label>
<select name="profile" id="profile-photo-profiles" class="form-input" >
{{ for $profiles as $p }}
<option value="$p.id" {{ if $p.default }}selected="selected"{{ endif }}>$p.name</option>
{{ endfor }}
</select>
<div class="clear"></div>
<div id="profile-photo-submit-wrapper">
<input type="submit" name="submit" id="profile-photo-submit" value="$submit">
</div>
</div>
</form>