From 4057a3ede8db647b1c38e3b6fa9bd828a5955fe0 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Thu, 3 Apr 2014 23:36:46 +0200 Subject: [PATCH 01/15] opened 2.2 --- CD-collection/composer.json | 5 ++--- Fifteen/composer.json | 5 ++--- Micro-blog/composer.json | 3 +-- Modules-Usage/composer.json | 5 ++--- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/CD-collection/composer.json b/CD-collection/composer.json index 66a939f..e76f533 100644 --- a/CD-collection/composer.json +++ b/CD-collection/composer.json @@ -15,7 +15,6 @@ ], "require": { "php": ">=5.3.7", - "nette/nette": "dev-master" - }, - "minimum-stability": "dev" + "nette/nette": "~2.2.0" + } } diff --git a/Fifteen/composer.json b/Fifteen/composer.json index b337f5c..cd9c473 100644 --- a/Fifteen/composer.json +++ b/Fifteen/composer.json @@ -15,7 +15,6 @@ ], "require": { "php": ">=5.3.0", - "nette/nette": "dev-master" - }, - "minimum-stability": "dev" + "nette/nette": "~2.2.0" + } } diff --git a/Micro-blog/composer.json b/Micro-blog/composer.json index 30e9ae1..57bd947 100644 --- a/Micro-blog/composer.json +++ b/Micro-blog/composer.json @@ -15,9 +15,8 @@ ], "require": { "php": ">=5.3.0", - "nette/nette": "dev-master" + "nette/nette": "~2.2.0" }, - "minimum-stability": "dev", "config": { "vendor-dir": "www/data/vendor" } diff --git a/Modules-Usage/composer.json b/Modules-Usage/composer.json index a7301d5..f00dcc9 100644 --- a/Modules-Usage/composer.json +++ b/Modules-Usage/composer.json @@ -15,7 +15,6 @@ ], "require": { "php": ">=5.3.0", - "nette/nette": "dev-master" - }, - "minimum-stability": "dev" + "nette/nette": "~2.2.0" + } } From bb3b08a2003e432c5ae497dde32c253b1fd617e0 Mon Sep 17 00:00:00 2001 From: David Grudl Date: 2014年5月24日 05:30:04 +0200 Subject: [PATCH 02/15] composer.json: type changed to 'project' --- CD-collection/composer.json | 2 +- Fifteen/composer.json | 2 +- Micro-blog/composer.json | 2 +- Modules-Usage/composer.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CD-collection/composer.json b/CD-collection/composer.json index e76f533..3affcd6 100644 --- a/CD-collection/composer.json +++ b/CD-collection/composer.json @@ -1,6 +1,6 @@ { "name": "nette-examples/cd-collection", - "type": "nette-example", + "type": "project", "description": "Classic Zend Framework Tutorial from Akrabat rewritten for Nette Framework.", "license": "BSD-3-Clause", "authors": [ diff --git a/Fifteen/composer.json b/Fifteen/composer.json index cd9c473..3111af9 100644 --- a/Fifteen/composer.json +++ b/Fifteen/composer.json @@ -1,6 +1,6 @@ { "name": "nette-examples/cd-collection", - "type": "nette-example", + "type": "project", "description": "A simple example showing components as the reusable stand-alone units.", "license": "BSD-3-Clause", "authors": [ diff --git a/Micro-blog/composer.json b/Micro-blog/composer.json index 57bd947..6dbe1e8 100644 --- a/Micro-blog/composer.json +++ b/Micro-blog/composer.json @@ -1,6 +1,6 @@ { "name": "nette-examples/micro-blog", - "type": "nette-example", + "type": "project", "description": "A simple example showing how to use Nette Framework as a micro-framework.", "license": "BSD-3-Clause", "authors": [ diff --git a/Modules-Usage/composer.json b/Modules-Usage/composer.json index f00dcc9..34ba9c7 100644 --- a/Modules-Usage/composer.json +++ b/Modules-Usage/composer.json @@ -1,6 +1,6 @@ { "name": "nette-examples/modules-usage", - "type": "nette-example", + "type": "project", "description": "The example demonstrates the usage of modules and submodules.", "license": "BSD-3-Clause", "authors": [ From 47c997b5118746a0b945de16584241e0d2dfb9d6 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 9 Jul 2014 16:41:25 +0200 Subject: [PATCH 03/15] removed $configurator->setDebugMode() --- CD-collection/app/bootstrap.php | 1 - Fifteen/app/bootstrap.php | 1 - Modules-Usage/app/bootstrap.php | 1 - 3 files changed, 3 deletions(-) diff --git a/CD-collection/app/bootstrap.php b/CD-collection/app/bootstrap.php index f2e9527..ad8286c 100644 --- a/CD-collection/app/bootstrap.php +++ b/CD-collection/app/bootstrap.php @@ -13,7 +13,6 @@ $configurator = new Nette\Configurator; // Enable Nette Debugger for error visualisation & logging -//$configurator->setDebugMode(TRUE); $configurator->enableDebugger(__DIR__ . '/../log'); // Enable RobotLoader - this will load all classes automatically diff --git a/Fifteen/app/bootstrap.php b/Fifteen/app/bootstrap.php index e074640..f7134a5 100644 --- a/Fifteen/app/bootstrap.php +++ b/Fifteen/app/bootstrap.php @@ -12,7 +12,6 @@ $configurator = new Nette\Configurator; // Enable Nette Debugger for error visualisation & logging -//$configurator->setDebugMode(TRUE); $configurator->enableDebugger(__DIR__ . '/../log'); // Enable RobotLoader - this will load all classes automatically diff --git a/Modules-Usage/app/bootstrap.php b/Modules-Usage/app/bootstrap.php index 9e24ee1..0d85a5e 100644 --- a/Modules-Usage/app/bootstrap.php +++ b/Modules-Usage/app/bootstrap.php @@ -14,7 +14,6 @@ $configurator = new Nette\Configurator; // Enable Nette Debugger for error visualisation & logging -//$configurator->setDebugMode(TRUE); $configurator->enableDebugger(__DIR__ . '/../log'); // Enable RobotLoader - this will load all classes automatically From 5f0e3ccf5c30cde6032dc38d93c76822b5bd069e Mon Sep 17 00:00:00 2001 From: David Grudl Date: 2014年7月23日 18:38:38 +0200 Subject: [PATCH 04/15] CD-collection: fixed validation scope [Closes #11][Closes #12] --- CD-collection/app/presenters/DashboardPresenter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CD-collection/app/presenters/DashboardPresenter.php b/CD-collection/app/presenters/DashboardPresenter.php index b8afdb4..1c26399 100644 --- a/CD-collection/app/presenters/DashboardPresenter.php +++ b/CD-collection/app/presenters/DashboardPresenter.php @@ -96,7 +96,7 @@ protected function createComponentAlbumForm() ->onClick[] = $this->albumFormSucceeded; $form->addSubmit('cancel', 'Cancel') - ->setValidationScope(NULL) + ->setValidationScope(array()) ->onClick[] = $this->formCancelled; $form->addProtection(); From 61dc2f60ba2fef8a590a462de08925e1eb526761 Mon Sep 17 00:00:00 2001 From: David Grudl Date: 2014年8月10日 17:32:00 +0200 Subject: [PATCH 05/15] config.neon: database moved to own section --- CD-collection/app/config.neon | 4 ++-- Micro-blog/www/config.neon | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CD-collection/app/config.neon b/CD-collection/app/config.neon index e1db780..feffaf5 100644 --- a/CD-collection/app/config.neon +++ b/CD-collection/app/config.neon @@ -10,8 +10,8 @@ nette: mapping: *: App\*Module\Presenters\*Presenter - database: - dsn: "sqlite:%appDir%/model/demo.db3" +database: + dsn: "sqlite:%appDir%/model/demo.db3" services: - App\Model\Authenticator diff --git a/Micro-blog/www/config.neon b/Micro-blog/www/config.neon index 78460c7..75e1a67 100644 --- a/Micro-blog/www/config.neon +++ b/Micro-blog/www/config.neon @@ -5,7 +5,6 @@ php: date.timezone: Europe/Prague -nette: - database: - dsn: 'sqlite:%appDir%/data/blog.db3' - reflection: conventional +database: + dsn: 'sqlite:%appDir%/data/blog.db3' + reflection: conventional From 4486fa6fddda86eaabca9bfc9befbba2733a6541 Mon Sep 17 00:00:00 2001 From: David Grudl Date: 2014年11月18日 02:33:48 +0100 Subject: [PATCH 06/15] added .travis.yml --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e5215c3 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: php +php: + - 5.3.3 + +script: + - php code-checker/src/code-checker.php + +before_script: + - composer create-project nette/code-checker code-checker ~2.3 --no-interaction --prefer-source From 953ef9df05416b8c97e607c331090abb1cae9838 Mon Sep 17 00:00:00 2001 From: David Grudl Date: 2014年7月22日 15:44:16 +0200 Subject: [PATCH 07/15] folder 'templates' moved in 'presenters' --- CD-collection/app/{ => presenters}/templates/@layout.latte | 0 CD-collection/app/{ => presenters}/templates/Dashboard/add.latte | 0 .../app/{ => presenters}/templates/Dashboard/default.latte | 0 .../app/{ => presenters}/templates/Dashboard/delete.latte | 0 CD-collection/app/{ => presenters}/templates/Dashboard/edit.latte | 0 CD-collection/app/{ => presenters}/templates/Sign/in.latte | 0 Fifteen/app/{ => presenters}/templates/Default.default.latte | 0 .../app/AdminModule/{ => presenters}/templates/@layout.latte | 0 .../AdminModule/{ => presenters}/templates/Default.default.latte | 0 .../ExportModule/{ => presenters}/templates/Default.xml.latte | 0 .../app/FrontModule/{ => presenters}/templates/@layout.latte | 0 .../{ => presenters}/templates/CatalogList/default.latte | 0 .../FrontModule/{ => presenters}/templates/Default/addItem.latte | 0 .../FrontModule/{ => presenters}/templates/Default/default.latte | 0 14 files changed, 0 insertions(+), 0 deletions(-) rename CD-collection/app/{ => presenters}/templates/@layout.latte (100%) rename CD-collection/app/{ => presenters}/templates/Dashboard/add.latte (100%) rename CD-collection/app/{ => presenters}/templates/Dashboard/default.latte (100%) rename CD-collection/app/{ => presenters}/templates/Dashboard/delete.latte (100%) rename CD-collection/app/{ => presenters}/templates/Dashboard/edit.latte (100%) rename CD-collection/app/{ => presenters}/templates/Sign/in.latte (100%) rename Fifteen/app/{ => presenters}/templates/Default.default.latte (100%) rename Modules-Usage/app/AdminModule/{ => presenters}/templates/@layout.latte (100%) rename Modules-Usage/app/AdminModule/{ => presenters}/templates/Default.default.latte (100%) rename Modules-Usage/app/FrontModule/ExportModule/{ => presenters}/templates/Default.xml.latte (100%) rename Modules-Usage/app/FrontModule/{ => presenters}/templates/@layout.latte (100%) rename Modules-Usage/app/FrontModule/{ => presenters}/templates/CatalogList/default.latte (100%) rename Modules-Usage/app/FrontModule/{ => presenters}/templates/Default/addItem.latte (100%) rename Modules-Usage/app/FrontModule/{ => presenters}/templates/Default/default.latte (100%) diff --git a/CD-collection/app/templates/@layout.latte b/CD-collection/app/presenters/templates/@layout.latte similarity index 100% rename from CD-collection/app/templates/@layout.latte rename to CD-collection/app/presenters/templates/@layout.latte diff --git a/CD-collection/app/templates/Dashboard/add.latte b/CD-collection/app/presenters/templates/Dashboard/add.latte similarity index 100% rename from CD-collection/app/templates/Dashboard/add.latte rename to CD-collection/app/presenters/templates/Dashboard/add.latte diff --git a/CD-collection/app/templates/Dashboard/default.latte b/CD-collection/app/presenters/templates/Dashboard/default.latte similarity index 100% rename from CD-collection/app/templates/Dashboard/default.latte rename to CD-collection/app/presenters/templates/Dashboard/default.latte diff --git a/CD-collection/app/templates/Dashboard/delete.latte b/CD-collection/app/presenters/templates/Dashboard/delete.latte similarity index 100% rename from CD-collection/app/templates/Dashboard/delete.latte rename to CD-collection/app/presenters/templates/Dashboard/delete.latte diff --git a/CD-collection/app/templates/Dashboard/edit.latte b/CD-collection/app/presenters/templates/Dashboard/edit.latte similarity index 100% rename from CD-collection/app/templates/Dashboard/edit.latte rename to CD-collection/app/presenters/templates/Dashboard/edit.latte diff --git a/CD-collection/app/templates/Sign/in.latte b/CD-collection/app/presenters/templates/Sign/in.latte similarity index 100% rename from CD-collection/app/templates/Sign/in.latte rename to CD-collection/app/presenters/templates/Sign/in.latte diff --git a/Fifteen/app/templates/Default.default.latte b/Fifteen/app/presenters/templates/Default.default.latte similarity index 100% rename from Fifteen/app/templates/Default.default.latte rename to Fifteen/app/presenters/templates/Default.default.latte diff --git a/Modules-Usage/app/AdminModule/templates/@layout.latte b/Modules-Usage/app/AdminModule/presenters/templates/@layout.latte similarity index 100% rename from Modules-Usage/app/AdminModule/templates/@layout.latte rename to Modules-Usage/app/AdminModule/presenters/templates/@layout.latte diff --git a/Modules-Usage/app/AdminModule/templates/Default.default.latte b/Modules-Usage/app/AdminModule/presenters/templates/Default.default.latte similarity index 100% rename from Modules-Usage/app/AdminModule/templates/Default.default.latte rename to Modules-Usage/app/AdminModule/presenters/templates/Default.default.latte diff --git a/Modules-Usage/app/FrontModule/ExportModule/templates/Default.xml.latte b/Modules-Usage/app/FrontModule/ExportModule/presenters/templates/Default.xml.latte similarity index 100% rename from Modules-Usage/app/FrontModule/ExportModule/templates/Default.xml.latte rename to Modules-Usage/app/FrontModule/ExportModule/presenters/templates/Default.xml.latte diff --git a/Modules-Usage/app/FrontModule/templates/@layout.latte b/Modules-Usage/app/FrontModule/presenters/templates/@layout.latte similarity index 100% rename from Modules-Usage/app/FrontModule/templates/@layout.latte rename to Modules-Usage/app/FrontModule/presenters/templates/@layout.latte diff --git a/Modules-Usage/app/FrontModule/templates/CatalogList/default.latte b/Modules-Usage/app/FrontModule/presenters/templates/CatalogList/default.latte similarity index 100% rename from Modules-Usage/app/FrontModule/templates/CatalogList/default.latte rename to Modules-Usage/app/FrontModule/presenters/templates/CatalogList/default.latte diff --git a/Modules-Usage/app/FrontModule/templates/Default/addItem.latte b/Modules-Usage/app/FrontModule/presenters/templates/Default/addItem.latte similarity index 100% rename from Modules-Usage/app/FrontModule/templates/Default/addItem.latte rename to Modules-Usage/app/FrontModule/presenters/templates/Default/addItem.latte diff --git a/Modules-Usage/app/FrontModule/templates/Default/default.latte b/Modules-Usage/app/FrontModule/presenters/templates/Default/default.latte similarity index 100% rename from Modules-Usage/app/FrontModule/templates/Default/default.latte rename to Modules-Usage/app/FrontModule/presenters/templates/Default/default.latte From 46713c5af7aa9bf72a9f4765e2b798ed5522435b Mon Sep 17 00:00:00 2001 From: David Grudl Date: 2015年1月31日 00:19:15 +0100 Subject: [PATCH 08/15] removed magic --- CD-collection/app/presenters/DashboardPresenter.php | 12 ++++++------ CD-collection/app/presenters/SignPresenter.php | 2 +- Fifteen/app/components/FifteenControl.php | 4 ++-- Fifteen/app/presenters/DefaultPresenter.php | 2 +- Modules-Usage/app/presenters/BasePresenter.php | 10 +++++----- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CD-collection/app/presenters/DashboardPresenter.php b/CD-collection/app/presenters/DashboardPresenter.php index 1c26399..a76f970 100644 --- a/CD-collection/app/presenters/DashboardPresenter.php +++ b/CD-collection/app/presenters/DashboardPresenter.php @@ -23,8 +23,8 @@ protected function startup() { parent::startup(); - if (!$this->user->isLoggedIn()) { - if ($this->user->logoutReason === Nette\Security\IUserStorage::INACTIVITY) { + if (!$this->getUser()->isLoggedIn()) { + if ($this->getUser()->logoutReason === Nette\Security\IUserStorage::INACTIVITY) { $this->flashMessage('You have been signed out due to inactivity. Please sign in again.'); } $this->redirect('Sign:in', array('backlink' => $this->storeRequest())); @@ -93,11 +93,11 @@ protected function createComponentAlbumForm() $form->addSubmit('save', 'Save') ->setAttribute('class', 'default') - ->onClick[] = $this->albumFormSucceeded; + ->onClick[] = array($this, 'albumFormSucceeded'); $form->addSubmit('cancel', 'Cancel') ->setValidationScope(array()) - ->onClick[] = $this->formCancelled; + ->onClick[] = array($this, 'formCancelled'); $form->addProtection(); return $form; @@ -127,11 +127,11 @@ protected function createComponentDeleteForm() { $form = new Form; $form->addSubmit('cancel', 'Cancel') - ->onClick[] = $this->formCancelled; + ->onClick[] = array($this, 'formCancelled'); $form->addSubmit('delete', 'Delete') ->setAttribute('class', 'default') - ->onClick[] = $this->deleteFormSucceeded; + ->onClick[] = array($this, 'deleteFormSucceeded'); $form->addProtection(); return $form; diff --git a/CD-collection/app/presenters/SignPresenter.php b/CD-collection/app/presenters/SignPresenter.php index 2eac2de..4f1d8a0 100644 --- a/CD-collection/app/presenters/SignPresenter.php +++ b/CD-collection/app/presenters/SignPresenter.php @@ -27,7 +27,7 @@ protected function createComponentSignInForm() $form->addSubmit('send', 'Sign in'); - $form->onSuccess[] = $this->signInFormSucceeded; + $form->onSuccess[] = array($this, 'signInFormSucceeded'); return $form; } diff --git a/Fifteen/app/components/FifteenControl.php b/Fifteen/app/components/FifteenControl.php index 25a010d..77fddfc 100644 --- a/Fifteen/app/components/FifteenControl.php +++ b/Fifteen/app/components/FifteenControl.php @@ -10,10 +10,10 @@ class FifteenControl extends UI\Control /** @var int */ public $width = 4; - /** @var array of function ($sender) */ + /** @var callable[] function ($sender) */ public $onAfterClick; - /** @var array of function ($sender, $round) */ + /** @var callable[] function ($sender, $round) */ public $onGameOver; /** @persistent array */ diff --git a/Fifteen/app/presenters/DefaultPresenter.php b/Fifteen/app/presenters/DefaultPresenter.php index f1d451f..ddf23a1 100644 --- a/Fifteen/app/presenters/DefaultPresenter.php +++ b/Fifteen/app/presenters/DefaultPresenter.php @@ -18,7 +18,7 @@ public function renderDefault() protected function createComponentFifteen() { $fifteen = new FifteenControl; - $fifteen->onGameOver[] = $this->gameOver; + $fifteen->onGameOver[] = array($this, 'gameOver'); $fifteen->redrawControl(); return $fifteen; } diff --git a/Modules-Usage/app/presenters/BasePresenter.php b/Modules-Usage/app/presenters/BasePresenter.php index dfe079c..5fc74b5 100644 --- a/Modules-Usage/app/presenters/BasePresenter.php +++ b/Modules-Usage/app/presenters/BasePresenter.php @@ -10,16 +10,16 @@ abstract class BasePresenter extends Nette\Application\UI\Presenter protected function beforeRender() { - $this->template->viewName = $this->view; + $this->template->viewName = $this->getView(); $this->template->root = isset($_SERVER['SCRIPT_FILENAME']) ? realpath(dirname(dirname($_SERVER['SCRIPT_FILENAME']))) : NULL; - $a = strrpos($this->name, ':'); + $a = strrpos($this->getName(), ':'); if ($a === FALSE) { $this->template->moduleName = ''; - $this->template->presenterName = $this->name; + $this->template->presenterName = $this->getName(); } else { - $this->template->moduleName = substr($this->name, 0, $a + 1); - $this->template->presenterName = substr($this->name, $a + 1); + $this->template->moduleName = substr($this->getName(), 0, $a + 1); + $this->template->presenterName = substr($this->getName(), $a + 1); } } From 04f430de1409e83e3984ecd58a87ad0d73e6a81f Mon Sep 17 00:00:00 2001 From: David Grudl Date: 2015年6月18日 16:46:36 +0200 Subject: [PATCH 09/15] improved coding style --- CD-collection/app/bootstrap.php | 4 ++-- CD-collection/app/model/Authenticator.php | 4 ++-- CD-collection/app/presenters/DashboardPresenter.php | 6 +++--- CD-collection/app/presenters/SignPresenter.php | 4 ++-- Micro-blog/www/data/TemplateRouter.php | 8 ++++---- Modules-Usage/app/bootstrap.php | 6 +++--- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CD-collection/app/bootstrap.php b/CD-collection/app/bootstrap.php index ad8286c..9565943 100644 --- a/CD-collection/app/bootstrap.php +++ b/CD-collection/app/bootstrap.php @@ -1,7 +1,7 @@ $file) { - $this[] = new Routers\Route($mask, function($presenter) use ($file, $cachePath) { - return $presenter->createTemplate(NULL, function() use ($cachePath) { + $this[] = new Routers\Route($mask, function ($presenter) use ($file, $cachePath) { + return $presenter->createTemplate(NULL, function () use ($cachePath) { $latte = new Latte\Engine; $latte->setTempDirectory($cachePath . '/cache'); $macroSet = new Latte\Macros\MacroSet($latte->getCompiler()); - $macroSet->addMacro('url', function(){}); // ignore + $macroSet->addMacro('url', function () {}); // ignore return $latte; })->setFile($file); }); @@ -37,7 +37,7 @@ public function scanRoutes($path) $routes = array(); $latte = new Latte\Engine; $macroSet = new Latte\Macros\MacroSet($latte->getCompiler()); - $macroSet->addMacro('url', function($node) use (&$routes, &$file) { + $macroSet->addMacro('url', function ($node) use (&$routes, &$file) { $routes[$node->args] = (string) $file; }); foreach (Nette\Utils\Finder::findFiles('*.latte')->from($path) as $file) { diff --git a/Modules-Usage/app/bootstrap.php b/Modules-Usage/app/bootstrap.php index 0d85a5e..f8a05a2 100644 --- a/Modules-Usage/app/bootstrap.php +++ b/Modules-Usage/app/bootstrap.php @@ -1,8 +1,8 @@ Date: 2015年7月11日 23:00:14 +0200 Subject: [PATCH 10/15] travis: migrating to container-based infrastructure --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e5215c3..7e2044f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,4 +6,10 @@ script: - php code-checker/src/code-checker.php before_script: - - composer create-project nette/code-checker code-checker ~2.3 --no-interaction --prefer-source + - travis_retry composer create-project nette/code-checker code-checker ~2.5 --no-interaction + +sudo: false + +cache: + directories: + - $HOME/.composer/cache From d560d7bccf389a7ae77f5ead6aab85dd974e46ef Mon Sep 17 00:00:00 2001 From: David Grudl Date: 2015年9月29日 21:31:22 +0200 Subject: [PATCH 11/15] typo --- CD-collection/app/presenters/DashboardPresenter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CD-collection/app/presenters/DashboardPresenter.php b/CD-collection/app/presenters/DashboardPresenter.php index d479269..b79e987 100644 --- a/CD-collection/app/presenters/DashboardPresenter.php +++ b/CD-collection/app/presenters/DashboardPresenter.php @@ -24,7 +24,7 @@ protected function startup() parent::startup(); if (!$this->getUser()->isLoggedIn()) { - if ($this->getUser()->logoutReason === Nette\Security\IUserStorage::INACTIVITY) { + if ($this->getUser()->getLogoutReason() === Nette\Security\IUserStorage::INACTIVITY) { $this->flashMessage('You have been signed out due to inactivity. Please sign in again.'); } $this->redirect('Sign:in', array('backlink' => $this->storeRequest())); From fcb5260c8c828c64a46deeb585aa49addd35303c Mon Sep 17 00:00:00 2001 From: David Grudl Date: Mon, 5 Oct 2015 13:26:52 +0200 Subject: [PATCH 12/15] used https --- CD-collection/app/config.neon | 2 +- CD-collection/app/presenters/templates/@layout.latte | 2 +- CD-collection/composer.json | 4 ++-- CD-collection/readme.md | 4 ++-- Fifteen/app/presenters/templates/Default.default.latte | 2 +- Fifteen/composer.json | 4 ++-- Fifteen/readme.md | 4 ++-- Fifteen/www/css/style.css | 2 +- Fifteen/www/js/jquery.nette.js | 2 +- Micro-blog/composer.json | 4 ++-- Micro-blog/readme.md | 6 +++--- Micro-blog/www/config.neon | 2 +- Micro-blog/www/data/templates/@layout.latte | 2 +- Modules-Usage/app/config.neon | 2 +- Modules-Usage/composer.json | 4 ++-- Modules-Usage/readme.md | 6 +++--- Modules-Usage/www/css/site.css | 2 +- license.md | 2 +- 18 files changed, 28 insertions(+), 28 deletions(-) diff --git a/CD-collection/app/config.neon b/CD-collection/app/config.neon index feffaf5..4320380 100644 --- a/CD-collection/app/config.neon +++ b/CD-collection/app/config.neon @@ -1,6 +1,6 @@ # # SECURITY WARNING: it is CRITICAL that this file & directory are NOT accessible directly via a web browser! -# http://nette.org/security-warning +# https://nette.org/security-warning # php: date.timezone: Europe/Prague diff --git a/CD-collection/app/presenters/templates/@layout.latte b/CD-collection/app/presenters/templates/@layout.latte index d6baf03..5162179 100644 --- a/CD-collection/app/presenters/templates/@layout.latte +++ b/CD-collection/app/presenters/templates/@layout.latte @@ -27,6 +27,6 @@

Signed in as {$user->identity->realname}. Sign out

- +

AltStyle によって変換されたページ (->オリジナル) /

diff --git a/CD-collection/composer.json b/CD-collection/composer.json index 3affcd6..2c3aa8b 100644 --- a/CD-collection/composer.json +++ b/CD-collection/composer.json @@ -6,11 +6,11 @@ "authors": [ { "name": "David Grudl", - "homepage": "http://davidgrudl.com" + "homepage": "https://davidgrudl.com" }, { "name": "Nette Community", - "homepage": "http://nette.org/contributors" + "homepage": "https://nette.org/contributors" } ], "require": { diff --git a/CD-collection/readme.md b/CD-collection/readme.md index 02ca26c..517d836 100644 --- a/CD-collection/readme.md +++ b/CD-collection/readme.md @@ -10,7 +10,7 @@ responsibility of the router and can be changed anytime. The target of a link is always a combination "Presenter:action" or "Presenter:signal!". -What is [Nette Framework](http://nette.org)? +What is [Nette Framework](https://nette.org)? -------------------------------------------- Nette Framework is a popular tool for PHP web development. It is designed to be @@ -24,7 +24,7 @@ Installing ---------- The best way to install Nette Framework is to download latest package -from http://nette.org/download or using [Composer](http://doc.nette.org/composer): +from https://nette.org/download or using [Composer](https://doc.nette.org/composer): curl -s http://getcomposer.org/installer | php php composer.phar update diff --git a/Fifteen/app/presenters/templates/Default.default.latte b/Fifteen/app/presenters/templates/Default.default.latte index a4d84d8..6dadfd2 100644 --- a/Fifteen/app/presenters/templates/Default.default.latte +++ b/Fifteen/app/presenters/templates/Default.default.latte @@ -15,7 +15,7 @@ {control fifteen} - + diff --git a/Fifteen/composer.json b/Fifteen/composer.json index 3111af9..60d1beb 100644 --- a/Fifteen/composer.json +++ b/Fifteen/composer.json @@ -6,11 +6,11 @@ "authors": [ { "name": "David Grudl", - "homepage": "http://davidgrudl.com" + "homepage": "https://davidgrudl.com" }, { "name": "Nette Community", - "homepage": "http://nette.org/contributors" + "homepage": "https://nette.org/contributors" } ], "require": { diff --git a/Fifteen/readme.md b/Fifteen/readme.md index cecee74..aaccafc 100644 --- a/Fifteen/readme.md +++ b/Fifteen/readme.md @@ -7,7 +7,7 @@ will be working stand-alone. The communication between components and presenter is arranged by events (event-driven model). -What is [Nette Framework](http://nette.org)? +What is [Nette Framework](https://nette.org)? -------------------------------------------- Nette Framework is a popular tool for PHP web development. It is designed to be @@ -21,7 +21,7 @@ Installing ---------- The best way to install Nette Framework is to download latest package -from http://nette.org/download or using [Composer](http://doc.nette.org/composer): +from https://nette.org/download or using [Composer](https://doc.nette.org/composer): curl -s http://getcomposer.org/installer | php php composer.phar update diff --git a/Fifteen/www/css/style.css b/Fifteen/www/css/style.css index e62798e..4fc565f 100644 --- a/Fifteen/www/css/style.css +++ b/Fifteen/www/css/style.css @@ -13,7 +13,7 @@ body { h1 { font-size: 1.9em; margin: .5em 0 1.5em; - background: url(http://files.nette.org/icons/logo-e1.png) right center no-repeat; + background: url(https://files.nette.org/icons/logo-e1.png) right center no-repeat; color: #7A7772; text-shadow: 1px 1px 0 white; } diff --git a/Fifteen/www/js/jquery.nette.js b/Fifteen/www/js/jquery.nette.js index bc6a0a8..694bd09 100644 --- a/Fifteen/www/js/jquery.nette.js +++ b/Fifteen/www/js/jquery.nette.js @@ -4,7 +4,7 @@ * @copyright Copyright (c) 2009, 2010 Jan Marek * @copyright Copyright (c) 2009, 2010 David Grudl * @license MIT - * @link http://nette.org/cs/extras/jquery-ajax + * @link https://addons.nette.org/honza-marek/jquery-ajax */ /* diff --git a/Micro-blog/composer.json b/Micro-blog/composer.json index 6dbe1e8..563097d 100644 --- a/Micro-blog/composer.json +++ b/Micro-blog/composer.json @@ -6,11 +6,11 @@ "authors": [ { "name": "David Grudl", - "homepage": "http://davidgrudl.com" + "homepage": "https://davidgrudl.com" }, { "name": "Nette Community", - "homepage": "http://nette.org/contributors" + "homepage": "https://nette.org/contributors" } ], "require": { diff --git a/Micro-blog/readme.md b/Micro-blog/readme.md index ba06668..b787a14 100644 --- a/Micro-blog/readme.md +++ b/Micro-blog/readme.md @@ -1,10 +1,10 @@ Micro-blog (Nette Framework example) ------------------------------------ -A simple example showing how to use [Nette Framework](http://nette.org) as a micro-framework. +A simple example showing how to use [Nette Framework](https://nette.org) as a micro-framework. -What is [Nette Framework](http://nette.org)? +What is [Nette Framework](https://nette.org)? -------------------------------------------- Nette Framework is a popular tool for PHP web development. It is designed to be @@ -18,7 +18,7 @@ Installing ---------- The best way to install Nette Framework is to download latest package -from http://nette.org/download or using [Composer](http://doc.nette.org/composer): +from https://nette.org/download or using [Composer](https://doc.nette.org/composer): curl -s http://getcomposer.org/installer | php php composer.phar update diff --git a/Micro-blog/www/config.neon b/Micro-blog/www/config.neon index 75e1a67..efcdc3a 100644 --- a/Micro-blog/www/config.neon +++ b/Micro-blog/www/config.neon @@ -1,6 +1,6 @@ # # SECURITY WARNING: it is CRITICAL that this file & directory are NOT accessible directly via a web browser! -# http://nette.org/security-warning +# https://nette.org/security-warning # php: date.timezone: Europe/Prague diff --git a/Micro-blog/www/data/templates/@layout.latte b/Micro-blog/www/data/templates/@layout.latte index 1092eea..ef116da 100644 --- a/Micro-blog/www/data/templates/@layout.latte +++ b/Micro-blog/www/data/templates/@layout.latte @@ -11,6 +11,6 @@ {include content} -

This is a Nette Framework example.

+

This is a Nette Framework example.

diff --git a/Modules-Usage/app/config.neon b/Modules-Usage/app/config.neon index d93b9a3..5d8797a 100644 --- a/Modules-Usage/app/config.neon +++ b/Modules-Usage/app/config.neon @@ -1,6 +1,6 @@ # # SECURITY WARNING: it is CRITICAL that this file & directory are NOT accessible directly via a web browser! -# http://nette.org/security-warning +# https://nette.org/security-warning # php: date.timezone: Europe/Prague diff --git a/Modules-Usage/composer.json b/Modules-Usage/composer.json index 34ba9c7..8552c37 100644 --- a/Modules-Usage/composer.json +++ b/Modules-Usage/composer.json @@ -6,11 +6,11 @@ "authors": [ { "name": "David Grudl", - "homepage": "http://davidgrudl.com" + "homepage": "https://davidgrudl.com" }, { "name": "Nette Community", - "homepage": "http://nette.org/contributors" + "homepage": "https://nette.org/contributors" } ], "require": { diff --git a/Modules-Usage/readme.md b/Modules-Usage/readme.md index 69a563b..1cd4230 100644 --- a/Modules-Usage/readme.md +++ b/Modules-Usage/readme.md @@ -1,12 +1,12 @@ Modules (Nette Framework example) --------------------------------- -The example demonstrates the usage of modules and submodules in [Nette Framework](http://nette.org). +The example demonstrates the usage of modules and submodules in [Nette Framework](https://nette.org). Presenters (and then templates) are separated on two main modules Front and Admin. Furthermore, the Front module contains the Export submodule. -What is [Nette Framework](http://nette.org)? +What is [Nette Framework](https://nette.org)? -------------------------------------------- Nette Framework is a popular tool for PHP web development. It is designed to be @@ -20,7 +20,7 @@ Installing ---------- The best way to install Nette Framework is to download latest package -from http://nette.org/download or using [Composer](http://doc.nette.org/composer): +from https://nette.org/download or using [Composer](https://doc.nette.org/composer): curl -s http://getcomposer.org/installer | php php composer.phar update diff --git a/Modules-Usage/www/css/site.css b/Modules-Usage/www/css/site.css index 0cb4f1f..a167c1e 100644 --- a/Modules-Usage/www/css/site.css +++ b/Modules-Usage/www/css/site.css @@ -13,7 +13,7 @@ body { h1 { font: 1.9em/1.5 sans-serif; margin: .5em 0 1.5em; - background: url(http://files.nette.org/icons/logo-e1.png) right center no-repeat; + background: url(https://files.nette.org/icons/logo-e1.png) right center no-repeat; color: #7A7772; text-shadow: 1px 1px 0 white; } diff --git a/license.md b/license.md index 68c9109..3fdd7c2 100644 --- a/license.md +++ b/license.md @@ -22,7 +22,7 @@ If your stuff is good, it will not take long to establish a reputation for yours New BSD License --------------- -Copyright (c) 2004, 2013 David Grudl (http://davidgrudl.com) +Copyright (c) 2004, 2013 David Grudl (https://davidgrudl.com) All rights reserved. Redistribution and use in source and binary forms, with or without modification, From 96afb6c8e011e5e3e8ffde9a4ccb7931aca26b69 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sat, 6 Feb 2016 23:26:20 +0100 Subject: [PATCH 13/15] typo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7e2044f..2768f1d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ script: before_script: - travis_retry composer create-project nette/code-checker code-checker ~2.5 --no-interaction - + sudo: false cache: From 20a3ba4fd19d5cba56966250bc83b91031b5cc82 Mon Sep 17 00:00:00 2001 From: David Grudl Date: 2016年3月21日 16:11:25 +0100 Subject: [PATCH 14/15] Fifteen: updated JS --- Fifteen/www/js/jquery.nette.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Fifteen/www/js/jquery.nette.js b/Fifteen/www/js/jquery.nette.js index 694bd09..7d3d4cd 100644 --- a/Fifteen/www/js/jquery.nette.js +++ b/Fifteen/www/js/jquery.nette.js @@ -85,7 +85,7 @@ jQuery(function($) { $.nette.createSpinner(); // apply AJAX unobtrusive way - $('a.ajax').live('click', function(event) { + $('body').on('click', 'a.ajax', function(event) { event.preventDefault(); if ($.active) return; From d84c7f4f1489d03c75b2df79022192d86cc0312e Mon Sep 17 00:00:00 2001 From: David Grudl Date: 2016年4月21日 11:07:56 +0200 Subject: [PATCH 15/15] travis: fixed test --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2768f1d..71e9844 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: php php: - - 5.3.3 + - 5.3 script: - php code-checker/src/code-checker.php