? SolrPhpClient
Index: apachesolr.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.admin.inc,v
retrieving revision 1.1.2.28.2.36
diff -r1.1.2.28.2.36 apachesolr.admin.inc
497a498,548
>  * Page callback to show available conf files.
>  */
> function apachesolr_config_files_overview() {
>   $output = '';
>   $xml = NULL;
>   try {
>     $solr = apachesolr_get_solr();
>     $response = $solr->makeServletRequest('admin/file');
>     $xml = simplexml_load_string($response->getRawResponse());
>   }
>   catch (Exception $e) {
>     watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
>     drupal_set_message(nl2br(check_plain($e->getMessage())), "warning");
>   }
>   if ($xml) {
>     $files = $xml->xpath('//lst[@name="files"]/lst');
>     $items = array();
>     foreach ($files as $file) {
>       $atr = $file->attributes();
>       $name = (string) $atr[0];
>       $str = l($name, 'admin/reports/apachesolr/conf/'. $name);
>       $str .= '<br />' . format_date(strtotime((string) $file->date));
>       $str .= '<br />' . t('Size (bytes): @bytes', array('@bytes' => (string) $file->long));
>       $items[$name] = $str;
>     }
>     ksort($items);
>     $output .= theme('item_list', array_values($items));
>   }
>   return $output;
> }
> 
> /**
>  * Page callback to show one conf file.
>  */
> function apachesolr_config_file($name) {
>   $output = '';
>   try {
>     $solr = apachesolr_get_solr();
>     $response = $solr->makeServletRequest('admin/file', array('file' => $name));
>     $raw_file = $response->getRawResponse();
>     $output = '<pre>' . check_plain($raw_file) . '</pre>';
>     drupal_set_title(check_plain($name));
>   }
>   catch (Exception $e) {
>     watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
>     drupal_set_message(nl2br(check_plain($e->getMessage())), "warning");
>   }
>   return $output;
> }
> 
> /**
Index: apachesolr.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.module,v
retrieving revision 1.1.2.12.2.155.2.110
diff -r1.1.2.12.2.155.2.110 apachesolr.module
107a108,123
>   $items['admin/reports/apachesolr/conf'] = array(
>     'title'              => 'Configuration files',
>     'page callback'      => 'apachesolr_config_files_overview',
>     'access arguments'   => array('access site reports'),
>     'file'               => 'apachesolr.admin.inc',
>     'weight'             => 5,
>     'type'               => MENU_LOCAL_TASK,
>   );
>   $items['admin/reports/apachesolr/conf/%'] = array(
>     'title'              => 'Configuration file',
>     'page callback'      => 'apachesolr_config_file',
>     'page arguments'     => array(4),
>     'access arguments'   => array('access site reports'),
>     'file'               => 'apachesolr.admin.inc',
>     'type'               => MENU_CALLBACK,
>   );
