In theory it would have been possible that WCF has a package id different from the value "1", but there is no way to achieve this unless you're manually screwing things up. This is no longer supported and the whole system will fail if you go full retard.
<p class="marginTop" id="benchmark"><small>Execution time: {@$__wcf->getBenchmark()->getExecutionTime()}s ({#($__wcf->getBenchmark()->getExecutionTime()-$__wcf->getBenchmark()->getQueryExecutionTime())/$__wcf->getBenchmark()->getExecutionTime()*100}% PHP, {#$__wcf->getBenchmark()->getQueryExecutionTime()/$__wcf->getBenchmark()->getExecutionTime()*100}% SQL) | SQL queries: {#$__wcf->getBenchmark()->getQueryCount()} | Memory-Usage: {$__wcf->getBenchmark()->getMemoryUsage()}</small></p>
{if ENABLE_DEBUG_MODE}
+ <script type="text/javascript">
+ //<![CDATA[
+ $(function() {
+ $('#benchmarkDetails > li > span').click(function() {
+ $(this).parent().children('pre').toggle();
+ });
+ });
+ //]]>
+ </script>
<ul id="benchmarkDetails" style="display: none;">
- {foreach from=$__wcf->getBenchmark()->getItems() item=item}
- <li style="margin-bottom: 8px;"{if $item.use >= 0.01} class="hot"{/if}>{if $item.type == 1}(SQL Query) {/if}{$item.text}<br /><small style="font-size: .85em">Execution time: {@$item.use}s</small></li>
+ {foreach from=$__wcf->getBenchmark()->getItems() key=benchmarkIndex item=item}
+ <li id="benchmarkItem{@$benchmarkIndex}" style="margin-bottom: 8px;"{if $item.use >= 0.01} class="hot"{/if}>
+ <span>{if $item.type == 1}(SQL Query) {/if}{$item.text}</span><br />
+ <small style="font-size: .85em">Execution time: {@$item.use}s</small>
+
+ <pre style="display: none">{foreach from=$item.trace key=traceNo item=traceItem}#{#$traceNo} {if !$traceItem.class|empty}{$traceItem.class}{$traceItem.type}{else}{if !$traceItem.file|empty}{$traceItem.file}: {/if}{/if}{$traceItem.function}() {if !$traceItem.line|empty}(line {#$traceItem.line}){/if}
+{/foreach}</pre>
+
+ </li>
{/foreach}
</ul>
* @see wcf\page\IPage::show()
*/
public function show() {
- $wcfPackageID = WCFACP::getWcfPackageID();
// check package installation queue
- if ($wcfPackageID == 0) {
+ if ($this->action == 'WCFSetup') {
$queueID = PackageInstallationDispatcher::checkPackageInstallationQueue();
if ($queueID) {
protected function initPackage() {
// define active package id
if (!defined('PACKAGE_ID')) {
- $packageID = self::getWcfPackageID();
- define('PACKAGE_ID', $packageID);
+ define('PACKAGE_ID', 1);
}
}
- /**
- * Returns the package id of the wcf package.
- *
- * @return integer
- */
- public static final function getWcfPackageID() {
- // try to find package wcf id
- $sql = "SELECT packageID
- FROM wcf".WCF_N."_package
- WHERE package = 'com.woltlab.wcf'";
- $statement = WCFACP::getDB()->prepareStatement($sql);
- $statement->execute();
- $package = $statement->fetchArray();
-
- if (!$package) return 0;
- else return $package['packageID'];
- }
-
/**
* Returns a list of all installed applications packages.
*
if (!empty($row['sessionLogID'])) {
$sessionLogID = $row['sessionLogID'];
- $sessionLogEditor = new ACPSessionLogEditor(new ACPSessionLog($sessionLogID));
+ $sessionLogEditor = new ACPSessionLogEditor(new ACPSessionLog(null, array('sessionLogID' => $sessionLogID)));
$sessionLogEditor->update(array(
'lastActivityTime' => TIME_NOW
));
<form method="get" action="{@RELATIVE_WCF_DIR}acp/index.php">
<div class="wcf-formSubmit">
{@SID_INPUT_TAG}
+ <input type="hidden" name="action" value="WCFSetup" />
</div>
</form>