Skip to content

Commit

Permalink
updated elgg in public.svn
Browse files Browse the repository at this point in the history
  • Loading branch information
Flatsoft Admin committed May 21, 2010
1 parent f4ec99e commit b1217c5
Show file tree
Hide file tree
Showing 4,009 changed files with 381,714 additions and 9,261 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1,051 changes: 1,051 additions & 0 deletions backup/dump.sql

Large diffs are not rendered by default.

Binary file added backup/dump.sql.tgz
Binary file not shown.
Binary file added backup/elgg-1.7.1.tgz
Binary file not shown.
Binary file added backup/mod.backup.tgz
Binary file not shown.
Binary file added backup/mod.tgz
Binary file not shown.
4 changes: 2 additions & 2 deletions config/deploy/geolocation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set :use_sudo, false
set :app_dir, "/home/ubuntu/elgg/current/mod/geolocation/"
set :deploy_to, "/home/ubuntu/elgg/geolocation/"
set :repository, "http://tgs.unfuddle.com/svn/tgs_geolocation"
set :repository, "http://tgs.unfuddle.com/svn/tgs_geolocation/trunk"
#set :branch, "staging"

namespace :deploy do
Expand All @@ -26,4 +26,4 @@
# task :symlink, :roles => [:app] do
# run "ln -s #{deploy_to}current #{app_dir}"
# end
end
end
4 changes: 2 additions & 2 deletions config/deploy/googleappslogin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set :use_sudo, false
set :app_dir, "/home/ubuntu/elgg/current/mod/googleappslogin/"
set :deploy_to, "/home/ubuntu/elgg/googleappslogin/"
set :repository, "http://tgs.unfuddle.com/svn/tgs_elgg-google"
set :repository, "http://tgs.unfuddle.com/svn/tgs_elgg-google/trunk"
#set :branch, "staging"

namespace :deploy do
Expand All @@ -26,4 +26,4 @@
# task :symlink, :roles => [:app] do
# run "ln -s #{deploy_to}current #{app_dir}"
# end
end
end
137 changes: 137 additions & 0 deletions public.1/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# Elgg htaccess directives
# Copyright Curverider Ltd 2008-2009
# License http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
# Link http://elgg.org/

<IfModule !mod_rewrite.c>
# ugly ugly hack to detect missing mod_rewrite
# RedirectMatch must be to an absolute destination, so forces 500 error...
ErrorDocument 500 "Elgg error: Apache does not have mod_rewrite loaded. Please check your Apache setup."
RedirectMatch 302 .* index.php
</IfModule>

<Files "htaccess_dist">
order allow,deny
deny from all
</Files>

# Don't listing directory
Options -Indexes

# Follow symbolic links
Options +FollowSymLinks

# Default handler
DirectoryIndex index.php

# Turn on expiry
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 minutes"
</IfModule>

# php 4, apache 1.x
<IfModule mod_php4.c>
ErrorDocument 500 "Elgg error: Elgg does not support PHP 4."
RedirectMatch 302 .* index.php
</IfModule>

# php 4, apache 2
<IfModule sapi_apache2.c>
ErrorDocument 500 "Elgg error: Elgg does not support PHP 4."
RedirectMatch 302 .* index.php
</IfModule>

# php 5, apache 1 and 2
<IfModule mod_php5.c>
# default memory limit to 64Mb
php_value memory_limit 128M
# to make sure register global is off
php_value register_globals 0
# max post size to 8Mb
php_value post_max_size 8388608
# upload size limit to 5Mb
php_value upload_max_filesize 5242880
# hide errors, enable only if debug enabled
php_value display_errors 0
</IfModule>

