Commit efd0df3c authored by sept_7's avatar sept_7

[FIX] Coding style from CodeSniffer : Opening brace of a class must be on the...

[FIX] Coding style from CodeSniffer : Opening brace of a class must be on the line after the definition, and Some ending tags removing...
parent 128e4c44
......@@ -17,7 +17,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
/*!
\static
*/
class Babelfish {
class Babelfish
{
/*!
Return the host name of the server
......
......@@ -10,5 +10,3 @@
header ("location: ../index.php");
die;
?>
......@@ -6,7 +6,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class AdminLib extends TikiLib {
class AdminLib extends TikiLib
{
function list_dsn($offset, $maxRecords, $sort_mode, $find) {
......
......@@ -8,7 +8,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
include_once('lib/reportslib.php');
class ArtLib extends TikiLib {
class ArtLib extends TikiLib
{
//Special parsing for multipage articles
function get_number_of_pages($data) {
$parts = explode("...page...", $data);
......
......@@ -10,7 +10,8 @@
require_once ("Net/LDAP2.php");
class TikiLdapLib {
class TikiLdapLib
{
// var to hold a esablished connection
protected $ldaplink = NULL;
......
......@@ -6,7 +6,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class bablotron extends TikiLib {
class bablotron extends TikiLib
{
var $words;
var $lan;
......
......@@ -6,7 +6,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class BanLib extends TikiLib {
class BanLib extends TikiLib
{
function get_rule($banId) {
$query = "select * from `tiki_banning` where `banId`=?";
......
......@@ -6,7 +6,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class BannerLib extends TikiLib {
class BannerLib extends TikiLib
{
function select_banner_id($zone) {
$map = array(0=>'sun', 1=>'mon', 2=>'tue', 3=>'wed', 4=>'thu', 5=>'fri', 6=>'sat');
......
......@@ -16,7 +16,8 @@ include_once('lib/reportslib.php');
* @version
* @license LGPL. See licence.txt for more details
*/
class BlogLib extends TikiLib {
class BlogLib extends TikiLib
{
/**
* get_number_of_pages Returns the number of pages
......
......@@ -6,7 +6,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class BookmarkLib extends TikiLib {
class BookmarkLib extends TikiLib
{
function get_folder_path($folderId, $user) {
$path = '';
......
......@@ -14,7 +14,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
include_once("tikihelplib.php");
class Breadcrumb {
class Breadcrumb
{
var $title;
var $description;
var $url;
......
......@@ -12,7 +12,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
* usage is simple and feel free to improve it
*/
class Cachelib {
class Cachelib
{
var $folder;
......
......@@ -13,7 +13,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
* This utility library is not a complete wrapper for PHP memcache functions,
* and only provides a minimal set currently in use in SUMO.
*/
class Memcachelib {
class Memcachelib
{
var $memcache;
var $options;
......
......@@ -8,7 +8,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
if (!defined('weekInSeconds')) define('weekInSeconds', 604800);
class CalendarLib extends TikiLib {
class CalendarLib extends TikiLib
{
function convertSortMode($sort_mode) {
$tmp = explode("_",$sort_mode);
if (count($tmp) == 2) {
......
......@@ -8,7 +8,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
if (!defined('weekInSeconds')) define('weekInSeconds', 604800);
if (!defined('dayInSeconds')) define('dayInSeconds', 86400);
class CalRecurrence extends TikiLib {
class CalRecurrence extends TikiLib
{
private $id;
private $calendarId;
private $start;
......
......@@ -3,7 +3,8 @@
global $calendarlib;
require_once('calendarlib.php');
class TikiCalendarLib extends CalendarLib {
class TikiCalendarLib extends CalendarLib
{
function list_items_by_day($tikiobj, $user, $tstart, $tstop, $offset, $maxRecords, $sort_mode = 'name_desc', $find = '') {
return $this->list_tiki_items($tikiobj, $user, $tstart, $tstop, $offset, $maxRecords, $sort_mode, $find);
......
......@@ -14,7 +14,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
global $objectlib;require_once("lib/objectlib.php");
class CategLib extends ObjectLib {
class CategLib extends ObjectLib
{
/* Returns an array of categories which are descendants of the category with the given $categId. If no category is given, all categories are returned.
Each category is similar to a tiki_categories record, but with the following additional fields:
......
......@@ -35,7 +35,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class Calendar {
class Calendar
{
var $lan;
function Calendar($lan = 'en') {
......
......@@ -85,7 +85,8 @@ define("RDF_OBJECT_TYPE_RESOURCE",0);
define("RDF_OBJECT_TYPE_LITERAL",1);
define("RDF_OBJECT_TYPE_XML",2);
class Rdf_parser {
class Rdf_parser
{
var $rdf_parser;
......
......@@ -36,7 +36,8 @@ define("_class_rss_parser_is_included",1);
include_once("class_rdf_parser.php");
class RSS_parser {
class RSS_parser
{
var $channel_handler_name;
var $item_handler_name;
var $items_suject='';
......
......@@ -6,7 +6,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class CommLib extends TikiLib {
class CommLib extends TikiLib
{
function accept_page($receivedPageId) {
$info = $this->get_received_page($receivedPageId);
......
......@@ -5,7 +5,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class ContributionLib extends TikiLib {
class ContributionLib extends TikiLib
{
function add_contribution($name, $description = '') {
$query = 'insert into `tiki_contributions`(`name`, `description`) values(?, ?)';
$this->query($query, array($name, $description));
......
......@@ -6,7 +6,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class CopyrightsLib extends TikiLib {
class CopyrightsLib extends TikiLib
{
function list_copyrights($page) {
$query = "select * from `tiki_copyrights` WHERE `page`=? order by ".$this->convertSortMode("copyright_order_asc");
$query_cant = "select count(*) from `tiki_copyrights` WHERE `page`=?";
......
......@@ -6,7 +6,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class cssLib extends TikiLib {
class cssLib extends TikiLib
{
function list_css($path) {
$back = array();
......
......@@ -12,7 +12,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class TikiRegistrationFields extends TikiLib {
class TikiRegistrationFields extends TikiLib
{
function TikiRegistrationFields() {
}
......
......@@ -6,7 +6,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class DCSLib extends TikiLib {
class DCSLib extends TikiLib
{
function remove_contents($contentId) {
$query = "delete from `tiki_programmed_content` where `contentId`=?";
......
......@@ -7,7 +7,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class DirLib extends TikiLib {
class DirLib extends TikiLib
{
// Path functions
function dir_get_category_path_admin($categId) {
global $prefs;
......
<?php
class Encoding {
class Encoding
{
var $_inputSupportedEncodings = array ('ISO-8859-1','ISO-8859-15','UTF-8');
var $_ouputSupportedEncodings = array ('ISO-8859-1','ISO-8859-15','UTF-8',);
......
......@@ -23,7 +23,8 @@
*
*/
class LatexRender {
class LatexRender
{
// ====================================================================================
// Variable Definitions
......
......@@ -7,7 +7,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
include_once ('lib/webmail/tikimaillib.php');
class EvLib extends TikiLib {
class EvLib extends TikiLib
{
function replace_event($evId, $name, $description, $allowUserSub, $allowAnySub, $unsubMsg, $validateAddr) {
if ($evId) {
......
......@@ -9,7 +9,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
/* Task properties:
user, taskId, title, description, date, status, priority, completed, percentage
*/
class FaqLib extends TikiLib {
class FaqLib extends TikiLib
{
function add_suggested_faq_question($faqId, $question, $answer, $user) {
$question = strip_tags($question, '<a>');
......
......@@ -6,7 +6,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class FlinksLib extends TikiLib {
class FlinksLib extends TikiLib
{
function add_featured_link($url, $title, $description = '', $position = 0, $type = 'f') {
$query = "delete from `tiki_featured_links` where `url`=?";
......
......@@ -178,7 +178,8 @@ define("FEEDCREATOR_VERSION", "Tiki CMS/Groupware via FeedCreator 1.7.2.1");
* @author Kai Blankenhorn <kaib@bitfolge.de>
* @since 1.3
*/
class FeedItem extends HtmlDescribable {
class FeedItem extends HtmlDescribable
{
/**
* Mandatory attributes of an item.
*/
......@@ -225,7 +226,8 @@ class FeedItem extends HtmlDescribable {
* @author Kai Blankenhorn <kaib@bitfolge.de>
* @since 1.3
*/
class FeedImage extends HtmlDescribable {
class FeedImage extends HtmlDescribable
{
/**
* Mandatory attributes of an image.
*/
......@@ -243,7 +245,8 @@ class FeedImage extends HtmlDescribable {
* An HtmlDescribable is an item within a feed that can have a description that may
* include HTML markup.
*/
class HtmlDescribable {
class HtmlDescribable
{
/**
* Indicates whether the description field should be rendered in HTML.
*/
......@@ -276,7 +279,8 @@ class HtmlDescribable {
* @author Pascal Van Hecke <feedcreator.class.php@vanhecke.info>
* @version 1.6
*/
class FeedHtmlField {
class FeedHtmlField
{
/**
* Mandatory attributes of a FeedHtmlField.
*/
......@@ -334,7 +338,8 @@ class FeedHtmlField {
* @since 1.3
* @author Kai Blankenhorn <kaib@bitfolge.de>
*/
class UniversalFeedCreator extends FeedCreator {
class UniversalFeedCreator extends FeedCreator
{
var $_feed;
function _setFormat($format) {
......@@ -470,7 +475,8 @@ class UniversalFeedCreator extends FeedCreator {
* @author Kai Blankenhorn <kaib@bitfolge.de>
* @since 1.4
*/
class FeedCreator extends HtmlDescribable {
class FeedCreator extends HtmlDescribable
{
/**
* Mandatory attributes of a feed.
......@@ -714,7 +720,8 @@ class FeedCreator extends HtmlDescribable {
* FeedDate is an internal class that stores a date for a feed or feed item.
* Usually, you won't need to use this.
*/
class FeedDate {
class FeedDate
{
var $unix;
/**
......@@ -811,7 +818,8 @@ class FeedDate {
* @since 1.7.2.1
* @author Oliver Hertel <ohertel@tikiwiki.org>
*/
class PodCastCreator10 extends FeedCreator {
class PodCastCreator10 extends FeedCreator
{
/**
* Builds the RSS feed's text.
......@@ -883,7 +891,8 @@ class PodCastCreator10 extends FeedCreator {
* @author Kai Blankenhorn <kaib@bitfolge.de>
*/
class RSSCreator10 extends FeedCreator {
class RSSCreator10 extends FeedCreator
{
/**
* Builds the RSS feed's text. The feed will be compliant to RDF Site Summary (RSS) 1.0.
......@@ -962,7 +971,8 @@ class RSSCreator10 extends FeedCreator {
* @since 1.3
* @author Kai Blankenhorn <kaib@bitfolge.de>
*/
class RSSCreator091 extends FeedCreator {
class RSSCreator091 extends FeedCreator
{
/**
* Stores this RSS feed's version number.
......@@ -1098,7 +1108,8 @@ class RSSCreator091 extends FeedCreator {
* @since 1.7.2.1
* @author Oliver Hertel <ohertel@tikiwiki.org>
*/
class RSSCreator09 extends FeedCreator {
class RSSCreator09 extends FeedCreator
{
/**
* Stores this RSS feed's version number.
......@@ -1156,7 +1167,8 @@ class RSSCreator09 extends FeedCreator {
* @since 1.3
* @author Kai Blankenhorn <kaib@bitfolge.de>
*/
class RSSCreator20 extends RSSCreator091 {
class RSSCreator20 extends RSSCreator091
{
function RSSCreator20() {
parent::_setRSSVersion("2.0");
......@@ -1173,7 +1185,8 @@ class RSSCreator20 extends RSSCreator091 {
* @since 1.3
* @author Scott Reynen <scott@randomchaos.com> and Kai Blankenhorn <kaib@bitfolge.de>
*/
class PIECreator01 extends FeedCreator {
class PIECreator01 extends FeedCreator
{
function PIECreator01() {
$this->encoding = "utf-8";
......@@ -1231,7 +1244,8 @@ class PIECreator01 extends FeedCreator {
* @since 1.6
* @author Kai Blankenhorn <kaib@bitfolge.de>, Scott Reynen <scott@randomchaos.com>
*/
class AtomCreator03 extends FeedCreator {
class AtomCreator03 extends FeedCreator
{
function AtomCreator03() {
$this->contentType = "application/atom+xml";
......@@ -1299,7 +1313,8 @@ class AtomCreator03 extends FeedCreator {
* @since 1.3
* @author Kai Blankenhorn <kaib@bitfolge.de>
*/
class MBOXCreator extends FeedCreator {
class MBOXCreator extends FeedCreator
{
function MBOXCreator() {
$this->contentType = "text/plain";
......@@ -1387,7 +1402,8 @@ class MBOXCreator extends FeedCreator {
* @author Dirk Clemens, Kai Blankenhorn
* @since 1.5
*/
class OPMLCreator extends FeedCreator {
class OPMLCreator extends FeedCreator
{
function OPMLCreator() {
$this->encoding = "utf-8";
......@@ -1444,7 +1460,8 @@ class OPMLCreator extends FeedCreator {
* @author Pascal Van Hecke
* @since 1.7
*/
class HTMLCreator extends FeedCreator {
class HTMLCreator extends FeedCreator
{
var $contentType = "text/html";
......@@ -1590,7 +1607,8 @@ class HTMLCreator extends FeedCreator {
*
* @author Pascal Van Hecke
*/
class JSCreator extends HTMLCreator {
class JSCreator extends HTMLCreator
{
var $contentType = "text/javascript";
/**
......
......@@ -7,7 +7,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class FileGalLib extends TikiLib {
class FileGalLib extends TikiLib
{
function isPodCastGallery($galleryId, $gal_info=null) {
if (empty($gal_info))
$gal_info = $this->get_file_gallery_info((int)$galleryId);
......
......@@ -46,7 +46,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
require_once("lib/objectlib.php");
class FreetagLib extends ObjectLib {
class FreetagLib extends ObjectLib
{
// The fields below should be tiki preferences
......
......@@ -10,7 +10,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class groupAlertLib extends TikiLib {
class groupAlertLib extends TikiLib
{
function AddGroup ($ObjectType, $ObjectNumber,$GroupName,$displayEachUser) {
if ( $displayEachUser == "on" ) $displayEachUser='y';
......
......@@ -5,7 +5,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class HeaderLib {
class HeaderLib
{
var $title;
var $jsfiles;
var $js;
......
......@@ -6,7 +6,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class HotwordsLib extends TikiLib {
class HotwordsLib extends TikiLib
{
function list_hotwords($offset = 0, $maxRecords = -1, $sort_mode = 'word_desc', $find = '') {
......
......@@ -6,7 +6,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class HtmlPagesLib extends TikiLib {
class HtmlPagesLib extends TikiLib
{
function remove_html_page($pageName) {
$query = "delete from `tiki_html_pages` where ".$this->convertBinary()." `pageName`=?";
$result = $this->query($query,array($pageName));
......
......@@ -35,7 +35,8 @@
* @category File
* @package iCal
*/
class File_iCal {
class File_iCal
{
const VERSION = "0.0.3";
const CLASSIFICATION_PUBLIC = "PUBLIC";
......
......@@ -9,7 +9,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
include_once('lib/reportslib.php');
class ImageGalsLib extends TikiLib {
class ImageGalsLib extends TikiLib
{
function __construct() {
parent::__construct();
global $prefs;
......
<?php
class ImageAbstract {
class ImageAbstract
{
var $data = NULL;
var $format = 'jpeg';
var $height = NULL;
......
......@@ -2,7 +2,8 @@
require_once('lib/images/abstract.php');
class Image extends ImageAbstract {
class Image extends ImageAbstract
{
var $gdinfo;
var $gdversion;
var $havegd = false;
......
......@@ -2,7 +2,8 @@
require_once('lib/images/abstract.php');
class Image extends ImageAbstract {
class Image extends ImageAbstract
{
function __construct($image, $isfile = false) {
if ( $isfile ) {
......
......@@ -2,7 +2,8 @@
require_once('lib/images/abstract.php');
class Image extends ImageAbstract {
class Image extends ImageAbstract
{
function __construct($image, $isfile = false) {
if ( $isfile ) {
......
......@@ -22,7 +22,8 @@ require_once ('commentslib.php');
* @uses Comments
* @license LGPL. Please, see licence.txt for mode details
*/
class Importer extends Comments {
class Importer extends Comments
{
// The types of forums are hard-coded into the library and displayed
// in the template. As support for more imports grows, add the type to
// the below two arrays, in addition to writing the functions to
......
......@@ -6,7 +6,8 @@ if (strpos($_SERVER['SCRIPT_NAME'],basename(__FILE__)) !== false) {
exit;
}
class TikiInit {
class TikiInit
{
function TikiInit() {
}
......
<?php
$access->check_script($_SERVER["SCRIPT_NAME"],basename(__FILE__));
class LsAdminlib extends TikiLib {
class LsAdminlib extends TikiLib
{
function add_operator($user) {
$this->getOne("delete from `tiki_live_support_operators` where `user`=?",array($user),false);
......
<?php
$access->check_script($_SERVER["SCRIPT_NAME"],basename(__FILE__));
class Lslib extends TikiLib {
class Lslib extends TikiLib
{
function set_operator_id($reqId, $senderId) {
$query = "update `tiki_live_support_requests` set `operator_id` = ? where `reqId`=?";
......
......@@ -7,8 +7,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class LogsLib extends TikiLib {
class LogsLib extends TikiLib
{
function add_log($type,$message,$who='',$ip='',$client='',$time='') {
global $user;
......
......@@ -6,7 +6,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class mime {
class mime
{
function mime() { }
......