Currently the only settings DBlog offers is located on a separate page. This is a waste of code and too complicated for users. The attached patch simplifies the form element, fixes a bug where the default value would always be the same and moves it to the general logging & alerts settings form, which is created by system.module, like you can see in the screen shot.
Only local images are allowed.

Comments

xano’s picture

Only local images are allowed.

xano’s picture

StatusFileSize
new2.99 KB
mr.baileys’s picture

I agree that the "database logging" form is too small to warant it's own page/tab/form. Applied the patch and it works as advertised. Manually reviewed the patch:

  1. The following is a bit of a strange construct:
    +  $buttons = $form['buttons'];
    +  unset($form['buttons']);
    +  $form['buttons'] = $buttons;
    

    I guess it should either be preceded by a comment (something like 'ensure that the buttons are displayed at the bottom of the form') or replaced by something like:

    $form['buttons']['#weight'] = 100;
    
  2. The maximum number of rows to keep in the database log.
    

    Since the title reads 'Database log entries to keep', it might make sense to talk about 'entries' instead of 'rows' in the description too?

xano’s picture

Issue tags: +Quick fix

New patch is on its way.

xano’s picture

StatusFileSize
new3.01 KB

Fixed both issues as posted in #3.

dawehner’s picture

StatusFileSize
new6.45 KB

are there reasons for not using hook_form_FORMID_alter?

additional, there is also syslog module which has its settings.

here is a patch which fixes both problems, i'm wondering why the form_alter works in the admin.inc file.

dries’s picture

Status: Needs review » Fixed

Looks great to me, and simplifies the experience a bit. Committed to CVS HEAD. Thanks!

xano’s picture

We had an issue dedicated to Syslog already...

Also see #394332: Logging and alerts cleanup.

dawehner’s picture

sry for that

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

xano’s picture

Assigned: xano » Unassigned