File/templates/docbook/funcs.php

Description

This file has some common functions.

Functions
book_fixed_to_tag (line 372)

Check whether the public copy of the book is fixed to a certain tag or revision and return it. If book is not fixed, return false.

void book_fixed_to_tag ( $book_id,  $lng)
  • $book_id
  • $lng
file_content_html (line 61)

Returns the path of the content_lng.html for the given node and language.

void file_content_html ([ $cache_path = WS_CACHE], [ $node_path = UNDEFINED], [ $lng = UNDEFINED])
  • $cache_path
  • $node_path
  • $lng
file_content_xml (line 37)

Returns the path of the content.xml for the given node and language.

void file_content_xml ([ $xml_path = WS_BOOKS], [ $node_path = UNDEFINED], [ $lng = UNDEFINED])
  • $xml_path
  • $node_path
  • $lng
get_arr_navigation (line 118)

Reads from cache 'navigation.txt' for the given node and returns an associative array with the template variables this_path, next_path, prev_path, up_path, this_title, next_title, prev_title, up_title.

void get_arr_navigation ( $node_path, [ $cache_path = UNDEFINED], [ $lng = UNDEFINED])
  • $node_path
  • $cache_path
  • $lng
get_date_str (line 320)

Converts the given time stamp to a date string.

If the time is today, then give just hours and minutes, otherwise give more information.

void get_date_str ( $timestamp)
  • $timestamp
get_node_state (line 217)

Reads the file state.txt of the current node and returns

an associative array with the variables found in it. This file contains two lines. The first line is the lock line and contains 'lock:mode:l_user:l_email:l_timestamp', where lock is 'locked' or 'unlocked' and mode is 'edit' or 'approve'. The second line is the modification line and it contains 'status:m_user:m_email:m_timestamp', where status is 'synchronized', or 'modified'. The keys of the associative array are: lock, mode, l_user, l_email, l_timestamp, status, m_user, m_email, m_timestamp.

void get_node_state ()
get_state_filename (line 196)

Returns the file state.txt of the current node.

void get_state_filename ()
is_locked (line 299)

Returns true if the node is locked and the lock has not expired.

void is_locked ( $arr_state)
  • $arr_state
locked_by_somebody (line 291)

Returns true and displays a notification message, if the node is locked by another user.

void locked_by_somebody ([ $arr_state = UNDEFINED])
  • $arr_state
process_index (line 81)

applies the given transformer to index.xml

void process_index ( $transformer, [ $arr_params = array()], [ $books = UNDEFINED], [ $lng = UNDEFINED])
  • $transformer
  • $arr_params
  • $books
  • $lng
set_node_lock (line 270)

Lock or unlock the current node.

The $lock parameter can be 'locked' or 'unlocked', and $mode can be 'edit' or 'approve'.

void set_node_lock ( $lock,  $mode)
  • $lock
  • $mode
set_node_status (line 255)

Set the status of the current node to the given new status.

The new status can be: synchronized or modified.

void set_node_status ( $new_status)
  • $new_status
update_cache (line 159)

Update the cache file content.html from content.xml

void update_cache ([ $public = 'workspace'], [ $node_path = UNDEFINED], [ $lng = UNDEFINED])
  • $public
  • $node_path
  • $lng
write_node_state (line 242)
void write_node_state ( $arr_state)
  • $arr_state

Documentation generated on Wed, 09 Jan 2008 08:26:53 +0100 by phpDocumentor 1.3.2