diff options
-rw-r--r-- | Bugzilla/Install/Filesystem.pm | 17 | ||||
-rw-r--r-- | docs/en/rst/conf.py | 4 | ||||
-rw-r--r-- | docs/en/rst/installing/migrating.rst | 3 | ||||
-rw-r--r-- | docs/en/rst/integrating/extensions.rst | 8 |
4 files changed, 15 insertions, 17 deletions
diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm index 4f133d865..43512e79c 100644 --- a/Bugzilla/Install/Filesystem.pm +++ b/Bugzilla/Install/Filesystem.pm @@ -782,22 +782,21 @@ sub _update_old_charts { # to product IDs. sub _update_old_mining_filenames { my ($miningdir) = @_; + my $dbh = Bugzilla->dbh; my @conversion_errors; - require Bugzilla::Product; - # We use a dummy product instance with ID 0, representing all products my $product_all = {id => 0, name => '-All-'}; - bless($product_all, 'Bugzilla::Product'); print "Updating old charting data file names..."; - my @products = Bugzilla::Product->get_all(); + my @products = @{ $dbh->selectall_arrayref('SELECT id, name FROM products + ORDER BY name', {Slice=>{}}) }; push(@products, $product_all); foreach my $product (@products) { - if (-e File::Spec->catfile($miningdir, $product->id)) { + if (-e File::Spec->catfile($miningdir, $product->{id})) { push(@conversion_errors, { product => $product, - message => 'A file named "' . $product->id . + message => 'A file named "' . $product->{id} . '" already exists.' }); } } @@ -805,8 +804,8 @@ sub _update_old_mining_filenames { if (! @conversion_errors) { # Renaming mining files should work now without a hitch. foreach my $product (@products) { - if (! rename(File::Spec->catfile($miningdir, $product->name), - File::Spec->catfile($miningdir, $product->id))) { + if (! rename(File::Spec->catfile($miningdir, $product->{name}), + File::Spec->catfile($miningdir, $product->{id}))) { push(@conversion_errors, { product => $product, message => $! }); @@ -822,7 +821,7 @@ sub _update_old_mining_filenames { print " FAILED:\n"; foreach my $error (@conversion_errors) { printf "Cannot rename charting data file for product %d (%s): %s\n", - $error->{product}->id, $error->{product}->name, + $error->{product}->{id}, $error->{product}->{name}, $error->{message}; } print "You need to empty the \"$miningdir\" directory, then run\n", diff --git a/docs/en/rst/conf.py b/docs/en/rst/conf.py index a758fd248..34acb4778 100644 --- a/docs/en/rst/conf.py +++ b/docs/en/rst/conf.py @@ -44,7 +44,7 @@ master_doc = 'index' # General information about the project. project = u'Bugzilla' -copyright = u'2014, The Bugzilla Team' +copyright = u'2016, The Bugzilla Team' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -387,7 +387,7 @@ todo_include_todos = False on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if on_rtd: - base_api_url = 'https://www.bugzilla.org/docs/5.0/en/html/api/' + base_api_url = 'https://www.bugzilla.org/docs/5.0/en/html/integrating/api/' else: base_api_url = '../integrating/api/' diff --git a/docs/en/rst/installing/migrating.rst b/docs/en/rst/installing/migrating.rst index 5b842dd3d..8fc0de5f4 100644 --- a/docs/en/rst/installing/migrating.rst +++ b/docs/en/rst/installing/migrating.rst @@ -4,8 +4,7 @@ Migrating From Other Bug-Tracking Systems ######################################### Bugzilla has a framework you can use for migrating from other bug-tracking -systems - -`Bugzilla::Migrate <http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/Migrate.html>`_. +systems - :api:`Bugzilla::Migrate <Bugzilla/Migrate.html>`. It provides the infrastructure you will need, but requires a module to be written to define the specifics of the system you are coming from. One exists for diff --git a/docs/en/rst/integrating/extensions.rst b/docs/en/rst/integrating/extensions.rst index 18c5341d3..6a3fd8d3f 100644 --- a/docs/en/rst/integrating/extensions.rst +++ b/docs/en/rst/integrating/extensions.rst @@ -11,8 +11,8 @@ versions of Bugzilla with minimal effort. We maintain a written by other people on our wiki. You would need to make sure that the extension in question works with your version of Bugzilla. -Or, you can write your own extension. See the `Bugzilla Extension -documentation <http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/Extension.html>`_ +Or, you can write your own extension. See the :api:`Bugzilla Extension +documentation <Bugzilla/Extension.html>` for the core documentation on how to do that. It would make sense to read the section on :ref:`templates`. There is also a sample extension in :file:`$BUGZILLA_HOME/extensions/Example/` which gives examples of how to @@ -183,8 +183,8 @@ bugs, except to comment and add themselves to the CC list. Because this kind of change is such a common request, we have added a specific hook for it that :ref:`extensions` can call. It's called -``bug_check_can_change_field``, and it's documented `in the Hooks -documentation <http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/Hook.html#bug_check_can_change_field>`_. +``bug_check_can_change_field``, and it's documented :api:`in the Hooks +documentation <Bugzilla/Hook.html#bug_check_can_change_field>`. Checking Syntax =============== |