NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use
trunk.foswiki.org to view this page for some minimal testing.
Use
Item9693 for docu changes for 1.2 and 2.0.
Item11078: Prefs tests strings for 'isa Meta' - presumably there was a plan, but its not needed anymore?
| Priority: |
CurrentState: |
AppliesTo: |
Component: |
WaitingFor: |
| Normal |
Closed |
Engine |
Preferences |
|
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