コード例 #1
0
ファイル: spdf2png.php プロジェクト: stevoland/ez_sbase
 /**
  * Performs PDF content generation and caching
  *
  * @param $url                 	 String    URL
  * @param $denisty               Integer   
  * @param $keys                  Mixed     Keys for Cache key(s) - either as a string or an array of strings
  * @param $subtree_expiry        Mixed     The parameter $subtreeExpiryParameter is expiry value is usually taken
  *                                         from the template operator and can be one of:
  *                                           - A numerical value which represents the node ID (the fastest approach)
  *                                           - A string containing 'content/view/full/xxx' where xx is the node ID number,
  *                                             the number will be extracted.
  *                                           - A string containing a nice url which will be decoded into a node ID using
  *                                             the database (slowest approach).
  * @param $expiry                Integer   The number of seconds that the pdf cache should be allowed to live.A value of
  *                                         zero will produce a cache block that will never expire
  * @param $ignore_content_expiry Boolean   Disables cache expiry when new content is published.
  * @return void
  */
 public function getObject($url = '', $density, $keys, $subtree_expiry, $expiry, $ignore_content_expiry = false)
 {
     $pngUrl = '';
     $obj = false;
     $mtime = eZDateTime::currentTimeStamp();
     $httpExpiry = $this->cacheTTL;
     if (strpos("://", $url) === false) {
         $url = eZSys::serverURL() . $url;
     }
     //eZDebug::writeError($url, 'sPdf2png::exportPng');
     if ($this->cacheEnabled) {
         $use_global_expiry = !$ignore_content_expiry;
         //$keys = self::getCacheKeysArray($keys);
         $expiry = is_numeric($expiry) ? $expiry : $this->cacheTTL;
         list($handler, $pngUrl) = eZTemplateCacheBlock::retrieve($keys, $subtree_expiry, $expiry, $use_global_expiry);
         if ($pngUrl instanceof eZClusterFileFailure || !file_get_contents($pngUrl)) {
             eZDebug::writeError("cache invalid", 'sPdf2png::exportPng');
             $obj = $this->generatePng($url, $density, $keys);
             $handler->storeCache(array('scope' => 'template-block', 'binarydata' => $obj['url']));
         }
         //eZDebug::writeError("cache", 'sPdf2png::exportPng');
     } else {
         $obj = $this->generatePng($url, $density, $keys);
     }
     if (!$obj) {
         $obj = $this->getPngData($pngUrl);
     }
     $obj['url'] = self::getWwwDir() . $obj['url'];
     return $obj;
 }
コード例 #2
0
 /**
  * Performs PDF content generation and caching
  *
  * @param $xhtml                 String    XHTML content
  * @param $pdf_file_name         String    Name that will be used when serving the PDF file (not for storage)
  * @param $keys                  Mixed     Keys for Cache key(s) - either as a string or an array of strings
  * @param $subtree_expiry        Mixed     The parameter $subtreeExpiryParameter is expiry value is usually taken
  *                                         from the template operator and can be one of:
  *                                           - A numerical value which represents the node ID (the fastest approach)
  *                                           - A string containing 'content/view/full/xxx' where xx is the node ID number,
  *                                             the number will be extracted.
  *                                           - A string containing a nice url which will be decoded into a node ID using
  *                                             the database (slowest approach).
  * @param $expiry                Integer   The number of seconds that the pdf cache should be allowed to live.A value of
  *                                         zero will produce a cache block that will never expire
  * @param $ignore_content_expiry Boolean   Disables cache expiry when new content is published.
  * @return void
  */
 public function exportPDF($xhtml = '', $pdf_file_name = '', $keys, $subtree_expiry, $expiry, $ignore_content_expiry = false)
 {
     if ($pdf_file_name == '') {
         $pdf_file_name = 'file';
     }
     $data = '';
     $size = 0;
     $mtime = eZDateTime::currentTimeStamp();
     $httpExpiry = $this->cacheTTL;
     if ($this->cacheEnabled) {
         $keys = self::getCacheKeysArray($keys);
         $expiry = is_numeric($expiry) ? $expiry : $this->cacheTTL;
         if ($expiry > 0) {
             $httpExpiry = $expiry;
         }
         if (isset($subtree_expiry)) {
             $ignore_content_expiry = true;
         }
         list($handler, $data) = eZTemplateCacheBlock::retrieve($keys, $subtree_expiry, $expiry, !$ignore_content_expiry);
         if ($data instanceof eZClusterFileFailure || $handler->size() == 0) {
             $data = $this->generatePDF($xhtml);
             // check if error occurred during pdf generation
             if ($data === false) {
                 return;
             }
             $handler->storeCache(array('scope' => 'template-block', 'binarydata' => $data));
             $size = strlen($data);
         } else {
             $size = $handler->size();
             $mtime = $handler->mtime();
         }
     } else {
         $data = $this->generatePDF($xhtml);
         // check if error occurred during pdf generation
         if ($data === false) {
             return;
         }
         $size = $this->size;
     }
     $this->flushPDF($data, $pdf_file_name, $size, $mtime, $httpExpiry);
 }
