Merge pull request #1890 from annando/1509-directory
There is now only one central parameter for the global directory.
This commit is contained in:
commit
bca4d31410
19 changed files with 92 additions and 99 deletions
|
@ -7,7 +7,7 @@ function directory_run(&$argv, &$argc){
|
|||
if(is_null($a)) {
|
||||
$a = new App;
|
||||
}
|
||||
|
||||
|
||||
if(is_null($db)) {
|
||||
@include(".htconfig.php");
|
||||
require_once("include/dba.php");
|
||||
|
@ -29,11 +29,13 @@ function directory_run(&$argv, &$argc){
|
|||
|
||||
$a->set_baseurl(get_config('system','url'));
|
||||
|
||||
$dir = get_config('system','directory_submit_url');
|
||||
$dir = get_config('system','directory');
|
||||
|
||||
if(! strlen($dir))
|
||||
return;
|
||||
|
||||
$dir .= "/submit";
|
||||
|
||||
$arr = array('url' => $argv[1]);
|
||||
|
||||
call_hooks('globaldir_update', $arr);
|
||||
|
|
|
@ -129,7 +129,7 @@ function nav_info(&$a) {
|
|||
$gdirpath = 'directory';
|
||||
|
||||
if(strlen(get_config('system','singleuser'))) {
|
||||
$gdir = dirname(get_config('system','directory_submit_url'));
|
||||
$gdir = get_config('system','directory');
|
||||
if(strlen($gdir))
|
||||
$gdirpath = $gdir;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ function profile_change() {
|
|||
return;
|
||||
|
||||
// $url = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
|
||||
// if($url && strlen(get_config('system','directory_submit_url')))
|
||||
// if($url && strlen(get_config('system','directory')))
|
||||
// proc_run('php',"include/directory.php","$url");
|
||||
|
||||
$recips = q("SELECT `id`,`name`,`network`,`pubkey`,`notify` FROM `contact` WHERE `network` = '%s'
|
||||
|
|
|
@ -1224,7 +1224,7 @@ function update_suggestions() {
|
|||
|
||||
$done[] = $a->get_baseurl() . '/poco';
|
||||
|
||||
if(strlen(get_config('system','directory_submit_url'))) {
|
||||
if(strlen(get_config('system','directory'))) {
|
||||
$x = fetch_url(get_server()."/pubsites");
|
||||
if($x) {
|
||||
$j = json_decode($x);
|
||||
|
|
|
@ -33,7 +33,7 @@ function create_user($arr) {
|
|||
$verified = ((x($arr,'verified')) ? intval($arr['verified']) : 0);
|
||||
|
||||
$publish = ((x($arr,'profile_publish_reg') && intval($arr['profile_publish_reg'])) ? 1 : 0);
|
||||
$netpublish = ((strlen(get_config('system','directory_submit_url'))) ? $publish : 0);
|
||||
$netpublish = ((strlen(get_config('system','directory'))) ? $publish : 0);
|
||||
|
||||
if ($password1 != $confirm) {
|
||||
$result['message'] .= t('Passwords do not match. Password unchanged.') . EOL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue