示例#1
0
文件: Page.php 项目: ssrsfs/blg
function _pageMeta($record)
{
    // Do not try to load the admin path from the registry until the registry
    // has been loaded. This is necessary to avoid causing infinite loops when
    // the registry uses Model_Page to load page data.
    if (Typeframe::RegistryLoaded()) {
        $response = Typeframe::Registry()->applicationAt(TYPEF_WEB_DIR . $record['uri']);
        if ($response) {
            $record['fullpath'] = $response->uri();
            if ($response->application()->admin()) {
                $record['admin'] = TYPEF_WEB_DIR . ($record['site']['directory'] ? '/' . $record['site']['directory'] : '') . $response->application()->admin();
            } else {
                $record['admin'] = '';
            }
        }
    }
}