]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Merged r6812:6837 from 1.7 branch to trunk (skipping some changes to plugins like...
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 22 Aug 2010 23:42:26 +0000 (23:42 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 22 Aug 2010 23:42:26 +0000 (23:42 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6851 36083f99-b078-4883-b0ff-0f9b5a30f544

15 files changed:
CHANGES.txt
CONTRIBUTORS.txt
engine/lib/annotations.php
engine/lib/entities.php
engine/lib/plugins.php
engine/schema/upgrades/2009100701.sql
engine/start.php
languages/en.php
mod/embed/views/default/object/default/embed.php
mod/reportedcontent/languages/en.php
mod/search/start.php
mod/twitter/views/default/widgets/twitter/view.php
views/default/messages/errors/error.php
views/default/messages/messages/message.php
views/default/output/longtext.php

index dcf33bce75bd01c4349cb922e2153215846b3f34..b24013d45727df139d2eac9aeaed03dc264b6acf 100644 (file)
@@ -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.
index a1a9329279559751c78882c31e8f5f00e781801d..163b19d9c19cc19bfaa14f30c41fde360b3ed939 100644 (file)
@@ -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
 
index dcb29d0abed3b237c4d782bc97e327343597943a..7f5ab93f2cf5ceb9ddb1b1cf403bd096774736a0 100644 (file)
@@ -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);
                }
        }
index 9b3895fd5bc935509c5ab1be11bd6b29c83f0852..95807aab58c5a0ed6f42a8519fb203db6ef65bb0 100644 (file)
@@ -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);
index 47a103dcd48bb30cef64f0c0063ac02d9ca4a94d..c2427c655825e15ab4d06242ed740bf74e2395de 100644 (file)
@@ -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;
index dbf52b4da57b862403e085c26e6c824bcce5fd33..74249e9019b772a515092fbee04c175020e230e5 100644 (file)
@@ -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.
index 442222dc80d4c8664cf336a9c54d8e5a6c2f6d53..1acbef977c1dc7f108a0343963e243c97f828c58 100644 (file)
@@ -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.
index f70a8707412fa7643f73793da5e417cb9b2a6fba..17ff4a52e7f63e05bd61325f1d56e8d1feec67ac 100644 (file)
@@ -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!",
 
index 6f698a157acb01345c9ff096e7e92169f2fdb03f..aca2ceea1ece0e556d864eaae1b572ff196d6a30 100644 (file)
@@ -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>";
+}
index 97b86d24220c2e014267eaef0063c45fe997b444..8fb1b6f5a2922ef81894fa5968ede0747f80f7ec 100644 (file)
                        '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',
        );
index ae5e71c976851344e466f252357bf4ad4b6be247..4f42c5391a1ca6031e056acc4cb325230eb56caa 100644 (file)
@@ -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'];
index 4ae0d7f275d68920640a57eb0bf244c060b263cf..3fba5b54dc9d2ee0bde583500442c4cb4ae60471 100644 (file)
@@ -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>";
+
+}
index 3175521d45f25a0c091ccdb078e228b099c13b87..e681b090b87738155f3520dafb05116d7b436f9d 100644 (file)
@@ -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)
+);
index 58777a3cc919c41899c6d99932ffc626b6f2130a..499165a901a2040e491e80b7966b0001a351bfda 100644 (file)
@@ -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)
+);
index a8540913ff73d2ce0f326a1a6a5bdd5bcc96fac0..1c57375de71335b1de4ba226f83c10c399c9cf4d 100644 (file)
@@ -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;