Beispiel #1
0
function getChildCategoryId($blogid, $id)
{
    $context = Model_Context::getInstance();
    if ($context->getProperty('category.raw') === null) {
        getCategories($blogid, 'raw');
    }
    //To cache category information.
    if ($result = MMCache::queryColumn($context->getProperty('category.raw'), 'parent', $id, 'id')) {
        return $result;
    }
    return null;
}
Beispiel #2
0
function getChildCategoryId($blogid, $id)
{
    global $__gCacheCategoryRaw;
    if (empty($__gCacheCategoryRaw)) {
        getCategories($blogid, 'raw');
    }
    //To cache category information.
    if ($result = MMCache::queryColumn($__gCacheCategoryRaw, 'parent', $id, 'id')) {
        return $result;
    }
    return null;
}