From 3b8da081a09bb433b0216cc60781d0323f0681a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20Pedro=20Athayde=20Marcondes=20de=20Andr=C3=A9?= Date: Fri, 18 Feb 2011 17:29:52 +0100 Subject: [PATCH] Migrating to php 5.3 --- class.xorg.auth.php | 6 +++--- widget.auth.php | 4 ++-- widget.blog.owner.php | 6 +++--- widget.copyright.php | 4 ++-- widget.post.perms.php | 20 ++++++++++---------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/class.xorg.auth.php b/class.xorg.auth.php index acdb277..198f8ec 100644 --- a/class.xorg.auth.php +++ b/class.xorg.auth.php @@ -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'])) { diff --git a/widget.auth.php b/widget.auth.php index 7095862..985ee53 100644 --- a/widget.auth.php +++ b/widget.auth.php @@ -1,10 +1,10 @@ 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) { diff --git a/widget.blog.owner.php b/widget.blog.owner.php index fec3393..d7f2f3d 100644 --- a/widget.blog.owner.php +++ b/widget.blog.owner.php @@ -1,7 +1,7 @@ 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'); diff --git a/widget.copyright.php b/widget.copyright.php index 11e78d8..552b250 100644 --- a/widget.copyright.php +++ b/widget.copyright.php @@ -1,10 +1,10 @@ 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'); diff --git a/widget.post.perms.php b/widget.post.perms.php index e62a132..0c9615a 100644 --- a/widget.post.perms.php +++ b/widget.post.perms.php @@ -42,7 +42,7 @@ class xorgPostPermsWidget { 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 { 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 = '

' @@ -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 { -- 2.1.4