Example #1
0
 private function loadExtensions()
 {
     $desc = getDescendants('XsnpServerExtension');
     foreach ($desc as $dc) {
         $this->extensions[] = new $dc($this);
     }
 }
Example #2
0
/**
 * DynamicSearch_catags
 *
 * @param array  $catags categories
 * @param string $s      search string
 * @param string $cat    category to search
 * @param int    $limit  how many results to return
 *
 * @return array
 */
function DynamicSearch_catags($catags, $s, $cat, $limit)
{
    if (!in_array($cat, $catags)) {
        die('Category does not exist.');
    }
    $id = dbOne('select id from pages where name="' . $cat . '"', 'id');
    $gd = getDescendants($id);
    $q = dbAll('select * from pages where (id=' . $id . ' ' . $gd . ') and (body like "%' . $s . '%" or name like "%' . $s . '%") order by edate limit ' . $limit);
    return $q;
}
Example #3
0
 private static function initPolicyProviderCache()
 {
     if (self::$cache != null) {
         return;
     }
     $cd = getDescendants('SecurityPolicyProvider');
     foreach ($cd as $cc) {
         self::$cache[] = new $cc();
     }
 }
Example #4
0
/**
 * DynamicSearch_catags
 *
 * @param misc $catags blah
 * @param misc $s      blah
 * @param misc $cat    blah
 * @param misc $limit  blah
 *
 * @return misc
 */
function DynamicSearch_catags($catags, $s, $cat, $limit)
{
    $cat_array = explode(',', $catags);
    if (!in_array($cat, $cat_array)) {
        die('Category does not exist.');
    }
    $i = mysql_query('select id from pages where name="' . $cat . '"');
    $d = mysql_fetch_array($i);
    $id = $d['id'];
    $gd = getDescendants($id);
    $q = mysql_query('select * from pages where (id=' . $id . ' ' . $gd . ') and (body like "%' . $s . '%" or name like "%' . $s . '%") order by edate limit ' . $limit);
    return $q;
}