Commit 46b24d4c authored by jonnybradley's avatar jonnybradley

[MRG] Automatic merge, trunk 61745 to 61845

Conflicts fixed (with tf) on:
        admin/include_general.php
        admin/include_intertiki.php
        db/config/controllers.xml
        lib/core/Search/Indexer.php
        lib/core/Services/Edit/PluginController.php
        lib/core/Tiki/MemoryLimit.php
        lib/prefs/wikiplugin.php
        templates/admin/include_calendar.tpl
        templates/admin/include_print.tpl
Setup and composer update to follow...
parent e13fc3fe
......@@ -18,7 +18,6 @@ admin/include_i18n.php -text
admin/include_intertiki.php -text
admin/include_login.php -text
admin/include_look.php -text
admin/include_maps.php -text
admin/include_performance.php -text
admin/include_profiles.php -text
admin/include_rating.php -text
......@@ -48,6 +47,7 @@ admin/index.php -text
/comments.php -text
/commxmlrpc.php -text
/composer.json -text
/composer.json.dist -text
/composer.lock -text
/console.php -text
/contribution.php -text
......@@ -1947,6 +1947,8 @@ installer/schema/20170213_footnotearea_tiki.sql -text
installer/schema/20170218_schedulers_menu_tiki.sql -text
installer/schema/20170305_webservices_menu_tiki.sql -text
installer/schema/20170307_kill_wikilingo_tiki.sql -text
installer/schema/20170319_kill_jcapture_tiki.sql -text
installer/schema/20170322_fix_allocate_memory_prefs_tiki.sql -text
installer/schema/999999991_decode_pages_sources_tiki.php -text
installer/schema/99999999_image_plugins_kill_tiki.php -text
installer/schema/index.php -text
......@@ -2412,7 +2414,10 @@ lib/core/Reports/Send/index.php -text
lib/core/Reports/Users.php -text
lib/core/Reports/index.php -text
lib/core/Scheduler/Item.php -text
lib/core/Scheduler/Task/CommandTask.php -text
lib/core/Scheduler/Task/ConsoleCommandTask.php -text
lib/core/Scheduler/Task/HTTPGetCommandTask.php -text
lib/core/Scheduler/Task/ShellCommandTask.php -text
lib/core/Search/Action/Action.php -text
lib/core/Search/Action/ActionStep.php -text
lib/core/Search/Action/ChangeStatusAction.php -text
......@@ -2637,6 +2642,7 @@ lib/core/Services/ContentTemplate/index.php -text
lib/core/Services/Draw/Controller.php -text
lib/core/Services/Draw/index.php -text
lib/core/Services/Edit/Controller.php -text
lib/core/Services/Edit/ListPluginHelper.php -text
lib/core/Services/Edit/PluginController.php -text
lib/core/Services/Edit/SemaphoreController.php -text
lib/core/Services/Edit/index.php -text
......@@ -2663,8 +2669,6 @@ lib/core/Services/Goal/index.php -text
lib/core/Services/Group/Controller.php -text
lib/core/Services/Group/index.php -text
lib/core/Services/H5P/Controller.php -text
lib/core/Services/JCapture/Controller.php -text
lib/core/Services/JCapture/index.php -text
lib/core/Services/Kaltura/Controller.php -text
lib/core/Services/Kaltura/index.php -text
lib/core/Services/Language/Controller.php -text
......@@ -2807,6 +2811,7 @@ lib/core/Tiki/Command/ProfileExport/AllModules.php -text
lib/core/Tiki/Command/ProfileExport/Article.php -text
lib/core/Tiki/Command/ProfileExport/ArticleTopic.php -text
lib/core/Tiki/Command/ProfileExport/ArticleType.php -text
lib/core/Tiki/Command/ProfileExport/Calendar.php -text
lib/core/Tiki/Command/ProfileExport/Category.php -text
lib/core/Tiki/Command/ProfileExport/FileGallery.php -text
lib/core/Tiki/Command/ProfileExport/Finalize.php -text
......@@ -2843,6 +2848,7 @@ lib/core/Tiki/Command/UsersListCommand.php -text
lib/core/Tiki/Command/UsersPasswordCommand.php -text
lib/core/Tiki/Command/index.php -text
lib/core/Tiki/Composer/BootstrapCompiler.php -text
lib/core/Tiki/Composer/CleanVendorAfterVendorBundledMigration.php -text
lib/core/Tiki/Composer/CleanVendors.php -text
lib/core/Tiki/Composer/ThemeInstaller.php -text
lib/core/Tiki/Composer/index.php -text
......@@ -3320,8 +3326,6 @@ lib/init/tra.php -text
lib/init/typography.php -text
lib/integrator/index.php -text
lib/integrator/integrator.php -text
lib/jcapture_tiki/index.php -text
lib/jcapture_tiki/tiki-jcapture.js -text
lib/jquery_tiki/autoToc.js -text
lib/jquery_tiki/customsearch.js -text
lib/jquery_tiki/elfinder/elFinderVolumeTikiFiles.class.php -text
......@@ -3335,6 +3339,8 @@ lib/jquery_tiki/inline_edit.js -text
lib/jquery_tiki/multilike.js -text
lib/jquery_tiki/mustread.js -text
lib/jquery_tiki/pdf.js -text
lib/jquery_tiki/pluginedit.js -text
lib/jquery_tiki/pluginedit_list.js -text
lib/jquery_tiki/social.js -text
lib/jquery_tiki/tablesorter.js -text
lib/jquery_tiki/tiki-admin.js -text
......@@ -3345,7 +3351,6 @@ lib/jquery_tiki/tiki-jquery.js -text
lib/jquery_tiki/tiki-jquery_upload.js -text
lib/jquery_tiki/tiki-maps-ol3.js -text
lib/jquery_tiki/tiki-maps.js -text
lib/jquery_tiki/tiki-pluginedit.js -text
lib/jquery_tiki/tiki-toolbars.js -text
lib/jquery_tiki/tiki-trackers.js -text
lib/jquery_tiki/tiki-workspace-ui.js -text
......@@ -3583,26 +3588,6 @@ lib/pdflib.php -text
lib/perspective/binderlib.php -text
lib/perspective/index.php -text
lib/perspectivelib.php -text
lib/phpsec/CHANGELOG.md -text
lib/phpsec/LICENSE -text
lib/phpsec/README.md -text
lib/phpsec/index.php -text
lib/phpsec/phpsec.class.php -text
lib/phpsec/phpsec/index.php -text
lib/phpsec/phpsec/phpsec.cache.php -text
lib/phpsec/phpsec/phpsec.crypt.php -text
lib/phpsec/phpsec/phpsec.filter.php -text
lib/phpsec/phpsec/phpsec.hash.php -text
lib/phpsec/phpsec/phpsec.otp.php -text
lib/phpsec/phpsec/phpsec.otpcard.php -text
lib/phpsec/phpsec/phpsec.pw.php -text
lib/phpsec/phpsec/phpsec.rand.php -text
lib/phpsec/phpsec/phpsec.session.php -text
lib/phpsec/phpsec/phpsec.store.filesystem.php -text
lib/phpsec/phpsec/phpsec.store.pdo.php -text
lib/phpsec/phpsec/phpsec.store.php -text
lib/phpsec/phpsec/phpsec.token.php -text
lib/phpsec/phpsec/phpsec.yubikey.php -text
lib/phpseclib_tiki/index.php -text
lib/phpseclib_tiki/tikisecure.php -text
lib/polls/index.php -text
......@@ -3669,6 +3654,7 @@ lib/prefs/https.php -text
lib/prefs/ids.php -text
lib/prefs/image.php -text
lib/prefs/index.php -text
lib/prefs/intertiki.php -text
lib/prefs/ip.php -text
lib/prefs/javascript.php -text
lib/prefs/jquery.php -text
......@@ -4041,6 +4027,7 @@ lib/smarty_tiki/function.redirect.php -text
lib/smarty_tiki/function.reindex_file_pixel.php -text
lib/smarty_tiki/function.rss.php -text
lib/smarty_tiki/function.sameurl.php -text
lib/smarty_tiki/function.scheduler_params.php -text
lib/smarty_tiki/function.sefurl.php -text
lib/smarty_tiki/function.select_all.php -text
lib/smarty_tiki/function.service.php -text
......@@ -4871,7 +4858,6 @@ lib/wizard/pages/admin_editor_type.php -text
lib/wizard/pages/admin_features.php -text
lib/wizard/pages/admin_files.php -text
lib/wizard/pages/admin_files_storage.php -text
lib/wizard/pages/admin_jcapture.php -text
lib/wizard/pages/admin_language.php -text
lib/wizard/pages/admin_login.php -text
lib/wizard/pages/admin_look_and_feel.php -text
......@@ -5370,8 +5356,6 @@ templates/h5p/embed.tpl -text
templates/header.tpl -text
templates/index.php -text
templates/interactive_translation_box.tpl -text
templates/jcapture/capture.tpl -text
templates/jcapture/index.php -text
templates/kaltura/index.php -text
templates/kaltura/list.tpl -text
templates/kaltura/upload.tpl -text
......@@ -6402,7 +6386,6 @@ templates/wizard/admin_editor_type.tpl -text
templates/wizard/admin_features.tpl -text
templates/wizard/admin_files.tpl -text
templates/wizard/admin_files_storage.tpl -text
templates/wizard/admin_jcapture.tpl -text
templates/wizard/admin_language.tpl -text
templates/wizard/admin_login.tpl -text
templates/wizard/admin_look_and_feel.tpl -text
......@@ -8033,6 +8016,9 @@ tiki_tests/tikitestslib.php -text
tiki_tests/web.config -text
/validate-ajax.php -text
vendor/.htaccess -text
vendor_bundled/.htaccess -text
vendor_bundled/composer.json -text
vendor_bundled/composer.lock -text
vendor_extra/anythingslider-themes/css/theme-default1.css -text
vendor_extra/anythingslider-themes/css/theme-default2.css -text
vendor_extra/anythingslider-themes/css/theme-mini-dark.css -text
......
......@@ -57,6 +57,7 @@ tests/.htaccess
tiki_tests/tests
/var
vendor/*
vendor_bundled/vendor
/vendor_custom
vendor_custom/*
/whelp
......@@ -221,7 +221,7 @@ FileETag none
#AuthUserFile /etc/httpd/passwords
#Require valid-user
# Option 2: Allows jCapture and other services that POST back to Tiki, but less secure.
# Option 2: Allows services that POST back to Tiki, but less secure.
#<Limit GET>
# Require valid-user
#</Limit>
......
......@@ -14,26 +14,24 @@ if (strpos($_SERVER['SCRIPT_NAME'], basename(__FILE__)) !== false) {
$filegallib = TikiLib::lib('filegal');
if ($check === true) {
if (isset($_REQUEST["filegalfeatures"])) {
// Check for last character being a / or a \
if (substr($_REQUEST["fgal_use_dir"], -1) != "\\" && substr($_REQUEST["fgal_use_dir"], -1) != "/" && $_REQUEST["fgal_use_dir"] != "") {
$_REQUEST["fgal_use_dir"].= "/";
}
// Check for last character being a / or a \
if (substr($_REQUEST["fgal_podcast_dir"], -1) != "\\" && substr($_REQUEST["fgal_podcast_dir"], -1) != "/" && $_REQUEST["fgal_podcast_dir"] != "") {
$_REQUEST["fgal_podcast_dir"].= "/";
}
if (substr($_REQUEST["fgal_batch_dir"], -1) != "\\" && substr($_REQUEST["fgal_batch_dir"], -1) != "/" && $_REQUEST["fgal_batch_dir"] != "") {
$_REQUEST["fgal_batch_dir"].= "/";
}
simple_set_value("fgal_use_dir");
simple_set_value("fgal_podcast_dir");
simple_set_value("fgal_batch_dir");
if (!empty($_REQUEST['fgal_quota']) && !empty($_REQUEST['fgal_quota_default']) && $_REQUEST['fgal_quota_default'] > $_REQUEST['fgal_quota']) {
$_REQUEST['fgal_quota_default'] = $_REQUEST['fgal_quota'];
}
simple_set_value('fgal_quota_default');
// Check for last character being a / or a \
if (substr($_REQUEST["fgal_use_dir"], -1) != "\\" && substr($_REQUEST["fgal_use_dir"], -1) != "/" && $_REQUEST["fgal_use_dir"] != "") {
$_REQUEST["fgal_use_dir"].= "/";
}
// Check for last character being a / or a \
if (substr($_REQUEST["fgal_podcast_dir"], -1) != "\\" && substr($_REQUEST["fgal_podcast_dir"], -1) != "/" && $_REQUEST["fgal_podcast_dir"] != "") {
$_REQUEST["fgal_podcast_dir"].= "/";
}
if (substr($_REQUEST["fgal_batch_dir"], -1) != "\\" && substr($_REQUEST["fgal_batch_dir"], -1) != "/" && $_REQUEST["fgal_batch_dir"] != "") {
$_REQUEST["fgal_batch_dir"].= "/";
}
simple_set_value("fgal_use_dir");
simple_set_value("fgal_podcast_dir");
simple_set_value("fgal_batch_dir");
if (!empty($_REQUEST['fgal_quota']) && !empty($_REQUEST['fgal_quota_default']) && $_REQUEST['fgal_quota_default'] > $_REQUEST['fgal_quota']) {
$_REQUEST['fgal_quota_default'] = $_REQUEST['fgal_quota'];
}
simple_set_value('fgal_quota_default');
if (!empty($_REQUEST['updateMime'])) {
$files = $filegallib->table('tiki_files');
$rows = $files->fetchAll(array('fileId', 'filename', 'filetype'), array('archiveId' => 0, 'filetype' => 'application/octet-stream'));
......@@ -65,68 +63,19 @@ if ($check === true) {
}
}
if (isset($_REQUEST["filegallistprefs"])) {
simple_set_value('fgal_list_id');
simple_set_value('fgal_list_type');
simple_set_value('fgal_list_name');
simple_set_value('fgal_list_description');
simple_set_value('fgal_list_size');
simple_set_value('fgal_list_created');
simple_set_value('fgal_list_lastModif');
simple_set_value('fgal_list_creator');
simple_set_value('fgal_list_author');
simple_set_value('fgal_list_last_user');
simple_set_value('fgal_list_comment');
simple_set_value('fgal_list_files');
simple_set_value('fgal_list_hits');
simple_set_value('fgal_list_lastDownload');
simple_set_value('fgal_list_deleteAfter');
simple_set_value('fgal_show_checked');
simple_set_value('fgal_list_share');
simple_set_value('fgal_list_lockedby');
$_REQUEST['fgal_sort_mode'] = (empty($_REQUEST['fgal_sortorder']) ? 'created' : $_REQUEST['fgal_sortorder']) . '_' . (empty($_REQUEST['fgal_sortdirection']) ? 'desc' : $_REQUEST['fgal_sortdirection']);
$prefs['fgal_sort_mode'] = $_REQUEST['fgal_sort_mode'];
simple_set_value('fgal_sort_mode');
simple_set_toggle('fgal_show_explorer');
simple_set_toggle('fgal_show_path');
simple_set_toggle('fgal_show_slideshow');
simple_set_toggle('fgal_list_ratio_hits');
simple_set_value('fgal_default_view');
simple_set_value('fgal_icon_fileId');
simple_set_value('fgal_list_backlinks');
simple_set_value('fgal_list_id_admin');
simple_set_value('fgal_list_type_admin');
simple_set_value('fgal_list_name_admin');
simple_set_value('fgal_list_description_admin');
simple_set_value('fgal_list_size_admin');
simple_set_value('fgal_list_created_admin');
simple_set_value('fgal_list_lastModif_admin');
simple_set_value('fgal_list_creator_admin');
simple_set_value('fgal_list_author_admin');
simple_set_value('fgal_list_last_user_admin');
simple_set_value('fgal_list_comment_admin');
simple_set_value('fgal_list_files_admin');
simple_set_value('fgal_list_hits_admin');
simple_set_value('fgal_list_lastDownload_admin');
simple_set_value('fgal_list_lockedby_admin');
simple_set_value('fgal_list_backlinks_admin');
}
if (isset($_REQUEST["filegalhandlers"])) {
if (!empty($_REQUEST['mimes'])) {
$mimes = $_REQUEST['mimes'];
foreach ($mimes as $mime => $cmd) {
$mime = trim($mime);
if (empty($cmd)) {
$filegallib->delete_file_handler($mime);
} else {
$filegallib->change_file_handler($mime, $cmd);
}
if (!empty($_REQUEST['mimes'])) {
$mimes = $_REQUEST['mimes'];
foreach ($mimes as $mime => $cmd) {
$mime = trim($mime);
if (empty($cmd)) {
$filegallib->delete_file_handler($mime);
} else {
$filegallib->change_file_handler($mime, $cmd);
}
}
if (!empty($_REQUEST['newMime']) && !empty($_REQUEST['newCmd'])) {
$filegallib->change_file_handler($_REQUEST['newMime'], $_REQUEST['newCmd']);
}
}
if (!empty($_REQUEST['newMime']) && !empty($_REQUEST['newCmd'])) {
$filegallib->change_file_handler($_REQUEST['newMime'], $_REQUEST['newCmd']);
}
if (isset($_REQUEST["filegalredosearch"])) {
$filegallib->reindex_all_files_for_search_text();
......@@ -160,27 +109,9 @@ if ($prefs['fgal_viewerjs_feature'] === 'y') {
$smarty->assign('viewerjs_err', $viewerjs_err);
}
if (!empty($prefs['fgal_sort_mode']) && preg_match('/(.*)_(asc|desc)/', $prefs['fgal_sort_mode'], $matches)) {
$smarty->assign('fgal_sortorder', $matches[1]);
$smarty->assign('fgal_sortdirection', $matches[2]);
} else {
$smarty->assign('fgal_sortorder', 'created');
$smarty->assign('fgal_sortdirection', 'desc');
}
$usedSize = $filegallib->getUsedSize();
$smarty->assign_by_ref('usedSize', $usedSize);
$options_sortorder = array(
tra('Creation Date') => 'created',
tra('Name') => 'name',
tra('Last modification date') => 'lastModif',
tra('Hits') => 'hits',
tra('Owner') => 'user',
tra('Description') => 'description',
tra('ID') => 'id'
);
$smarty->assign_by_ref('options_sortorder', $options_sortorder);
$handlers = $filegallib->get_file_handlers();
ksort($handlers);
$smarty->assign("fgal_handlers", $handlers);
......
......@@ -10,59 +10,27 @@
require_once ('tiki-setup.php');
$access->check_script($_SERVER['SCRIPT_NAME'], basename(__FILE__));
if (isset($_REQUEST['new_prefs']) && $check === true) {
$listgroups = $userlib->get_groups(0, -1, 'groupName_asc', '', '', 'n');
$in = array();
$out = array();
foreach ($listgroups['data'] as $gr) {
if ($gr['groupName'] == 'Anonymous') {
continue;
}
if ($gr['registrationChoice'] == 'y'
&& isset($_REQUEST['registration_choices'])
&& !in_array($gr['groupName'], $_REQUEST['registration_choices'])
) {
// deselect
$out[] = $gr['groupName'];
} elseif ($gr['registrationChoice'] != 'y'
&& isset($_REQUEST['registration_choices'])
&& in_array($gr['groupName'], $_REQUEST['registration_choices'])
) { //select
$in[] = $gr['groupName'];
}
}
$pref_toggles = array(
'feature_wiki_1like_redirection',
);
foreach ($pref_toggles as $toggle) {
simple_set_toggle($toggle);
}
simple_set_value('server_timezone');
if ($access->ticketMatch()) {
$tikilib->set_preference('display_timezone', $tikilib->get_preference('server_timezone'));
// Special handling for tied fields: tikiIndex, urlIndex and useUrlIndex
}
$smarty->assign('now', $tikilib->now);
if (!empty($_REQUEST['testMail']) && $check === true) {
include_once('lib/webmail/tikimaillib.php');
$mail = new TikiMail();
$mail->setSubject(tra('Tiki Email Test'));
$mail->setText(tra('Tiki Test email from:') . ' ' . $_SERVER['SERVER_NAME']);
if (!$mail->send(array($_REQUEST['testMail']))) {
$msg = tra('Unable to send mail');
if ($tiki_p_admin == 'y') {
$mailerrors = print_r($mail->errors, true);
$msg .= '<br>' . $mailerrors;
if (!empty($_REQUEST['testMail'])) {
include_once('lib/webmail/tikimaillib.php');
$mail = new TikiMail();
$mail->setSubject(tra('Tiki Email Test'));
$mail->setText(tra('Tiki Test email from:') . ' ' . $_SERVER['SERVER_NAME']);
if (!$mail->send(array($_REQUEST['testMail']))) {
$msg = tra('Unable to send mail');
if ($tiki_p_admin == 'y') {
$mailerrors = print_r($mail->errors, true);
$msg .= '<br>' . $mailerrors;
}
Feedback::warning($msg, 'session');
} else {
add_feedback('testMail', tra('Test mail sent to') . ' ' . $_REQUEST['testMail'], 3);
}
Feedback::warning($msg, 'session');
} else {
add_feedback('testMail', tra('Test mail sent to') . ' ' . $_REQUEST['testMail'], 3);
}
}
$engine_type = getCurrentEngine();
$smarty->assign('db_engine_type', $engine_type);
$smarty->assign('now', $tikilib->now);
......@@ -17,16 +17,20 @@ if (!isset($_REQUEST['known_hosts'])) {
$_REQUEST['known_hosts'] = array();
}
if ($check === true) {
$smarty->assign('serverFields', ['name', 'host', 'port', 'path', 'groups']);
if ($access->ticketMatch()) {
if (isset($_REQUEST['del'])) {
//TODO add service for confirm popup
// $access->check_authenticity(tra('Are you sure you want to remove this server?'));
$_REQUEST["intertikiclient"] = true;
foreach ($prefs['interlist'] as $k => $i) {
if ($k != $_REQUEST['del']) {
$_REQUEST['interlist'][$k] = $i;
if ($k == $_REQUEST['del']) {
unset($_REQUEST['interlist'][$k]);
}
}
simple_set_value('interlist');
//to refresh interlist dropdown - not sure if there's a better way to do this
$access->redirect($_SERVER['REQUEST_URI'], '', 200);
}