Merge branch 'MDL-53397_master' of git://github.com/dmonllao/moodle
authorAndrew Nicols <andrew@nicols.co.uk>
Mon, 4 Apr 2016 04:12:44 +0000 (12:12 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Mon, 4 Apr 2016 04:12:44 +0000 (12:12 +0800)
1  2 
search/engine/solr/settings.php

@@@ -31,10 -31,8 +31,10 @@@ if ($ADMIN->fulltree) 
              $settings->add(new admin_setting_heading('search_solr_settings', '', get_string('extensionerror', 'search_solr')));
  
          } else {
-             $settings->add(new admin_setting_configtext('search_solr/server_hostname', new lang_string('solrserverhostname', 'search_solr'), new lang_string('solrserverhostname_desc', 'search_solr'), '127.0.0.1', PARAM_TEXT));
-             $settings->add(new admin_setting_configtext('search_solr/indexname', new lang_string('solrindexname', 'search_solr'), '', 'moodle', PARAM_TEXT));
 +            $settings->add(new admin_setting_heading('search_solr_connection',
 +                    new lang_string('connectionsettings', 'search_solr'), ''));
+             $settings->add(new admin_setting_configtext('search_solr/server_hostname', new lang_string('solrserverhostname', 'search_solr'), new lang_string('solrserverhostname_desc', 'search_solr'), '127.0.0.1', PARAM_HOST));
+             $settings->add(new admin_setting_configtext('search_solr/indexname', new lang_string('solrindexname', 'search_solr'), '', '', PARAM_ALPHANUMEXT));
              $settings->add(new admin_setting_configcheckbox('search_solr/secure', new lang_string('solrsecuremode', 'search_solr'), '', 0, 1, 0));
  
              $secure = get_config('search_solr', 'secure');
              $settings->add(new admin_setting_configtext('search_solr/ssl_keypassword', new lang_string('solrsslkeypassword', 'search_solr'), new lang_string('solrsslkeypassword_desc', 'search_solr'), '', PARAM_RAW));
              $settings->add(new admin_setting_configtext('search_solr/ssl_cainfo', new lang_string('solrsslcainfo', 'search_solr'), new lang_string('solrsslcainfo_desc', 'search_solr'), '', PARAM_RAW));
              $settings->add(new admin_setting_configtext('search_solr/ssl_capath', new lang_string('solrsslcapath', 'search_solr'), new lang_string('solrsslcapath_desc', 'search_solr'), '', PARAM_RAW));
 +
 +            $settings->add(new admin_setting_heading('search_solr_fileindexing',
 +                    new lang_string('fileindexsettings', 'search_solr'), ''));
 +            $settings->add(new admin_setting_configcheckbox('search_solr/fileindexing',
 +                    new lang_string('fileindexing', 'search_solr'),
 +                    new lang_string('fileindexing_help', 'search_solr'), 1));
 +            $settings->add(new admin_setting_configtext('search_solr/maxindexfilekb',
 +                    new lang_string('maxindexfilekb', 'search_solr'),
 +                    new lang_string('maxindexfilekb_help', 'search_solr'), '20197152', PARAM_INT));
          }
      }
  }