Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: Preferences
Branches:
I'm in the process of redoing
Foswiki::Store
and the Meta factory code. In the process I noticed the conditional Foswiki::Meta->new, and could not find any code that used _getBackend with an actual topic object.
So I added the (uncommented) ##ASSERT line, and it also didn't trigger
# Get a backend object corresponding to the given $web,$topic
# or Foswiki::Meta object
sub _getBackend {
my $this = shift;
my $metaObject = shift;
##ASSERT(not (ref($metaObject) && UNIVERSAL::isa( $metaObject, 'Foswiki::Meta' ))) if DEBUG;
$metaObject = Foswiki::Meta->new( $this->{session}, $metaObject, @_ )
unless ref($metaObject) && UNIVERSAL::isa( $metaObject, 'Foswiki::Meta' );
my $path = $metaObject->getPath();
unless ( exists $this->{paths}{$path} ) {
$this->{paths}{$path} =
$Foswiki::cfg{Store}{PrefsBackend}->new($metaObject);
}
return $this->{paths}{$path};
}
So I'd like to simplify - I will commit soon, and we'll see if anyone notices
--
SvenDowideit - 25 Aug 2011
As far as I remember, the ThinPrefs code was created before
Foswiki::Meta
refactoring and I had to adapt it in order to commit to trunk. Probably I thought this feature would be used, but it wasn't. Feel free to modify
--
GilmarSantosJr - 26 Aug 2011
done
--
SvenDowideit - 08 Sep 2011