r1348 + removed debug lines
authorDenis Ovsienko <infrastation@yandex.ru>
Wed, 5 Dec 2007 12:36:46 +0000 (12:36 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Wed, 5 Dec 2007 12:36:46 +0000 (12:36 +0000)
+ don't forget to update DB_VERSION
+ produce correct $root

upgrade.php

index 9fcba0e5c1e08371bbf87e615f5abc1fa98b7041..943b2340c85b5d1ce71b2fe77ebcc8dea8522168 100644 (file)
@@ -157,7 +157,6 @@ echo '<pre>';
                        $chaplist = array();
                        while ($row = $r2->fetch (PDO::FETCH_NUM))
                                $chaplist[] = $row[0];
-print_r ($chaplist);
                        $r2->closeCursor();
                        unset ($r2);
 
@@ -319,7 +318,6 @@ print_r ($chaplist);
                        $query[] = "delete from AttributeMap";
                        foreach ($new_dict as $chapter_no => $words)
                        {
-echo "Processing chapter ${chapter_no}\n";
                                foreach ($words as $oldkey => $data)
                                {
                                        $value = $data['value'];
@@ -545,7 +543,7 @@ echo '</pre>';
                        // leaving messed values.
                        $query[] = "update Config set varvalue = '24' where varname = 'default_port_type' limit 1";
                        // We are done.
-#                      $query[] = "update Config set varvalue = '0.14.7' where varname = 'DB_VERSION'";
+                       $query[] = "update Config set varvalue = '0.14.7' where varname = 'DB_VERSION'";
                        break; // --------------------------------------------
                default:
                        showError ("executeUpgradeBatch () failed, because batch '${batchid}' isn't defined");
@@ -597,7 +595,9 @@ echo '</pre>';
 $root = (empty($_SERVER['HTTPS'])?'http':'https').
        '://'.
        (isset($_SERVER['HTTP_HOST'])?$_SERVER['HTTP_HOST']:($_SERVER['SERVER_NAME'].($_SERVER['SERVER_PORT']=='80'?'':$_SERVER['SERVER_PORT']))).
-       dirname($_SERVER['PHP_SELF']).'/';
+       dirname($_SERVER['PHP_SELF']);
+if (substr ($root, -1) != '/')
+       $root .= '/';
 
 // The below will be necessary as long as we rely on showError()
 require_once 'inc/interface.php';