From d7b81d18263c1aedc6f7f08049b5bbde358ced9d Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Tue, 10 Jul 2012 14:48:35 +0100 Subject: [PATCH 1/8] Moved the Exceptions stuff to "Coding Practises" where we can show off a few tips on good code. --- .DS_Store | Bin 0 -> 6148 bytes _posts/.DS_Store | Bin 0 -> 15364 bytes ...-01-Namespaces.md => 03-03-01-Namespaces.md} | 0 ...rary.md => 03-04-01-Standard-PHP-Library.md} | 0 ...ce.md => 03-05-01-Command-Line-Interface.md} | 0 _posts/05-01-01-Coding-Practises.md | 1 + ...-01-Exceptions.md => 05-02-01-Exceptions.md} | 0 ...and-PDO.md => 06-01-01-Databases-and-PDO.md} | 0 ...6-01-01-Security.md => 07-01-01-Security.md} | 0 ....md => 07-02-01-Web-Application-Security.md} | 0 ...=> 07-03-01-Password-Hashing-with-Bcrypt.md} | 0 ... 07-04-01-Input-Filtering-and-Sanitizing.md} | 0 ...{07-01-01-Testing.md => 08-01-01-Testing.md} | 0 ...t.md => 08-02-01-Test-Driven-Development.md} | 0 ... => 08-03-01-Behavior-Driven-Development.md} | 0 ...nt.md => 09-01-01-Servers-and-Deployment.md} | 0 ...ice.md => 09-02-01-Platform-as-a-Service.md} | 0 ...=> 09-03-01-Virtual-or-Dedicated-Servers.md} | 0 ...ed-Servers.md => 09-04-01-Shared-Servers.md} | 0 ....md => 10-01-01-Libraries-and-Frameworks.md} | 0 ...01-01-Resources.md => 11-01-01-Resources.md} | 0 21 files changed, 1 insertion(+) create mode 100644 .DS_Store create mode 100644 _posts/.DS_Store rename _posts/{03-04-01-Namespaces.md => 03-03-01-Namespaces.md} (100%) rename _posts/{03-05-01-Standard-PHP-Library.md => 03-04-01-Standard-PHP-Library.md} (100%) rename _posts/{03-06-01-Command-Line-Interface.md => 03-05-01-Command-Line-Interface.md} (100%) create mode 100644 _posts/05-01-01-Coding-Practises.md rename _posts/{03-03-01-Exceptions.md => 05-02-01-Exceptions.md} (100%) rename _posts/{05-01-01-Databases-and-PDO.md => 06-01-01-Databases-and-PDO.md} (100%) rename _posts/{06-01-01-Security.md => 07-01-01-Security.md} (100%) rename _posts/{06-02-01-Web-Application-Security.md => 07-02-01-Web-Application-Security.md} (100%) rename _posts/{06-03-01-Password-Hashing-with-Bcrypt.md => 07-03-01-Password-Hashing-with-Bcrypt.md} (100%) rename _posts/{06-04-01-Input-Filtering-and-Sanitizing.md => 07-04-01-Input-Filtering-and-Sanitizing.md} (100%) rename _posts/{07-01-01-Testing.md => 08-01-01-Testing.md} (100%) rename _posts/{07-02-01-Test-Driven-Development.md => 08-02-01-Test-Driven-Development.md} (100%) rename _posts/{07-03-01-Behavior-Driven-Development.md => 08-03-01-Behavior-Driven-Development.md} (100%) rename _posts/{08-01-01-Servers-and-Deployment.md => 09-01-01-Servers-and-Deployment.md} (100%) rename _posts/{08-02-01-Platform-as-a-Service.md => 09-02-01-Platform-as-a-Service.md} (100%) rename _posts/{08-03-01-Virtual-or-Dedicated-Servers.md => 09-03-01-Virtual-or-Dedicated-Servers.md} (100%) rename _posts/{08-04-01-Shared-Servers.md => 09-04-01-Shared-Servers.md} (100%) rename _posts/{09-01-01-Libraries-and-Frameworks.md => 10-01-01-Libraries-and-Frameworks.md} (100%) rename _posts/{10-01-01-Resources.md => 11-01-01-Resources.md} (100%) diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9acd805f46f5723c6168cda80f4244c7bde37ecb GIT binary patch literal 6148 zcmeHK%}T>S5T0#oO;8~h(c|K|N_wawcnG0_N1=rttki@E4V0!dDLuq!diGs>9G}OT z-L+5+J&NcI%zm@;v)O!*-3$N-e-X6-900IT2?ZGyLhi~?%_Iv%R9qv2G+d^$aFT=- z3;jkH?Y#*jm_Y*Rm;Jwmvq_w0uKO-(^~O$f*Rm~Ze>jMzQL^-t#WYIqdgEl-i=)Rd znBOZq3$jJ(2Xhs<4YDytl-*B~3ED%GJ&2=hJaUfmynWtj$y2vz$^5e8w&X?IEehMR zZRgcGJUP3%=?D2!@%*Cc6SQNJ0}bnOwYJz`2ABb6fEi#0wlQFC5^HZ;633VUX5e2k zK<9%*CG-rI8r9K(gK7Z~8|YSoHuVxzBMo{6ON|&o5xNvnmkQHj2wjeTY4SXSrAA#2 z!ZaVkJo&SE5$frEUPPo}cT-z?!7Gr$b|F$P4V+w1!H zQs!>`_Ih;JO4J8b63Q#dKtX%sCjcjOjvT9?j!UvJ&ofwRq*chT$`ScTKoP literal 0 HcmV?d00001 diff --git a/_posts/.DS_Store b/_posts/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..a2599f293c85923a980b59f5983df7b4823aea99 GIT binary patch literal 15364 zcmeHN+ip`w6x}DyLnL@WYC(dQ;$Eaim5c%{w>M*)5G0^hQs50WzK~e>CdUENCx1pi zsvpn~=tKXaU2D&rnXx^Fst*X!eWG*r$sEsGGi$Gz@tj0Niuy_Cnn*=NHgGbYJBv%^ z;B%f!$C@ws60tyik!wW^AL;Go;Vx%syqxD)w4pk5De1)j(;>Q{ksr174d0CR%- zA<9aYmh|=MQ(Pyg(UTFL=Qw{~;Jgwze+Zm)aP)vkeDG2$C`p^oNH(C#{$yDfOI1uJ=4~8(AU@KGqqp_Rv@lDUqJiQ%k3dayjx=e0iW^dN(-9{DZt$X5Y9 zw!Mj*jDR))`T#$r1Dp7rWgX=htYDxcQicnGA@*Wh-XLdPa_Hu13Fe}W} z=g5mWj7rm|ZtkR`*)qC~ZC>e+Io!*@jkzn;Jpjr9yl~)=(%v`Zr(BEajXC6R19DWg zoD=Ut*|Cn}HaN=h;bx;YM*IYQn6B_3=8id@&A^i?%a$KwjvE1sF5K0=90j#rE5i|< z)S(&u&T*RYqq^ly;ufwrPO<1pI(v+EPl2}sWUd2rO_`f=EbOBdLuKyCul{L{lkQ15 zKLh72V7vUdD`)O^XjRZfDbA-EoS)Szm64?j#S?F zk%{r!My2{EZR>Y|CFZpbq$6nf3feKV|DBC4O4&FE+|DRmuH46XR%X%7KJ3xy+j^wV z`73b_XEMhTb!$Qyj(`{1pMkPCE;ky;-$S0W>!{EtDFerXV~CnPMSXsw;yT&~eyJP3 zVG)_^ypMczZhrQlpHjX{fiI4Qea#TRZT&k;x+}%xym1GuNxhz~Og$i{+1NpAxrTTB zXn&b+yZS5TIgh^}Z7uNZDfUQbpp~mESE#ubW6`z46fgx$0aIW}flpjXh425jSO5Kg zsh$;>0;a&nqd>9V*l*O)AOCKBsb_rGUcvbbP9FT+%tft&i@uIWTt_i~;p_NK-lJ@b zkq7Q;KF(Z336A&v$AFFGyT9%K`CnVM|Np=3|8?Zq#S}0FOaW8C6fgx$0aL&fFa=Bj UQ@|831xx``z!WeAK1K!p0jFpRwEzGB literal 0 HcmV?d00001 diff --git a/_posts/03-04-01-Namespaces.md b/_posts/03-03-01-Namespaces.md similarity index 100% rename from _posts/03-04-01-Namespaces.md rename to _posts/03-03-01-Namespaces.md diff --git a/_posts/03-05-01-Standard-PHP-Library.md b/_posts/03-04-01-Standard-PHP-Library.md similarity index 100% rename from _posts/03-05-01-Standard-PHP-Library.md rename to _posts/03-04-01-Standard-PHP-Library.md diff --git a/_posts/03-06-01-Command-Line-Interface.md b/_posts/03-05-01-Command-Line-Interface.md similarity index 100% rename from _posts/03-06-01-Command-Line-Interface.md rename to _posts/03-05-01-Command-Line-Interface.md diff --git a/_posts/05-01-01-Coding-Practises.md b/_posts/05-01-01-Coding-Practises.md new file mode 100644 index 0000000..f3e99af --- /dev/null +++ b/_posts/05-01-01-Coding-Practises.md @@ -0,0 +1 @@ +# Coding Practises \ No newline at end of file diff --git a/_posts/03-03-01-Exceptions.md b/_posts/05-02-01-Exceptions.md similarity index 100% rename from _posts/03-03-01-Exceptions.md rename to _posts/05-02-01-Exceptions.md diff --git a/_posts/05-01-01-Databases-and-PDO.md b/_posts/06-01-01-Databases-and-PDO.md similarity index 100% rename from _posts/05-01-01-Databases-and-PDO.md rename to _posts/06-01-01-Databases-and-PDO.md diff --git a/_posts/06-01-01-Security.md b/_posts/07-01-01-Security.md similarity index 100% rename from _posts/06-01-01-Security.md rename to _posts/07-01-01-Security.md diff --git a/_posts/06-02-01-Web-Application-Security.md b/_posts/07-02-01-Web-Application-Security.md similarity index 100% rename from _posts/06-02-01-Web-Application-Security.md rename to _posts/07-02-01-Web-Application-Security.md diff --git a/_posts/06-03-01-Password-Hashing-with-Bcrypt.md b/_posts/07-03-01-Password-Hashing-with-Bcrypt.md similarity index 100% rename from _posts/06-03-01-Password-Hashing-with-Bcrypt.md rename to _posts/07-03-01-Password-Hashing-with-Bcrypt.md diff --git a/_posts/06-04-01-Input-Filtering-and-Sanitizing.md b/_posts/07-04-01-Input-Filtering-and-Sanitizing.md similarity index 100% rename from _posts/06-04-01-Input-Filtering-and-Sanitizing.md rename to _posts/07-04-01-Input-Filtering-and-Sanitizing.md diff --git a/_posts/07-01-01-Testing.md b/_posts/08-01-01-Testing.md similarity index 100% rename from _posts/07-01-01-Testing.md rename to _posts/08-01-01-Testing.md diff --git a/_posts/07-02-01-Test-Driven-Development.md b/_posts/08-02-01-Test-Driven-Development.md similarity index 100% rename from _posts/07-02-01-Test-Driven-Development.md rename to _posts/08-02-01-Test-Driven-Development.md diff --git a/_posts/07-03-01-Behavior-Driven-Development.md b/_posts/08-03-01-Behavior-Driven-Development.md similarity index 100% rename from _posts/07-03-01-Behavior-Driven-Development.md rename to _posts/08-03-01-Behavior-Driven-Development.md diff --git a/_posts/08-01-01-Servers-and-Deployment.md b/_posts/09-01-01-Servers-and-Deployment.md similarity index 100% rename from _posts/08-01-01-Servers-and-Deployment.md rename to _posts/09-01-01-Servers-and-Deployment.md diff --git a/_posts/08-02-01-Platform-as-a-Service.md b/_posts/09-02-01-Platform-as-a-Service.md similarity index 100% rename from _posts/08-02-01-Platform-as-a-Service.md rename to _posts/09-02-01-Platform-as-a-Service.md diff --git a/_posts/08-03-01-Virtual-or-Dedicated-Servers.md b/_posts/09-03-01-Virtual-or-Dedicated-Servers.md similarity index 100% rename from _posts/08-03-01-Virtual-or-Dedicated-Servers.md rename to _posts/09-03-01-Virtual-or-Dedicated-Servers.md diff --git a/_posts/08-04-01-Shared-Servers.md b/_posts/09-04-01-Shared-Servers.md similarity index 100% rename from _posts/08-04-01-Shared-Servers.md rename to _posts/09-04-01-Shared-Servers.md diff --git a/_posts/09-01-01-Libraries-and-Frameworks.md b/_posts/10-01-01-Libraries-and-Frameworks.md similarity index 100% rename from _posts/09-01-01-Libraries-and-Frameworks.md rename to _posts/10-01-01-Libraries-and-Frameworks.md diff --git a/_posts/10-01-01-Resources.md b/_posts/11-01-01-Resources.md similarity index 100% rename from _posts/10-01-01-Resources.md rename to _posts/11-01-01-Resources.md From 784778298801f4bc7d512f8fa4a9c887edd1159d Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Tue, 10 Jul 2012 14:53:02 +0100 Subject: [PATCH 2/8] Removed a negative punt at W3Schools, no need to be rude even if they do have terrible old tutorials. --- _includes/welcome.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/welcome.md b/_includes/welcome.md index 080cd94..5fbe7f2 100644 --- a/_includes/welcome.md +++ b/_includes/welcome.md @@ -1,6 +1,6 @@ # Welcome -There's a lot of bad information on the Web (I'm looking at you, W3Schools) that leads new PHP users astray, propagating bad practices and bad code. This must stop. _PHP: The Right Way_ is an easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative tutorials around the Web. +There's a lot of outdated information on the Web that leads new PHP users astray, propagating bad practices and bad code. This must stop. _PHP: The Right Way_ is an easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative tutorials around the Web. It is important to understand _there is no canonical way to use PHP_. That's the beauty of it. This website introduces new PHP developers to best practices, available options, and good information. From 5efd908b91f0664d68697a28e377edc167dd15ac Mon Sep 17 00:00:00 2001 From: Kris Jordan Date: Tue, 10 Jul 2012 10:26:19 -0400 Subject: [PATCH 3/8] Spelling inconsistency broke sidebar nav. Fixed. --- _posts/08-03-01-Behavior-Driven-Development.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/08-03-01-Behavior-Driven-Development.md b/_posts/08-03-01-Behavior-Driven-Development.md index 9f0d4ea..c1c1b99 100644 --- a/_posts/08-03-01-Behavior-Driven-Development.md +++ b/_posts/08-03-01-Behavior-Driven-Development.md @@ -2,7 +2,7 @@ isChild: true --- -## Behaviour Driven Development +## Behavior Driven Development There are two different types of Behavior-Driven Development (BDD): SpecBDD and StoryBDD. SpecBDD focuses on technical behavior or code, while StoryBDD focuses on business or feature behaviors or interactions. PHP has frameworks for both types of BDD. From 6573438bc1ac1a05c115f20b35da76358fe14418 Mon Sep 17 00:00:00 2001 From: Kris Jordan Date: Tue, 10 Jul 2012 10:29:00 -0400 Subject: [PATCH 4/8] Fixing spelling inconsistency. --- _posts/05-01-01-Coding-Practices.md | 1 + _posts/05-01-01-Coding-Practises.md | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 _posts/05-01-01-Coding-Practices.md delete mode 100644 _posts/05-01-01-Coding-Practises.md diff --git a/_posts/05-01-01-Coding-Practices.md b/_posts/05-01-01-Coding-Practices.md new file mode 100644 index 0000000..c5e80a3 --- /dev/null +++ b/_posts/05-01-01-Coding-Practices.md @@ -0,0 +1 @@ +# Coding Practices diff --git a/_posts/05-01-01-Coding-Practises.md b/_posts/05-01-01-Coding-Practises.md deleted file mode 100644 index f3e99af..0000000 --- a/_posts/05-01-01-Coding-Practises.md +++ /dev/null @@ -1 +0,0 @@ -# Coding Practises \ No newline at end of file From ed91fe4705c8e6087e18d84f4441cee283fe7e57 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Tue, 10 Jul 2012 15:31:36 +0100 Subject: [PATCH 5/8] Updated PDO and Abstraction Layer stuff. --- _posts/06-01-01-Databases-and-PDO.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/_posts/06-01-01-Databases-and-PDO.md b/_posts/06-01-01-Databases-and-PDO.md index 5791fb6..9b810f7 100644 --- a/_posts/06-01-01-Databases-and-PDO.md +++ b/_posts/06-01-01-Databases-and-PDO.md @@ -1,6 +1,9 @@ # Databases and PDO -Many times your PHP code will use a database to persist information. If you use a database, use `PDO` to talk with it. PDO is a database abstraction library — (usually) built into PHP — that provides a common interface to talk with many different databases. +Many times your PHP code will use a database to persist information. If you use a database, use `PDO` to talk with it. PDO is a +database connection abstraction library — built into PHP since 5.1.0 — that provides a common interface to talk with +many different databases. PDO will not translate your SQL queries or emulate missing features, it is purely for connecting to multiple +types of database with the same API. More importantly, `PDO` allows you to safely inject foreign input (e.g. IDs) into your SQL queries without worrying about database SQL injection attacks. This is possible using PDOStatements and bound parameters. @@ -12,7 +15,8 @@ $pdo = new PDO('sqlite:users.db'); $pdo->query("SELECT name FROM users WHERE id = " . $_GET['id']); // <-- NO! {% endhighlight %} -This is terrible code. You are inserting a raw query parameter into a SQL query. This will get you hacked in a heartbeat. Instead, you should sanitize the ID input using PDO bound parameters. +This is terrible code. You are inserting a raw query parameter into a SQL query. This will get you hacked in a heartbeat. Instead, +you should sanitize the ID input using PDO bound parameters. {% highlight php %} bindParam(':id', filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT $stmt->execute(); {% endhighlight %} -This is correct code. It uses a bound parameter on a PDO statement. This escapes the foreign input ID before it is introduced to the database preventing potential SQL injection attacks. +This is correct code. It uses a bound parameter on a PDO statement. This escapes the foreign input ID before it is introduced to the +database preventing potential SQL injection attacks. * [Learn about PDO][1] + +## Abstraction Layers + +Many frameworks provide their own abstraction layer which may or may not sit on top of PDO. These will often emulate features for +one database system that another is missing form another by wrapping your queries in PHP methods, giving you actual database abstraction. +This will of course add a little overhead, but if you are building a portable application that needs to work with MySQL, PostgreSQL and +SQLite then a little overhead will be worth it the sake of code cleanliness. + +Some abstraction layers have been built using the PSR-0 namespace standard so can be installed in any application you like: + * [Doctrine2 DBAL][2] * [ZF2 Db][4] * [ZF1 Db][3] From 9a36715bdc283054950ac2fc3b4ef9ff51664256 Mon Sep 17 00:00:00 2001 From: Kris Jordan Date: Tue, 10 Jul 2012 10:31:54 -0400 Subject: [PATCH 6/8] Removing .DS_Store files and gitignoring them. --- .DS_Store | Bin 6148 -> 0 bytes .gitignore | 1 + _posts/.DS_Store | Bin 15364 -> 0 bytes 3 files changed, 1 insertion(+) delete mode 100644 .DS_Store delete mode 100644 _posts/.DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 9acd805f46f5723c6168cda80f4244c7bde37ecb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}T>S5T0#oO;8~h(c|K|N_wawcnG0_N1=rttki@E4V0!dDLuq!diGs>9G}OT z-L+5+J&NcI%zm@;v)O!*-3$N-e-X6-900IT2?ZGyLhi~?%_Iv%R9qv2G+d^$aFT=- z3;jkH?Y#*jm_Y*Rm;Jwmvq_w0uKO-(^~O$f*Rm~Ze>jMzQL^-t#WYIqdgEl-i=)Rd znBOZq3$jJ(2Xhs<4YDytl-*B~3ED%GJ&2=hJaUfmynWtj$y2vz$^5e8w&X?IEehMR zZRgcGJUP3%=?D2!@%*Cc6SQNJ0}bnOwYJz`2ABb6fEi#0wlQFC5^HZ;633VUX5e2k zK<9%*CG-rI8r9K(gK7Z~8|YSoHuVxzBMo{6ON|&o5xNvnmkQHj2wjeTY4SXSrAA#2 z!ZaVkJo&SE5$frEUPPo}cT-z?!7Gr$b|F$P4V+w1!H zQs!>`_Ih;JO4J8b63Q#dKtX%sCjcjOjvT9?j!UvJ&ofwRq*chT$`ScTKoP diff --git a/.gitignore b/.gitignore index bd3f1fa..460916b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /_site/ +*.DS_Store diff --git a/_posts/.DS_Store b/_posts/.DS_Store deleted file mode 100644 index a2599f293c85923a980b59f5983df7b4823aea99..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15364 zcmeHN+ip`w6x}DyLnL@WYC(dQ;$Eaim5c%{w>M*)5G0^hQs50WzK~e>CdUENCx1pi zsvpn~=tKXaU2D&rnXx^Fst*X!eWG*r$sEsGGi$Gz@tj0Niuy_Cnn*=NHgGbYJBv%^ z;B%f!$C@ws60tyik!wW^AL;Go;Vx%syqxD)w4pk5De1)j(;>Q{ksr174d0CR%- zA<9aYmh|=MQ(Pyg(UTFL=Qw{~;Jgwze+Zm)aP)vkeDG2$C`p^oNH(C#{$yDfOI1uJ=4~8(AU@KGqqp_Rv@lDUqJiQ%k3dayjx=e0iW^dN(-9{DZt$X5Y9 zw!Mj*jDR))`T#$r1Dp7rWgX=htYDxcQicnGA@*Wh-XLdPa_Hu13Fe}W} z=g5mWj7rm|ZtkR`*)qC~ZC>e+Io!*@jkzn;Jpjr9yl~)=(%v`Zr(BEajXC6R19DWg zoD=Ut*|Cn}HaN=h;bx;YM*IYQn6B_3=8id@&A^i?%a$KwjvE1sF5K0=90j#rE5i|< z)S(&u&T*RYqq^ly;ufwrPO<1pI(v+EPl2}sWUd2rO_`f=EbOBdLuKyCul{L{lkQ15 zKLh72V7vUdD`)O^XjRZfDbA-EoS)Szm64?j#S?F zk%{r!My2{EZR>Y|CFZpbq$6nf3feKV|DBC4O4&FE+|DRmuH46XR%X%7KJ3xy+j^wV z`73b_XEMhTb!$Qyj(`{1pMkPCE;ky;-$S0W>!{EtDFerXV~CnPMSXsw;yT&~eyJP3 zVG)_^ypMczZhrQlpHjX{fiI4Qea#TRZT&k;x+}%xym1GuNxhz~Og$i{+1NpAxrTTB zXn&b+yZS5TIgh^}Z7uNZDfUQbpp~mESE#ubW6`z46fgx$0aIW}flpjXh425jSO5Kg zsh$;>0;a&nqd>9V*l*O)AOCKBsb_rGUcvbbP9FT+%tft&i@uIWTt_i~;p_NK-lJ@b zkq7Q;KF(Z336A&v$AFFGyT9%K`CnVM|Np=3|8?Zq#S}0FOaW8C6fgx$0aL&fFa=Bj UQ@|831xx``z!WeAK1K!p0jFpRwEzGB From 02861a342580e1da2460a46f18cee140b600a150 Mon Sep 17 00:00:00 2001 From: = Date: Tue, 10 Jul 2012 10:43:20 -0400 Subject: [PATCH 7/8] Convert to CC non-commercial sharealike license --- LICENSE | 18 +----------------- README.md | 4 ++-- _layouts/default.html | 6 +++++- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/LICENSE b/LICENSE index ec361cb..e03e9bc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,19 +1,3 @@ Copyright (c) 2012 Josh Lockhart -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +http://creativecommons.org/licenses/by-nc-sa/3.0/ diff --git a/README.md b/README.md index 9095f34..7003f42 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,6 @@ There's been a lot of discussion lately about how the PHP community lacks suffic My name is [Josh Lockhart](http://twitter.com/codeguy). I'm the author of the [Slim Framework](http://www.slimframework.com/), and I work for [New Media Campaigns](http://www.newmediacampaigns.com/). -## Copyright +## License -[MIT](http://opensource.org/licenses/MIT) +[Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License][http://creativecommons.org/licenses/by-nc-sa/3.0/] diff --git a/_layouts/default.html b/_layouts/default.html index 7106a65..22148a3 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -62,9 +62,13 @@

Project sponsors

-

- Creative Commons License
PHP: The Right Way by Josh Lockhart is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Based on a work at www.phptherightway.com. + Creative Commons License
PHP: The Right Way by Josh Lockhart is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Based on a work at www.phptherightway.com.