本文整理汇总了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;
}