Noscrape is now enabled all the time.

This commit is contained in:
Michael Vogel 2015-02-08 12:07:35 +01:00
parent f620834d97
commit f931eba7f2
4 changed files with 1 additions and 12 deletions

View file

@ -372,7 +372,6 @@ function admin_page_site_post(&$a){
$basepath = ((x($_POST,'basepath')) ? notags(trim($_POST['basepath'])) : ''); $basepath = ((x($_POST,'basepath')) ? notags(trim($_POST['basepath'])) : '');
$singleuser = ((x($_POST,'singleuser')) ? notags(trim($_POST['singleuser'])) : ''); $singleuser = ((x($_POST,'singleuser')) ? notags(trim($_POST['singleuser'])) : '');
$proxy_disabled = ((x($_POST,'proxy_disabled')) ? True : False); $proxy_disabled = ((x($_POST,'proxy_disabled')) ? True : False);
$disable_noscrape = ((x($_POST,'disable_noscrape')) ? true : false);
if($ssl_policy != intval(get_config('system','ssl_policy'))) { if($ssl_policy != intval(get_config('system','ssl_policy'))) {
if($ssl_policy == SSL_POLICY_FULL) { if($ssl_policy == SSL_POLICY_FULL) {
q("update `contact` set q("update `contact` set
@ -500,7 +499,6 @@ function admin_page_site_post(&$a){
set_config('system','temppath', $temppath); set_config('system','temppath', $temppath);
set_config('system','basepath', $basepath); set_config('system','basepath', $basepath);
set_config('system','proxy_disabled', $proxy_disabled); set_config('system','proxy_disabled', $proxy_disabled);
set_config('system','disable_noscrape', $disable_noscrape);
info( t('Site settings updated.') . EOL); info( t('Site settings updated.') . EOL);
goaway($a->get_baseurl(true) . '/admin/site' ); goaway($a->get_baseurl(true) . '/admin/site' );
@ -668,8 +666,6 @@ function admin_page_site(&$a) {
'$proxy_disabled' => array('proxy_disabled', t("Disable picture proxy"), get_config('system','proxy_disabled'), t("The picture proxy increases performance and privacy. It shouldn't be used on systems with very low bandwith.")), '$proxy_disabled' => array('proxy_disabled', t("Disable picture proxy"), get_config('system','proxy_disabled'), t("The picture proxy increases performance and privacy. It shouldn't be used on systems with very low bandwith.")),
'$relocate_url' => array('relocate_url', t("New base url"), $a->get_baseurl(), "Change base url for this server. Sends relocate message to all DFRN contacts of all users."), '$relocate_url' => array('relocate_url', t("New base url"), $a->get_baseurl(), "Change base url for this server. Sends relocate message to all DFRN contacts of all users."),
'$disable_noscrape'=> array('disable_noscrape', t("Disable noscrape"), get_config('system','disable_noscrape'), t("The noscrape feature speeds up directory submissions by using JSON data instead of HTML scraping. Disabling it will cause higher load on your server and the directory server.")),
'$form_security_token' => get_form_security_token("admin_site") '$form_security_token' => get_form_security_token("admin_site")
)); ));

View file

@ -38,11 +38,8 @@ function friendica_init(&$a) {
'site_name' => $a->config['sitename'], 'site_name' => $a->config['sitename'],
'platform' => FRIENDICA_PLATFORM, 'platform' => FRIENDICA_PLATFORM,
'info' => ((x($a->config,'info')) ? $a->config['info'] : ''), 'info' => ((x($a->config,'info')) ? $a->config['info'] : ''),
'no_scrape_url' => $a->get_baseurl().'/noscrape'
); );
//Enable noscrape?
if(!get_config('system','disable_noscrape'))
$data['no_scrape_url'] = $a->get_baseurl().'/noscrape';
echo json_encode($data); echo json_encode($data);
killme(); killme();

View file

@ -2,9 +2,6 @@
function noscrape_init(&$a) { function noscrape_init(&$a) {
if(get_config('system','disable_noscrape'))
killme();
if($a->argc > 1) if($a->argc > 1)
$which = $a->argv[1]; $which = $a->argv[1];
else else

View file

@ -111,7 +111,6 @@
{{include file="field_checkbox.tpl" field=$suppress_language}} {{include file="field_checkbox.tpl" field=$suppress_language}}
<h3>{{$performance}}</h3> <h3>{{$performance}}</h3>
{{include file="field_checkbox.tpl" field=$disable_noscrape}}
{{include file="field_checkbox.tpl" field=$use_fulltext_engine}} {{include file="field_checkbox.tpl" field=$use_fulltext_engine}}
{{include file="field_input.tpl" field=$itemcache}} {{include file="field_input.tpl" field=$itemcache}}
{{include file="field_input.tpl" field=$itemcache_duration}} {{include file="field_input.tpl" field=$itemcache_duration}}