Commit ad65901a authored by changi67's avatar changi67

no change, only fix some violation - see qa.tiki.org

parent 4bac481f
......@@ -18,7 +18,8 @@ class ServiceLib
return $this->broker;
}
function getUrl($params) {
function getUrl($params)
{
global $prefs;
if ($prefs['feature_sefurl'] == 'y') {
......
......@@ -26,7 +26,7 @@ function smarty_block_filter($params, $content, $smarty, &$repeat)
$tikilib = TikiLib::lib('tiki');
$unifiedsearchlib = TikiLib::lib('unifiedsearch');
if (! isset($params['action'])) {
$params['action'] = '';
}
......@@ -53,7 +53,7 @@ function smarty_block_filter($params, $content, $smarty, &$repeat)
'modification_date_ndesc' => tra('Modified date'),
'visits_ndesc' => tra('Visits'),
);
$smarty->assign('sort_mode', $sort_mode );
$smarty->assign('sort_mode', $sort_mode);
$smarty->assign('sort_modes', $sort_modes);
// Categories
......@@ -97,7 +97,7 @@ BODY;
if ($prefs['feature_freetags'] == 'y') {
global $freetaglib; require_once 'lib/freetag/freetaglib.php';
$smarty->assign('filter_tags', isset($filter['tags']) ? $filter['tags'] : '');
$smarty->assign('filter_tagmap', json_encode(TikiDb::get()->fetchMap('SELECT tagId, tag FROM tiki_freetags')));
$smarty->assign('filter_tags_picker', (string) $freetaglib->get_cloud());
......
......@@ -3,7 +3,7 @@
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: block.permission.php 39783 2012-02-08 09:14:14Z sept_7 $
// $Id$
/**
* Smarty plugin
......
......@@ -1107,7 +1107,7 @@ class Net_POP3
function _getMultiline()
{
$data = '';
while (!is_a($tmp = $this->_recvLn(),'PEAR_Error')) {
while (!is_a($tmp = $this->_recvLn(), 'PEAR_Error')) {
if ($tmp == '.') {
return substr($data, 0, -2);
}
......
<?php
// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
//
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
......@@ -14,7 +14,7 @@ function wikiplugin_bigbluebutton_info()
'format' => 'html',
'prefs' => array( 'wikiplugin_bigbluebutton', 'bigbluebutton_feature' ),
'icon' => 'img/icons/webcam.png',
'tags' => array( 'basic' ),
'tags' => array( 'basic' ),
'params' => array(
'name' => array(
'required' => true,
......@@ -97,10 +97,10 @@ function wikiplugin_bigbluebutton( $data, $params )
if ( $perms->bigbluebutton_join ) {
$smarty->assign('bbb_attendees', $bigbluebuttonlib->getAttendees($meeting));
if($perms->bigbluebutton_view_rec) {
if ($perms->bigbluebutton_view_rec) {
$smarty->assign('bbb_recordings', $bigbluebuttonlib->getRecordings($meeting));
}
return $smarty->fetch('wiki-plugins/wikiplugin_bigbluebutton.tpl');
} elseif ( $perms->bigbluebutton_view_rec ) { # Case for anonymous users with the perm to view recordings but not to join meetings
......
......@@ -3,7 +3,7 @@
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: mod-func-top_forum_posters.php 43604 2012-10-23 01:52:36Z kstingel $
// $Id$
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
......@@ -33,6 +33,6 @@ function module_top_blog_posters($mod_reference, $module_params)
{
global $smarty;
$bloggers = TikiLib::lib('blog')->top_bloggers($mod_reference['rows']);
$smarty->assign_by_ref('modTopBloggers', $bloggers['data']);
}
<?php
// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
//
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: index.php 40086 2012-03-08 15:47:37Z changi67 $
// $Id$
// This redirects to the sites root to prevent directory browsing
header("location: ../index.php");
......
<?php
// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
//
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: index.php 40086 2012-03-08 15:47:37Z changi67 $
// $Id$
// This redirects to the sites root to prevent directory browsing
header("location: ../index.php");
......
<?php
// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
//
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
/*
* This is used to make module-specific parameters available to jquery
* This is used to make module-specific parameters available to jquery
* so that the plugin edit popup form for PluginModule can include the parameters for the selected module in the form
* The java script generated defines tiki_module_params["modulename"] with meta data for the parameters of the module.
*
* Cached by language to allow translations
*
* Cached by language to allow translations
*/
header('content-type: application/x-javascript');
header('Cache-Control: no-cache, pre-check=0, post-check=0');
......@@ -33,8 +33,8 @@ $mods = $modlib->get_all_modules();
ob_start();
?>if ( typeof tiki_module_params == 'undefined' ) { var tiki_module_params = {}; }
<?php
foreach ( $mods as $mod ):
<?php
foreach ( $mods as $mod ) {
include_once('modules/mod-func-' . $mod . '.php');
$info_func = "module_{$mod}_info";
if (function_exists($info_func)) {
......@@ -44,7 +44,8 @@ foreach ( $mods as $mod ):
}
?>
tiki_module_params.<?php echo TikiLib::remove_non_word_characters_and_accents($mod) ?> = <?php echo json_encode($info) ?>;
<?php endforeach;
<?php
}
$content = ob_get_contents();
file_put_contents($cache, $content);
ob_end_flush();
<?php
// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
//
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
......@@ -12,7 +12,7 @@
* The java script generated defines tiki_plugins["pluginname"] with meta data for the parameters of the plugin.
* This is then used to allow a nice way for the editor of the page to use a form to edit the plug-in when they
* click the little edit icon next to the plug-ins generated html.
*
*
* Cached by language to allow translations (tiki 5)
*/
......@@ -40,7 +40,7 @@ if ( $all ) {
}
include 'tiki-setup.php';
$parserlib = TikiLib::lib('parser');
$plugins = $parserlib->plugin_get_list();
} else {
......@@ -63,12 +63,13 @@ ob_start();
$parserlib = TikiLib::lib('parser');
?>
if ( typeof tiki_plugins == 'undefined' ) { var tiki_plugins = {}; }
<?php foreach ( $plugins as $plugin ):
<?php foreach ( $plugins as $plugin ) {
if ( ! $info = $parserlib->plugin_info($plugin) )
continue;
?>
tiki_plugins.<?php echo $plugin ?> = <?php echo json_encode($info) ?>;
<?php endforeach;
<?php
}
$content = ob_get_contents();
file_put_contents($cache, $content);
......
......@@ -890,7 +890,7 @@ if (isset($_GET['slideshow'])) {
$smarty->assign('cant', $files['cant']);
$subs = 0;
if ($with_subgals) {
foreach($files['data'] as $f) {
foreach ($files['data'] as $f) {
$subs = $subs + $f['isgal'];
}
}
......
<?php
// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
//
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
......@@ -8,7 +8,7 @@ $section = 'newsletters';
require_once ('tiki-setup.php');
global $nllib; include_once ('lib/newsletters/nllib.php');
$access->check_feature('feature_newsletters');
if ( !isset( $_REQUEST["unsubscribe"] ) ){
if ( !isset( $_REQUEST["unsubscribe"] ) ) {
$access->check_permission('tiki_p_list_newsletters');
}
......@@ -22,7 +22,7 @@ if (isset($_REQUEST["confirm_subscription"])) {
$smarty->assign('nl_info', $conf);
} else {
$smarty->assign('confirm', 'f'); // Signal failure
}
}
$smarty->assign('unsub', 'n');
......@@ -33,7 +33,7 @@ if (isset($_REQUEST["unsubscribe"])) {
$smarty->assign('nl_info', $conf);
} else {
$smarty->assign('unsub', 'f'); // Signal failure
}
}
if (!$user && $tiki_p_subscribe_newsletters != 'y' && !isset($_REQUEST["confirm_subscription"]) && !isset($_REQUEST["unsubscribe"])) {
......@@ -71,7 +71,7 @@ if ($tiki_p_subscribe_newsletters == 'y') {
$_REQUEST["email"] = $userlib->get_user_email($user);
}
// Save the ip at the log for email subscriptions from anonymous
if (empty($user)) {
if (empty($user)) {
$logslib->add_log('newsletter', 'subscribed email '.$_REQUEST["email"].' to newsletter '.$_REQUEST["nlId"]);
$smarty->assign('subscribed', 'y'); // will receive en email
}
......@@ -80,7 +80,7 @@ if ($tiki_p_subscribe_newsletters == 'y') {
if ($nl_info['allowAnySub'] != 'y' && $user) {
if ($nllib->newsletter_subscribe($_REQUEST["nlId"], $user, "y")) $smarty->assign('subscribed', 'y');
} elseif ($nllib->newsletter_subscribe($_REQUEST["nlId"], $_REQUEST["email"])) $smarty->assign('subscribed', 'y'); // will receive en email
}
}
if (isset($_REQUEST["info"])) {
......
<?php
// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
//
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
......@@ -82,7 +82,7 @@ if (isset($_REQUEST['display']) && $_REQUEST['display'] == 'pdf') {
require_once 'lib/pdflib.php';
$generator = new PdfGenerator();
$pdf = $generator->getPdf('tiki-print.php', array('page' => $page));
if(empty($pdf)) {
if (empty($pdf)) {
echo "Unable to generate PDF";
} else {
$length = strlen($pdf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment