]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/app/phpBB.py
Fix missing meta variable for < Wordpress 3.0.
[wizard.git] / wizard / app / phpBB.py
index 49fbf4f2d09c0ab72280f91e2d17cbcedd33c923..c8fa1f591d9bb4627e55a4e094e7b1132213ecc6 100644 (file)
@@ -1,8 +1,9 @@
 import shutil
 import logging
 import os.path
+import distutils.version
 
-from wizard import app, install, resolve, util
+from wizard import app, install, resolve, sql, util
 from wizard.app import php
 
 #phpBB                104 installs
@@ -33,13 +34,14 @@ class Application(app.Application):
         return os.path.getsize('config.php')
 
     def detectVersion(self, deployment):
-        version = self.detectVersionFromFile('install/database_update.php', php.re_var('updates_to_version'))
+        version = str(self.detectVersionFromFile('install/update_to_latest.php', php.re_var('updates_to_version')))
         if version.startswith('.'): # blehh, but phpBB2 uses '.0.19'...
             version = '2' + version
-        return version
+        return distutils.version.LooseVersion(version)
 
+    @app.throws_database_errors
     def remove(self, deployment, options):
-        app.remove_database(deployment)
+        sql.drop(deployment.dsn)
 
     def install(self, version, options):
         old_mode = os.stat(".").st_mode
@@ -72,6 +74,10 @@ class Application(app.Application):
         logging.debug('install.php output:\n\n' + result)
         if 'Thank you' not in result:
             raise app.InstallFailure()
+        # Removing these trees will make upgrade merges annoying.  Maybe
+        # we should patch out the check and stick .htaccess files which
+        # block access for these folders (we'd probably have to make it
+        # available again for an upgrade though)
         #shutil.rmtree('install')
         #shutil.rmtree('contrib')