# Turn on mod_gzip if available
<IfModule mod_gzip.c>
mod_gzip_on yes
mod_gzip_dechunk yes
mod_gzip_keep_workfiles No
mod_gzip_minimum_file_size 1000
mod_gzip_maximum_file_size 1000000
mod_gzip_maximum_inmem_size 1000000
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/javascript$
mod_gzip_item_include mime ^application/x-javascript$
# Exclude old browsers and images since IE has trouble with this
mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\["
mod_gzip_item_exclude mime ^image/.*
</IfModule>

## Apache2 deflate support if available
##
## Important note: mod_headers is required for correct functioning across proxies.
##
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.[0678] no-gzip
BrowserMatch \bMSIE !no-gzip

<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>

# The following is to disable compression for actions. The reason being is that these
# may offer direct downloads which (since the initial request comes in as text/html and headers
# get changed in the script) get double compressed and become unusable when downloaded by IE.
SetEnvIfNoCase Request_URI action\/* no-gzip dont-vary
SetEnvIfNoCase Request_URI actions\/* no-gzip dont-vary

</IfModule>

# Configure ETags
<FilesMatch "\.(jpg|jpeg|gif|png|mp3|flv|mov|avi|3pg|html|htm|swf)$">
FileETag MTime Size
</FilesMatch>

<IfModule mod_rewrite.c>

RewriteEngine on

# If Elgg is in a subdirectory on your site, you might need to add a RewriteBase line
# containing the path from your site root to elgg's root. e.g. If your site is
# http://example.com/ and Elgg is in http://example.com/sites/elgg/, you might need
#
#RewriteBase /sites/elgg/
#
# here, only without the # in front.
#
# If you're not running Elgg in a subdirectory on your site, but still getting lots
# of 404 errors beyond the front page, you could instead try:
#
#RewriteBase /

RewriteRule ^action\/([A-Za-z0-9\_\-\/]+)$ engine/handlers/action_handler.php?action=$1

RewriteRule ^services\/api\/([A-Za-z0-9\_\-]+)\/(.*)$ engine/handlers/service_handler.php?handler=$1&request=$2

RewriteRule ^export\/([A-Za-z]+)\/([0-9]+)$ services/export/handler.php?view=$1&guid=$2
RewriteRule ^export\/([A-Za-z]+)\/([0-9]+)\/$ services/export/handler.php?view=$1&guid=$2
RewriteRule ^export\/([A-Za-z]+)\/([0-9]+)\/([A-Za-z]+)\/([A-Za-z0-9\_]+)\/$ services/export/handler.php?view=$1&guid=$2&type=$3&idname=$4

RewriteRule ^\_css\/css\.css$ _css/css.php

RewriteRule ^pg\/([A-Za-z0-9\_\-]+)\/(.*)$ engine/handlers/pagehandler.php?handler=$1&page=$2
RewriteRule ^pg\/([A-Za-z0-9\_\-]+)$ engine/handlers/pagehandler.php?handler=$1

RewriteRule xml-rpc.php engine/handlers/xml-rpc_handler.php
RewriteRule mt/mt-xmlrpc.cgi engine/handlers/xml-rpc_handler.php

RewriteRule ^tag/(.+)/?$ engine/handlers/pagehandler.php?handler=search&page=$1

</IfModule>
90 changes: 90 additions & 0 deletions public.1/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
Version 1.7.1
(April 21, 2010 from http://code.elgg.org/elgg/branches/1.7)

UI changes:
* (Unused) tags field removed from external pages.
* Languages fixes in groups.
* Installation checks database settings before writing settings.php.
* Made the widgets more consistent in their UI.

Bugfixes:
* Pagination fixed.
* Profile icons fixed for PHP-CGI users who were seeing incorrect avatars.
* Tag search works in groups and members.
* Tag clouds correctly link to tag search.
* RSS views added to search.
* Wrapper function for get_entities() correctly rewrites container_guid to
owner_guid.
* output/url correctly appends http:// again.
* full_url() urlencode()'s ' and " to avoid a security problem in IE.

API changes:
* Moved admin flag to users_entity table and added ElggUser->isAdmin(),
->makeAdmin(), and ->removeAdmin() to replace the metadata.
* Plugin hook for reported content includes the report object.
* UTF8 upgrade checks server defaults before running to avoid
corrupted strings.
* Tags lib updated to elgg_get_*() interface.
* Can get entities based upon annotation/metadata owner_guid.
* Moved friendly time and friendly title into overridable views.
* Added unregister_notification_handler().
* Added remove_widget_type().
* Search supports container_guid.

Version 1.7.0
(March 2, 2010 from http://code.elgg.org/elgg/trunk/)

User-visible changes:
* UTF8 now saved correctly in database. #1151
* Unit tests added to System diagnostics.
* Debug values output to screen when enabled in admin settings.
* Users can now log in from multiple computers or browsers concurrently.
* Misconfigured plugins no longer break the site. #1454
* User display names cannot have HTML or be longer than 50 characters.
* New search system.

Bugfixes:
* Searching by tag with extended characters now works. #1151, #1231
* Searching for entities works properly with case-insensitive metadata. #1326
* Invalid views now default to 'default' view. #1161.
* Metadata cache now handles a 0 string. #1227
* ElggPlugin get() now works with 0. #1286
* Metadata __isset() now works for falsy values (except NULL). #1414
* clear_plugin_setting() now only clears a single setting.
* Submenu entries are correctly calculated after a simplecache refresh.

API changes:
* New plugin hook system:unit_test for adding files to unit tests.
* $is_admin global deprecated; use elgg_set_ignore_access() instead.
* Deprecated get_entities(). Use elgg_get_entities().
* Deprecated get_entities_from_metadata(). Use elgg_get_entities_from_metadata().
* Deprecated get_entities_from_relationship() and g_e_f_relationships_and_meta(). Use elgg_get_entities_from_relationship().
* Deprecated get_entities_from_access_id(). Use elgg_get_entities_from_access_id().
* Deprecated get_entities_from_annotations(). Use elgg_get_entities_from_annotations().
* Reorganized directory file path to rely on GUID instead of username.
* annotation_id column added to the river database table.
* remove_from_river_by_annotation() added.
* unregister_elgg_event_handler() and unregister_plugin_hook() added. #1465
* clear_all_plugin_settings() added.
* get_entity_relationships() supports inverse relationships. #1472.
* can_write_to_container() can be overridden with the container_permissions_check hook. #1164 (part 2).
* Deprecated search_for_*().
* Deprecated search_list*().
* Added elgg_deprecated_notice().
* ElggEntity::countEntitiesFromRelationship() supports inverse relationships. #1325
* delete_relationship() triggers the hook delete:relationship and passes the relationship object. #1213
* added ElggEntity::removeRelationship(). #1376.
* get_entity_dates() supports order by. #1406.
* Added elgg_http_add_url_query_elements().
* Added elgg_register_tag_metadata_name() and elgg_get_registered_tag_metadata_names();
* Added ElggEntity::getTags().
* Added elgg_add_action_tokens_to_url().

Services API:
* Separated user and api authenticate processing
* hmac signature encoding now compatible with OAuth
* New plugin hook api_key:use for keeping stats on key usage
* New plugin hook rest:init so plugins can configure authentication modules
* Moved auth.gettoken to POST for increased security
* Fixed REST POST bug #1114
* Fixed #881, #1214, #1215, #1216, #1217, #1218, #1219, #1220, #1298, #1364
113 changes: 113 additions & 0 deletions public.1/CODING.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
*** CODING STANDARDS ***

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 standalone functions using underscore_character().
* Name classes using CamelCase() and methods using lowerCamelCase().
* 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, marginal speed improvements.)


*** DEPRECATING APIs ***

Occasionally, functions and classes must be deprecated in favor of newer
replacements. Since 3rd party plugin authors rely on a consistent API,
backward compatibility must be maintained, but will not be maintained
indefinitely as plugin authors are expected to properly update their
plugins. In order to maintain backward compatibility, deprecated APIs will
follow these guidelines:

* API changes cannot occur between bugfix versions (1.6.0 - 1.6.1).
* API changes between minor versions (1.6 - 1.7) must maintain backward
compatibility for at least 2 minor versions. (See procedures, below.)
* Bugfixes that change the API cannot be included in bugfix versions.
* API changes between major versions (1.0 - 2.0) can occur without regard to
backward compatibility.

The procedures for deprecating an API are as follows:

* The first minor version (1.7) with a deprecated API must include a wrapper
function/class (or otherwise appropriate means) to maintain backward
compatibility, including any bugs in the original function/class.
This wrapper function will use elgg_log('...', 'WARNING') to announce
that the function is deprecated.
* The second minor version (1.8) maintains the backward compatibility
wrapper, but in addition to elgg_log(), a register_error() message is also
thrown.
* The third minor version (1.9) removes the wrapper function. Any use of
the deprecated API should be corrected before this.

The general timeline for three minor releases is 8 to 12 months.


*** CODING BEST PRACTICES ***

The following best practices make code easier to read, easier to maintain,
and easier to debug. Consistent use of these guidelines means less guess
work for developers.

* Use self-documenting variable names. $group_guids is better than $array.
* Functions returning an array should return an empty array instead of FALSE
on no results.
* If not throwing an exception, boolean FALSE should be returned by functions
on failure or error.
* Functions returning only boolean should be prefaced with is_*(). (eg,
is_logged_in().)
* Ternary syntax is acceptable for single-line, non-embedded statements.
* Use comments effectively. Good comments describe the "why." Good code
describes the "how." Ex:
Not a very useful comment:

// increment $i only when the entity is marked as active.
foreach($entities as $entity) {
if ($entity->active == TRUE) {
$i++;
}
}

Useful comment:

// find the next index for inserting a new active entity.
foreach($entities as $entity) {
if ($entity->active == TRUE) {
$i++;
}
}
* Commit effectively: Err on the side of atomic commits. One revision with
many changes is scary.
* Commit effectively part 2: Use concise, meaningful commit messages. Ex:
Not meaningful: "Fixed some bugs in groups."
Meaningful: "Fixes #1234: Missing ) added in group profile page."

Loading

0 comments on commit b1217c5

Please sign in to comment.