Version 1.7.2
-(xxxxx from http://code.elgg.org/elgg/branches/1.7)
+(August 18, 2010 from http://code.elgg.org/elgg/branches/1.7)
UI Changes:
* Group "widgets" have been standardized with new blog and bookmark widgets.
Nicholas Whitt <nick@elgg.com>
http://twitter.com/nogoodnick
+
CONTRIBUTING DEVELOPERS
Cash Costello - http://cashcostello.com/
Justin Richer, Nathan Rackliffe, Tom Read, Jon Maul - MITRE http://www.mitre.org/
+Milan Magudia - http://hedgehogs.net/
+Evan Winslow - http://evanwinslow.com/
+
ALUMNI DEVELOPERS
if (trigger_elgg_event('create', 'annotation', $obj)) {
return $result;
} else {
+ // plugin returned false to reject annotation
delete_annotation($result);
+ return FALSE;
}
}
}
if (trigger_elgg_event('update', 'annotation', $obj)) {
return true;
} else {
+ // @todo add plugin hook that sends old and new annotation information before db access
delete_annotation($annotation_id);
}
}
return $new_entity;
}
+ // load class for entity if one is registered
$classname = get_subtype_class_from_id($row->subtype);
if ($classname!="") {
if (class_exists($classname)) {
error_log(sprintf(elgg_echo('ClassNotFoundException:MissingClass'), $classname));
}
}
- else {
+
+ if (!$new_entity) {
switch ($row->type) {
case 'object' :
$new_entity = new ElggObject($row);
$CONFIG->pluginlistcache = $plugins;
return $plugins;
} else {
+ // this only runs on install, otherwise uses serialized plugin order
$plugins = array();
if ($handle = opendir($CONFIG->pluginspath)) {
while ($mod = readdir($handle)) {
- if (!in_array($mod,array('.','..','.svn','CVS')) && is_dir($CONFIG->pluginspath . "/" . $mod)) {
+ // must be directory and not begin with a .
+ if (substr($mod, 0, 1) !== '.' && is_dir($CONFIG->pluginspath . "/" . $mod)) {
$plugins[] = $mod;
}
}
// Add new plugins to the end
if ($handle = opendir($CONFIG->pluginspath)) {
while ($mod = readdir($handle)) {
- if (!in_array($mod,array('.','..','.svn','CVS')) && is_dir($CONFIG->pluginspath . "/" . $mod)) {
+ // must be directory and not begin with a .
+ if (substr($mod, 0, 1) !== '.' && is_dir($CONFIG->pluginspath . "/" . $mod)) {
if (!in_array($mod, $pluginorder)) {
$max = $max + 10;
$pluginorder[$max] = $mod;
--- Previously was the UTF8 migration that is now in code at 2010033101.
+-- Previously was the UTF8 migration that is now in code at engine/lib/upgrades/2010033101.php
-- Keeping this file to force an overwrite and to avoid confusion with missing migrations.
}
// System booted, return to normal view
-set_input('view', $oldview);
-
-if (empty($oldview)) {
+if (!elgg_is_valid_view_type($oldview)) {
if (empty($CONFIG->view)) {
$oldview = 'default';
} else {
$oldview = $CONFIG->view;
}
}
+set_input('view', $oldview);
// Regenerate the simple cache if expired.
// Don't do it on upgrade, because upgrade does it itself.
'InvalidClassException:NotValidElggStar' => "GUID:%d is not a valid %s",
- 'PluginException:MisconfiguredPlugin' => "%s is a misconfigured plugin. It has been disabled. Please see the Elgg wiki for possible causes.",
+ 'PluginException:MisconfiguredPlugin' => "%s is a misconfigured plugin. It has been disabled. Please search the Elgg wiki for possible causes (http://docs.elgg.org/wiki/).",
'InvalidParameterException:NonElggUser' => "Passing a non-ElggUser to an ElggUser constructor!",
<?php
- if ($vars['entity'] instanceof ElggObject) {
- echo '<a href="'. $vars['entity']->getURL() .'">' . $vars['entity']->title . '</a>';
- }
-?>
\ No newline at end of file
+
+if ($vars['entity'] instanceof ElggObject) {
+ $title = htmlspecialchars($vars['entity']->title, ENT_QUOTES);
+ echo "<a href=\"{$vars['entity']->getURL()}\">$title</a>";
+}
'item:object:reported_content' => 'Reported items',
'reportedcontent' => 'Reported content',
'reportedcontent:this' => 'Report this',
- 'reportedcontent:this:title' => 'Report this page to the site administrator for review',
- 'reportedcontent:none' => 'There is no reported content at this time.',
+ 'reportedcontent:none' => 'There is no reported content',
'reportedcontent:report' => 'Report to admin',
'reportedcontent:title' => 'Page title',
'reportedcontent:deleted' => 'The reported content has been deleted',
'reportedcontent:notdeleted' => 'We were not able to delete that report',
- 'reportedcontent:delete' => 'Delete',
+ 'reportedcontent:delete' => 'Delete report',
'reportedcontent:areyousure' => 'Are you sure you want to delete?',
- 'reportedcontent:archive' => 'Archive',
+ 'reportedcontent:archive' => 'Archive report',
'reportedcontent:archived' => 'The report has been archived',
'reportedcontent:visit' => 'Visit reported item',
'reportedcontent:by' => 'Report by',
'reportedcontent:failing' => 'Your report could not be sent',
'reportedcontent:report' => 'Report this',
'reportedcontent:moreinfo' => 'More info',
- 'reportedcontent:warning' => 'Please don\'t abuse the reporting service.',
+
'reportedcontent:failed' => 'Sorry, the attempt to report this content has failed.',
'reportedcontent:notarchived' => 'We were not able to archive that report',
);
// can't use get_data() here because some servers don't have these globals set,
// which throws a db exception.
- $r = mysql_query('SELECT @@ft_min_word_len as min, @@ft_max_word_len as max');
+ $dblink = get_db_link('read');
+ $r = mysql_query('SELECT @@ft_min_word_len as min, @@ft_max_word_len as max', $dblink);
if ($r && ($word_lens = mysql_fetch_assoc($r))) {
$CONFIG->search_info['min_chars'] = $word_lens['min'];
$CONFIG->search_info['max_chars'] = $word_lens['max'];
-<?php
- /**
+<?php
+
+/**
* Elgg twitter view page
*
* @package ElggTwitter
* @copyright Curverider Ltd 2008-2010
* @link http://elgg.com/
*/
-
- //some required params
-
- $username = $vars['entity']->twitter_username;
- $num = $vars['entity']->twitter_num;
-
+
+//some required params
+
+$username = $vars['entity']->twitter_username;
+$num = $vars['entity']->twitter_num;
+
// if the twitter username is empty, then do not show
-if($username){
-
+if ($username) {
+
?>
<div id="twitter_widget">
-<ul id="twitter_update_list"></ul>
-<p class="visit_twitter"><a href="http://twitter.com/<?php echo $username; ?>"><?php echo elgg_echo("twitter:visit"); ?></a></p>
-<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
-<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/<?php echo $username; ?>.json?callback=twitterCallback2&count=<?php echo $num; ?>"></script>
-<?php
- } else {
- echo "<p>" . elgg_echo("twitter:notset") . ".</p>";
- }
-?>
-</div>
\ No newline at end of file
+ <ul id="twitter_update_list"></ul>
+ <p class="visit_twitter"><a href="http://twitter.com/<?php echo $username; ?>"><?php echo elgg_echo("twitter:visit"); ?></a></p>
+ <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
+ <script type="text/javascript" src="http://twitter.com/statuses/user_timeline/<?php echo $username; ?>.json?callback=twitterCallback2&count=<?php echo $num; ?>"></script>
+</div>
+
+<?php
+} else {
+
+ echo "<p>" . elgg_echo("twitter:notset") . ".</p>";
+
+}
*
* @uses $vars['object'] An error message (string)
*/
-echo elgg_view('output/longtext', array('value' => $vars['object']));
+
+echo elgg_view('output/longtext', array(
+ 'value' => $vars['object'],
+ 'parse_urls' => FALSE)
+);
* @uses $vars['object'] A system message (string)
*/
-echo elgg_view('output/longtext', array('value' => $vars['object']));
+echo elgg_view('output/longtext', array(
+ 'value' => $vars['object'],
+ 'parse_urls' => FALSE)
+);
* @author Curverider Ltd
* @link http://elgg.org/
*
- * @uses $vars['text'] The text to display
- *
+ * @uses $vars['value'] The text to display
+ * @uses $vars['parse_urls'] Whether to turn urls into links. Default is true.
*/
-global $CONFIG;
+$parse_urls = isset($vars['parse_urls']) ? $vars['parse_urls'] : TRUE;
+
+$text = $vars['value'];
+
+$text = filter_tags($text);
+
+if ($parse_urls) {
+ $text = parse_urls($text);
+}
+
+$text = autop($text);
-echo autop(parse_urls(filter_tags($vars['value'])));
\ No newline at end of file
+echo $text;