setPermission('smdoc_news', 'class', 'list', 'Everybody');
setPermission('smdoc_news', 'object', 'history', 'Nobody');
setPermission('smdoc_news', 'object', 'diff', 'Nobody');
setPermission('smdoc_news', 'object', 'revert', 'Nobody');
setPermission('smdoc_news', 'object', 'delete', 'News');
setPermission('smdoc_news', 'object', 'edit', 'News');
/** Class Descriptor/Meta information */
setClassMeta('smdoc_news', 'News');
setConst('NEWS_CLASS_ID', META_SMDOC_NEWS_CLASS_ID);
setConst('NEWS_CLASS_NAME', 'smdoc_news');
/**
 * Array identifying news source
 * @global array $NEWS_SOURCE
 */
global $NEWS_SOURCE;
$NEWS_SOURCE = array('table' => 'smdoc_news', 'table_create' => array(getClassname(NEWS_CLASS_ID), 'makeTable'));
/** 
 * Global containing default news categories 
 * @global array $NEWS_CATEGORIES
 */
global $NEWS_CATEGORIES;
$NEWS_CATEGORIES = array('None', 'Development', 'Stable', 'Plugins');
/**
 * News items/blurbs
 *
 * This class defines a HTML/Textile text area and 
 * methods to view and edit that area.
 *
 * @package smdoc
 * @subpackage text
 * @author Erin Schnabel
Exemple #2
0
 /**
  * Log the user out and display a log out screen.
  *
  * @static
  * @param smdoc $foowd Reference to the foowd environment object.
  * @param string className The name of the class.
  */
 function class_logout(&$foowd, $className)
 {
     $result = call_user_func(array($className, 'logout'), $foowd);
     switch ($result) {
         case 0:
         case 3:
             $_SESSION['ok'] = USER_LOGOUT_OK;
             $uri_arr['class'] = getClassname(USER_CLASS_ID);
             $uri_arr['method'] = 'login';
             $foowd->loc_forward(getURI($uri_arr, FALSE));
             return NULL;
     }
     trigger_error('Unexpected response when logging out user: ' . $result, E_USER_ERROR);
 }