[TikiWiki-commits] [Git][tikiwiki/tiki][cherry-pick-0ec6d2e9] 8 commits: [BP, FIX, ENH] api: Fix the "Content Authentication" form on Admin Content Sources
"Boss Ibrahim Mussa Gregoire \(@bim-g\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <68b85b72ee86e_2cdd02c545e6@gitlab-sidekiq-low-urgency-cpu-bound-v2-84cbfb8f78-p268g.mail> |
Boss Ibrahim Mussa Gregoire pushed to branch cherry-pick-0ec6d2e9 at Tiki Wiki CMS Groupware / Tiki Commits: 15f70da3 by Sammy Ndabo at 2025-08-29T13:22:27+00:00 [BP, FIX, ENH] api: Fix the "Content Authentication" form on Admin Content Sources --- * [BP][FIX] tiki-tracker_view_history.php: Fix tiki-tracker_view_history ERROR --- * [FIX, ENH] api: Fix the "Content Authentication" form on Admin Content Sources --- * [FIX, ENH] api: Fix the "Content Authentication" form on Admin Content Sources --- * [FIX] api: Fix the "Content Authentication" form on Admin Content Sources (tiki-admin_dsn.php) so it shows what's being saved properly - note you need to not set a user here for tiki-admin_sync.php to work. * [FIX] wikiplugin_tracker: Allow not having a preview button See merge request tikiwiki/tiki!8451 (cherry picked from commit 8ec37ffab64e95c232fabd85998fe2b31234d2dc) See merge request tikiwiki/tiki!8452 (cherry picked from commit b5a909269709ce22eb4e41a435f4686435d72194) See merge request tikiwiki/tiki!8453 (cherry picked from commit b19a224a8736001dffc82a9f5eee3413af786756) See merge request tikiwiki/tiki!8455 - - - - - f7a6ed20 by MAGENE Sem Joel at 2025-09-01T08:21:30+03:00 [BP][FIX][UX] Surveys: Improve feedback and error handling in admin actions --- * [BP][FIX][UX] Surveys: Improve feedback and error handling in admin actions --- * [BP][FIX][UX] Surveys: Improve feedback and error handling in admin actions --- * [FIX][UX] Surveys: Improve feedback and error handling in admin actions --- * [FIX][UX] Surveys: Improve feedback and error handling in admin actions See merge request tikiwiki/tiki!8087 (cherry picked from commit 74a239f8f5407719994171d6c859fe0821b33630) See merge request tikiwiki/tiki!8332 (cherry picked from commit 6e452638e07a44d257083fe46f9404e2574e45ad) See merge request tikiwiki/tiki!8341 See merge request tikiwiki/tiki!8351 - - - - - 8e96494b by Domeshow Emmanuel at 2025-09-02T00:18:14+03:00 [FIX] Prevent email spam protection while indexing --- * [FIX] Prevent email spam protection while indexing --- * [FIX] Prevent email spam protection while indexing --- * [FIX] Prevent email spam protection while indexing --- * [FIX] Prevent email spam protection while indexing See merge request tikiwiki/tiki!8462 (cherry picked from commit 2fa74b5a1e2b67eb62ce9abe3418e757de734dc3) e782d58a [FIX] Prevent email spam protection while indexing Co-authored-by: Domeshow Emmanuel <[email protected]> See merge request tikiwiki/tiki!8468 (cherry picked from commit 0a7cf40c64d684de21d96cd425b13b9ac15bdab6) 93645eb0 [FIX] Prevent email spam protection while indexing Co-authored-by: Domeshow Emmanuel <[email protected]> See merge request tikiwiki/tiki!8469 (cherry picked from commit 8224a759e17c3a8c992a9c4e70a4ef8f03ec1a59) 74de5e8b [FIX] Prevent email spam protection while indexing Co-authored-by: Domeshow Emmanuel <[email protected]> See merge request tikiwiki/tiki!8470 - - - - - 6812008a by Victor Emanouilov at 2025-09-03T14:03:11+03:00 [FIX] tabular imports: return formatted data after import from the API, so the remote point can sync any PKs or other data if needed - - - - - 3cd57da3 by Victor Emanouilov at 2025-09-03T14:14:04+03:00 [FIX] tabular api writer - parse single responses correctly - - - - - 488b08ee by MAGENE Sem Joel at 2025-09-03T15:15:09+03:00 [BP][FIX][REF] Trackers: Use intended JitFilter pattern for array values --- * [BP][FIX][REF] Trackers: Use intended JitFilter pattern for array values --- * [BP][FIX][REF] Trackers: Use intended JitFilter pattern for array values --- * [REF] Trackers: Use intended JitFilter pattern for array values --- * [REF] Trackers: Use intended JitFilter pattern for array values See merge request tikiwiki/tiki!8460 (cherry picked from commit 5b41a0f7198dcd2ccda4ed7c713188b3bf3f05f8) See merge request tikiwiki/tiki!8492 (cherry picked from commit 8d9135a289ee3f9fbe7cb8bcf434a9c4df36c399) See merge request tikiwiki/tiki!8493 (cherry picked from commit e8a11515d415098598b15797ea3006b90eb9eca3) See merge request tikiwiki/tiki!8494 - - - - - f8aa25e9 by Alvin Bauma at 2025-09-03T16:14:00+02:00 [FIX] Pages list : Fix the misalignment of the columns in the list header --- * [FIX] Pages list : Fix the misalignment of the columns in the list header --- * [FIX] Pages list : Fix the misalignment of the columns in the list header See merge request tikiwiki/tiki!8465 See merge request tikiwiki/tiki!8496 - - - - - 1575fc09 by Boss Ibrahim Mussa Gregoire at 2025-09-03T17:14:49+02:00 [BP][FIX] File Gallery: regression in Category assigning on file upload --- * [FIX] File Gallery: regression in Category assigning on file upload --- * [FIX]Fixing Category affactation on upload to files gallery See merge request tikiwiki/tiki!7479 See merge request tikiwiki/tiki!8357 (cherry picked from commit 0ec6d2e925065c41b5460e0cf32fb5097cdf171c) 8fd07017 [FIX] File Gallery: regression in Category assigning on file upload Co-authored-by: Boss Ibrahim Mussa Gregoire <[email protected]> - - - - - 10 changed files: - lib/core/Services/File/Controller.php - lib/core/Services/Tracker/TabularController.php - lib/core/Tracker/Tabular/Writer/APIWriter.php - lib/core/Tracker/Tabular/Writer/TrackerWriter.php - lib/parser/parserlib.php - lib/trackers/trackerlib.php - templates/tiki-admin_dsn.tpl - templates/tiki-admin_surveys.tpl - templates/tiki-listpages_content.tpl - tiki-admin_surveys.php Changes: ===================================== lib/core/Services/File/Controller.php ===================================== @@ -213,8 +213,11 @@ class Services_File_Controller $cat_desc = null; $cat_name = $name; $cat_href = "tiki-download_file.php?fileId=$fileId"; - $_REQUEST['cat_categories'] = $categories; - $_REQUEST["cat_categorize"] = 'on'; + + if ($categories) { + $_REQUEST['cat_categories'] = $categories; + $_REQUEST["cat_categorize"] = 'on'; + } include('categorize.php'); $util->setTicket(); ===================================== lib/core/Services/Tracker/TabularController.php ===================================== @@ -12,6 +12,7 @@ use Tracker\Tabular\Source\CsvSource; use Tracker\Tabular\Schema; use Tracker\Tabular\Source\PaginatedQuerySource; use Tracker\Tabular\Source\QuerySource; +use Tracker\Tabular\Source\TrackerSourceEntry; use Tracker\Tabular\Writer\APIWriter; use Tracker\Tabular\Writer\HtmlWriter; use Tracker\Tabular\Writer\ODBCWriter; @@ -557,15 +558,25 @@ class Services_Tracker_TabularController return TikiLib::lib('tiki')->allocate_extra( 'tracker_import_items', - function () use ($writer, $source, $info) { - $writer->write($source); + function () use ($writer, $source, $info, $schema) { + $result = $writer->write($source); unlink($_FILES['file']['tmp_name']); $message = tr('Your import was completed successfully.'); if (TIKI_API) { - return ['feedback' => $message]; + $data = []; + $columns = $schema->getColumns(); + foreach ($result as $itemId) { + $entry = new TrackerSourceEntry($itemId); + $row = ['itemId' => $itemId]; + foreach ($columns as $column) { + $row[$column->getField()] = $entry->render($column, false); + } + $data[] = $row; + } + return $data; } Feedback::success($message); ===================================== lib/core/Tracker/Tabular/Writer/APIWriter.php ===================================== @@ -122,6 +122,10 @@ class APIWriter $result = false; } + if (is_array($result) && count($result) == 1 && ! empty($result[0])) { + $result = $result[0]; + } + if ($result && ! $id && method_exists($entry, 'backfillPK')) { foreach (explode('.', $this->config['modify_data_path']) as $field) { if ($field !== '' && $result[$field]) { ===================================== lib/core/Tracker/Tabular/Writer/TrackerWriter.php ===================================== @@ -132,7 +132,7 @@ class TrackerWriter $definition = $schema->getDefinition(); - $iterate(function ($line, $info, $columns) use ($utilities, $definition, $schema) { + $result = $iterate(function ($line, $info, $columns) use ($utilities, $definition, $schema) { try { if (! isset($info['status'])) { $info['status'] = ''; @@ -184,7 +184,7 @@ class TrackerWriter $source->importSuccess(); } - return true; + return $result; } /** ===================================== lib/parser/parserlib.php ===================================== @@ -1349,7 +1349,7 @@ class ParserLib extends TikiDb_Bridge // email address ([email protected]) $patterns[] = "#([\n ])([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i"; - if ($this->option['protect_email'] && $this->option['print'] !== 'y' && $prefs['feature_wiki_protect_email'] == 'y') { + if ($this->option['protect_email'] && $this->option['print'] !== 'y' && $prefs['feature_wiki_protect_email'] == 'y' && $this->option['indexing'] == false) { if (! $mail_protect_pattern) { $mail_protect_pattern = "\\1" . TikiLib::protect_email("\\2", "\\3"); } ===================================== lib/trackers/trackerlib.php ===================================== @@ -7069,7 +7069,7 @@ class TrackerLib extends TikiLib 'logo' => $input->logo->text(), 'useFormClasses' => $input->useFormClasses->int() ? 'y' : 'n', 'formClasses' => $input->formClasses->text(), - 'tabularSync' => implode(',', $input->tabularSync->asArray()), + 'tabularSync' => implode(',', $input->asArray('tabularSync')), 'tabularSyncModifiedField' => $input->tabularSyncModifiedField->int(), 'tabularSyncLastImport' => $input->tabularSyncLastImport->int(), 'tabularSyncLastImportSkipUpdate' => $input->tabularSyncLastImportSkipUpdate->int() ? 'y' : 'n', ===================================== templates/tiki-admin_dsn.tpl ===================================== @@ -210,8 +210,13 @@ $('#source-form').each(function () { reload = function () { $('option.added', form).remove(); $.getJSON($.service('auth_source', 'list'), function (entries) { + const urlParams = new URLSearchParams(window.location.search); $.each(entries, function (k, v) { - $(form.existing).append($('<option class="added"/>').text(v)); + $(form.existing).append( + $('<option class="added"/>') + .text(v) + .prop("selected", v === urlParams.get('identifier')) + ); }); $(form.existing).trigger("change.select2"); @@ -238,7 +243,7 @@ $('#source-form').each(function () { $(form.identifier).val(id); $(form.method).val(data.method).trigger("change").trigger("change.select2"); $(form.url).val(data.url); - $(form.user).val(data.user); + $(form.user).val(data.user).trigger("change.select2"); switch (data.method) { case 'basic': ===================================== templates/tiki-admin_surveys.tpl ===================================== @@ -76,7 +76,8 @@ <input type="hidden" name="offset" value="{$offset}"> <input type="hidden" name="sort_mode" value="{$sort_mode}"> <input type="hidden" name="remove" value="{$channels[user].surveyId}"> - <button type="submit" class="btn btn-link px-0 pt-0 pb-0" onclick="confirmPopup()"> + <button type="submit" class="btn btn-link px-0 pt-0 pb-0" + onclick="confirmPopup('{tr}Are you sure you want to delete this survey?{/tr}')" aria-label="{tr}Remove{/tr}"> {icon name='remove' _menu_text='y' _menu_icon='y' alt="{tr}Remove{/tr}"} </button> </form> ===================================== templates/tiki-listpages_content.tpl ===================================== @@ -39,9 +39,9 @@ <thead> <tr> {if isset($checkboxes_on) and $checkboxes_on eq 'y'} - <dh id="checkbox"> + <th id="checkbox"> {select_all checkbox_names='checked[]' tablesorter="{$ts.enabled}"} - </dh> + </th> {assign var='cntcol' value='1'} {else} {assign var='cntcol' value='0'} @@ -51,9 +51,7 @@ {assign var='cntcol' value=$cntcol+1} <th id="pageid"> {self_link _sort_arg='sort_mode' _sort_field='page_id'}{tr}Id{/tr}{/self_link} - </th> - {else} - <th id="pageid">{$ln|escape}</th> + </th> {/if} {if $prefs.wiki_list_name eq 'y'} ===================================== tiki-admin_surveys.php ===================================== @@ -36,8 +36,16 @@ if (isset($_REQUEST["save"])) { } else { $restriction = 'n'; } + + $isUpdating = ! empty($_REQUEST["surveyId"]); + $sid = $srvlib->replace_survey($_REQUEST["surveyId"], $_REQUEST["name"], $_REQUEST["description"], $restriction, $_REQUEST["status"]); if ($sid) { + if ($isUpdating) { + Feedback::success(tr('Survey updated successfully.')); + } else { + Feedback::success(tr('Survey created successfully.')); + } $cat_type = 'survey'; $cat_objid = is_int($sid) ? $sid : $_REQUEST["surveyId"]; $cat_desc = substr($_REQUEST["description"], 0, 200); @@ -64,6 +72,7 @@ if (! empty($_REQUEST["surveyId"])) { $smarty->assign('info', $info); if (isset($_REQUEST["remove"]) && $access->checkCsrf()) { $srvlib->remove_survey($_REQUEST["remove"]); + Feedback::success(tr('The survey has been deleted successfully.')); } if (! isset($_REQUEST["sort_mode"])) { $sort_mode = 'created_desc'; View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/compare/31a0a63f526b2c2af5577b97766c0536770837a0...1575fc098919a418709a68e796eed520c9cdd2d8 -- View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/compare/31a0a63f526b2c2af5577b97766c0536770837a0...1575fc098919a418709a68e796eed520c9cdd2d8 You're receiving this email because of your account on gitlab.com. _______________________________________________ TikiWiki-cvs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs