Commit 0675d0c5 authored by Jonny Bradley's avatar Jonny Bradley
Browse files

[REF] tabs: Replace tabs in other files (includes tabs in javascript inside...

[REF] tabs: Replace tabs in other files (includes tabs in javascript inside php, xml, sql and .htaccess etc)
parent c3fccc5b
Pipeline #332096590 failed with stages
in 5 minutes and 46 seconds
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"jquery": true
},
"rules": {
"no-tabs": "off",
"no-trailing-spaces": "error",
"semi": [
"error",
"always"
]
}
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"jquery": true
},
"rules": {
"no-tabs": "off",
"no-trailing-spaces": "error",
"semi": [
"error",
"always"
]
}
}
......@@ -16,7 +16,7 @@ Before you get started, it is a good idea to know:
* Your database schema name, database user name and password
* Your Apache user and group ID (e.g. www-user and www-data)
If not, Tiki will detect
If not, Tiki will detect
These are notes on how to setup and configure Tiki.
......@@ -52,8 +52,8 @@ Step three: create the database
the database schema name is usually called "tiki"
Be sure to record the following items:
- The database schema name
- The user name and password that has admin authority in the database.
- The database schema name
- The user name and password that has admin authority in the database.
------------------------------
......
......@@ -10,22 +10,22 @@ Currently any custom PHP code required for your site can now be added to _custom
For instance, you can add new bindings to events here, e.g. a custom function to run when a tracker item is saved
// first define your custom event handler function
function itemWasSaved($args) {
// perform post item save actions here such as:
if ($args['trackerId'] === '42') { // only for tracker #42
$status = $args['values']['status'];
$oldStatus = $args['old_values']['status'];
$itemId = $args['object'];
// ... etc
}
}
// then bind your custom function to an event
TikiLib::lib('events')->bind('tiki.trackeritem.save', 'itemWasSaved');
// note: you can find the full list of events in lib/setup/events.php
// first define your custom event handler function
function itemWasSaved($args) {
// perform post item save actions here such as:
if ($args['trackerId'] === '42') { // only for tracker #42
$status = $args['values']['status'];
$oldStatus = $args['old_values']['status'];
$itemId = $args['object'];
// ... etc
}
}
// then bind your custom function to an event
TikiLib::lib('events')->bind('tiki.trackeritem.save', 'itemWasSaved');
// note: you can find the full list of events in lib/setup/events.php
N.B. this directory and all files within it should NOT be web writable.
......
......@@ -39,25 +39,25 @@
<IfModule mod_dir.c>
# -- Home Page Feature -- #
# Option 1: (recommended) Not using home page feature.
DirectoryIndex index.php
DirectoryIndex index.php
# Option 2: If using home page feature you may avoid the home page name being appended to the url by using this option.
#DirectoryIndex tiki-index.php index.php
# Option 2: If using home page feature you may avoid the home page name being appended to the url by using this option.
#DirectoryIndex tiki-index.php index.php
</IfModule>
# -- Ensure Caching Proxy Sends Content to Correct Client -- #
# In some distributions of Apache (e.g. Wampserver 2.5) you may also need to enable mod_filter as well for this to work.
#<IfModule mod_filter.c>
<IfModule mod_deflate.c>
<IfModule mod_headers.c>
# Make sure proxies don't deliver the wrong content.
Header append Vary User-Agent env=!dont-vary
</IfModule>
AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
<IfModule mod_mime.c>
# DEFLATE by extension.
AddOutputFilter DEFLATE js css htm html xml svg
</IfModule>
<IfModule mod_headers.c>
# Make sure proxies don't deliver the wrong content.
Header append Vary User-Agent env=!dont-vary
</IfModule>
AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
<IfModule mod_mime.c>
# DEFLATE by extension.
AddOutputFilter DEFLATE js css htm html xml svg
</IfModule>
</IfModule>
#</IfModule>
......@@ -108,22 +108,22 @@ FileETag none
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
# -- Enable video/audio seek -- #
Header set Accept-Ranges bytes
# -- Enable video/audio seek -- #
Header set Accept-Ranges bytes
</IfModule>
# -- Expires Headers -- #
# If the site is in active development, you may want to comment out this section.
<IfModule mod_expires.c>
<FilesMatch "(?i)\.(gif|png|jpe?g|svgz?|ico)$">
ExpiresActive on
ExpiresDefault "access plus 1 month"
</FilesMatch>
<FilesMatch "(?i)\.(js|css)$">
ExpiresActive on
ExpiresDefault "access plus 1 month"
</FilesMatch>
<FilesMatch "(?i)\.(gif|png|jpe?g|svgz?|ico)$">
ExpiresActive on
ExpiresDefault "access plus 1 month"
</FilesMatch>
<FilesMatch "(?i)\.(js|css)$">
ExpiresActive on
ExpiresDefault "access plus 1 month"
</FilesMatch>
</IfModule>
<IfModule mod_rewrite.c>
......@@ -203,9 +203,9 @@ FileETag none
# crawled by search engines.
#RewriteRule ^sitemap.txt$ tiki-browse_categories.php?find=&deep=on&type=wiki+page&parentId=2&sort_mode=name_asc&links&maxRecords=1000000 [L]
# -- RSS Feeds -- #
# Example rewrite rule to use the search as a simple RSS feed
#RewriteRule feed-(.*)\.rss tiki-searchindex.php?httpaccept=application\%2Frss\%2Bxml&filter~content=$1 [QSA,L]
# -- RSS Feeds -- #
# Example rewrite rule to use the search as a simple RSS feed
#RewriteRule feed-(.*)\.rss tiki-searchindex.php?httpaccept=application\%2Frss\%2Bxml&filter~content=$1 [QSA,L]
# If you use session_protected and want to use apache monitoring you may get "certificate verify failed" errors on https://127.0.0.1/server-status
# If so, uncomment this line which will route these requests straight to apache and so not get forced into https
......@@ -229,7 +229,7 @@ FileETag none
# -- Prevent Directory Browsing -- #
# Some shared hosting environments block options, so first check if the module is enabled
<IfModule !mod_dir>
Options -Indexes
Options -Indexes
</IfModule>
# -- Developer cTag Blocking -- #
......@@ -253,7 +253,7 @@ FileETag none
# Option 2: Allows services that POST back to Tiki, but less secure.
#<Limit GET>
# Require valid-user
# Require valid-user
#</Limit>
# -- Apache Error Handling -- #
......
<FilesMatch ".*">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
order deny,allow
deny from all
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
order deny,allow
deny from all
</IfModule>
</FilesMatch>
......@@ -32,13 +32,13 @@ if (empty($prefs['connect_site_title'])) {
$headerlib->add_jq_onready(
<<<JQ
$("#connect_defaults_btn a").click(function(){
var connect_defaults = $defaults;
for (var el in connect_defaults) {
$("input[name=" + el + "]").val(connect_defaults[el]);
}
return false;
});
$("#connect_defaults_btn a").click(function(){
var connect_defaults = $defaults;
for (var el in connect_defaults) {
$("input[name=" + el + "]").val(connect_defaults[el]);
}
return false;
});
JQ
);
}
......
......@@ -92,86 +92,86 @@ $js
\$(document).ready( function() {
var setupThemeSelects = function (themeDropDown, optionDropDown, showPreview) {
// pick up theme drop-down change
themeDropDown.change( function() {
var ops = theme_options[themeDropDown.val()];
var none = true;
var current = optionDropDown.val();
optionDropDown.empty().attr('disabled',false)
.append(\$('<option/>').attr('value','').text($none));
if (themeDropDown.val()) {
\$.each(ops[1], function(i, val) {
optionDropDown.append(\$('<option/>').attr('value',i).text(i));
none = false;
});
}
optionDropDown.val(current);
if (!optionDropDown.val()){
optionDropDown.val('');
}
if (none) {
optionDropDown.attr('disabled',true);
}
optionDropDown.change();
if (jqueryTiki.select2) {
optionDropDown.trigger("change:select2");
}
}).change();
optionDropDown.change( function() {
if (showPreview !== undefined) {
var t = themeDropDown.val();
var o = optionDropDown.val();
var f = theme_options[t][1][o];
if ( ! f ) {
f = theme_options[t][0];
}
if (f) {
\$('#theme_thumb').fadeOut('fast').attr('src', f).fadeIn('fast').animate({'opacity': 1}, 'fast');
} else {
\$('#theme_thumb').animate({'opacity': 0.3}, 'fast');
}
}
});
};
setupThemeSelects(\$('.tab-content select[name=theme]'), \$('.tab-content select[name=theme_option]'), true);
setupThemeSelects(\$('.tab-content select[name=theme_admin]'), \$('.tab-content select[name=theme_option_admin]'));
var setupThemeLayouts = function (themeDropDown, optionDropDown, layoutDropDown) {
themeDropDown,optionDropDown.change( function() {
var theme_name = themeDropDown.val();
if (optionDropDown.val()){
theme_name += ":" + optionDropDown.val();
}
var layouts = theme_layouts[theme_name];
var current = layoutDropDown.val();
layoutDropDown.empty();
if (!theme_name){
layoutDropDown.append(\$('<option/>').attr('value','').text('Site layout'));
layoutDropDown.attr('disabled',true);
} else {
layoutDropDown.attr('disabled',false);
\$.each(layouts, function(i, val) {
layoutDropDown.append(\$('<option/>').attr('value',i).text(val));
});
//try setting the option to the previously selected option and if no layout matched, set to 'basic'
layoutDropDown.val(current);
if (!layoutDropDown.val()){
layoutDropDown.val('basic');
}
}
layoutDropDown.change();
}).change();
};
setupThemeLayouts(\$('.tab-content select[name=theme]'), \$('.tab-content select[name=theme_option]'), \$('.tab-content select[name=site_layout]') );
setupThemeLayouts(\$('.tab-content select[name=theme_admin]'), \$('.tab-content select[name=theme_option_admin]'), \$('.tab-content select[name=site_layout_admin]') );
var setupThemeSelects = function (themeDropDown, optionDropDown, showPreview) {
// pick up theme drop-down change
themeDropDown.change( function() {
var ops = theme_options[themeDropDown.val()];
var none = true;
var current = optionDropDown.val();
optionDropDown.empty().attr('disabled',false)
.append(\$('<option/>').attr('value','').text($none));
if (themeDropDown.val()) {
\$.each(ops[1], function(i, val) {
optionDropDown.append(\$('<option/>').attr('value',i).text(i));
none = false;
});
}
optionDropDown.val(current);
if (!optionDropDown.val()){
optionDropDown.val('');
}
if (none) {
optionDropDown.attr('disabled',true);
}
optionDropDown.change();
if (jqueryTiki.select2) {
optionDropDown.trigger("change:select2");
}
}).change();
optionDropDown.change( function() {
if (showPreview !== undefined) {
var t = themeDropDown.val();
var o = optionDropDown.val();
var f = theme_options[t][1][o];
if ( ! f ) {
f = theme_options[t][0];
}
if (f) {
\$('#theme_thumb').fadeOut('fast').attr('src', f).fadeIn('fast').animate({'opacity': 1}, 'fast');
} else {
\$('#theme_thumb').animate({'opacity': 0.3}, 'fast');
}
}
});
};
setupThemeSelects(\$('.tab-content select[name=theme]'), \$('.tab-content select[name=theme_option]'), true);
setupThemeSelects(\$('.tab-content select[name=theme_admin]'), \$('.tab-content select[name=theme_option_admin]'));
var setupThemeLayouts = function (themeDropDown, optionDropDown, layoutDropDown) {
themeDropDown,optionDropDown.change( function() {
var theme_name = themeDropDown.val();
if (optionDropDown.val()){
theme_name += ":" + optionDropDown.val();
}
var layouts = theme_layouts[theme_name];
var current = layoutDropDown.val();
layoutDropDown.empty();
if (!theme_name){
layoutDropDown.append(\$('<option/>').attr('value','').text('Site layout'));
layoutDropDown.attr('disabled',true);
} else {
layoutDropDown.attr('disabled',false);
\$.each(layouts, function(i, val) {
layoutDropDown.append(\$('<option/>').attr('value',i).text(val));
});
//try setting the option to the previously selected option and if no layout matched, set to 'basic'
layoutDropDown.val(current);
if (!layoutDropDown.val()){
layoutDropDown.val('basic');
}
}
layoutDropDown.change();
}).change();
};
setupThemeLayouts(\$('.tab-content select[name=theme]'), \$('.tab-content select[name=theme_option]'), \$('.tab-content select[name=site_layout]') );
setupThemeLayouts(\$('.tab-content select[name=theme_admin]'), \$('.tab-content select[name=theme_option_admin]'), \$('.tab-content select[name=site_layout_admin]') );
});
JS
);
......
......@@ -40,21 +40,21 @@ function createPage($title, $content)
{
echo <<<END
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="themes/default/css/default.css" />
<link type="text/css" rel="stylesheet" href="themes/css/tiki-install.css" />
<title>$title</title>
</head>
<body class="installer-body">
<div id="fixedwidth" class="fixedwidth">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="themes/default/css/default.css" />
<link type="text/css" rel="stylesheet" href="themes/css/tiki-install.css" />
<title>$title</title>
</head>
<body class="installer-body">
<div id="fixedwidth" class="fixedwidth">
<header class="header-main">
<img alt="Site Logo" src="img/tiki/Tiki_WCG_light.png" class="logo-box" />
<div class="text-box">
<div class="text-box">
<div class="heading-text">
<h3 class="main-text">$title</h3>
</div>
......@@ -67,7 +67,7 @@ function createPage($title, $content)
</a>
</header>
</div>
</body>
</body>
</html>
END;
die;
......
{
"name": "tiki/tiki-custom",
"description": "Tiki Wiki CMS Groupware",
"license": "LGPL-2.1",
"homepage": "https://tiki.org",
"minimum-stability": "stable",
"require": {
},
"config": {
"process-timeout": 5000,
"bin-dir": "bin",
"component-dir": "vendor/components"
},
"repositories": [
{
"type": "composer",
"url": "https://composer.tiki.org"
}
]
"name": "tiki/tiki-custom",
"description": "Tiki Wiki CMS Groupware",
"license": "LGPL-2.1",
"homepage": "https://tiki.org",
"minimum-stability": "stable",
"require": {
},
"config": {
"process-timeout": 5000,
"bin-dir": "bin",
"component-dir": "vendor/components"
},
"repositories": [
{
"type": "composer",
"url": "https://composer.tiki.org"
}
]
}
<FilesMatch ".*">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
order deny,allow
deny from all
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
order deny,allow
deny from all
</IfModule>
</FilesMatch>
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<security>
<requestFiltering>
<fileExtensions allowUnlisted="false" />
</requestFiltering>
</security>
</system.webServer>
<system.webServer>
<security>
<requestFiltering>
<fileExtensions allowUnlisted="false" />
</requestFiltering>
</security>
</system.webServer>
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<container xmlns="http://symfony.com/schema/dic/services">
<!--
<!--
Important: This file is part of Tiki.
If you want to load additional services, please create
a 'custom.xml' file to avoid conflicts.
Important: This file is part of Tiki.
If you want to load additional services, please create
a 'custom.xml' file to avoid conflicts.
-->
<services>
<!-- this makes public all the services defined in this file -->
<!-- https://symfony.com/blog/new-in-symfony-3-4-services-are-private-by-default -->
<defaults public="true" />
-->
<services>
<!-- this makes public all the services defined in this file -->
<!-- https://symfony.com/blog/new-in-symfony-3-4-services-are-private-by-default -->
<defaults public="true" />
<service id="tiki.controller.access" class="Services_Access_Controller"/>
<service id="tiki.controller.activitystream" class="Services_ActivityStream_Controller"/>
<service id="tiki.controller.annotation" class="Services_Comment_AnnotationController"/>
<service id="tiki.controller.article" class="Services_Article_Controller"/>
<service id="tiki.controller.attribute" class="Services_Attribute_Controller"/>
<service id="tiki.controller.auth_source" class="Services_AuthSource_Controller"/>
<service id="tiki.controller.autosave" class="Services_AutoSave_Controller"/>
<service id="tiki.controller.bigbluebutton" class="Services_BigBlueButton_Controller"/>
<service id="tiki.controller.calendar" class="Services_Calendar_Controller"/>
<service id="tiki.controller.category" class="Services_Category_Controller"/>
<service id="tiki.controller.comment" class="Services_Comment_Controller"/>
<service id="tiki.controller.connect_server" class="Services_Connect_Server"/>
<service id="tiki.controller.connect" class="Services_Connect_Client"/>
<service id="tiki.controller.contenttemplate" class="Services_ContentTemplate_Controller"/>
<service id="tiki.controller.customroute" class="Services_CustomRoute_Controller"/>
<service id="tiki.controller.cypht" class="Services_Cypht_Controller"/>
<service id="tiki.controller.draw" class="Services_Draw_Controller"/>
<service id="tiki.controller.edit" class="Services_Edit_Controller"/>
<service id="tiki.controller.encryption" class="Services_Encryption_Controller"/>
<service id="tiki.controller.diagram" class="Services_Diagram_Controller"/>
<service id="tiki.controller.edit_semaphore" class="Services_Edit_SemaphoreController"/>
<service id="tiki.controller.export" class="Services_Export_Controller"/>
<service id="tiki.controller.favorite" class="Services_User_FavoriteController"/>
<service id="tiki.controller.forum" class="Services_Forum_Controller"/>
<service id="tiki.controller.goal" class="Services_Goal_Controller"/>
<service id="tiki.controller.group" class="Services_Group_Controller"/>
<service id="tiki.controller.file_finder" class="Services_File_FinderController"/>
<service id="tiki.controller.file" class="Services_File_Controller"/>
<service id="tiki.controller.h5p" class="Services_H5P_Controller"/>
<service id="tiki.controller.kaltura" class="Services_Kaltura_Controller"/>
<service id="tiki.controller.language" class="Services_Language_Controller"/>
<service id="tiki.controller.ml" class="Services_ML_Controller"/>
<service id="tiki.controller.mailin" class="Services_MailIn_Controller"/>
<service id="tiki.controller.managestream" class="Services_ActivityStream_ManageController"/>
<service id="tiki.controller.menu" class="Services_Menu_Controller"/>
<service id="tiki.controller.module" class="Services_Module_Controller"/>
<service id="tiki.controller.monitor" class="Services_User_MonitorController"/>
<service id="tiki.controller.mustread" class="Services_MustRead_Controller"/>
<service id="tiki.controller.oauth" class="Services_AuthSource_OAuthController"/>
<service id="tiki.controller.oauthserver" class="Services_OAuthServer_Controller"/>
<service id="tiki.controller.object" class="Services_Object_Controller"/>
<service id="tiki.controller.payment" class="Services_Payment_Controller"/>
<service id="tiki.controller.pivot" class="Services_Pivot_Controller"/>
<service id="tiki.controller.pdf" class="Services_PDF_Controller"/>
<service id="tiki.controller.plugin" class="Services_Edit_PluginController"/>
<service id="tiki.controller.rating" class="Services_Rating_Controller"/>
<service id="tiki.controller.recordrtc" class="Services_RecordRtc_Controller"/>
<service id="tiki.controller.relation" class="Services_Relation_Controller"/>
<service id="tiki.controller.report" class="Services_Report_Controller"/>
<service id="tiki.controller.recommendation_dev" class="Services_Recommendation_DevelopmentController"/>
<service id="tiki.controller.scheduler" class="Services_Scheduler_Controller"/>
<service id="tiki.controller.score" class="Services_Score_Controller"/>
<service id="tiki.controller.search" class="Services_Search_Controller"/>
<service id="tiki.controller.search_customsearch" class="Services_Search_CustomSearchController"/>
<service id="tiki.controller.search_manifold" class="Services_Search_ManifoldController"/>
<service id="tiki.controller.search_stored" class="Services_Search_StoredController"/>
<service id="tiki.controller.semaphore" class="Services_Edit_SemaphoreController"/>
<service id="tiki.controller.showtikiorg" class="Services_ShowTikiOrg_Controller"/>
<service id="tiki.controller.social" class="Services_User_SocialController"/>
<service id="tiki.controller.styleguide" class="Services_StyleGuide_Controller"/>
<service id="tiki.controller.suite" class="Services_Suite_Controller"/>
<service id="tiki.controller.tabular" class="Services_Tracker_TabularController"/>
<service id="tiki.controller.tracker" class="Services_Tracker_Controller"/>
<service id="tiki.controller.tracker_calendar" class="Services_Tracker_CalendarController"/>
<service id="tiki.controller.tracker_duration" class="Services_Tracker_DurationController"/>
<service id="tiki.controller.tracker_sync" class="Services_Tracker_SyncController"/>
<service id="tiki.controller.tracker_todo" class="Services_Tracker_TodoController"/>
<service id="tiki.controller.translation" class="Services_Language_TranslationController"/>
<service id="tiki.controller.user" class="Services_User_Controller"/>
<service id="tiki.controller.user_conditions" class="Services_User_ConditionsController"/>
<service id="tiki.controller.vimeo" class="Services_File_VimeoController"/>
<service id="tiki.controller.xmpp" class="Services_Xmpp_Controller"/>
<service id="tiki.controller.wiki" class="Services_Wiki_Controller"/>
<service id="tiki.controller.wiki_structure" class="Services_Wiki_StructureController"/>
<service id="tiki.controller.workspace" class="Services_Workspace_Controller"/>
<service id="tiki.controller.ids" class="Services_IDS_Controller"/>
</services>
<service id="tiki.controller.access" class="Services_Access_Controller"/>
<service id="tiki.controller.activitystream" class="Services_ActivityStream_Controller"/>
<service id="tiki.controller.annotation"