static function allUpdate() { dbEntry_module::updateAuto(); return 1; }
<?php namespace qg; foreach (dbEntry_module::all() as $M) { $search = isset($vars['search']) ? $vars['search'] : ''; if (!preg_match('/(^|\\.)' . preg_quote($search, '/') . '/', $M->name)) { continue; } if (!isset($vars['installed'])) { $vars['installed'] = true; } if ($vars['installed'] && !$M->local_time) { continue; } if (!$vars['installed'] && $M->local_time) { continue; } ?> <tr> <td> <a href="<?php echo Url()->addParam('settings', $M->name); ?> "> <?php echo $M->name; ?> <?php if (G()->SET->has($M->name) || G()->SET['m']->has($M->name)) { ?>
static function updateAuto() { dbEntry_module::sync(); foreach (qg::$modules as $name => $egal) { // qg::$modules depency order is better then self::all() $E = D()->module->Entry(D()->row("SELECT * FROM module WHERE name = " . D()->quote($name))); $limit = G()->SET['qg']['module']['beta']->v ? 3 : 2; if ($E->local_version && versionCompare($E->local_version, $E->server_version, $limit)) { $E->update(); } } }
<?php namespace qg; ?> <div> <?php if (isset($_GET['settings'])) { include $Cont->modPath . 'parts/settings.php'; return; } dbEntry_module::sync(); ?> <h1>Module</h1> <div class=be_contentTextBox> <div style="margin-bottom:10px"> <button class=btnUpdateAll style="float:right">Alle updaten</button> <form id=searchForm> <input type=search placeholder="<?php echo L('suchen'); ?> ..." name=search style="width:300px" autofocus> <label><input type=checkbox name=installed checked> Installiert?</label> </form> </div> <table class="c1-style c1-scrollable"> <thead> <tr> <th style="width:250px">Name