/**
  * Returns exactly one DRAFT (or draft-equivalent) registry object by Key (or NULL)
  *
  * @param the registry object key
  * @return _registry_object object or NULL
  */
 function getDraftByKey($key)
 {
     $results = $this->_get(array(array('args' => $key, 'fn' => function ($db, $key) {
         $db->select("registry_object_id")->from("registry_objects")->where('`key` =', '"' . $key . '"', false)->where_in("status", getDraftStatusGroup());
         return $db;
     })), true, 1);
     return is_array($results) ? $results[0] : null;
 }
Ejemplo n.º 2
0
function isDraftStatus($status)
{
    return in_array($status, getDraftStatusGroup());
}