Browse Source

update README

euromark 12 years ago
parent
commit
308e1f6cff
4 changed files with 30 additions and 16 deletions
  1. 3 2
      Model/MyModel.php
  2. 2 1
      README.md
  3. 0 13
      USAGE
  4. 25 0
      USAGE.md

+ 3 - 2
Model/MyModel.php

@@ -41,8 +41,9 @@ class MyModel extends Model {
 			$this->prefixOrderProperty();
 		}
 
-		# get a notice if there is an AppModel instances instead of real Models (in those cases usually a dev error!)
-		if (defined('HTTP_HOST') && HTTP_HOST && !is_a($this, $this->name) && $this->displayField !== 'id' && $this->useDbConfig !== 'test' && !Configure::read('Core.disableModelInstanceNotice')) {
+		# Get a notice if there is an AppModel instance instead of a real Model (in those cases usually a dev error!)
+		if (!is_a($this, $this->name) && $this->displayField !== 'id' && $this->useDbConfig !== 'test'
+			&& !Configure::read('Core.disableModelInstanceNotice')) {
 			trigger_error('AppModel instance! Expected: ' . $this->name);
 		}
 	}

+ 2 - 1
README.md

@@ -75,7 +75,7 @@ App::uses('GeocoderBehavior', 'Tools.Model/Behavior');
 ```
 
 Tip: For how to use them, try to find some information in the test cases.
-Usage for some larger modules: https://github.com/dereuromark/tools/blob/master/USAGE
+A quick reference or some larger modules: [USAGE.md](https://github.com/dereuromark/tools/blob/master/USAGE.md)
 
 ## The cool stuff
 
@@ -92,6 +92,7 @@ Usage for some larger modules: https://github.com/dereuromark/tools/blob/master/
 
 * Using the Common component's flashMessage() you can have colorful (success, warning, error, ...) flash messages.
   They also can stack up (multiple messages per type). This way no message is lost when redirecting twice etc.
+* TinyAuth authorization adapter with single and multi-role support - extremely fast and easy to use.
 * The Passwordable behavior allows easy to use functionality for frontend and backend.
 * Geocodeable, WhoDidIt, Confirmable and Bitmasked behaviors.
 * With MyModel you can build subqueries the Cake way.

+ 0 - 13
USAGE

@@ -1,13 +0,0 @@
-CODE KEY
-- http://www.dereuromark.de/2010/06/25/tools-plugin-part1-codekey
-
-QLOGIN
-- http://www.dereuromark.de/2012/02/08/qlogin-quicklogins-fur-cakephp/
-
-CAPTCHA
-- http://www.dereuromark.de/2010/08/09/how-to-implement-captchas-properly/
-
-GEOCODING
-- http://www.dereuromark.de/2012/06/12/geocoding-with-cakephp
-
-for all others, see the inline documentation

+ 25 - 0
USAGE.md

@@ -0,0 +1,25 @@
+# Usage of some larger modules
+
+## TinyAuth
+http://www.dereuromark.de/2011/12/18/tinyauth-the-fastest-and-easiest-authorization-for-cake2/
+
+## Tokens
+http://www.dereuromark.de/2010/06/25/tools-plugin-part1-codekey
+
+## Contact forms
+http://www.dereuromark.de/2011/12/15/tools-plugin-part-2-contact-form/
+
+## Qlogins
+http://www.dereuromark.de/2012/02/08/qlogin-quicklogins-fur-cakephp/
+
+## Captchas
+http://www.dereuromark.de/2010/08/09/how-to-implement-captchas-properly/
+
+## Geocoding
+http://www.dereuromark.de/2012/06/12/geocoding-with-cakephp
+
+## GoogleMaps
+http://www.dereuromark.de/2010/12/21/googlemapsv3-cakephp-helper/
+
+
+for all others, see the inline documentation