Merge branch 'diff' of git://github.com/younes0/BookStack into younes0-diff
Showing
6 changed files
with
219 additions
and
54 deletions
| ... | @@ -12,6 +12,7 @@ use BookStack\Repos\ChapterRepo; | ... | @@ -12,6 +12,7 @@ use BookStack\Repos\ChapterRepo; |
| 12 | use BookStack\Repos\PageRepo; | 12 | use BookStack\Repos\PageRepo; |
| 13 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | 13 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
| 14 | use Views; | 14 | use Views; |
| 15 | +use GatherContent\Htmldiff\Htmldiff; | ||
| 15 | 16 | ||
| 16 | class PageController extends Controller | 17 | class PageController extends Controller |
| 17 | { | 18 | { |
| ... | @@ -335,9 +336,18 @@ class PageController extends Controller | ... | @@ -335,9 +336,18 @@ class PageController extends Controller |
| 335 | $book = $this->bookRepo->getBySlug($bookSlug); | 336 | $book = $this->bookRepo->getBySlug($bookSlug); |
| 336 | $page = $this->pageRepo->getBySlug($pageSlug, $book->id); | 337 | $page = $this->pageRepo->getBySlug($pageSlug, $book->id); |
| 337 | $revision = $this->pageRepo->getRevisionById($revisionId); | 338 | $revision = $this->pageRepo->getRevisionById($revisionId); |
| 339 | + | ||
| 340 | + $next = $revision->getNext() ?: $page; | ||
| 341 | + $diff = (new Htmldiff)->diff($revision->html, $next->html); | ||
| 342 | + | ||
| 338 | $page->fill($revision->toArray()); | 343 | $page->fill($revision->toArray()); |
| 339 | $this->setPageTitle('Page Revision For ' . $page->getShortName()); | 344 | $this->setPageTitle('Page Revision For ' . $page->getShortName()); |
| 340 | - return view('pages/revision', ['page' => $page, 'book' => $book]); | 345 | + |
| 346 | + return view('pages/revision', [ | ||
| 347 | + 'page' => $page, | ||
| 348 | + 'book' => $book, | ||
| 349 | + 'diff' => $diff, | ||
| 350 | + ]); | ||
| 341 | } | 351 | } |
| 342 | 352 | ||
| 343 | /** | 353 | /** | ... | ... |
| ... | @@ -32,4 +32,25 @@ class PageRevision extends Model | ... | @@ -32,4 +32,25 @@ class PageRevision extends Model |
| 32 | return $this->page->getUrl() . '/revisions/' . $this->id; | 32 | return $this->page->getUrl() . '/revisions/' . $this->id; |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | + /** | ||
| 36 | + * Get previous revision | ||
| 37 | + * @return \BookStack\PageRevision | ||
| 38 | + */ | ||
| 39 | + public function getPrevious() | ||
| 40 | + { | ||
| 41 | + if ($id = PageRevision::where('id', '<', $this->id)->max('id')) { | ||
| 42 | + return PageRevision::find($id); | ||
| 43 | + } | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * Get next revision | ||
| 48 | + * @return \BookStack\PageRevision | ||
| 49 | + */ | ||
| 50 | + public function getNext() | ||
| 51 | + { | ||
| 52 | + if ($id = PageRevision::where('id', '>', $this->id)->min('id')) { | ||
| 53 | + return PageRevision::find($id); | ||
| 54 | + } | ||
| 55 | + } | ||
| 35 | } | 56 | } | ... | ... |
| ... | @@ -7,13 +7,15 @@ | ... | @@ -7,13 +7,15 @@ |
| 7 | "require": { | 7 | "require": { |
| 8 | "php": ">=5.6.4", | 8 | "php": ">=5.6.4", |
| 9 | "laravel/framework": "^5.3.4", | 9 | "laravel/framework": "^5.3.4", |
| 10 | + "ext-tidy": "*", | ||
| 10 | "intervention/image": "^2.3", | 11 | "intervention/image": "^2.3", |
| 11 | "laravel/socialite": "^2.0", | 12 | "laravel/socialite": "^2.0", |
| 12 | "barryvdh/laravel-ide-helper": "^2.1", | 13 | "barryvdh/laravel-ide-helper": "^2.1", |
| 13 | "barryvdh/laravel-debugbar": "^2.2.3", | 14 | "barryvdh/laravel-debugbar": "^2.2.3", |
| 14 | "league/flysystem-aws-s3-v3": "^1.0", | 15 | "league/flysystem-aws-s3-v3": "^1.0", |
| 15 | "barryvdh/laravel-dompdf": "^0.7", | 16 | "barryvdh/laravel-dompdf": "^0.7", |
| 16 | - "predis/predis": "^1.1" | 17 | + "predis/predis": "^1.1", |
| 18 | + "gathercontent/htmldiff": "^0.2.1" | ||
| 17 | }, | 19 | }, |
| 18 | "require-dev": { | 20 | "require-dev": { |
| 19 | "fzaninotto/faker": "~1.4", | 21 | "fzaninotto/faker": "~1.4", | ... | ... |
| ... | @@ -4,21 +4,21 @@ | ... | @@ -4,21 +4,21 @@ |
| 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", | 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", |
| 5 | "This file is @generated automatically" | 5 | "This file is @generated automatically" |
| 6 | ], | 6 | ], |
| 7 | - "hash": "c90a6e41767306ceb3b8cedb91468390", | 7 | + "hash": "3124d900cfe857392a94de479f3ff6d4", |
| 8 | - "content-hash": "3b5d2d6b77fbe71101e7e8eaff0754fe", | 8 | + "content-hash": "a968767a73f77e66e865c276cf76eedf", |
| 9 | "packages": [ | 9 | "packages": [ |
| 10 | { | 10 | { |
| 11 | "name": "aws/aws-sdk-php", | 11 | "name": "aws/aws-sdk-php", |
| 12 | - "version": "3.19.6", | 12 | + "version": "3.19.11", |
| 13 | "source": { | 13 | "source": { |
| 14 | "type": "git", | 14 | "type": "git", |
| 15 | "url": "https://github.com/aws/aws-sdk-php.git", | 15 | "url": "https://github.com/aws/aws-sdk-php.git", |
| 16 | - "reference": "34060bf0db260031697b17dbb37fa1bbec92f1c4" | 16 | + "reference": "19bac3bdd7988cbf7f89d5ce8e2748d774e2cde8" |
| 17 | }, | 17 | }, |
| 18 | "dist": { | 18 | "dist": { |
| 19 | "type": "zip", | 19 | "type": "zip", |
| 20 | - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/34060bf0db260031697b17dbb37fa1bbec92f1c4", | 20 | + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/19bac3bdd7988cbf7f89d5ce8e2748d774e2cde8", |
| 21 | - "reference": "34060bf0db260031697b17dbb37fa1bbec92f1c4", | 21 | + "reference": "19bac3bdd7988cbf7f89d5ce8e2748d774e2cde8", |
| 22 | "shasum": "" | 22 | "shasum": "" |
| 23 | }, | 23 | }, |
| 24 | "require": { | 24 | "require": { |
| ... | @@ -85,32 +85,32 @@ | ... | @@ -85,32 +85,32 @@ |
| 85 | "s3", | 85 | "s3", |
| 86 | "sdk" | 86 | "sdk" |
| 87 | ], | 87 | ], |
| 88 | - "time": "2016-09-08 20:27:15" | 88 | + "time": "2016-09-27 19:38:36" |
| 89 | }, | 89 | }, |
| 90 | { | 90 | { |
| 91 | "name": "barryvdh/laravel-debugbar", | 91 | "name": "barryvdh/laravel-debugbar", |
| 92 | - "version": "V2.2.3", | 92 | + "version": "v2.3.0", |
| 93 | "source": { | 93 | "source": { |
| 94 | "type": "git", | 94 | "type": "git", |
| 95 | "url": "https://github.com/barryvdh/laravel-debugbar.git", | 95 | "url": "https://github.com/barryvdh/laravel-debugbar.git", |
| 96 | - "reference": "ecd1ce5c4a827e2f6a8fb41bcf67713beb1c1cbd" | 96 | + "reference": "0c87981df959c7c1943abe227baf607c92f204f9" |
| 97 | }, | 97 | }, |
| 98 | "dist": { | 98 | "dist": { |
| 99 | "type": "zip", | 99 | "type": "zip", |
| 100 | - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/ecd1ce5c4a827e2f6a8fb41bcf67713beb1c1cbd", | 100 | + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/0c87981df959c7c1943abe227baf607c92f204f9", |
| 101 | - "reference": "ecd1ce5c4a827e2f6a8fb41bcf67713beb1c1cbd", | 101 | + "reference": "0c87981df959c7c1943abe227baf607c92f204f9", |
| 102 | "shasum": "" | 102 | "shasum": "" |
| 103 | }, | 103 | }, |
| 104 | "require": { | 104 | "require": { |
| 105 | "illuminate/support": "5.1.*|5.2.*|5.3.*", | 105 | "illuminate/support": "5.1.*|5.2.*|5.3.*", |
| 106 | - "maximebf/debugbar": "~1.11.0|~1.12.0", | 106 | + "maximebf/debugbar": "~1.13.0", |
| 107 | "php": ">=5.5.9", | 107 | "php": ">=5.5.9", |
| 108 | "symfony/finder": "~2.7|~3.0" | 108 | "symfony/finder": "~2.7|~3.0" |
| 109 | }, | 109 | }, |
| 110 | "type": "library", | 110 | "type": "library", |
| 111 | "extra": { | 111 | "extra": { |
| 112 | "branch-alias": { | 112 | "branch-alias": { |
| 113 | - "dev-master": "2.2-dev" | 113 | + "dev-master": "2.3-dev" |
| 114 | } | 114 | } |
| 115 | }, | 115 | }, |
| 116 | "autoload": { | 116 | "autoload": { |
| ... | @@ -139,7 +139,7 @@ | ... | @@ -139,7 +139,7 @@ |
| 139 | "profiler", | 139 | "profiler", |
| 140 | "webprofiler" | 140 | "webprofiler" |
| 141 | ], | 141 | ], |
| 142 | - "time": "2016-07-29 15:00:36" | 142 | + "time": "2016-09-15 14:05:56" |
| 143 | }, | 143 | }, |
| 144 | { | 144 | { |
| 145 | "name": "barryvdh/laravel-dompdf", | 145 | "name": "barryvdh/laravel-dompdf", |
| ... | @@ -359,6 +359,57 @@ | ... | @@ -359,6 +359,57 @@ |
| 359 | "time": "2015-11-09 22:51:51" | 359 | "time": "2015-11-09 22:51:51" |
| 360 | }, | 360 | }, |
| 361 | { | 361 | { |
| 362 | + "name": "cogpowered/finediff", | ||
| 363 | + "version": "0.3.1", | ||
| 364 | + "source": { | ||
| 365 | + "type": "git", | ||
| 366 | + "url": "https://github.com/cogpowered/FineDiff.git", | ||
| 367 | + "reference": "339ddc8c3afb656efed4f2f0a80e5c3d026f8ea8" | ||
| 368 | + }, | ||
| 369 | + "dist": { | ||
| 370 | + "type": "zip", | ||
| 371 | + "url": "https://api.github.com/repos/cogpowered/FineDiff/zipball/339ddc8c3afb656efed4f2f0a80e5c3d026f8ea8", | ||
| 372 | + "reference": "339ddc8c3afb656efed4f2f0a80e5c3d026f8ea8", | ||
| 373 | + "shasum": "" | ||
| 374 | + }, | ||
| 375 | + "require": { | ||
| 376 | + "php": ">=5.3.0" | ||
| 377 | + }, | ||
| 378 | + "require-dev": { | ||
| 379 | + "mockery/mockery": "*", | ||
| 380 | + "phpunit/phpunit": "*" | ||
| 381 | + }, | ||
| 382 | + "type": "library", | ||
| 383 | + "autoload": { | ||
| 384 | + "psr-0": { | ||
| 385 | + "cogpowered\\FineDiff": "src/" | ||
| 386 | + } | ||
| 387 | + }, | ||
| 388 | + "notification-url": "https://packagist.org/downloads/", | ||
| 389 | + "license": [ | ||
| 390 | + "MIT" | ||
| 391 | + ], | ||
| 392 | + "authors": [ | ||
| 393 | + { | ||
| 394 | + "name": "Rob Crowe", | ||
| 395 | + "email": "rob@cogpowered.com" | ||
| 396 | + }, | ||
| 397 | + { | ||
| 398 | + "name": "Raymond Hill" | ||
| 399 | + } | ||
| 400 | + ], | ||
| 401 | + "description": "PHP implementation of a Fine granularity Diff engine", | ||
| 402 | + "homepage": "https://github.com/cogpowered/FineDiff", | ||
| 403 | + "keywords": [ | ||
| 404 | + "diff", | ||
| 405 | + "finediff", | ||
| 406 | + "opcode", | ||
| 407 | + "string", | ||
| 408 | + "text" | ||
| 409 | + ], | ||
| 410 | + "time": "2014-05-19 10:25:02" | ||
| 411 | + }, | ||
| 412 | + { | ||
| 362 | "name": "dnoegel/php-xdg-base-dir", | 413 | "name": "dnoegel/php-xdg-base-dir", |
| 363 | "version": "0.1", | 414 | "version": "0.1", |
| 364 | "source": { | 415 | "source": { |
| ... | @@ -520,6 +571,55 @@ | ... | @@ -520,6 +571,55 @@ |
| 520 | "time": "2016-05-11 00:36:29" | 571 | "time": "2016-05-11 00:36:29" |
| 521 | }, | 572 | }, |
| 522 | { | 573 | { |
| 574 | + "name": "gathercontent/htmldiff", | ||
| 575 | + "version": "0.2.1", | ||
| 576 | + "source": { | ||
| 577 | + "type": "git", | ||
| 578 | + "url": "https://github.com/gathercontent/htmldiff.git", | ||
| 579 | + "reference": "24674a62315f64330134b4a4c5b01a7b59193c93" | ||
| 580 | + }, | ||
| 581 | + "dist": { | ||
| 582 | + "type": "zip", | ||
| 583 | + "url": "https://api.github.com/repos/gathercontent/htmldiff/zipball/24674a62315f64330134b4a4c5b01a7b59193c93", | ||
| 584 | + "reference": "24674a62315f64330134b4a4c5b01a7b59193c93", | ||
| 585 | + "shasum": "" | ||
| 586 | + }, | ||
| 587 | + "require": { | ||
| 588 | + "cogpowered/finediff": "0.3.1", | ||
| 589 | + "ext-tidy": "*" | ||
| 590 | + }, | ||
| 591 | + "require-dev": { | ||
| 592 | + "phpunit/phpunit": "4.*", | ||
| 593 | + "squizlabs/php_codesniffer": "1.*" | ||
| 594 | + }, | ||
| 595 | + "type": "library", | ||
| 596 | + "autoload": { | ||
| 597 | + "psr-0": { | ||
| 598 | + "GatherContent\\Htmldiff": "src/" | ||
| 599 | + } | ||
| 600 | + }, | ||
| 601 | + "notification-url": "https://packagist.org/downloads/", | ||
| 602 | + "license": [ | ||
| 603 | + "MIT" | ||
| 604 | + ], | ||
| 605 | + "authors": [ | ||
| 606 | + { | ||
| 607 | + "name": "Andrew Cairns", | ||
| 608 | + "email": "andrew@gathercontent.com" | ||
| 609 | + }, | ||
| 610 | + { | ||
| 611 | + "name": "Mathew Chapman", | ||
| 612 | + "email": "mat@gathercontent.com" | ||
| 613 | + }, | ||
| 614 | + { | ||
| 615 | + "name": "Peter Legierski", | ||
| 616 | + "email": "peter@gathercontent.com" | ||
| 617 | + } | ||
| 618 | + ], | ||
| 619 | + "description": "Compare two HTML strings", | ||
| 620 | + "time": "2015-04-15 15:39:46" | ||
| 621 | + }, | ||
| 622 | + { | ||
| 523 | "name": "guzzlehttp/guzzle", | 623 | "name": "guzzlehttp/guzzle", |
| 524 | "version": "6.2.1", | 624 | "version": "6.2.1", |
| 525 | "source": { | 625 | "source": { |
| ... | @@ -899,16 +999,16 @@ | ... | @@ -899,16 +999,16 @@ |
| 899 | }, | 999 | }, |
| 900 | { | 1000 | { |
| 901 | "name": "laravel/framework", | 1001 | "name": "laravel/framework", |
| 902 | - "version": "v5.3.9", | 1002 | + "version": "v5.3.11", |
| 903 | "source": { | 1003 | "source": { |
| 904 | "type": "git", | 1004 | "type": "git", |
| 905 | "url": "https://github.com/laravel/framework.git", | 1005 | "url": "https://github.com/laravel/framework.git", |
| 906 | - "reference": "f6fbb481672f8dc4bc6882d5d654bbfa3588c8ec" | 1006 | + "reference": "ca48001b95a0543fb39fcd7219de960bbc03eaa5" |
| 907 | }, | 1007 | }, |
| 908 | "dist": { | 1008 | "dist": { |
| 909 | "type": "zip", | 1009 | "type": "zip", |
| 910 | - "url": "https://api.github.com/repos/laravel/framework/zipball/f6fbb481672f8dc4bc6882d5d654bbfa3588c8ec", | 1010 | + "url": "https://api.github.com/repos/laravel/framework/zipball/ca48001b95a0543fb39fcd7219de960bbc03eaa5", |
| 911 | - "reference": "f6fbb481672f8dc4bc6882d5d654bbfa3588c8ec", | 1011 | + "reference": "ca48001b95a0543fb39fcd7219de960bbc03eaa5", |
| 912 | "shasum": "" | 1012 | "shasum": "" |
| 913 | }, | 1013 | }, |
| 914 | "require": { | 1014 | "require": { |
| ... | @@ -956,6 +1056,7 @@ | ... | @@ -956,6 +1056,7 @@ |
| 956 | "illuminate/http": "self.version", | 1056 | "illuminate/http": "self.version", |
| 957 | "illuminate/log": "self.version", | 1057 | "illuminate/log": "self.version", |
| 958 | "illuminate/mail": "self.version", | 1058 | "illuminate/mail": "self.version", |
| 1059 | + "illuminate/notifications": "self.version", | ||
| 959 | "illuminate/pagination": "self.version", | 1060 | "illuminate/pagination": "self.version", |
| 960 | "illuminate/pipeline": "self.version", | 1061 | "illuminate/pipeline": "self.version", |
| 961 | "illuminate/queue": "self.version", | 1062 | "illuminate/queue": "self.version", |
| ... | @@ -1022,7 +1123,7 @@ | ... | @@ -1022,7 +1123,7 @@ |
| 1022 | "framework", | 1123 | "framework", |
| 1023 | "laravel" | 1124 | "laravel" |
| 1024 | ], | 1125 | ], |
| 1025 | - "time": "2016-09-12 14:08:29" | 1126 | + "time": "2016-09-28 02:15:37" |
| 1026 | }, | 1127 | }, |
| 1027 | { | 1128 | { |
| 1028 | "name": "laravel/socialite", | 1129 | "name": "laravel/socialite", |
| ... | @@ -1273,16 +1374,16 @@ | ... | @@ -1273,16 +1374,16 @@ |
| 1273 | }, | 1374 | }, |
| 1274 | { | 1375 | { |
| 1275 | "name": "maximebf/debugbar", | 1376 | "name": "maximebf/debugbar", |
| 1276 | - "version": "v1.12.0", | 1377 | + "version": "v1.13.0", |
| 1277 | "source": { | 1378 | "source": { |
| 1278 | "type": "git", | 1379 | "type": "git", |
| 1279 | "url": "https://github.com/maximebf/php-debugbar.git", | 1380 | "url": "https://github.com/maximebf/php-debugbar.git", |
| 1280 | - "reference": "e634fbd32cd6bc3fa0e8c972b52d4bf49bab3988" | 1381 | + "reference": "5f49a5ed6cfde81d31d89378806670d77462526e" |
| 1281 | }, | 1382 | }, |
| 1282 | "dist": { | 1383 | "dist": { |
| 1283 | "type": "zip", | 1384 | "type": "zip", |
| 1284 | - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/e634fbd32cd6bc3fa0e8c972b52d4bf49bab3988", | 1385 | + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/5f49a5ed6cfde81d31d89378806670d77462526e", |
| 1285 | - "reference": "e634fbd32cd6bc3fa0e8c972b52d4bf49bab3988", | 1386 | + "reference": "5f49a5ed6cfde81d31d89378806670d77462526e", |
| 1286 | "shasum": "" | 1387 | "shasum": "" |
| 1287 | }, | 1388 | }, |
| 1288 | "require": { | 1389 | "require": { |
| ... | @@ -1301,7 +1402,7 @@ | ... | @@ -1301,7 +1402,7 @@ |
| 1301 | "type": "library", | 1402 | "type": "library", |
| 1302 | "extra": { | 1403 | "extra": { |
| 1303 | "branch-alias": { | 1404 | "branch-alias": { |
| 1304 | - "dev-master": "1.12-dev" | 1405 | + "dev-master": "1.13-dev" |
| 1305 | } | 1406 | } |
| 1306 | }, | 1407 | }, |
| 1307 | "autoload": { | 1408 | "autoload": { |
| ... | @@ -1330,7 +1431,7 @@ | ... | @@ -1330,7 +1431,7 @@ |
| 1330 | "debug", | 1431 | "debug", |
| 1331 | "debugbar" | 1432 | "debugbar" |
| 1332 | ], | 1433 | ], |
| 1333 | - "time": "2016-05-15 13:11:34" | 1434 | + "time": "2016-09-15 14:01:59" |
| 1334 | }, | 1435 | }, |
| 1335 | { | 1436 | { |
| 1336 | "name": "monolog/monolog", | 1437 | "name": "monolog/monolog", |
| ... | @@ -1558,16 +1659,16 @@ | ... | @@ -1558,16 +1659,16 @@ |
| 1558 | }, | 1659 | }, |
| 1559 | { | 1660 | { |
| 1560 | "name": "nikic/php-parser", | 1661 | "name": "nikic/php-parser", |
| 1561 | - "version": "v2.1.0", | 1662 | + "version": "v2.1.1", |
| 1562 | "source": { | 1663 | "source": { |
| 1563 | "type": "git", | 1664 | "type": "git", |
| 1564 | "url": "https://github.com/nikic/PHP-Parser.git", | 1665 | "url": "https://github.com/nikic/PHP-Parser.git", |
| 1565 | - "reference": "47b254ea51f1d6d5dc04b9b299e88346bf2369e3" | 1666 | + "reference": "4dd659edadffdc2143e4753df655d866dbfeedf0" |
| 1566 | }, | 1667 | }, |
| 1567 | "dist": { | 1668 | "dist": { |
| 1568 | "type": "zip", | 1669 | "type": "zip", |
| 1569 | - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/47b254ea51f1d6d5dc04b9b299e88346bf2369e3", | 1670 | + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4dd659edadffdc2143e4753df655d866dbfeedf0", |
| 1570 | - "reference": "47b254ea51f1d6d5dc04b9b299e88346bf2369e3", | 1671 | + "reference": "4dd659edadffdc2143e4753df655d866dbfeedf0", |
| 1571 | "shasum": "" | 1672 | "shasum": "" |
| 1572 | }, | 1673 | }, |
| 1573 | "require": { | 1674 | "require": { |
| ... | @@ -1605,7 +1706,7 @@ | ... | @@ -1605,7 +1706,7 @@ |
| 1605 | "parser", | 1706 | "parser", |
| 1606 | "php" | 1707 | "php" |
| 1607 | ], | 1708 | ], |
| 1608 | - "time": "2016-04-19 13:41:41" | 1709 | + "time": "2016-09-16 12:04:44" |
| 1609 | }, | 1710 | }, |
| 1610 | { | 1711 | { |
| 1611 | "name": "paragonie/random_compat", | 1712 | "name": "paragonie/random_compat", |
| ... | @@ -1825,22 +1926,30 @@ | ... | @@ -1825,22 +1926,30 @@ |
| 1825 | }, | 1926 | }, |
| 1826 | { | 1927 | { |
| 1827 | "name": "psr/log", | 1928 | "name": "psr/log", |
| 1828 | - "version": "1.0.0", | 1929 | + "version": "1.0.1", |
| 1829 | "source": { | 1930 | "source": { |
| 1830 | "type": "git", | 1931 | "type": "git", |
| 1831 | "url": "https://github.com/php-fig/log.git", | 1932 | "url": "https://github.com/php-fig/log.git", |
| 1832 | - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" | 1933 | + "reference": "5277094ed527a1c4477177d102fe4c53551953e0" |
| 1833 | }, | 1934 | }, |
| 1834 | "dist": { | 1935 | "dist": { |
| 1835 | "type": "zip", | 1936 | "type": "zip", |
| 1836 | - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", | 1937 | + "url": "https://api.github.com/repos/php-fig/log/zipball/5277094ed527a1c4477177d102fe4c53551953e0", |
| 1837 | - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", | 1938 | + "reference": "5277094ed527a1c4477177d102fe4c53551953e0", |
| 1838 | "shasum": "" | 1939 | "shasum": "" |
| 1839 | }, | 1940 | }, |
| 1941 | + "require": { | ||
| 1942 | + "php": ">=5.3.0" | ||
| 1943 | + }, | ||
| 1840 | "type": "library", | 1944 | "type": "library", |
| 1945 | + "extra": { | ||
| 1946 | + "branch-alias": { | ||
| 1947 | + "dev-master": "1.0.x-dev" | ||
| 1948 | + } | ||
| 1949 | + }, | ||
| 1841 | "autoload": { | 1950 | "autoload": { |
| 1842 | - "psr-0": { | 1951 | + "psr-4": { |
| 1843 | - "Psr\\Log\\": "" | 1952 | + "Psr\\Log\\": "Psr/Log/" |
| 1844 | } | 1953 | } |
| 1845 | }, | 1954 | }, |
| 1846 | "notification-url": "https://packagist.org/downloads/", | 1955 | "notification-url": "https://packagist.org/downloads/", |
| ... | @@ -1854,12 +1963,13 @@ | ... | @@ -1854,12 +1963,13 @@ |
| 1854 | } | 1963 | } |
| 1855 | ], | 1964 | ], |
| 1856 | "description": "Common interface for logging libraries", | 1965 | "description": "Common interface for logging libraries", |
| 1966 | + "homepage": "https://github.com/php-fig/log", | ||
| 1857 | "keywords": [ | 1967 | "keywords": [ |
| 1858 | "log", | 1968 | "log", |
| 1859 | "psr", | 1969 | "psr", |
| 1860 | "psr-3" | 1970 | "psr-3" |
| 1861 | ], | 1971 | ], |
| 1862 | - "time": "2012-12-21 11:40:51" | 1972 | + "time": "2016-09-19 16:02:08" |
| 1863 | }, | 1973 | }, |
| 1864 | { | 1974 | { |
| 1865 | "name": "psy/psysh", | 1975 | "name": "psy/psysh", |
| ... | @@ -3167,16 +3277,16 @@ | ... | @@ -3167,16 +3277,16 @@ |
| 3167 | }, | 3277 | }, |
| 3168 | { | 3278 | { |
| 3169 | "name": "myclabs/deep-copy", | 3279 | "name": "myclabs/deep-copy", |
| 3170 | - "version": "1.5.2", | 3280 | + "version": "1.5.4", |
| 3171 | "source": { | 3281 | "source": { |
| 3172 | "type": "git", | 3282 | "type": "git", |
| 3173 | "url": "https://github.com/myclabs/DeepCopy.git", | 3283 | "url": "https://github.com/myclabs/DeepCopy.git", |
| 3174 | - "reference": "da8529775f14f4fdae33f916eb0cf65f6afbddbc" | 3284 | + "reference": "ea74994a3dc7f8d2f65a06009348f2d63c81e61f" |
| 3175 | }, | 3285 | }, |
| 3176 | "dist": { | 3286 | "dist": { |
| 3177 | "type": "zip", | 3287 | "type": "zip", |
| 3178 | - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/da8529775f14f4fdae33f916eb0cf65f6afbddbc", | 3288 | + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/ea74994a3dc7f8d2f65a06009348f2d63c81e61f", |
| 3179 | - "reference": "da8529775f14f4fdae33f916eb0cf65f6afbddbc", | 3289 | + "reference": "ea74994a3dc7f8d2f65a06009348f2d63c81e61f", |
| 3180 | "shasum": "" | 3290 | "shasum": "" |
| 3181 | }, | 3291 | }, |
| 3182 | "require": { | 3292 | "require": { |
| ... | @@ -3205,7 +3315,7 @@ | ... | @@ -3205,7 +3315,7 @@ |
| 3205 | "object", | 3315 | "object", |
| 3206 | "object graph" | 3316 | "object graph" |
| 3207 | ], | 3317 | ], |
| 3208 | - "time": "2016-09-06 16:07:05" | 3318 | + "time": "2016-09-16 13:37:59" |
| 3209 | }, | 3319 | }, |
| 3210 | { | 3320 | { |
| 3211 | "name": "phpdocumentor/reflection-common", | 3321 | "name": "phpdocumentor/reflection-common", |
| ... | @@ -3661,24 +3771,24 @@ | ... | @@ -3661,24 +3771,24 @@ |
| 3661 | }, | 3771 | }, |
| 3662 | { | 3772 | { |
| 3663 | "name": "phpunit/phpunit", | 3773 | "name": "phpunit/phpunit", |
| 3664 | - "version": "5.5.4", | 3774 | + "version": "5.5.5", |
| 3665 | "source": { | 3775 | "source": { |
| 3666 | "type": "git", | 3776 | "type": "git", |
| 3667 | "url": "https://github.com/sebastianbergmann/phpunit.git", | 3777 | "url": "https://github.com/sebastianbergmann/phpunit.git", |
| 3668 | - "reference": "3e6e88e56c912133de6e99b87728cca7ed70c5f5" | 3778 | + "reference": "a57126dc681b08289fef6ac96a48e30656f84350" |
| 3669 | }, | 3779 | }, |
| 3670 | "dist": { | 3780 | "dist": { |
| 3671 | "type": "zip", | 3781 | "type": "zip", |
| 3672 | - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6e88e56c912133de6e99b87728cca7ed70c5f5", | 3782 | + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a57126dc681b08289fef6ac96a48e30656f84350", |
| 3673 | - "reference": "3e6e88e56c912133de6e99b87728cca7ed70c5f5", | 3783 | + "reference": "a57126dc681b08289fef6ac96a48e30656f84350", |
| 3674 | "shasum": "" | 3784 | "shasum": "" |
| 3675 | }, | 3785 | }, |
| 3676 | "require": { | 3786 | "require": { |
| 3677 | "ext-dom": "*", | 3787 | "ext-dom": "*", |
| 3678 | "ext-json": "*", | 3788 | "ext-json": "*", |
| 3679 | - "ext-pcre": "*", | 3789 | + "ext-libxml": "*", |
| 3680 | - "ext-reflection": "*", | 3790 | + "ext-mbstring": "*", |
| 3681 | - "ext-spl": "*", | 3791 | + "ext-xml": "*", |
| 3682 | "myclabs/deep-copy": "~1.3", | 3792 | "myclabs/deep-copy": "~1.3", |
| 3683 | "php": "^5.6 || ^7.0", | 3793 | "php": "^5.6 || ^7.0", |
| 3684 | "phpspec/prophecy": "^1.3.1", | 3794 | "phpspec/prophecy": "^1.3.1", |
| ... | @@ -3700,7 +3810,12 @@ | ... | @@ -3700,7 +3810,12 @@ |
| 3700 | "conflict": { | 3810 | "conflict": { |
| 3701 | "phpdocumentor/reflection-docblock": "3.0.2" | 3811 | "phpdocumentor/reflection-docblock": "3.0.2" |
| 3702 | }, | 3812 | }, |
| 3813 | + "require-dev": { | ||
| 3814 | + "ext-pdo": "*" | ||
| 3815 | + }, | ||
| 3703 | "suggest": { | 3816 | "suggest": { |
| 3817 | + "ext-tidy": "*", | ||
| 3818 | + "ext-xdebug": "*", | ||
| 3704 | "phpunit/php-invoker": "~1.1" | 3819 | "phpunit/php-invoker": "~1.1" |
| 3705 | }, | 3820 | }, |
| 3706 | "bin": [ | 3821 | "bin": [ |
| ... | @@ -3735,7 +3850,7 @@ | ... | @@ -3735,7 +3850,7 @@ |
| 3735 | "testing", | 3850 | "testing", |
| 3736 | "xunit" | 3851 | "xunit" |
| 3737 | ], | 3852 | ], |
| 3738 | - "time": "2016-08-26 07:11:44" | 3853 | + "time": "2016-09-21 14:40:13" |
| 3739 | }, | 3854 | }, |
| 3740 | { | 3855 | { |
| 3741 | "name": "phpunit/phpunit-mock-objects", | 3856 | "name": "phpunit/phpunit-mock-objects", |
| ... | @@ -4524,7 +4639,8 @@ | ... | @@ -4524,7 +4639,8 @@ |
| 4524 | "prefer-stable": false, | 4639 | "prefer-stable": false, |
| 4525 | "prefer-lowest": false, | 4640 | "prefer-lowest": false, |
| 4526 | "platform": { | 4641 | "platform": { |
| 4527 | - "php": ">=5.6.4" | 4642 | + "php": ">=5.6.4", |
| 4643 | + "ext-tidy": "*" | ||
| 4528 | }, | 4644 | }, |
| 4529 | "platform-dev": [] | 4645 | "platform-dev": [] |
| 4530 | } | 4646 | } | ... | ... |
resources/assets/sass/_pages.scss
100644 → 100755
| ... | @@ -71,6 +71,18 @@ | ... | @@ -71,6 +71,18 @@ |
| 71 | max-width: 100%; | 71 | max-width: 100%; |
| 72 | height: auto !important; | 72 | height: auto !important; |
| 73 | } | 73 | } |
| 74 | + | ||
| 75 | + // diffs | ||
| 76 | + ins, | ||
| 77 | + del { | ||
| 78 | + text-decoration: none; | ||
| 79 | + } | ||
| 80 | + ins { | ||
| 81 | + background: #dbffdb; | ||
| 82 | + } | ||
| 83 | + del { | ||
| 84 | + background: #FFECEC; | ||
| 85 | + } | ||
| 74 | } | 86 | } |
| 75 | 87 | ||
| 76 | // Page content pointers | 88 | // Page content pointers | ... | ... |
| ... | @@ -24,5 +24,9 @@ | ... | @@ -24,5 +24,9 @@ |
| 24 | 24 | ||
| 25 | <div style="clear:left;"></div> | 25 | <div style="clear:left;"></div> |
| 26 | 26 | ||
| 27 | - {!! $page->html !!} | 27 | + @if (isset($diff) && $diff) |
| 28 | + {!! $diff !!} | ||
| 29 | + @else | ||
| 30 | + {!! $page->html !!} | ||
| 31 | + @endif | ||
| 28 | </div> | 32 | </div> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment