]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
fixed bug with setting initial version
authorCash Costello <cash.costello@gmail.com>
Sat, 30 Oct 2010 01:34:33 +0000 (01:34 +0000)
committerCash Costello <cash.costello@gmail.com>
Sat, 30 Oct 2010 01:34:33 +0000 (01:34 +0000)
views/default/tidypics/admin/upgrade.php

index 3450bd7db3298cff4567d80fb1c589925b12be08..fd324b2d9a9902c8cbfe239fb92d475e68b6c465 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
+// sets $version based on code
 require_once "{$CONFIG->pluginspath}tidypics/version.php";
 
 $upgrade_url = "{$vars['url']}action/tidypics/admin/upgrade";
@@ -11,7 +12,8 @@ if ($local_version === FALSE) {
        if (!get_subtype_class('object', 'image') || !get_subtype_class('object', 'album')) {
                $local_version = 0;
        } else {
-               set_plugin_setting('version', $local_version, 'tidypics');
+               // set initial version for new install
+               set_plugin_setting('version', $version, 'tidypics');
                $local_version = $version;
        }
 } elseif ($local_version == '1.62') {
@@ -27,4 +29,4 @@ if ($local_version == $version) {
 echo elgg_view('output/url', array(    'text' => 'Upgrade',
                                                                        'href' => $upgrade_url,
                                                                        'is_action' => TRUE));
-echo '<br />';
\ No newline at end of file
+echo '<br />';