Changeset 987 for trunk/common


Ignore:
Timestamp:
01/20/09 02:39:25 (3 years ago)
Author:
strat.cristian@…
Message:

HTML Newsletter

This patch adds support for HTML in the infoarena newsletter. A newsletter can be created just like a regular wiki page, using textile, macros, and templates. Sending is still done with a command-line script.

Location:
trunk/common
Files:
4 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/common/db/textblock.php

    r981 r987  
    7272function textblock_complex_query($options) 
    7373{ 
    74     //log_print_r($options); 
     74    // log_print_r($options); 
    7575 
    7676    $field_list = "`name`, `title`, `creation_timestamp`, `timestamp`, `security`, `user_id`, `forum_topic`"; 
     
    112112                          $where, $where, $order, $options['limit_start'], $options['limit_count']); 
    113113    } else { 
    114         $query = "SELECT $field_list FROM ia_textblock $join $where"; 
    115     } 
    116     //log_print("QUERY: " . $query); 
     114        $query = "SELECT $field_list FROM ia_textblock 
     115                  $join $where ORDER BY ia_textblock.`creation_timestamp` $order"; 
     116    } 
     117    // log_print("QUERY: " . $query); 
    117118    return db_fetch_all($query); 
    118119} 
     
    166167// Get all textblocks(without content) with a certain prefix). 
    167168// Ordered by name. 
    168 function textblock_get_by_prefix($prefix, $content = false, $username = false) { 
     169function textblock_get_by_prefix($prefix, $content = false, $username = false, 
     170        $order = 'asc') { 
    169171    return textblock_complex_query(array( 
    170172            'content' => $content, 
    171173            'username' => $username, 
    172174            'prefix' => $prefix, 
     175            'order' => $order, 
    173176    )); 
    174177} 
Note: See TracChangeset for help on using the changeset viewer.