Ticket #266 (assigned defect)

Opened 9 months ago

Last modified 8 months ago

sidebar_remove will not remove all entries

Reported by: garrettn Assigned to: rho (accepted)
Priority: normal Milestone: 0.9.2
Component: core Version: 0.9.0
Severity: normal Keywords: sidebar
Cc: misja, diego, ewout, renato Patch Included: 1
Review Stage: reviewed

Description

As I understand it, sidebar_remove with the 2nd param = true will remove all *but* things matching the first option. However, in practice, it don't seem to work.

Test Case, using /mod/folio/view.php (but verified with other pages):

sidebar_add(1,'test','bob'); sidebar_remove('test',true);

All sidebar entries will still exist. Running sidebar_remove without the sidebar_add in front of it will remove all entries. I've gone thru the code, and this doesn't seem to act according to the description of the code.

Attachments

080215_sidebar_remove_all_fix.diff (0.6 kB) - added by rho on 02/15/08 22:08:18.

Change History

01/24/08 20:30:22 changed by misja

  • owner changed from misja to rho.
  • haspatch changed.
  • review_stage set to verify.

02/15/08 08:25:31 changed by misja

  • milestone changed from 0.9.1 to 0.9.2.

02/15/08 22:06:08 changed by rho

  • keywords set to sidebar.
  • status changed from new to assigned.
  • haspatch set to 1.
  • review_stage changed from verify to reviewed.

I verified and sidebar_remove(id, true) not clear previous added blocks, only prevent new blocks to be added.

I'd attach patch.

If there is twice sidebar_remove(id, true), the latest override the first call.

02/15/08 22:07:51 changed by rho

  • cc set to misja, diego, ewout, renato.

02/15/08 22:08:18 changed by rho

  • attachment 080215_sidebar_remove_all_fix.diff added.