diff options
author | cdolivei.bugzilla@gmail.com <cdolivei.bugzilla@gmail.com@4eb1ac78-321c-0410-a911-ec516a8615a5> | 2009-02-02 14:55:35 (GMT) |
---|---|---|
committer | cdolivei.bugzilla@gmail.com <cdolivei.bugzilla@gmail.com@4eb1ac78-321c-0410-a911-ec516a8615a5> | 2009-02-02 14:55:35 (GMT) |
commit | 6a172957a03664617a04fb53a778266407228385 (patch) | |
tree | 67e37a2141e9462af05879a487ddc8f00b136a57 | |
parent | ce5cb43664ae9c5837545612eda3002b5d3155c2 (diff) |
xpi diff tool only shows a line number (bug 472276, r=wenzel)
git-svn-id: http://svn.mozilla.org/addons/trunk@21896 4eb1ac78-321c-0410-a911-ec516a8615a5
-rw-r--r-- | site/app/controllers/files_controller.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/site/app/controllers/files_controller.php b/site/app/controllers/files_controller.php index f1cf5c4..837779c 100644 --- a/site/app/controllers/files_controller.php +++ b/site/app/controllers/files_controller.php @@ -196,7 +196,7 @@ class FilesController extends AppController if (!empty($_GET['compare'])) { $public_path = REPO_PATH.'/'.$this->Addon->id.'/'.$public_file['File'][0]['filename']; $sandbox_path = REPO_PATH.'/'.$this->Addon->id.'/'.$sandbox_file['File']['filename']; - $this->_compare($sandbox_path, $public_path, $_GET['compare']); + $this->_compare($sandbox_path, $public_path, html_entity_decode($_GET['compare'], ENT_QUOTES, 'UTF-8')); return; } @@ -277,6 +277,11 @@ class FilesController extends AppController $public_contents = $this->_get_contents($public_path, $file); $diff = ""; + if ($sandbox_contents === false) { + $this->flash('Something went horribly wrong! Please file a bug mentioning the addon you were trying to diff', "/"); + return; + } + if (!defined("DIFF_PATH")) { $diff = xdiff_string_diff($public_contents, $sandbox_contents); $diff = split("[\n]", $diff); |