static function allUpdate() { if (!Usr()->superuser) { return false; } qgEntry_module::updateAuto(); return 1; }
<?php if (isset($_GET['settings'])) { include $Cont->modPath . 'parts/settings.php'; return; } qgEntry_module::sync(); ?> <div> <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 <th style="width:10px"> <th style="width:45px; text-align:center">Access <th style="width:20px"> <th style="width:60px"> <th style="width:20px"> <th style="width:20px">
static function updateAuto() { qgEntry_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(); } } /* zzz foreach (self::all() as $E) { $limit = G()->SET['qg']['module']['beta']->v ? 3 : 2; if ($E->local_version && versionCompare($E->local_version, $E->server_version, $limit)) { $E->update(); } } */ }
<?php foreach (qgEntry_module::all() as $name => $M) { ?> <?php $search = isset($vars['search']) ? $vars['search'] : ''; if (!preg_match('/(^|\\.)' . preg_quote($search, '/') . '/', $name)) { continue; } if (!isset($vars['installed'])) { $vars['installed'] = true; } if ($vars['installed'] && !$M->local_time) { continue; } else { if (!$vars['installed'] && $M->local_time) { continue; } } ?> <tr> <td> <?php echo $name; ?> <td> <?php $num = D()->one("SELECT count(*) FROM page WHERE module = " . D()->quote($name)); if ($num || preg_match('/^cms\\.(backend|cont|layout)/', $name)) { echo $num; }