samizdat-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #21242] frontpage_leftcol-0.1 - allow adding further content to lef


From: boud
Subject: [bug #21242] frontpage_leftcol-0.1 - allow adding further content to left column from config.yaml file alone (fwd)
Date: Sat, 6 Oct 2007 15:52:43 +0200 (CEST)

Subject: [bug #21242] frontpage_leftcol-0.1 - allow adding further
    content to left column from config.yaml file alone


URL:
  <http://savannah.nongnu.org/bugs/?21242>

                 Summary: frontpage_leftcol-0.1 - allow adding further
content to left column from config.yaml file alone
                 Project: Samizdat
            Submitted by: boud
            Submitted on: mercredi 03.10.2007 - 23:28
                Category: None
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

This patch adds one line and adds stuff to two lines in
frontpage_controller.rb.

IMHO the third one-line change


-    text = config['site'][name]
+    text = (config['site'][name] or '')


probably counts as a bug fix, since it
prevents an error in the case that someone forgets to put one
of the static things like header, footer etc. in the config
file, making them optional. This way new static things
like 'left_column'  (really left_column_additional_stuff but
that sounds a bit too long) can be added as options without
making them obligatory. A page might be less useful without
a footer or header, but it shouldn't be a fatal error.

With this third change, the .to_s probably becomes unnecessary
in the first one-line change:

+    render_left_column = static_text('left_column').to_s


BTW, for someone too lazy to download the file, here's the second
one-line change:

-    render_feeds << '
+    render_feeds << render_left_column << '


cheers
boud




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: mercredi 03.10.2007 ˙˙ 23:28  Name: frontpage_leftcol-0.1.patch  Size:
1 ko   By: boud

<http://savannah.nongnu.org/bugs/download.php?file_id=14075>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?21242>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]