/**
  * Retrieves a listing of content licenses
  * 
  * @return array
  *
  * @Access(callback='user_access', args={'access content'}, appendArgs=false)
  */
 public static function index()
 {
     return array_values(ContentLicense::load());
 }
 /**
  * Gets license information.
  *
  * @param int $lid
  *  Optional. The id of the license to get.
  * @return array|object
  *  An array of license objects or a single object if a specific license was requested. NULL will be returned if
  *  the requested license doesn't exist.
  */
 public static function load($lid = NULL)
 {
     if (!self::$availableLicenses) {
         self::$availableLicenses = array();
         $res = db_query("SELECT * FROM {content_license}");
         while ($obj = db_fetch_object($res)) {
             self::$availableLicenses[$obj->lid] = $obj;
         }
     }
     if ($lid) {
         if (isset(self::$availableLicenses[$lid])) {
             return self::$availableLicenses[$lid];
         }
         return NULL;
     }
     return self::$availableLicenses;
 }