Migrating to php 5.3
authorJoão Pedro Athayde Marcondes de André <jp_git@polytechnique.org>
Fri, 18 Feb 2011 16:29:52 +0000 (17:29 +0100)
committerJoão Pedro Athayde Marcondes de André <jp_git@polytechnique.org>
Fri, 18 Feb 2011 16:29:52 +0000 (17:29 +0100)
class.xorg.auth.php
widget.auth.php
widget.blog.owner.php
widget.copyright.php
widget.post.perms.php

index acdb277..198f8ec 100644 (file)
@@ -10,12 +10,12 @@ class xorgAuth extends dcAuth {
                              'nom' => null,
                              'grpauth' => null,
                              'perms' => null);
-  static public function behavior_coreBlogConstruct(&$blog) {
+  static public function behavior_coreBlogConstruct($blog) {
     global $core;
     $core->auth->sudo(array($core->auth, 'updateUserPerms'), $blog);
   }
 
-  public function __construct(&$core) {
+  public function __construct($core) {
     parent::__construct($core);
     $core->addBehavior('coreBlogConstruct', array('xorgAuth', 'behavior_coreBlogConstruct'));
   }
@@ -74,7 +74,7 @@ class xorgAuth extends dcAuth {
     }
   }
 
-  public function updateUserPerms(&$blog) {
+  public function updateUserPerms($blog) {
     global $core;
     $this->buildFromSession();
     if (!isset($_SESSION['auth-xorg'])) {
index 7095862..985ee53 100644 (file)
@@ -1,10 +1,10 @@
 <?php
 class xorgAuthWidget {
-  public static function behavior_initWidgets(&$w) {
+  public static function behavior_initWidgets($w) {
     $w->create('XorgAuth', __('Auth. X.org'), array('xorgAuthWidget', 'widget'));
   }
 
-  static public function widget(&$w) {
+  static public function widget($w) {
     global $core;
     $name = @$core->auth->getInfo('user_displayname');
     if ($name) {
index fec3393..d7f2f3d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 class xorgBlogOwnerWidget {
-  public static function behavior_adminBlogPreferencesForm(&$core) {
+  public static function behavior_adminBlogPreferencesForm($core) {
     if ($core->auth->isSuperAdmin()) {
       if (isset($_GET['id'])) {
         $settings = new dcSettings($core, $_GET['id']);
@@ -58,11 +58,11 @@ class xorgBlogOwnerWidget {
     }
   }
 
-  public static function behavior_adminBeforeBlogSettingsUpdate(&$settings) {
+  public static function behavior_adminBeforeBlogSettingsUpdate($settings) {
     self::setXorgOwner($settings, $_POST['xorg_blog_type'], $_POST['xorg_blog_owner']);
   }
 
-  public static function setXorgOwner(&$settings, $type, $owner) {
+  public static function setXorgOwner($settings, $type, $owner) {
     global $core;
     if ($core->auth->isSuperAdmin()) {
       $settings->xorgauth->put('xorg_blog_type', $type, 'string', 'Type de blog X.org');
index 11e78d8..552b250 100644 (file)
@@ -1,10 +1,10 @@
 <?php
 class xorgCopyrightWidget {
-  public static function behavior_initWidgets(&$w) {
+  public static function behavior_initWidgets($w) {
     $w->create('XorgCopyright', __('Copyright'), array('xorgCopyrightWidget', 'widget'));
   }
 
-  static public function widget(&$w) {
+  static public function widget($w) {
     global $core;
     $copyright = $core->blog->settings->system->get('copyright_notice');
     $editor    = $core->blog->settings->system->get('editor');
index e62a132..0c9615a 100644 (file)
@@ -42,7 +42,7 @@ class xorgPostPermsWidget {
     <?php
   }
 
-  private static function setPermsMeta(&$cur) {
+  private static function setPermsMeta($cur) {
     $meta = $cur->getField('post_meta');
     if (is_string($meta)) {
       $meta = unserialize($meta);
@@ -54,11 +54,11 @@ class xorgPostPermsWidget {
     $cur->setField('post_meta', serialize($meta));
   }
 
-  public static function behavior_adminBeforePostCreate(&$cur) {
+  public static function behavior_adminBeforePostCreate($cur) {
     self::setPermsMeta($cur);
   }
 
-  public static function behavior_adminBeforePostUpdate(&$cur, $post_id) {
+  public static function behavior_adminBeforePostUpdate($cur, $post_id) {
     self::setPermsMeta($cur);
   }
 
@@ -93,17 +93,17 @@ class xorgPostPermsWidget {
     <?php
   }
 
-  public static function behavior_adminBeforeUserUpdate(&$cur, $user_id) {
+  public static function behavior_adminBeforeUserUpdate($cur, $user_id) {
     $opts = $cur->getField('user_options');
     $opts['post_xorg_perms'] = $_POST['post_xorg_perms'];
     $cur->setField('user_options', $opts);
   }
 
-  public static function behavior_coreBlogGetPosts(&$rs) {
+  public static function behavior_coreBlogGetPosts($rs) {
     $rs->extend('xorgPostPermsFilter');
   }
 
-/*  public static function behavior_coreBlogGetComments(&$rs) {
+/*  public static function behavior_coreBlogGetComments($rs) {
     $rs->extends('xorgCommentPermsFilter');
   }*/
 }
@@ -111,7 +111,7 @@ class xorgPostPermsWidget {
 if (class_exists('rsExtPostPublic')) {
 
 class xorgPostPermsFilter extends rsExtPostPublic {
-  private static function canRead(&$rs) {
+  private static function canRead($rs) {
     $metas = unserialize($rs->field('post_meta'));
     global $core;
     if (!isset($metas['post_xorg_perms'])) {
@@ -126,7 +126,7 @@ class xorgPostPermsFilter extends rsExtPostPublic {
     return false;
   }
 
-  private static function showMessage(&$rs) {
+  private static function showMessage($rs) {
     $metas = unserialize($rs->field('post_meta'));
     global $core;
     $str = '<p class="error">'
@@ -141,7 +141,7 @@ class xorgPostPermsFilter extends rsExtPostPublic {
 
   public static function getContent($rs, $absolute_urls = false) {
     if (self::canRead($rs)) {
-      return parent::getContent(&$rs, $absolute_urls);
+      return parent::getContent($rs, $absolute_urls);
     } else if (!self::isExtended($rs)) {
       return self::showMessage($rs);
     } else {
@@ -151,7 +151,7 @@ class xorgPostPermsFilter extends rsExtPostPublic {
 
   public static function getExcerpt($rs, $absolute_urls = false) {
     if (self::canRead($rs)) {
-      return parent::getExcerpt(&$rs, $absolute_urls);
+      return parent::getExcerpt($rs, $absolute_urls);
     } else if (self::isExtended($rs)) {
       return self::showMessage($rs);
     } else {