On 7/10/06, N Jansen <njansen(a)natuurlijk.nl> wrote:
I use the Gis-extension:
http://meta.wikimedia.org/wiki/Gis
Today I upgraded to Mediawiki 1.7.1.
Now I always get the error
Fatal error: Call to undefined method Parser::extracttags() in
httpdocs/extensions/gis/database.php on line 61.
wenn i want to change a page.
Without the extension it works fine.
Is there somewhere an upgrade of this extension?
No, unfortunately there is no upgrade in Subversion. However, replace the
article_save_geo function in database.php with the following to get it to
work.
function article_save_geo ( $article, $user, $text )
{
$id = $article->getID();
$g = new gis_database();
$g->delete_position( $id );
$tag = 'geo';
$gis_content = array();
//$text = Parser::extractTags( $tag, $text, $gis_content );
if (preg_match("/(<geo[^>]*>)([^<]*)(<\/geo>)/", $text,
$matches)) {
$gis_content = array($matches[2]);
foreach( $gis_content as $marker => $content ) {
$p = new geo_param( $content );
$attr = $p->get_attr();
$g->add_position( $id,
$p->latdeg_min, $p->londeg_min,
$p->latdeg_max, $p->londeg_max,
$attr['globe'],
$attr['type'], $attr['arg:type'] );
}
}
return true;
}
Also, I believe the Semantic MediaWiki extension does GIS. I'm waiting for
it to mature a bit more before I play around with it though. I'm not even
sure it works with 1.7.x.
Greg