Merge branch 'master' of https://github.com/redmatrix/hubzilla into homeinstall
This commit is contained in:
commit
368bb18935
@ -407,7 +407,7 @@ function account_allow($hash) {
|
|||||||
|
|
||||||
pop_lang();
|
pop_lang();
|
||||||
|
|
||||||
if(get_config('system','auto_channel_create'))
|
if(get_config('system','auto_channel_create') || UNO)
|
||||||
auto_channel_create($register[0]['uid']);
|
auto_channel_create($register[0]['uid']);
|
||||||
|
|
||||||
if ($res) {
|
if ($res) {
|
||||||
@ -500,7 +500,7 @@ function account_approve($hash) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
if(get_config('system','auto_channel_create'))
|
if(get_config('system','auto_channel_create') || UNO)
|
||||||
auto_channel_create($register[0]['uid']);
|
auto_channel_create($register[0]['uid']);
|
||||||
|
|
||||||
info( t('Account verified. Please login.') . EOL );
|
info( t('Account verified. Please login.') . EOL );
|
||||||
|
@ -269,15 +269,16 @@ function relative_date($posted_date, $format = null) {
|
|||||||
return t('less than a second ago');
|
return t('less than a second ago');
|
||||||
}
|
}
|
||||||
|
|
||||||
$a = array( 12 * 30 * 24 * 60 * 60 => array( t('year'), t('years')),
|
$a = array( 12 * 30 * 24 * 60 * 60 => 'y',
|
||||||
30 * 24 * 60 * 60 => array( t('month'), t('months')),
|
30 * 24 * 60 * 60 => 'm',
|
||||||
7 * 24 * 60 * 60 => array( t('week'), t('weeks')),
|
7 * 24 * 60 * 60 => 'w',
|
||||||
24 * 60 * 60 => array( t('day'), t('days')),
|
24 * 60 * 60 => 'd',
|
||||||
60 * 60 => array( t('hour'), t('hours')),
|
60 * 60 => 'h',
|
||||||
60 => array( t('minute'), t('minutes')),
|
60 => 'i',
|
||||||
1 => array( t('second'), t('seconds'))
|
1 => 's'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
foreach ($a as $secs => $str) {
|
foreach ($a as $secs => $str) {
|
||||||
$d = $etime / $secs;
|
$d = $etime / $secs;
|
||||||
if ($d >= 1) {
|
if ($d >= 1) {
|
||||||
@ -285,11 +286,43 @@ function relative_date($posted_date, $format = null) {
|
|||||||
if (! $format)
|
if (! $format)
|
||||||
$format = t('%1$d %2$s ago', 'e.g. 22 hours ago, 1 minute ago');
|
$format = t('%1$d %2$s ago', 'e.g. 22 hours ago, 1 minute ago');
|
||||||
|
|
||||||
return sprintf($format, $r, (($r == 1) ? $str[0] : $str[1]));
|
return sprintf($format, $r, plural_dates($str,$r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function plural_dates($k,$n) {
|
||||||
|
|
||||||
|
switch($k) {
|
||||||
|
case 'y':
|
||||||
|
return tt('year','years',$n,'relative_date');
|
||||||
|
break;
|
||||||
|
case 'm':
|
||||||
|
return tt('month','months',$n,'relative_date');
|
||||||
|
break;
|
||||||
|
case 'w':
|
||||||
|
return tt('week','weeks',$n,'relative_date');
|
||||||
|
break;
|
||||||
|
case 'd':
|
||||||
|
return tt('day','days',$n,'relative_date');
|
||||||
|
break;
|
||||||
|
case 'h':
|
||||||
|
return tt('hour','hours',$n,'relative_date');
|
||||||
|
break;
|
||||||
|
case 'i':
|
||||||
|
return tt('minute','minutes',$n,'relative_date');
|
||||||
|
break;
|
||||||
|
case 's':
|
||||||
|
return tt('second','seconds',$n,'relative_date');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns timezone correct age in years.
|
* @brief Returns timezone correct age in years.
|
||||||
*
|
*
|
||||||
|
@ -8,7 +8,6 @@ function new_channel_init(&$a) {
|
|||||||
|
|
||||||
$cmd = ((argc() > 1) ? argv(1) : '');
|
$cmd = ((argc() > 1) ? argv(1) : '');
|
||||||
|
|
||||||
|
|
||||||
if($cmd === 'autofill.json') {
|
if($cmd === 'autofill.json') {
|
||||||
require_once('library/urlify/URLify.php');
|
require_once('library/urlify/URLify.php');
|
||||||
$result = array('error' => false, 'message' => '');
|
$result = array('error' => false, 'message' => '');
|
||||||
@ -59,7 +58,6 @@ function new_channel_init(&$a) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function new_channel_post(&$a) {
|
function new_channel_post(&$a) {
|
||||||
|
|
||||||
$arr = $_POST;
|
$arr = $_POST;
|
||||||
@ -94,12 +92,6 @@ function new_channel_post(&$a) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function new_channel_content(&$a) {
|
function new_channel_content(&$a) {
|
||||||
|
|
||||||
$acc = $a->get_account();
|
$acc = $a->get_account();
|
||||||
@ -136,9 +128,9 @@ function new_channel_content(&$a) {
|
|||||||
$role = array('permissions_role' , t('Channel role and privacy'), ($privacy_role) ? $privacy_role : 'social', t('Select a channel role with your privacy requirements.') . ' <a href="help/roles" target="_blank">' . t('Read more about roles') . '</a>',get_roles());
|
$role = array('permissions_role' , t('Channel role and privacy'), ($privacy_role) ? $privacy_role : 'social', t('Select a channel role with your privacy requirements.') . ' <a href="help/roles" target="_blank">' . t('Read more about roles') . '</a>',get_roles());
|
||||||
|
|
||||||
$o = replace_macros(get_markup_template('new_channel.tpl'), array(
|
$o = replace_macros(get_markup_template('new_channel.tpl'), array(
|
||||||
'$title' => t('Create a Channel'),
|
'$title' => t('Create Channel'),
|
||||||
'$desc' => t('A channel is your identity on the grid. It can represent a person, a blog, or a forum to name a few. Channels can make connections with other channels to share information with highly detailed permissions.'),
|
'$desc' => t('A channel is your identity on this network. It can represent a person, a blog, or a forum to name a few. Channels can make connections with other channels to share information with highly detailed permissions.'),
|
||||||
'$label_import' => t('Or <a href="import">import an existing channel</a> from another location'),
|
'$label_import' => t('or <a href="import">import an existing channel</a> from another location.'),
|
||||||
'$name' => $name,
|
'$name' => $name,
|
||||||
'$role' => $role,
|
'$role' => $role,
|
||||||
'$default_role' => $default_role,
|
'$default_role' => $default_role,
|
||||||
|
2849
util/hmessages.po
2849
util/hmessages.po
File diff suppressed because it is too large
Load Diff
@ -26,7 +26,7 @@
|
|||||||
<div id="newchannel-nickname-feedback" class="newchannel-feedback"></div>
|
<div id="newchannel-nickname-feedback" class="newchannel-feedback"></div>
|
||||||
<div id="nick-spinner"></div>
|
<div id="nick-spinner"></div>
|
||||||
|
|
||||||
<input type="submit" name="submit" id="newchannel-submit-button" value="{{$submit}}" />
|
<button class="btn btn-primary" type="submit" name="submit" id="newchannel-submit-button" value="{{$submit}}">{{$submit}}</button>
|
||||||
<div id="newchannel-submit-end" class="clear"></div>
|
<div id="newchannel-submit-end" class="clear"></div>
|
||||||
|
|
||||||
<div id="newchannel-import-link" class="descriptive-paragraph" >{{$label_import}}</div>
|
<div id="newchannel-import-link" class="descriptive-paragraph" >{{$label_import}}</div>
|
||||||
|
Reference in New Issue
Block a user