Whinging whining stupid fucks.
This commit is contained in:
		| @@ -332,14 +332,6 @@ function user_allow($hash) { | |||||||
| 		intval($register[0]['uid']) | 		intval($register[0]['uid']) | ||||||
| 	); | 	); | ||||||
| 	 | 	 | ||||||
| 	$r = q("SELECT uid FROM profile WHERE uid = %d AND is_default = 1", |  | ||||||
| 		intval($account[0]['account_id']) |  | ||||||
| 	); |  | ||||||
|  |  | ||||||
| 	if($r && $r[0]['publish']) { |  | ||||||
| 		proc_run('php',"include/directory.php",$r[0]['uid']); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	push_lang($register[0]['language']); | 	push_lang($register[0]['language']); | ||||||
|  |  | ||||||
| 	$email_tpl = get_intltext_template("register_open_eml.tpl"); | 	$email_tpl = get_intltext_template("register_open_eml.tpl"); | ||||||
|   | |||||||
| @@ -80,7 +80,12 @@ function create_identity($arr) { | |||||||
| 	$sig = base64url_encode(rsa_sign($guid,$key['prvkey'])); | 	$sig = base64url_encode(rsa_sign($guid,$key['prvkey'])); | ||||||
| 	$hash = base64url_encode(hash('whirlpool',$guid . $sig,true)); | 	$hash = base64url_encode(hash('whirlpool',$guid . $sig,true)); | ||||||
|  |  | ||||||
| 	// Force primary until importation works, then we'll offer a choice | 	// Force a few things on the short term until we can provide a theme or app with choice | ||||||
|  |  | ||||||
|  | 	$publish = 1; | ||||||
|  |  | ||||||
|  | 	if(array_key_exists('publish', $arr)) | ||||||
|  | 		$publish = intval($arr['publish']); | ||||||
|  |  | ||||||
| 	$primary = true; | 	$primary = true; | ||||||
| 		 | 		 | ||||||
| @@ -107,7 +112,7 @@ function create_identity($arr) { | |||||||
| 		dbesc($guid) | 		dbesc($guid) | ||||||
| 	); | 	); | ||||||
|  |  | ||||||
| 	if(! ($r && count($r))) { | 	if(! $r) { | ||||||
| 		$ret['message'] = t('Unable to retrieve created identity'); | 		$ret['message'] = t('Unable to retrieve created identity'); | ||||||
| 		return $ret; | 		return $ret; | ||||||
| 	} | 	} | ||||||
| @@ -167,13 +172,14 @@ function create_identity($arr) { | |||||||
| 	// It's ok for this to fail if it's an imported channel, and therefore the hash is a duplicate | 	// It's ok for this to fail if it's an imported channel, and therefore the hash is a duplicate | ||||||
| 		 | 		 | ||||||
|  |  | ||||||
| 	$r = q("INSERT INTO profile ( aid, uid, profile_guid, profile_name, is_default, name, photo, thumb) | 	$r = q("INSERT INTO profile ( aid, uid, profile_guid, profile_name, is_default, publish, name, photo, thumb) | ||||||
| 		VALUES ( %d, %d, '%s', '%s', %d, '%s', '%s', '%s') ", | 		VALUES ( %d, %d, '%s', '%s', %d, %d, '%s', '%s', '%s') ", | ||||||
| 		intval($ret['channel']['channel_account_id']), | 		intval($ret['channel']['channel_account_id']), | ||||||
| 		intval($newuid), | 		intval($newuid), | ||||||
| 		dbesc(random_string()), | 		dbesc(random_string()), | ||||||
| 		t('Default Profile'), | 		t('Default Profile'), | ||||||
| 		1, | 		1, | ||||||
|  | 		$publish, | ||||||
| 		dbesc($ret['channel']['channel_name']), | 		dbesc($ret['channel']['channel_name']), | ||||||
| 		dbesc($a->get_baseurl() . "/photo/profile/l/{$newuid}"), | 		dbesc($a->get_baseurl() . "/photo/profile/l/{$newuid}"), | ||||||
| 		dbesc($a->get_baseurl() . "/photo/profile/m/{$newuid}") | 		dbesc($a->get_baseurl() . "/photo/profile/m/{$newuid}") | ||||||
| @@ -199,6 +205,8 @@ function create_identity($arr) { | |||||||
|  |  | ||||||
| 	call_hooks('register_account', $newuid); | 	call_hooks('register_account', $newuid); | ||||||
|  |  | ||||||
|  | 	proc_run('php','include/directory.php', $ret['channel']['channel_id']); | ||||||
|  |  | ||||||
| 	$ret['success'] = true; | 	$ret['success'] = true; | ||||||
| 	return $ret; | 	return $ret; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -38,7 +38,7 @@ function profile_photo_post(&$a) { | |||||||
| 		$is_default_profile = 1; | 		$is_default_profile = 1; | ||||||
|  |  | ||||||
| 		if($_REQUEST['profile']) { | 		if($_REQUEST['profile']) { | ||||||
| 			$r = q("select id, `is_default` from profile where id = %d and uid = %d limit 1", | 			$r = q("select id, is_default from profile where id = %d and uid = %d limit 1", | ||||||
| 				intval($_REQUEST['profile']), | 				intval($_REQUEST['profile']), | ||||||
| 				intval(local_user()) | 				intval(local_user()) | ||||||
| 			); | 			); | ||||||
| @@ -110,7 +110,7 @@ function profile_photo_post(&$a) { | |||||||
| 				// If setting for the default profile, unset the profile photo flag from any other photos I own | 				// If setting for the default profile, unset the profile photo flag from any other photos I own | ||||||
|  |  | ||||||
| 				if($is_default_profile) { | 				if($is_default_profile) { | ||||||
| 					$r = q("UPDATE `photo` SET `profile` = 0 WHERE `profile` = 1 AND `resource_id` != '%s' AND `uid` = %d", | 					$r = q("UPDATE photo SET profile = 0 WHERE profile = 1 AND resource_id != '%s' AND `uid` = %d", | ||||||
| 						dbesc($base_image['resource_id']), | 						dbesc($base_image['resource_id']), | ||||||
| 						intval(local_user()) | 						intval(local_user()) | ||||||
| 					); | 					); | ||||||
| @@ -137,11 +137,9 @@ function profile_photo_post(&$a) { | |||||||
| 				); | 				); | ||||||
|  |  | ||||||
| 				info( t('Shift-reload the page or clear browser cache if the new photo does not display immediately.') . EOL); | 				info( t('Shift-reload the page or clear browser cache if the new photo does not display immediately.') . EOL); | ||||||
| 				// Update global directory in background |  | ||||||
| 				$url = $a->get_baseurl() . '/channel/' . $a->user['nickname']; |  | ||||||
| 				if($url && strlen(get_config('system','directory_submit_url'))) |  | ||||||
| 					proc_run('php',"include/directory.php","$url"); |  | ||||||
|  |  | ||||||
|  | 				// Update directory in background | ||||||
|  | 				proc_run('php',"include/directory.php",$channel['channel_id']); | ||||||
| 			} | 			} | ||||||
| 			else | 			else | ||||||
| 				notice( t('Unable to process image') . EOL); | 				notice( t('Unable to process image') . EOL); | ||||||
| @@ -257,11 +255,11 @@ function profile_photo_content(&$a) { | |||||||
| 		// go ahead as if we have just uploaded a new photo to crop | 		// go ahead as if we have just uploaded a new photo to crop | ||||||
| 		profile_photo_crop_ui_head($a, $ph); | 		profile_photo_crop_ui_head($a, $ph); | ||||||
| 	} | 	} | ||||||
| dbg(1); |  | ||||||
| 	$profiles = q("select id, profile_name as name, is_default as pdefault from profile where uid = %d", | 	$profiles = q("select id, profile_name as name, is_default as pdefault from profile where uid = %d", | ||||||
| 		intval(local_user()) | 		intval(local_user()) | ||||||
| 	); | 	); | ||||||
| dbg(0); |  | ||||||
| 	if(! x($a->data,'imagecrop')) { | 	if(! x($a->data,'imagecrop')) { | ||||||
| 	 | 	 | ||||||
| 		$tpl = get_markup_template('profile_photo.tpl'); | 		$tpl = get_markup_template('profile_photo.tpl'); | ||||||
|   | |||||||
| @@ -335,8 +335,6 @@ function settings_post(&$a) { | |||||||
|  |  | ||||||
| 	$allow_location   = (((x($_POST,'allow_location')) && (intval($_POST['allow_location']) == 1)) ? 1: 0); | 	$allow_location   = (((x($_POST,'allow_location')) && (intval($_POST['allow_location']) == 1)) ? 1: 0); | ||||||
| 	$publish          = (((x($_POST,'profile_in_directory')) && (intval($_POST['profile_in_directory']) == 1)) ? 1: 0); | 	$publish          = (((x($_POST,'profile_in_directory')) && (intval($_POST['profile_in_directory']) == 1)) ? 1: 0); | ||||||
| 	$net_publish      = (((x($_POST,'profile_in_netdirectory')) && (intval($_POST['profile_in_netdirectory']) == 1)) ? 1: 0); |  | ||||||
| 	$old_visibility   = (((x($_POST,'visibility')) && (intval($_POST['visibility']) == 1)) ? 1 : 0); |  | ||||||
| 	$page_flags       = (((x($_POST,'page-flags')) && (intval($_POST['page-flags']))) ? intval($_POST['page-flags']) : 0); | 	$page_flags       = (((x($_POST,'page-flags')) && (intval($_POST['page-flags']))) ? intval($_POST['page-flags']) : 0); | ||||||
| 	$blockwall        = (((x($_POST,'blockwall')) && (intval($_POST['blockwall']) == 1)) ? 0: 1); // this setting is inverted! | 	$blockwall        = (((x($_POST,'blockwall')) && (intval($_POST['blockwall']) == 1)) ? 0: 1); // this setting is inverted! | ||||||
| 	$blocktags        = (((x($_POST,'blocktags')) && (intval($_POST['blocktags']) == 1)) ? 0: 1); // this setting is inverted! | 	$blocktags        = (((x($_POST,'blocktags')) && (intval($_POST['blocktags']) == 1)) ? 0: 1); // this setting is inverted! | ||||||
| @@ -959,11 +957,6 @@ function settings_content(&$a) { | |||||||
|  |  | ||||||
| 		)); | 		)); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| 		$invisible = ((! $profile['publish']) ? true : false); |  | ||||||
|  |  | ||||||
|  |  | ||||||
| 		$subdir = ((strlen($a->get_path())) ? '<br />' . t('or') . ' ' . $a->get_baseurl(true) . '/channel/' . $nickname : ''); | 		$subdir = ((strlen($a->get_path())) ? '<br />' . t('or') . ' ' . $a->get_baseurl(true) . '/channel/' . $nickname : ''); | ||||||
|  |  | ||||||
| 		$tpl_addr = get_markup_template("settings_nick_set.tpl"); | 		$tpl_addr = get_markup_template("settings_nick_set.tpl"); | ||||||
| @@ -1022,7 +1015,6 @@ function settings_content(&$a) { | |||||||
| 			'$maxreq' 	=> array('maxreq', t('Maximum Friend Requests/Day:'), intval($channel['channel_max_friend_req']) , t('May reduce spam activity')), | 			'$maxreq' 	=> array('maxreq', t('Maximum Friend Requests/Day:'), intval($channel['channel_max_friend_req']) , t('May reduce spam activity')), | ||||||
| 			'$permissions' => t('Default Post Permissions'), | 			'$permissions' => t('Default Post Permissions'), | ||||||
| 			'$permdesc' => t("\x28click to open/close\x29"), | 			'$permdesc' => t("\x28click to open/close\x29"), | ||||||
| 			'$visibility' => $profile['net-publish'], |  | ||||||
| 			'$aclselect' => populate_acl($a->user,$celeb), | 			'$aclselect' => populate_acl($a->user,$celeb), | ||||||
| 			'$suggestme' => $suggestme, | 			'$suggestme' => $suggestme, | ||||||
|  |  | ||||||
|   | |||||||
| @@ -21,10 +21,6 @@ $nickname_block | |||||||
| <h3 class="settings-heading">$h_prv</h3> | <h3 class="settings-heading">$h_prv</h3> | ||||||
|  |  | ||||||
|  |  | ||||||
| <input type="hidden" name="visibility" value="$visibility" /> |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| <div id="settings-permissions-wrapper"> | <div id="settings-permissions-wrapper"> | ||||||
| {{ for $permiss_arr as $permit }} | {{ for $permiss_arr as $permit }} | ||||||
| {{inc field_select.tpl with $field=$permit }}{{endinc}} | {{inc field_select.tpl with $field=$permit }}{{endinc}} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user