diff options
-rw-r--r-- | CHANGES.txt | 2 | ||||
-rw-r--r-- | CONTRIBUTORS.txt | 4 | ||||
-rw-r--r-- | engine/lib/annotations.php | 3 | ||||
-rw-r--r-- | engine/lib/entities.php | 4 | ||||
-rw-r--r-- | engine/lib/plugins.php | 7 | ||||
-rw-r--r-- | engine/schema/upgrades/2009100701.sql | 2 | ||||
-rw-r--r-- | engine/start.php | 5 | ||||
-rw-r--r-- | languages/en.php | 2 | ||||
-rw-r--r-- | mod/embed/views/default/object/default/embed.php | 9 | ||||
-rw-r--r-- | mod/reportedcontent/languages/en.php | 9 | ||||
-rw-r--r-- | mod/search/start.php | 3 | ||||
-rw-r--r-- | mod/twitter/views/default/widgets/twitter/view.php | 43 | ||||
-rw-r--r-- | views/default/messages/errors/error.php | 6 | ||||
-rw-r--r-- | views/default/messages/messages/message.php | 5 | ||||
-rw-r--r-- | views/default/output/longtext.php | 18 |
15 files changed, 77 insertions, 45 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index dcf33bce7..b24013d45 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -18,7 +18,7 @@ Version 1.8.0 (Jackie) 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. diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index a1a932927..163b19d9c 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -11,10 +11,14 @@ Pete Harris <pete@elgg.com> 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 diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php index dcb29d0ab..7f5ab93f2 100644 --- a/engine/lib/annotations.php +++ b/engine/lib/annotations.php @@ -206,7 +206,9 @@ function create_annotation($entity_guid, $name, $value, $value_type, $owner_guid if (trigger_elgg_event('create', 'annotation', $obj)) { return $result; } else { + // plugin returned false to reject annotation delete_annotation($result); + return FALSE; } } } @@ -263,6 +265,7 @@ function update_annotation($annotation_id, $name, $value, $value_type, $owner_gu 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); } } diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 9b3895fd5..95807aab5 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1690,6 +1690,7 @@ function entity_row_to_elggstar($row) { 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)) { @@ -1702,7 +1703,8 @@ function entity_row_to_elggstar($row) { error_log(sprintf(elgg_echo('ClassNotFoundException:MissingClass'), $classname)); } } - else { + + if (!$new_entity) { switch ($row->type) { case 'object' : $new_entity = new ElggObject($row); diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index 47a103dcd..c2427c655 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -99,11 +99,13 @@ function get_plugin_list() { $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; } } @@ -162,7 +164,8 @@ function regenerate_plugin_list($pluginorder = FALSE) { // 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; diff --git a/engine/schema/upgrades/2009100701.sql b/engine/schema/upgrades/2009100701.sql index dbf52b4da..74249e901 100644 --- a/engine/schema/upgrades/2009100701.sql +++ b/engine/schema/upgrades/2009100701.sql @@ -1,2 +1,2 @@ --- 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. diff --git a/engine/start.php b/engine/start.php index 442222dc8..1acbef977 100644 --- a/engine/start.php +++ b/engine/start.php @@ -123,15 +123,14 @@ if (!substr_count($_SERVER["PHP_SELF"], "install.php") } // 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. diff --git a/languages/en.php b/languages/en.php index f70a87074..17ff4a52e 100644 --- a/languages/en.php +++ b/languages/en.php @@ -57,7 +57,7 @@ $english = array( '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!", diff --git a/mod/embed/views/default/object/default/embed.php b/mod/embed/views/default/object/default/embed.php index 6f698a157..aca2ceea1 100644 --- a/mod/embed/views/default/object/default/embed.php +++ b/mod/embed/views/default/object/default/embed.php @@ -1,5 +1,6 @@ <?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>"; +} diff --git a/mod/reportedcontent/languages/en.php b/mod/reportedcontent/languages/en.php index 97b86d242..8fb1b6f5a 100644 --- a/mod/reportedcontent/languages/en.php +++ b/mod/reportedcontent/languages/en.php @@ -18,15 +18,14 @@ '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', @@ -39,7 +38,7 @@ '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', ); diff --git a/mod/search/start.php b/mod/search/start.php index ae5e71c97..4f42c5391 100644 --- a/mod/search/start.php +++ b/mod/search/start.php @@ -39,7 +39,8 @@ function search_init() { // 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']; diff --git a/mod/twitter/views/default/widgets/twitter/view.php b/mod/twitter/views/default/widgets/twitter/view.php index 4ae0d7f27..3fba5b54d 100644 --- a/mod/twitter/views/default/widgets/twitter/view.php +++ b/mod/twitter/views/default/widgets/twitter/view.php @@ -1,5 +1,6 @@ -<?php - /** +<?php + +/** * Elgg twitter view page * * @package ElggTwitter @@ -8,25 +9,27 @@ * @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>"; + +} diff --git a/views/default/messages/errors/error.php b/views/default/messages/errors/error.php index 3175521d4..e681b090b 100644 --- a/views/default/messages/errors/error.php +++ b/views/default/messages/errors/error.php @@ -10,4 +10,8 @@ * * @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) +); diff --git a/views/default/messages/messages/message.php b/views/default/messages/messages/message.php index 58777a3cc..499165a90 100644 --- a/views/default/messages/messages/message.php +++ b/views/default/messages/messages/message.php @@ -11,4 +11,7 @@ * @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) +); diff --git a/views/default/output/longtext.php b/views/default/output/longtext.php index a8540913f..1c57375de 100644 --- a/views/default/output/longtext.php +++ b/views/default/output/longtext.php @@ -8,10 +8,20 @@ * @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; |