Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge

This commit is contained in:
redmatrix 2016-04-25 20:14:07 -07:00
commit 78e4b64c8b
12 changed files with 16024 additions and 15580 deletions

View File

@ -514,7 +514,7 @@ class Connedit extends \Zotlabs\Web\Controller {
$contact_id = \App::$poi['abook_id']; $contact_id = \App::$poi['abook_id'];
$contact = \App::$poi; $contact = \App::$poi;
$buttons = array( $tools = array(
'view' => array( 'view' => array(
'label' => t('View Profile'), 'label' => t('View Profile'),
@ -711,7 +711,8 @@ class Connedit extends \Zotlabs\Web\Controller {
'$notself' => (($self) ? '' : '1'), '$notself' => (($self) ? '' : '1'),
'$self' => (($self) ? '1' : ''), '$self' => (($self) ? '1' : ''),
'$autolbl' => t('The permissions indicated on this page will be applied to all new connections.'), '$autolbl' => t('The permissions indicated on this page will be applied to all new connections.'),
'$buttons' => (($self) ? '' : $buttons), '$tools_label' => t('Connection Tools'),
'$tools' => (($self) ? '' : $tools),
'$lbl_slider' => t('Slide to adjust your degree of friendship'), '$lbl_slider' => t('Slide to adjust your degree of friendship'),
'$lbl_rating' => t('Rating'), '$lbl_rating' => t('Rating'),
'$lbl_rating_label' => t('Slide to adjust your rating'), '$lbl_rating_label' => t('Slide to adjust your rating'),

View File

@ -1231,6 +1231,7 @@ class Photos extends \Zotlabs\Web\Controller {
$o .= replace_macros($photo_tpl, array( $o .= replace_macros($photo_tpl, array(
'$id' => $ph[0]['id'], '$id' => $ph[0]['id'],
'$album' => $album_e, '$album' => $album_e,
'$tools_label' => t('Photo Tools'),
'$tools' => $tools, '$tools' => $tools,
'$lock' => $lockstate[1], '$lock' => $lockstate[1],
'$photo' => $photo, '$photo' => $photo,

View File

@ -691,6 +691,7 @@ class Profiles extends \Zotlabs\Web\Controller {
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$viewprof' => t('View this profile'), '$viewprof' => t('View this profile'),
'$editvis' => t('Edit visibility'), '$editvis' => t('Edit visibility'),
'$tools_label' => t('Profile Tools'),
'$coverpic' => t('Change cover photo'), '$coverpic' => t('Change cover photo'),
'$profpic' => t('Change profile photo'), '$profpic' => t('Change profile photo'),
'$cr_prof' => t('Create a new profile using these settings'), '$cr_prof' => t('Create a new profile using these settings'),

View File

@ -3,13 +3,54 @@
// Red config utility // Red config utility
if(!file_exists('include/cli_startup.php')) {
echo 'Run config from the top level Hubzilla web directory, as util/config <args>' . PHP_EOL;
exit(1);
}
require_once('include/cli_startup.php'); require_once('include/cli_startup.php');
cli_startup(); cli_startup();
if($argc > 3) {
$helpArgs = getopt('h', array('help'));
if (count($helpArgs) === 1) {
echo <<<'EndOfOutput'
Gets, sets, or lists site-wide configuration settings.
Usage: util/config
util/config <family>
util/config <family> <key>
util/config <family> <key> <value>
util/config
Displays all config entries
util/config <family>
Displays all config entries for family (system, database, etc)
util/config <family> <key>
Displays single config entry for the specified family and key
util/config <family> <key> <value>
Set config entry for specified family and key to value and display result
Notes:
Setting config entries which are manually set in .htconfig.php may result
in conflict between database settings and the manual startup settings.
For channel-specific configuration settings, use util/pconfig
Details for configuration options can be found at:
EndOfOutput;
echo ' ' . App::get_baseurl() . '/help/hidden_configs' . PHP_EOL . PHP_EOL;
return;
}
if($argc > 3) {
set_config($argv[1],$argv[2],$argv[3]); set_config($argv[1],$argv[2],$argv[3]);
echo "config[{$argv[1]}][{$argv[2]}] = " . printable_config(get_config($argv[1],$argv[2])) . "\n"; echo "config[{$argv[1]}][{$argv[2]}] = " . printable_config(get_config($argv[1],$argv[2])) . "\n";
} }

View File

@ -3,11 +3,57 @@
// Red pconfig utility // Red pconfig utility
if(!file_exists('include/cli_startup.php')) {
echo 'Run pconfig from the top level Hubzilla web directory, as util/pconfig <args>' . PHP_EOL;
exit(1);
}
require_once('include/cli_startup.php'); require_once('include/cli_startup.php');
require_once('include/zot.php'); require_once('include/zot.php');
cli_startup(); cli_startup();
$helpArgs = getopt('h', array('help'));
if (count($helpArgs) === 1) {
echo <<<'EndOfOutput'
Gets, sets, or lists personal (per channel) configuration settings.
Usage: util/pconfig
util/pconfig <channel_id>
util/pconfig <channel_id> <family>
util/pconfig <channel_id> <family> <key>
util/pconfig <channel_id> <family> <key> <value>
util/pconfig
List all channel IDs
util/pconfig <channel_id>
Displays all of the the channel's config entries
util/pconfig <channel_id> <family>
Displays all of the channel's config entries for the specified family
(system, database, etc)
util/pconfig <channel_id> <family> <key>
Displays single config entry for the specified family and key
util/pconfig <channel_id> <family> <key> <value>
Set config entry for specified family and key to value and display result
Notes:
For site-wide configuration settings, use util/config
Details for configuration options can be found at:
EndOfOutput;
echo ' ' . App::get_baseurl() . '/help/hidden_configs' . PHP_EOL . PHP_EOL;
return;
}
if($argc > 4) { if($argc > 4) {
set_pconfig($argv[1],$argv[2],$argv[3],$argv[4]); set_pconfig($argv[1],$argv[2],$argv[3],$argv[4]);
build_sync_packet($argv[1]); build_sync_packet($argv[1]);
@ -34,3 +80,11 @@ if($argc == 2) {
} }
} }
if($argc == 1) {
$r = q("select channel_id, channel_name from channel");
if($r) {
foreach($r as $rr) {
echo sprintf('%4u %s', $rr['channel_id'], $rr['channel_name']) . PHP_EOL;
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3,18 +3,18 @@
{{if $notself}} {{if $notself}}
<div class="dropdown pull-right"> <div class="dropdown pull-right">
<button id="connection-dropdown" class="btn btn-default btn-xs" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button id="connection-dropdown" class="btn btn-default btn-xs" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="icon-caret-down"></i> <i class="icon-caret-down"></i>&nbsp;{{$tools_label}}
</button> </button>
<ul class="dropdown-menu" aria-labelledby="dLabel"> <ul class="dropdown-menu" aria-labelledby="dLabel">
<li><a href="{{$buttons.view.url}}" title="{{$buttons.view.title}}">{{$buttons.view.label}}</a></li> <li><a href="{{$tools.view.url}}" title="{{$tools.view.title}}">{{$tools.view.label}}</a></li>
<li><a href="{{$buttons.recent.url}}" title="{{$buttons.recent.title}}">{{$buttons.recent.label}}</a></li> <li><a href="{{$tools.recent.url}}" title="{{$tools.recent.title}}">{{$tools.recent.label}}</a></li>
<li class="divider"></li> <li class="divider"></li>
<li><a href="#" title="{{$buttons.refresh.title}}" onclick="window.location.href='{{$buttons.refresh.url}}'; return false;">{{$buttons.refresh.label}}</a></li> <li><a href="#" title="{{$tools.refresh.title}}" onclick="window.location.href='{{$tools.refresh.url}}'; return false;">{{$tools.refresh.label}}</a></li>
<li><a href="#" title="{{$buttons.block.title}}" onclick="window.location.href='{{$buttons.block.url}}'; return false;">{{$buttons.block.label}}</a></li> <li><a href="#" title="{{$tools.block.title}}" onclick="window.location.href='{{$tools.block.url}}'; return false;">{{$tools.block.label}}</a></li>
<li><a href="#" title="{{$buttons.ignore.title}}" onclick="window.location.href='{{$buttons.ignore.url}}'; return false;">{{$buttons.ignore.label}}</a></li> <li><a href="#" title="{{$tools.ignore.title}}" onclick="window.location.href='{{$tools.ignore.url}}'; return false;">{{$tools.ignore.label}}</a></li>
<li><a href="#" title="{{$buttons.archive.title}}" onclick="window.location.href='{{$buttons.archive.url}}'; return false;">{{$buttons.archive.label}}</a></li> <li><a href="#" title="{{$tools.archive.title}}" onclick="window.location.href='{{$tools.archive.url}}'; return false;">{{$tools.archive.label}}</a></li>
<li><a href="#" title="{{$buttons.hide.title}}" onclick="window.location.href='{{$buttons.hide.url}}'; return false;">{{$buttons.hide.label}}</a></li> <li><a href="#" title="{{$tools.hide.title}}" onclick="window.location.href='{{$tools.hide.url}}'; return false;">{{$tools.hide.label}}</a></li>
<li><a href="#" title="{{$buttons.delete.title}}" onclick="window.location.href='{{$buttons.delete.url}}'; return false;">{{$buttons.delete.label}}</a></li> <li><a href="#" title="{{$tools.delete.title}}" onclick="window.location.href='{{$tools.delete.url}}'; return false;">{{$tools.delete.label}}</a></li>
</ul> </ul>
</div> </div>
{{/if}} {{/if}}
@ -22,11 +22,11 @@
</div> </div>
<div class="section-content-wrapper-np"> <div class="section-content-wrapper-np">
{{if $notself}} {{if $notself}}
{{foreach $buttons as $b}} {{foreach $tools as $tool}}
{{if $b.info}} {{if $tool.info}}
<div class="section-content-danger-wrapper"> <div class="section-content-danger-wrapper">
<div> <div>
{{$b.info}} {{$tool.info}}
</div> </div>
</div> </div>
{{/if}} {{/if}}

View File

@ -5,7 +5,7 @@
{{if $tools || $map || $edit}} {{if $tools || $map || $edit}}
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
<i class="icon-caret-down"></i> <i class="icon-caret-down"></i>&nbsp;{{$tools_label}}
</button> </button>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{{if $tools}} {{if $tools}}

View File

@ -2,7 +2,7 @@
<div class="section-title-wrapper"> <div class="section-title-wrapper">
<div class="dropdown pull-right" id="profile-edit-links"> <div class="dropdown pull-right" id="profile-edit-links">
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="icon-caret-down"></i> <i class="icon-caret-down"></i>&nbsp;{{$tools_label}}
</button> </button>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li class="nav-item"> <li class="nav-item">