diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-11-15 16:22:26 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-11-15 16:22:26 -0500 |
commit | 0da284dec075c8fb1fa9c78289e336132f348882 (patch) | |
tree | a4812fc3607ab113c5de68048b4c20a2b58e2c8c | |
parent | 445148827d8f0d144085a19bcb47bc84d0c8b599 (diff) | |
download | themesite-0da284dec075c8fb1fa9c78289e336132f348882.tar.gz themesite-0da284dec075c8fb1fa9c78289e336132f348882.zip |
checkwps: Only check _new_ themes against the last release
For the nightly/post-build stuff, only check the latest wps builds.
-rwxr-xr-x | private/runcheckwps.php | 2 | ||||
-rw-r--r-- | private/themesite.class.php | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/private/runcheckwps.php b/private/runcheckwps.php index 8908e67..627a23e 100755 --- a/private/runcheckwps.php +++ b/private/runcheckwps.php @@ -8,5 +8,5 @@ class preconfig { } require_once('preamble.inc.php'); -$results = $site->checkallthemes(); +$results = $site->checkallthemes(0, 0); // change the second '0' to '1' to check release too ?> diff --git a/private/themesite.class.php b/private/themesite.class.php index 8e6bc6d..8acfaf5 100644 --- a/private/themesite.class.php +++ b/private/themesite.class.php @@ -96,7 +96,7 @@ class themesite { /* * Run checkwps on all our themes */ - public function checkallthemes($id = 0) { + public function checkallthemes($id = 0, $release = 0) { $this->log('Running checkwps'); $sql = 'SELECT * FROM themes WHERE themeid=:id OR (:wmtf AND approved > 0)'; $args = array(':id' => $id, ':wmtf' => $id === 0 ? 1 : 0); @@ -110,7 +110,7 @@ class themesite { $theme['shortname'], $theme['zipfile'] ); - $result = $this->checkwps($zipfile, $theme['mainlcd'], $theme['remotelcd']); + $result = $this->checkwps($zipfile, $theme['mainlcd'], $theme['remotelcd'], $release); /* * Store the results and check if at least one check passed (for @@ -626,7 +626,7 @@ END; $mainlcd, $shortname ); - + /* Prepend wps- and menu- to screenshots */ $sshot_wps['name'] = empty($sshot_wps['name']) ? '' : 'wps-'.$sshot_wps['name']; $sshot_menu['name'] = empty($sshot_menu['name']) ? '' : 'menu-'.$sshot_menu['name']; @@ -680,7 +680,7 @@ END; ); $result = $this->db->query($sql, $args); $id = $result->insertid(); - $this->checkallthemes($id); + $this->checkallthemes($id, 1); // We want to check it against stable! $this->log(sprintf("Added theme %d (email: %s)", $id, $email)); return $id; } @@ -834,7 +834,7 @@ END; /* * Check a WPS against two revisions: current and the latest release */ - public function checkwps($zipfile, $mainlcd, $remotelcd) { + public function checkwps($zipfile, $mainlcd, $remotelcd, $release = 0) { $return = array(); /* First, create a temporary dir */ @@ -859,6 +859,9 @@ END; while($target = $targets->next()){ /* for both versions */ foreach(array('release', 'current') as $version) { + if ($release == 0 && $version == 'release') { + continue; + } /* for every skin file in the theme */ foreach(glob('.rockbox/wps/*{wps,sbs,fms}',GLOB_BRACE) as $file) { $p = $this->my_pathinfo($file); |