Recent Topics

1 May 29, 2008 19:23    

I can't figure out how to delete parameters defined with
$Blog->set_setting( 'my_param', 1 )

Something like $Blog->delete( 'my_param' ) would be cool, but it doesn't work.

Please help.

2 May 29, 2008 19:27

I've never tried to delete a setting before, chances are you'd need to use sql to remove the setting .... might be worth trying "NULL" as a value though ;)

¥

3 May 29, 2008 19:30

Thanks :)
Here is another question, why does my_param still there after I delete the blog?

4 May 29, 2008 19:32

Probably because it's not a default param, I guess the core only deletes expected params, sounds like a great post to make in the bugs forum huh? ;)

¥

5 May 29, 2008 19:37

I'll try with NULL. Sure it would be cool to see $Blog->delete( 'my_param' ) available in next releases.

6 May 29, 2008 19:38

Swift update, this *might* work ( see inc/settings/model/_abstractsettings.class.php approx 500 onwards ) :

$Blog->CollectionSettings->delete( 'my_param' );

¥

7 May 29, 2008 19:44

Undefined offset: 1 in ... inc\settings\model\_abstractsettings.class.php on line 517

8 May 29, 2008 19:45

Do I have to send my_param as array, right?

9 May 29, 2008 19:50

Never mind I'll use sql instead :)

11 May 30, 2008 04:00

To whom it may concern :roll:

$DB->query('
			DELETE FROM T_coll_settings
			WHERE cset_coll_ID = '.$Blog->ID.'
			AND cset_name = "my_param" ');


Form is loading...