本文整理匯總了PHP中module_config::current_version方法的典型用法代碼示例。如果您正苦於以下問題:PHP module_config::current_version方法的具體用法?PHP module_config::current_version怎麽用?PHP module_config::current_version使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類module_config
的用法示例。
在下文中一共展示了module_config::current_version方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: date
</div> <!-- end .content -->
</div>
<!-- /#wrap -->
<div id="footer">
<p>© <?php
echo module_config::s('admin_system_name', 'Ultimate Client Manager');
?>
- <?php
echo date("Y");
?>
- Version: <?php
echo module_config::current_version();
?>
- Time: <?php
echo round(microtime(true) - $start_time, 5);
?>
</p>
</div>
</body>
</html>
<?php
break;
}
示例2: _e
<?php
if (isset($setup_upgrade_hack)) {
?>
<input type="button" name="go" value="<?php
_e('Continue');
?>
" class="submit_button"
onclick="window.location.href='?m=setup&step=4';">
<?php
}
}
}
} else {
if (isset($_REQUEST['run_upgrade'])) {
// runs the manual update button
$new_system_version = module_config::current_version();
$fail = false;
$set_versions = array();
foreach ($plugins as $plugin_name => $p) {
if (!$p->is_plugin_enabled()) {
$p->init();
}
echo "Checking plugin: <span style='text-decoration:underline;'>{$plugin_name}</span> - Current Version: " . $p->get_plugin_version() . ".... ";
if ($version = $p->install_upgrade()) {
echo '<span class="success_text">all good</span>';
$set_versions[$plugin_name] = $version;
$new_system_version = max($version, $new_system_version);
} else {
$fail = true;
echo '<span class="error_text">failed</span> ';
}
示例3: complete_plugin_installation
public function complete_plugin_installation($plugin_name)
{
global $plugins;
$result = array('message' => '');
$new_system_version = module_config::current_version();
$fail = false;
if (isset($plugins[$plugin_name])) {
$result['message'] .= "Processing update: <span style='text-decoration:underline;'>" . $plugin_name . "</span> - Current Version: " . $plugins[$plugin_name]->get_plugin_version() . ".... ";
ob_start();
if ($version = $plugins[$plugin_name]->install_upgrade()) {
$result['message'] .= '<span class="success_text">all good</span>';
$new_system_version = max($version, $new_system_version);
$plugins[$plugin_name]->init();
// lol typo - oh well.
$plugins[$plugin_name]->set_insatlled_plugin_version($version);
} else {
$fail = true;
$result['message'] .= '<span class="error_text">failed</span> ';
}
$result['message'] .= ob_get_clean() . '<br/>';
$result['message'] .= '<br/>';
if ($fail) {
$result['message'] .= _('Some things failed. Please go back and try again.');
} else {
$result['message'] .= '<strong>' . _l('Success! Everything worked.') . '</strong>';
module_config::set_system_version($new_system_version);
module_config::save_config('last_update', time());
}
if (isset($_SESSION['_message']) && count($_SESSION['_message'])) {
$result['message'] .= '<br/>';
$result['message'] .= implode('<br/>', $_SESSION['_message']);
unset($_SESSION['_errors']);
}
if (isset($_SESSION['_errors']) && count($_SESSION['_errors'])) {
$result['message'] .= '<br/>';
$result['message'] .= implode('<br/>', $_SESSION['_errors']);
unset($_SESSION['_errors']);
}
} else {
if ($plugin_name == 'corefiles' || $plugin_name == 'database') {
} else {
$fail = true;
}
}
// hack to clear db field cache:
module_cache::clear('db');
if (!$fail) {
$result['success'] = 1;
}
return $result;
}