コード例 #3
0
 static function subtreeCacheSubDirForNode( $nodeID )
 {
     return eZTemplateCacheBlock::subtreeCacheSubDirForNode( $nodeID );
 }
     $cacheKeys2 = $cacheKeys2->templateValue();
 }
 while (is_object($cacheKeys2) and method_exists($cacheKeys2, 'templateValue')) {
     $cacheKeys2 = $cacheKeys2->templateValue();
 }
 $cacheKeys = array($cacheKeys1, $cacheKeys2);
 unset($cacheKeys1, $cacheKeys2);
 if (!isset($cacheKeys)) {
     $cacheKeys = NULL;
 }
 while (is_object($cacheKeys) and method_exists($cacheKeys, 'templateValue')) {
     $cacheKeys = $cacheKeys->templateValue();
 }
 $subtreeExpiry = NULL;
 $cacheKeys = array($cacheKeys, "68_4_68_100_design/admin2/templates/contentstructuremenu/content_structure_menu_dynamic.tpl", "plain_site_admin");
 list($cacheHandler_c2f03dbf07f54398c30816cddbccda0a, $contentData) = eZTemplateCacheBlock::retrieve($cacheKeys, $subtreeExpiry, 86400, false);
 if (!$contentData instanceof eZClusterFileFailure) {
     $text .= $contentData;
     unset($contentData);
 } else {
     unset($contentData);
     if (!isset($textStack)) {
         $textStack = array();
     }
     $textStack[] = $text;
     $text = '';
     $text .= '        ';
     // def $iconInfo
     unset($var);
     if (!isset($var)) {
         $var = NULL;
    $cacheKeys1 = $cacheKeys1->templateValue();
}
while (is_object($cacheKeys1) and method_exists($cacheKeys1, 'templateValue')) {
    $cacheKeys1 = $cacheKeys1->templateValue();
}
$cacheKeys = array($cacheKeys1);
unset($cacheKeys1);
if (!isset($cacheKeys)) {
    $cacheKeys = NULL;
}
while (is_object($cacheKeys) and method_exists($cacheKeys, 'templateValue')) {
    $cacheKeys = $cacheKeys->templateValue();
}
$subtreeExpiry = NULL;
$cacheKeys = array($cacheKeys, "3_0_3_36_design/standard/templates/dashboard/all_latest_content.tpl", "formation_admin");
list($cacheHandler_2f6fafe8f59a74f5ff4d233de82e064d, $contentData) = eZTemplateCacheBlock::retrieve($cacheKeys, $subtreeExpiry, 7200, true);
if (!$contentData instanceof eZClusterFileFailure) {
    $text .= $contentData;
    unset($contentData);
} else {
    unset($contentData);
    if (!isset($textStack)) {
        $textStack = array();
    }
    $textStack[] = $text;
    $text = '';
    $text .= '
';
    // def $date_end
    unset($var);
    unset($var1);
}
while (is_object($cacheKeys1) and method_exists($cacheKeys1, 'templateValue')) {
    $cacheKeys1 = $cacheKeys1->templateValue();
}
$cacheKeys = array($cacheKeys1);
unset($cacheKeys1);
if (!isset($cacheKeys)) {
    $cacheKeys = NULL;
}
while (is_object($cacheKeys) and method_exists($cacheKeys, 'templateValue')) {
    $cacheKeys = $cacheKeys->templateValue();
}
$subtreeExpiry = NULL;
//include_once( 'lib/eztemplate/classes/eztemplatecacheblock.php' );
$cacheKeys = array($cacheKeys, "140_0_140_60_design/admin2/templates/pagelayout.tpl", "ezflow_site_clean_admin");
list($cacheHandler_479ae7d98e3fcc190ba6398a65dad590, $contentData) = eZTemplateCacheBlock::retrieve($cacheKeys, $subtreeExpiry, 7200, false);
if (!$contentData instanceof eZClusterFileFailure) {
    $text .= $contentData;
    unset($contentData);
} else {
    unset($contentData);
    if (!isset($textStack)) {
        $textStack = array();
    }
    $textStack[] = $text;
    $text = '';
    $text .= '<div id="footer" class="float-break">
<div id="footer-design">
    ';
    $oldRestoreIncludeArray_45fe33bff0775bf7793a6079f1cc5ed5 = isset($restoreIncludeArray) ? $restoreIncludeArray : array();
    $restoreIncludeArray = array();
    $cacheKeys5 = $cacheKeys5->templateValue();
}
while (is_object($cacheKeys5) and method_exists($cacheKeys5, 'templateValue')) {
    $cacheKeys5 = $cacheKeys5->templateValue();
}
$cacheKeys = array($cacheKeys1, $cacheKeys2, $cacheKeys3, $cacheKeys4, $cacheKeys5);
unset($cacheKeys1, $cacheKeys2, $cacheKeys3, $cacheKeys4, $cacheKeys5);
if (!isset($cacheKeys)) {
    $cacheKeys = NULL;
}
while (is_object($cacheKeys) and method_exists($cacheKeys, 'templateValue')) {
    $cacheKeys = $cacheKeys->templateValue();
}
$subtreeExpiry = NULL;
$cacheKeys = array($cacheKeys, "6_0_6_109_design/admin2/templates/loginpagelayout.tpl", "formation_admin");
list($cacheHandler_1c3e02f95063cf8dc32292c7ee289626, $contentData) = eZTemplateCacheBlock::retrieve($cacheKeys, $subtreeExpiry, 7200, true);
if (!$contentData instanceof eZClusterFileFailure) {
    $text .= $contentData;
    unset($contentData);
} else {
    unset($contentData);
    if (!isset($textStack)) {
        $textStack = array();
    }
    $textStack[] = $text;
    $text = '';
    $text .= '
';
    $oldRestoreIncludeArray_a93e6316262c2d7b10eab748af6b737e = isset($restoreIncludeArray) ? $restoreIncludeArray : array();
    $restoreIncludeArray = array();
    if (!isset($dKeys)) {
コード例 #8
0
 function processCached($tpl, $functionChildren, $rootNamespace, $currentNamespace, $placementString, $keys, $subtreeExpiry, $expiry, $ignoreContentExpiry)
 {
     // Fetch the current siteaccess
     $accessName = false;
     if (isset($GLOBALS['eZCurrentAccess']['name'])) {
         $accessName = $GLOBALS['eZCurrentAccess']['name'];
     }
     if ($keys === null) {
         $keyArray = array($placementString, $accessName);
     } else {
         $keyArray = array($keys, $placementString, $accessName);
     }
     $nodeID = $subtreeExpiry ? eZTemplateCacheBlock::decodeNodeID($subtreeExpiry) : false;
     $phpPath = eZTemplateCacheBlock::cachePath(eZTemplateCacheBlock::keyString($keyArray), $nodeID);
     $ttl = $expiry > 0 ? $expiry : null;
     if ($subtreeExpiry !== null) {
         $ignoreContentExpiry = true;
     } else {
         if ($ignoreContentExpiry === null) {
             $ignoreContentExpiry = false;
         }
     }
     $globalExpiryTime = -1;
     if ($ignoreContentExpiry == false) {
         $globalExpiryTime = eZExpiryHandler::getTimestamp('template-block-cache', -1);
     }
     $globalExpiryTime = max(eZExpiryHandler::getTimestamp('global-template-block-cache', -1), $globalExpiryTime);
     // Check if we can restore
     $cacheFile = eZClusterFileHandler::instance($phpPath);
     $args = array("tpl" => $tpl, "functionChildren" => $functionChildren, "rootNamespace" => $rootNamespace, "currentNamespace" => $currentNamespace);
     return $cacheFile->processCache(array('eZTemplateCacheBlock', 'retrieveContent'), array($this, 'generateProcessedContent'), $ttl, $globalExpiryTime, $args);
 }
コード例 #9
0
    /**
     * Returns the name_trunk for a file path
     * @param string $filePath
     * @param string $scope
     * @return string
     */
    static protected function nameTrunk( $filePath, $scope )
    {
        switch ( $scope )
        {
            case 'viewcache':
            {
                $nameTrunk = substr( $filePath, 0, strrpos( $filePath, '-' ) + 1 );
            } break;

            case 'template-block':
            {
                $templateBlockCacheDir = eZTemplateCacheBlock::templateBlockCacheDir();
                $templateBlockPath = str_replace( $templateBlockCacheDir, '', $filePath );
                if ( strstr( $templateBlockPath, 'subtree/' ) !== false )
                {
                    // 6 = strlen( 'cache/' );
                    $len = strlen( $templateBlockCacheDir ) + strpos( $templateBlockPath, 'cache/' ) + 6;
                    $nameTrunk = substr( $filePath, 0, $len  );
                }
                else
                {
                    $nameTrunk = $filePath;
                }
            } break;

            default:
            {
                $nameTrunk = $filePath;
            }
        }
        return $nameTrunk;
    }
}
while (is_object($cacheKeys4) and method_exists($cacheKeys4, 'templateValue')) {
    $cacheKeys4 = $cacheKeys4->templateValue();
}
$cacheKeys = array($cacheKeys1, $cacheKeys2, $cacheKeys3, $cacheKeys4);
unset($cacheKeys1, $cacheKeys2, $cacheKeys3, $cacheKeys4);
if (!isset($cacheKeys)) {
    $cacheKeys = NULL;
}
while (is_object($cacheKeys) and method_exists($cacheKeys, 'templateValue')) {
    $cacheKeys = $cacheKeys->templateValue();
}
$subtreeExpiry = NULL;
//include_once( 'lib/eztemplate/classes/eztemplatecacheblock.php' );
$cacheKeys = array($cacheKeys, "77_0_77_93_extension/ezwebin/design/ezwebin/templates/pagelayout.tpl", "ezflow_site_clean_user");
list($cacheHandler_6195df5bc927b630f97071b12a9c66e8, $contentData) = eZTemplateCacheBlock::retrieve($cacheKeys, $subtreeExpiry, 7200, true);
if (!$contentData instanceof eZClusterFileFailure) {
    $text .= $contentData;
    unset($contentData);
} else {
    unset($contentData);
    if (!isset($textStack)) {
        $textStack = array();
    }
    $textStack[] = $text;
    $text = '';
    $text .= '
    ';
    // if begins
    unset($if_cond);
    unset($if_cond1);
コード例 #11
0
$extendedAttributeFilter = array();
$extendedAttributeFilter['id'] = "SQLFacetFilterParts";
$extendedAttributeFilter['params']['bolean'] = $boolop;
$extendedAttributeFilter['params']['subnode_id'] = $subNodeID;
if ($http->hasVariable('RevSelectedObjectIDs')) {
    $objectIDs = $http->variable('RevSelectedObjectIDs');
    if ($boolop == "and") {
        foreach ($objectIDs as $objectID) {
            $revSelectedObjectIDs[] = $objectID;
            $extendedAttributeFilter['params']['object_id'][] = $objectID;
        }
    } else {
        $extendedAttributeFilter['params']['object_id'][] = $objectIDs;
    }
}
list($uCacheHandler, $uCachedContent) = eZTemplateCacheBlock::retrieve(array('extension/labforculture/modules/labforculture/ajaxfacetfilter', implode($roleListArray, ","), $boolop, $phrase, $action, implode($revSelectedObjectIDs, ",")), $topNodeID, 600);
$ajaxnodeexpired = get_class($uCachedContent) == 'ezclusterfilefailure';
if (!$ajaxnodeexpired and 1 == 0) {
    $view = $uCachedContent;
} else {
    //BUILD REQUEST XML
    $request_value[] = "<request>";
    $request_value[] = "<topNodeID>" . $topNodeID . "</topNodeID>";
    $request_value[] = "<revTopNodeID>" . $revTopNodeID . "</revTopNodeID>";
    $request_value[] = "<phrase>" . $phrase . "</phrase>";
    if (count($revSelectedObjectIDs) > 0) {
        $request_value[] = "<revSelectedObjectIDs>";
        foreach ($revSelectedObjectIDs as $revSelectedObjectID) {
            $request_value[] = "<objectID>" . $revSelectedObjectID . "</objectID>";
        }
        $request_value[] = "</revSelectedObjectIDs>";
    $cacheKeys5 = $cacheKeys5->templateValue();
}
while (is_object($cacheKeys5) and method_exists($cacheKeys5, 'templateValue')) {
    $cacheKeys5 = $cacheKeys5->templateValue();
}
$cacheKeys = array($cacheKeys1, $cacheKeys2, $cacheKeys3, $cacheKeys4, $cacheKeys5);
unset($cacheKeys1, $cacheKeys2, $cacheKeys3, $cacheKeys4, $cacheKeys5);
if (!isset($cacheKeys)) {
    $cacheKeys = NULL;
}
while (is_object($cacheKeys) and method_exists($cacheKeys, 'templateValue')) {
    $cacheKeys = $cacheKeys->templateValue();
}
$subtreeExpiry = NULL;
$cacheKeys = array($cacheKeys, "6_0_6_109_design/admin/templates/loginpagelayout.tpl", "ezdemo_site_admin");
list($cacheHandler_49dc1f301537bb71f852e21b1300b509, $contentData) = eZTemplateCacheBlock::retrieve($cacheKeys, $subtreeExpiry, 7200, true);
if (!$contentData instanceof eZClusterFileFailure) {
    $text .= $contentData;
    unset($contentData);
} else {
    unset($contentData);
    if (!isset($textStack)) {
        $textStack = array();
    }
    $textStack[] = $text;
    $text = '';
    $text .= '
';
    $oldRestoreIncludeArray_ef95998d18e2f056b513bece78cb5c38 = isset($restoreIncludeArray) ? $restoreIncludeArray : array();
    $restoreIncludeArray = array();
    if (!isset($dKeys)) {
    $cacheKeys4 = $cacheKeys4->templateValue();
}
while (is_object($cacheKeys4) and method_exists($cacheKeys4, 'templateValue')) {
    $cacheKeys4 = $cacheKeys4->templateValue();
}
$cacheKeys = array($cacheKeys1, $cacheKeys2, $cacheKeys3, $cacheKeys4);
unset($cacheKeys1, $cacheKeys2, $cacheKeys3, $cacheKeys4);
if (!isset($cacheKeys)) {
    $cacheKeys = NULL;
}
while (is_object($cacheKeys) and method_exists($cacheKeys, 'templateValue')) {
    $cacheKeys = $cacheKeys->templateValue();
}
$subtreeExpiry = NULL;
$cacheKeys = array($cacheKeys, "82_12_82_105_extension/ezdemo/design/ezdemo/templates/pagelayout.tpl", "eng");
list($cacheHandler_9d778d2351c6a18059d8ad5a4783db73, $contentData) = eZTemplateCacheBlock::retrieve($cacheKeys, $subtreeExpiry, 7200, true);
if (!$contentData instanceof eZClusterFileFailure) {
    $text .= $contentData;
    unset($contentData);
} else {
    unset($contentData);
    if (!isset($textStack)) {
        $textStack = array();
    }
    $textStack[] = $text;
    $text = '';
    $text .= '
            <!-- Extra area: START -->
            ';
    // if begins
    unset($if_cond);
}
while (is_object($cacheKeys2) and method_exists($cacheKeys2, 'templateValue')) {
    $cacheKeys2 = $cacheKeys2->templateValue();
}
$cacheKeys = array($cacheKeys1, $cacheKeys2);
unset($cacheKeys1, $cacheKeys2);
if (!isset($cacheKeys)) {
    $cacheKeys = NULL;
}
while (is_object($cacheKeys) and method_exists($cacheKeys, 'templateValue')) {
    $cacheKeys = $cacheKeys->templateValue();
}
$subtreeExpiry = NULL;
//include_once( 'lib/eztemplate/classes/eztemplatecacheblock.php' );
$cacheKeys = array($cacheKeys, "546_0_546_62_design/admin2/templates/contentstructuremenu/content_structure_menu_dynamic.tpl", "ezflow_site_clean_admin");
list($cacheHandler_f455b8fa11552b945be2b2bf64ff5b59, $contentData) = eZTemplateCacheBlock::retrieve($cacheKeys, $subtreeExpiry, null, true);
if (!$contentData instanceof eZClusterFileFailure) {
    $text .= $contentData;
    unset($contentData);
} else {
    unset($contentData);
    if (!isset($textStack)) {
        $textStack = array();
    }
    $textStack[] = $text;
    $text = '';
    $text .= '    ';
    // def $root_node_url
    unset($var);
    unset($var);
    $var = (array_key_exists($rootNamespace, $vars) and array_key_exists('root_node', $vars[$rootNamespace])) ? $vars[$rootNamespace]['root_node'] : null;
コード例 #15
0
 static function subtreeCacheSubDirForNode($nodeID)
 {
     $cacheDir = eZTemplateCacheBlock::subtreeCacheBaseSubDir();
     if (is_numeric($nodeID)) {
         $nodeID = (string) $nodeID;
         $length = strlen($nodeID);
         $pos = 0;
         while ($pos < $length) {
             $cacheDir .= '/' . $nodeID[$pos];
             ++$pos;
         }
     } else {
         eZDebug::writeWarning("Unable to determine cacheDir for nodeID = {$nodeID}", 'eZtemplateCacheFunction::subtreeCacheSubDirForNode');
     }
     $cacheDir .= '/cache';
     return $cacheDir;
 }
コード例 #16
0
 static function cleanupAll()
 {
     $subtreeCacheDir = eZTemplateCacheBlock::templateBlockCacheDir() . eZTemplateCacheBlock::subtreeCacheBaseSubDir();
     eZSubtreeCache::cleanupCacheDir($subtreeCacheDir);
 }
     $cacheKeys2 = $cacheKeys2->templateValue();
 }
 while (is_object($cacheKeys2) and method_exists($cacheKeys2, 'templateValue')) {
     $cacheKeys2 = $cacheKeys2->templateValue();
 }
 $cacheKeys = array($cacheKeys1, $cacheKeys2);
 unset($cacheKeys1, $cacheKeys2);
 if (!isset($cacheKeys)) {
     $cacheKeys = NULL;
 }
 while (is_object($cacheKeys) and method_exists($cacheKeys, 'templateValue')) {
     $cacheKeys = $cacheKeys->templateValue();
 }
 $subtreeExpiry = NULL;
 $cacheKeys = array($cacheKeys, "72_4_72_100_design/admin/templates/contentstructuremenu/content_structure_menu_dynamic.tpl", "ezdemo_site_admin");
 list($cacheHandler_b4a13badd907740b4c2c7b13b214c5b2, $contentData) = eZTemplateCacheBlock::retrieve($cacheKeys, $subtreeExpiry, 86400, false);
 if (!$contentData instanceof eZClusterFileFailure) {
     $text .= $contentData;
     unset($contentData);
 } else {
     unset($contentData);
     if (!isset($textStack)) {
         $textStack = array();
     }
     $textStack[] = $text;
     $text = '';
     $text .= '        ';
     // def $iconInfo
     unset($var);
     if (!isset($var)) {
         $var = NULL;
コード例 #18
0
ファイル: treemenu.php プロジェクト: stevoland/ez_patch
    header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
    eZExecution::cleanExit();
    return;
}
$accessName = false;
if (isset($GLOBALS['eZCurrentAccess']['name'])) {
    $accessName = $GLOBALS['eZCurrentAccess']['name'];
}
$user = eZUser::currentUser();
$limitedAssignmentValueList = implode(',', $user->limitValueList());
$roleList = implode(',', $user->roleIDList());
// HACK!
$showHidden = $contentstructuremenuINI->variable('TreeMenu', 'ShowHiddenNodes') == 'true' || $siteINI->variable('SiteAccessSettings', 'ShowHiddenNodes') == 'true';
$handler = false;
if ($contentstructuremenuINI->variable('TreeMenu', 'UseCache') == 'enabled' and $siteINI->variable('TemplateSettings', 'TemplateCache') == 'enabled') {
    list($handler, $cacheFileContent) = eZTemplateCacheBlock::retrieve(array('content_structure', $nodeID, $showHidden, $user->roleIDList(), $user->limitValueList(), $accessName), $nodeID, -1);
    if (!$cacheFileContent instanceof eZClusterFileFailure) {
        header('Expires: ' . gmdate('D, d M Y H:i:s', time() + MAX_AGE) . ' GMT');
        header('Cache-Control: max-age=' . MAX_AGE);
        header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $Params['Modified']) . ' GMT');
        header('Pragma: ');
        header('Content-Type: application/json');
        header('Content-Length: ' . strlen($cacheFileContent));
        echo $cacheFileContent;
        eZExecution::cleanExit();
        return;
    }
}
$node = eZContentObjectTreeNode::fetch($nodeID);
if (!$node) {
    header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
コード例 #19
0
    $cacheKeys1 = $cacheKeys1->templateValue();
}
while (is_object($cacheKeys1) and method_exists($cacheKeys1, 'templateValue')) {
    $cacheKeys1 = $cacheKeys1->templateValue();
}
$cacheKeys = array($cacheKeys1);
unset($cacheKeys1);
if (!isset($cacheKeys)) {
    $cacheKeys = NULL;
}
while (is_object($cacheKeys) and method_exists($cacheKeys, 'templateValue')) {
    $cacheKeys = $cacheKeys->templateValue();
}
$subtreeExpiry = NULL;
$cacheKeys = array($cacheKeys, "167_0_167_60_design/admin2/templates/pagelayout.tpl", "plain_site_admin");
list($cacheHandler_c3c40d995d916d4a4ed46470f59969cf, $contentData) = eZTemplateCacheBlock::retrieve($cacheKeys, $subtreeExpiry, 7200, false);
if (!$contentData instanceof eZClusterFileFailure) {
    $text .= $contentData;
    unset($contentData);
} else {
    unset($contentData);
    if (!isset($textStack)) {
        $textStack = array();
    }
    $textStack[] = $text;
    $text = '';
    $text .= '<div id="footer" class="float-break">
<div id="footer-design">
    ';
    $oldRestoreIncludeArray_a563820a83486fb492386216768520ab = isset($restoreIncludeArray) ? $restoreIncludeArray : array();
    $restoreIncludeArray = array();
コード例 #20
0
    $cacheKeys1 = $cacheKeys1->templateValue();
}
while (is_object($cacheKeys1) and method_exists($cacheKeys1, 'templateValue')) {
    $cacheKeys1 = $cacheKeys1->templateValue();
}
$cacheKeys = array($cacheKeys1);
unset($cacheKeys1);
if (!isset($cacheKeys)) {
    $cacheKeys = NULL;
}
while (is_object($cacheKeys) and method_exists($cacheKeys, 'templateValue')) {
    $cacheKeys = $cacheKeys->templateValue();
}
$subtreeExpiry = NULL;
$cacheKeys = array($cacheKeys, "1_0_1_48_design/standard/templates/dashboard/latest_content.tpl", "formation_admin");
list($cacheHandler_beaca3859df7c32ea32c68250e28c938, $contentData) = eZTemplateCacheBlock::retrieve($cacheKeys, $subtreeExpiry, 7200, true);
if (!$contentData instanceof eZClusterFileFailure) {
    $text .= $contentData;
    unset($contentData);
} else {
    unset($contentData);
    if (!isset($textStack)) {
        $textStack = array();
    }
    $textStack[] = $text;
    $text = '';
    // def $latest_content
    unset($var);
    unset($var1);
    unset($var1);
    $var1 = (array_key_exists($rootNamespace, $vars) and array_key_exists('block', $vars[$rootNamespace])) ? $vars[$rootNamespace]['block'] : null;
    $cacheKeys1 = $cacheKeys1->templateValue();
}
while (is_object($cacheKeys1) and method_exists($cacheKeys1, 'templateValue')) {
    $cacheKeys1 = $cacheKeys1->templateValue();
}
$cacheKeys = array($cacheKeys1);
unset($cacheKeys1);
if (!isset($cacheKeys)) {
    $cacheKeys = NULL;
}
while (is_object($cacheKeys) and method_exists($cacheKeys, 'templateValue')) {
    $cacheKeys = $cacheKeys->templateValue();
}
$subtreeExpiry = NULL;
$cacheKeys = array($cacheKeys, "191_0_191_60_design/admin/templates/pagelayout.tpl", "ezdemo_site_admin");
list($cacheHandler_10a9c53cafe0795b1211492fad2bd169, $contentData) = eZTemplateCacheBlock::retrieve($cacheKeys, $subtreeExpiry, 7200, false);
if (!$contentData instanceof eZClusterFileFailure) {
    $text .= $contentData;
    unset($contentData);
} else {
    unset($contentData);
    if (!isset($textStack)) {
        $textStack = array();
    }
    $textStack[] = $text;
    $text = '';
    $text .= '<div id="footer" class="float-break">
<div id="footer-design">
    ';
    $oldRestoreIncludeArray_08878c847c803a1c9136a2a5b2cf0fec = isset($restoreIncludeArray) ? $restoreIncludeArray : array();
    $restoreIncludeArray = array();