Skip to content

Commit

Permalink
Fix: in content stats page, request Solr data using an url which corr…
Browse files Browse the repository at this point in the history
…esponds to Solr 4.10 admin interface
  • Loading branch information
gggeek committed Mar 23, 2019
1 parent 0fbf1da commit ced9042
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
13 changes: 9 additions & 4 deletions classes/contentstatsgatherer.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,15 @@ static function gather()
if ( in_array( 'ezfind', eZExtension::activeExtensions() ) )
{
$ini = eZINI::instance( 'solr.ini' );
$ezfindpingurl = $ini->variable( 'SolrBase', 'SearchServerURI' )."/admin/stats.jsp";
$data = eZHTTPTool::getDataByURL( $ezfindpingurl, false );
//var_dump( $data );
if ( preg_match( '#<stat +name="numDocs" ?>([^<]+)</stat>#', $data, $matches ) )
// remove the last part of the url, corresponding to the core name
$ezfindSatsUrl = substr(
$ini->variable( 'SolrBase', 'SearchServerURI' ),
0,
strrpos( rtrim( $ini->variable( 'SolrBase', 'SearchServerURI' ), '/' ), '/' )
) . "/admin/cores";
$data = eZHTTPTool::getDataByURL( $ezfindSatsUrl, false );
/// @todo add support for multi-core setups
if ( preg_match( '#<int +name="numDocs" ?>([^<]+)</int>#', $data, $matches ) )
{
$contentList['Documents in SOLR'] = trim( $matches[1] );
}
Expand Down
3 changes: 3 additions & 0 deletions doc/changelogs/CHANGELOG-0.9.11-to-0.9.12
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Changes from 0.9.11 to 0.9.12 - unreleased

Fix: in content stats page, request Solr data using an url which corresponds to Solr 4.10 admin interface
2 changes: 1 addition & 1 deletion extension.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<software>
<metadata>
<name>ggsysinfo</name>
<version>0.9.11</version>
<version>0.9.12</version>
<copyright>Copyright (C) 2008-2019 Gaetano Giunta</copyright>
<license>GNU General Public License v2.0</license>
</metadata>
Expand Down
2 changes: 1 addition & 1 deletion ezinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ggsysinfoInfo
static function info()
{
return array( 'Name' => "<a href=\"http://projects.ez.no/ggsysinfo\">ggsysinfo</a>",
'Version' => "0.9.11",
'Version' => "0.9.12",
'Copyright' => "Copyright (C) 2008-2019 Gaetano Giunta",
'License' => "GNU General Public License v2.0"
);
Expand Down

0 comments on commit ced9042

Please sign in to comment.