]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Added coding styles and changes documents.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 11 Oct 2009 16:17:35 +0000 (16:17 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 11 Oct 2009 16:17:35 +0000 (16:17 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3526 36083f99-b078-4883-b0ff-0f9b5a30f544

CHANGES.txt [new file with mode: 0644]
CODING.txt [new file with mode: 0644]

diff --git a/CHANGES.txt b/CHANGES.txt
new file mode 100644 (file)
index 0000000..78944dd
--- /dev/null
@@ -0,0 +1,13 @@
+Version 1.7.0
+(?? November 2009 from /branches/1.7.x)
+http://code.elgg.org/elgg/.....
+
+ User-visible changes:
+  * UTF8 now saved correctly in database. #1151
+  * Unit tests added at engine/tests/suites.php
+
+ Bugfixes:
+  * Searching by tag with extended characters now works. #1151, #1231
+
+ API changes:
+  * New plugin hook system:unit_test for adding files to unit tests.
diff --git a/CODING.txt b/CODING.txt
new file mode 100644 (file)
index 0000000..a3b9209
--- /dev/null
@@ -0,0 +1,38 @@
+These are the coding standards for Elgg.  All core development, bundled 
+plugins, and tickets attached to Trac are expected to be in this format.
+
+* Unix line endings
+* Hard tabs, 4 character tab spacing.
+* No shortcut tags ( <? or <?= or <% )
+* PHPDoc comments on functions and classes (including methods and declared 
+  members).
+* Mandatory wrapped {}s around any code blocks. 
+       Bad:
+       if (true)
+               foreach($arr as $elem)
+                       echo $elem;
+
+       Good:
+       if (true) {
+               foreach($arr as $elem) {
+                       echo $elem;
+               }
+       }
+* Name functions and methods using underscore_character().
+* Name classes using CamelCase()
+* Name globals and constants in ALL_CAPS (FALSE, TRUE, NULL, ACCESS_FRIENDS, 
+  $CONFIG).
+* Space functions like_this($required, $optional = TRUE)
+* Space keywords and constructs like this: if (false) { ... }
+* Include variables in strings with double quotes instead of concatenating:
+       Bad: 
+       echo 'Hello, ' . $name . '!  How are you?';
+       
+       Good:
+       echo "Hello, $name!  How are you?"; 
+       
+* Line lengths should be reasonable.  If you are writing lines over 100 
+  characters, please revise the code.
+* Use slash-style comments. (// and /* */)
+* Preferred no closing ?> tag at EOF. (Avoids problems with trailing 
+  whitespace.)