Журнал изменений

Журнал изменений

Фильтр и поиск

Всего: 1173 Доступных коммитов | Отфильтровано: 1173 Коммиты | Страница: 11 из 118
28.07.2026
Refactor: the comment counter and the target resolver move into the Comment class
Автор: Eduard Laas | Дата: 19:15 28.07.2026

Stage 1 of docs/COMMENTS-REDESIGN-2026.md closes here. The comment table now has exactly one owner: the three global helpers that shared it are gone, the last consumer reaching it through an assembled table name is closed, and a guard test asserts the boundary for the whole stage rather than for one batch.

Core changes:

  1. Counter and resolver absorbed (core/classes/comment.php):
  2. numcom() becomes the private updateTargetCount()

    • three unreachable branches dropped: account/members, gallery, multimedia
    • their points slots 3, 17 and 29 leave the code; the users.points CSV keeps
all 45 positions, because the list is indexed positionally
  • getCommentMode() becomes the public getTargetMode()
  • both index one MODULES map holding the target table and the points slot of the eight modules that render comments

    • the counter map and the supported-module list stop being two lists
  • getStatusCount() added for the admin sidebar
  • The HTML monolith is deleted (core/system.php, core/user.php):
  • ashowcom() removed; its frontend half is getCommentList() in core/user.php, directly above setComShow(), which is where the design puts the rendering

  • the seven defined('ADMIN_FILE') branches are deleted rather than moved

    • core/user.php is required only under MODULE_FILE, so they were unreachable
  • core/system.php shrinks from 5944 to 5689 lines
  • The last direct consumer is closed (core/admin.php):
  • the waiting-content chip reads getStatusCount(CommentStatus::Pending)
  • getAdminCountRow() takes an optional precomputed count and skips its own query when it is given; the other fifteen sidebar rows are unchanged

  • the dead table, where and rate keys leave the comment entry of getProfileModules(), which is the shape that hid two consumers from earlier sweeps

  • Stage guard (tests/Unit/CommentIsolationTest.php):
  • no production file but the class names the comment table
  • the files that build a table name from a variable are a closed list, and neither getProfileModules() nor getAdminCountRow() can be handed comments

  • the retired globals are defined nowhere and named nowhere
  • the module map keeps its eight modules and their slots; the points CSV keeps its length

Benefits:

  • one reader and one writer for the comment table, so a counter can no longer drift from the rows it counts

  • the resolver that authorizes a target and the counter that follows a write sit behind the same private boundary, so the trust boundary stage 0 closed cannot be reopened from inside the project

  • the render is 135 lines of markup assembly with no SQL and no dead branches

Technical notes:

  • no table or column changes
  • behaviour and markup preserved: 80 URLs per round compared against the pre-move tree, 80/80 identical descending, and the moderator branch the guest probe cannot reach proven by source equivalence

  • measured on the live table: no stored row carries a module outside the map, so the dropped counter branches were unreachable in data as well as in code

  • breaking change for third-party code: ashowcom(), numcom() and getCommentMode() no longer exist; no wrapper and no alias is provided

Docs: record stage 1 batch 5 of the comment plan
Автор: Eduard Laas | Дата: 17:58 28.07.2026

The Progress section is the only place decisions of a finished batch survive into the next chat, so batch 5 writes down what it moved, what it measured, and the two consumers the plan's own fact list had missed.

Core changes:

  1. Progress and decisions (docs/COMMENTS-REDESIGN-2026.md):
  2. batch 5 row: what moved, the three parity measurements, and the checks that ran

  3. decisions: why deleteTarget() binds one placeholder per id and moves no counter, why it does not re-validate the module, why the whole shop id list was bound rather than the comment statement alone, what the two extra round trips per profile page buy, and where the unreachable feed guard went

  4. Consumers found by reading rather than grepping:
  5. modules/account/index.php built the profile hub from the same module map as the feed, so it reached the comment table through an assembled name and never appeared in a search for the literal; batch 5 migrated it

  6. core/admin.php:319 counts pending comments the same way through getAdminCountRow() and is recorded as open, with what it would take

  7. the stage 1 acceptance criterion now says a sweep for the literal name is not enough, and names both shapes seen so far

  8. Re-measured facts (docs/COMMENTS-REDESIGN-2026.md):
  9. the comment table holds 7353 rows and 3 pending, not 7357 and 4; the distribution moved with it, and the stage 2 body migration must measure the table it actually runs on

  10. the class line numbers cited across the plan are refreshed
  11. the shop id-list interpolation is struck from the fact list
  12. Deviations worth carrying (docs/COMMENTS-REDESIGN-2026.md):
  13. comment-baseline verify reported CHANGED for three modules and the cause was the verification itself: one point per rendered admin page moved a counter the author card shows; the value was restored and the baseline deliberately not re-captured

  14. the comment entry of the profile module map now carries three dead keys, and that is the disguise which hid two consumers

  15. two log entries found and left alone, neither owned by this batch

Benefits:

  • a new chat reading only this file sees why each deviation exists
  • batch 6 inherits a stage guard that knows what to look for

Technical notes:

  • no code changes in this commit
Refactor: the activity feed and the target deletions move into the Comment class
Автор: Eduard Laas | Дата: 17:58 28.07.2026

Stage 1, batch 5 of docs/COMMENTS-REDESIGN-2026.md. The profile feed, the profile hub and the eight module delete handlers stop reaching the comment table themselves, which leaves one runtime consumer outside the class and removes the last statement that pasted an id list into IN (...).

Core changes:

  1. Target deletion and the profile count (core/classes/comment.php):
  2. deleteTarget() removes the comments of target rows a module admin has just deleted

    • one placeholder per id, so a bulk selection reaches the statement as
bound values and the single case needs no second method
  • no counter is moved: a target that is gone has no row left to hold
one, which is what the eight handlers did before the move
  • getUserCount() answers the published comment count of one account, the number the profile hub shows beside its other module counters

  • Profile reads (core/user.php, modules/account/index.php):
  • getProfileLastView() drops the comment branch of its UNION and fills the comment tab from getUserList()

  • the profile hub drops the same branch and takes its count from getUserCount(), keeping the rating and favourites values it wrote before

  • the unreachable "no parts" guard of the feed moved to the query itself, so a comment-only feed still renders and the empty case is unchanged

  • Module delete handlers (eight admin modules):
  • faq, files, links, media, news, pages, shop and voting call deleteTarget() and hold no comment statement any more

  • Bulk id list (modules/shop/admin/index.php):
  • productops() builds $keys/$pars the way the news and pages handlers already did

    • all six IN (...) clauses bind, closing the interpolation the plan
lists as an acceptance criterion of this stage
  1. Parity probe and guard (tests/):
  2. contract_probe.php gains three modes: the pre-move feed function beside the migrated one, deleteTarget() driven inside a rolled-back transaction, and the hub values of both versions

  3. CommentTargetTest.php asserts the migrated call sites and the measured behaviour, and pins the comment entry out of both UNION branches

Benefits:

  • every runtime comment read and write goes through one class, except the admin sidebar chip recorded as open in the plan

  • a target delete can no longer reach past the module it names
  • the shop handler stops assembling SQL from a joined id list

Technical notes:

  • no table or column changes; no behaviour change intended, and none measured

  • the feed renders byte for byte against the UNION it replaces: 10 accounts, six with comments, one without, plus a missing, a zero and a negative id

  • deleteTarget() measured on all eight modules, on a bulk selection, on a target id shared by five modules, and against crafted id lists and a crafted module name, all inside a transaction that is rolled back

  • the eight routes exercised over real HTTP with a signed-in administrator: each removed only its own module's rows, a wrong token removed none, a repeated delete was a no-op, every per-module total returned to the value it started from

  • core/admin.php:319 still counts pending comments through getAdminCountRow(), which assembles the table name from a variable; it is left for a batch that owns the admin sidebar

Docs: record stage 1 batch 4 of the comment plan
Автор: Eduard Laas | Дата: 15:42 28.07.2026

The Progress section is the only place decisions of a finished batch survive into the next chat, so batch 4 writes down what it moved, what it measured and where it had to change behaviour.

Core changes:

  1. Progress and decisions (docs/COMMENTS-REDESIGN-2026.md):
  2. batch 4 row: what moved, the 42-URL and 16-scenario parity measurement, and the checks that ran

  3. decisions: why setStatus() took the moderation guard, why the body save is its own method, why updateBody() checks no moderator, and how the admin list lost its second description of itself

  4. deviations: the page clamp, the "LIMIT -25, 25" it removes, and the delete() redirect that no longer follows the deleted row's status

  5. two runtime log entries found and deliberately left alone, because neither is comment SQL and both behave alike in either version

  6. Re-measured facts (docs/COMMENTS-REDESIGN-2026.md):
  7. the frontend handlers and the admin module are struck from the list of direct comment-table consumers

  8. numcom() is called from the Comment class alone
  9. the class and admin line numbers cited across the plan are refreshed
  10. the concurrency section states what the new guard does and does not close, so stage 2 still owes the conditional update

  11. Table rendering (docs/COMMENTS-REDESIGN-2026.md):
  12. blank lines had split the Progress table into three, the last two without a header; the table is one again

Benefits:

  • a new chat reading only this file sees why each deviation exists
  • the public method list matches the class that actually exists

Technical notes:

  • no code changes in this commit
Refactor: the comment moderation module moves into the Comment class
Автор: Eduard Laas | Дата: 15:42 28.07.2026

Stage 1, batch 4 of docs/COMMENTS-REDESIGN-2026.md. The admin comment module no longer touches the comment table: every read and write it performed now goes through the Comment class, which leaves the class as the only place that knows how a comment is stored, permitted and counted.

Core changes:

  1. Moderation write methods (core/classes/comment.php):
  2. deleteComment() removes one comment and takes the target counter and the author points back when the removed row was published

    • the module and the target come from the stored row, never from the
request, so the stage 0 trust boundary holds for deletion too
  • updateBody() stores the body a moderator typed, verbatim

    • the moderation form is not the author edit path and applies neither
checkEditRules() nor filterHtml() nor the edit window
  • setStatus() takes the read-then-compare guard the moderation module always had

    • a comment already carrying the wanted status is answered as done
without writing, so a repeated click cannot count its target twice
  • the frontend path inherits the guard and loses a double count it
never intended; the rendered fragment is unchanged
  1. Moderation module (admin/modules/comments.php):
  2. the module selector reads getModuleList(), the list and its count read getAdminList(), the edit form reads getComment()

  3. the four write handlers call setStatus(), deleteComment() and updateBody(); no handler takes $db any more

  4. the pager renders through getTplPagerView() from the total the list itself counted, replacing getTplPager() and its separate COUNT

    • the $where/$wcnt pair is gone, and with it the second, differently
spelled description of one list
  • the rewritten list loop drops its snake_case names per .rules/global.md
  • Trust boundary guard (tests/Unit/CommentTrustBoundaryTest.php):
  • deleteComment() joined the methods asserted to read module and target from the stored row

  • the numcom() assertion follows the $cid the new status guard needs

Benefits:

  • the moderation list can no longer count one thing and show another
  • a repeated approve or delete leaves counters and points untouched
  • the admin panel gains prepared statements everywhere it had them by hand, and loses one hand-built subquery

Technical notes:

  • no table or column changes; the current sort is untouched
  • three measured behaviour changes, each a consequence of the move: an out-of-range page now clamps instead of answering "no information", &num=0 no longer builds "LIMIT -25, 25", and delete() redirects by the tab the request came from instead of by the deleted row's status

  • parity measured over real HTTP with a signed-in administrator: 42 URLs in two rounds, 39 byte-identical in the module content region, the three others being the page clamp above; 16 write scenarios left identical rows, bodies, target counters, points and row count

Docs: record stage 1 batch 3 of the comment plan
Автор: Eduard Laas | Дата: 14:50 28.07.2026

A new chat starts from this file rather than from the working tree, so the batch that moved the frontend writes has to leave behind what it decided, what it measured and which defects it found and deliberately did not touch.

Core changes:

  1. Comment plan progress (docs/COMMENTS-REDESIGN-2026.md):
  2. Batch 3 recorded with what landed, which checks ran and what they reported
  3. Decisions written down: why the class still calls numcom() and getCommentMode() as globals, why both validation copies moved unmerged, why the falsy body test was kept, why CommentStatus is applied and CommentMode is not, and why the captcha rule moved with the others

  4. The write parity method recorded: a rolled-back transaction against the live rows, which is what makes a real published add checkable on the stand the markup baseline is captured from

  5. Three defects recorded with file:line and left untouched: the anchor query that matches without modul, the edit alert that index.php discards, and is_moder('') deciding rights for a row that is gone

  6. The clock skew of this installation recorded: MySQL at Etc/GMT-1 against PHP at Europe/Berlin, which keeps the flood window from ever firing and closes the edit window before the author sees their own comment

  7. Verification gaps named: the moderator paths and the ajax textarea branch need a browser session no CLI probe can hold

  8. Line references re-measured after the move: the resolver, numcom() and its dead branches, the flood query, the anchor query, the word length defect, the render sites and the callers of ashowcom()

  9. The render sites are three, not four: batch 3 merged the two inside updateComment(), and the fourth sits in the unreachable admin branch that batch 6 deletes with the function

Benefits:

  • The stage keeps one place where every decision of every batch survives
  • Stage 2 inherits a measured list of what it has to fix rather than a guess

Technical notes:

  • Documentation only; no code, schema or behaviour is touched by this commit
Refactor: frontend comment writes move into the Comment class
Автор: Eduard Laas | Дата: 14:49 28.07.2026

Stage 1 batch 3 of docs/COMMENTS-REDESIGN-2026.md: adding, editing and moderating a comment no longer happen in the request handlers. The subsystem owns the rules, the permissions and the state changes, and the handlers read the request and render the answer, which is what lets stage 2 make the write transactional in one place instead of at three call sites.

Core changes:

  1. Comment write path (core/classes/comment.php):
  2. addComment(), updateComment() and setStatus() carry the frontend writes

    • the target mode, the author, the address and the moderation state are
resolved from the server context, never taken from the request
  • checkAddRules() answers the single message the submit path shows,
checkEditRules() the list the edit path shows; both are merged into
checkRules() in stage 2, not here
  • getLinkFlag(), getLastTime() and getLastId() carry the auto-link rule,
the flood window and the anchor id of a fresh row
  • CommentStatus names the value written to the status column; the acomm
comparisons stay bare because CommentMode belongs to stage 2
  • the counters still run through the global numcom(), and the target still resolves through the global getCommentMode(), as the batch table requires; batch 6 absorbs both

  • Request handlers (core/user.php, core/system.php):
  • addComment() shrank from 48 lines to 16, updateComment() from 43 to 22 and updateCommentStatus() from 15 to 7

  • none of the three holds comment SQL any more; the alerts, the ajax textarea, filterContent(), ashowcom() and addAdminMail() stay with the handler

  • Write parity checks (tests/):
  • CommentWriteTest drives the class against the live rows of the installation inside a transaction that is always rolled back

    • all eight modules store the row they resolved, increment their own target
counter and award their own points slot
  • an anonymous comment lands pending and moves neither
  • every refusal answers the message the submit path answered
  • the author edits inside the window and is refused after it; a visitor
edits and moderates nothing
  • CommentTrustBoundaryTest follows the code it guards: the stage 0 contract is now read off the class, and the handlers are asserted to carry neither a request module nor comment SQL

Benefits:

  • one description of what may be written, shared by the three routes
  • the counter and the points slot of every module are measured, not assumed
  • the write path is ready for the transaction and the reqkey of stage 2

Technical notes:

  • no schema and no markup change; behaviour is preserved down to the falsy body test that keeps a body of "0" from being saved, and to the edit length rule that still measures the last word in bytes

  • the six POSTs that reach the three routes answer byte for byte the same as before the move, with the comment count and the target counter unchanged

  • comment-baseline verify stays OK on all eight modules
  • the moderator paths need a browser session and are not covered by this batch
Docs: record stage 1 batch 2 of the comment plan
Автор: Eduard Laas | Дата: 12:42 28.07.2026

A new chat starts from this file rather than from the working tree, so the batch that moved the frontend reads has to leave behind what it decided, what it measured and what it deliberately did not touch.

Core changes:

  1. Comment plan progress (docs/COMMENTS-REDESIGN-2026.md):
  2. Batch 2 recorded with what landed, which checks ran and what they reported
  3. Decisions written down: the unreachable admin read branch left with the read it built, the page size no longer dividing by zero, the two single-letter locals renamed, and why the no-direct-SQL guard belongs to batch 6

  4. The setting invariant recorded: the class snapshots $conf['comments'] while the render function still reads sort and nump live, which is safe only because nothing writes that section at runtime

  5. Deviation recorded: the batch inherits the unmeasured moderator branch, since the signed-in views need a session no CLI probe can hold

  6. Function size re-measured after the move: 186 lines instead of 253, with the new line range

Benefits:

  • The stage keeps one place where every decision of every batch survives
  • The next batch knows which verification gaps it inherits instead of rediscovering them

Technical notes:

  • Documentation only; no code, schema or behaviour is touched by this commit
Refactor: frontend comment reads move into the Comment class
Автор: Eduard Laas | Дата: 12:42 28.07.2026

Stage 1 batch 2 of docs/COMMENTS-REDESIGN-2026.md: the render function no longer queries the comment table itself. It asks the subsystem for one page and assembles markup, which is what lets the later stages change storage and sorting in one place instead of at every call site.

Core changes:

  1. Comment list rendering (core/system.php):
  2. ashowcom() reads through $com->getList() instead of its own SQL

    • the count query, the page query and the author group join are gone
    • pagination, the visibility scope and the running comment number now come
from the class, so a count can no longer disagree with the page it counts
  • the unreachable ADMIN_FILE read branch left with the read it built; the
admin render branches stay until the function itself is removed
  • local names follow the naming rules of .rules/global.md

    • the running number $a became $numb, the checkbox flag $b became $mark

Benefits:

  • 253 lines down to 186, and no direct comment SQL left in the render path
  • one description of what a viewer may see, shared by the count and the page
  • a broken comments.num setting falls back to 15 instead of dividing by zero

Technical notes:

  • no schema, template or markup change; the rendered output is byte for byte the same

  • verified against the pre-move file over 26 URLs in both sort directions: first, middle, last, out-of-range and zero pages, a target with no comments, a target spilling one row onto a second page, one holding exactly the page size, garbage and negative page parameters, and a missing target id

  • comment-baseline verify stays OK on all eight modules
  • the signed-in and moderator views need a browser session and are not covered by this batch

Docs: record stage 1 batch 1 and the eight-module comment baseline
Автор: Eduard Laas | Дата: 12:02 28.07.2026

The markup baseline the comment stage checks its parity against covered six of the eight modules, which would have let two of them drift unnoticed through the whole refactor. Both fixtures are restored and the plan now carries what batch 1 decided, so the next chat starts from a record of the work rather than from the code alone.

Core changes:

  1. Comment plan progress (docs/COMMENTS-REDESIGN-2026.md):
  2. Batch 1 recorded with what landed, which checks ran and what they reported
  3. Decisions written down: the third constructor argument, the parser kept unused until it is needed, the pager and scope helpers, status = 1 for public reads, the two placeholders of the author search, and the name shared with the global getUserList()
  4. Deviations recorded: six read methods instead of the four the plan named, and the moderator branch written but not measured because the probe is a guest
  5. The baseline blocker is closed, since capture now records all eight modules
  6. Comment table facts re-measured: 7357 rows, media back in the distribution with its two fixture rows
  7. Baseline fixture procedure (docs/TESTS.md):
  8. The preparation SQL is recorded beside the revert it already carried, so a lost fixture can be rebuilt rather than guessed
  9. note and links are named explicitly because both are TEXT NOT NULL without a default and the server runs STRICT_TRANS_TABLES; the documented statements were proven executable against the live schema
  10. The category permission values are explained, because catmids() filters the view by them and the schema default is not an open state
  11. Unit test inventory brought up to date with the comment and mail test files

Benefits:

  • The parity claim of the stage covers all eight commenting modules instead of six
  • A stand that lost a fixture can be repaired from the document instead of from memory
  • Every decision of the batch survives into the next chat, which starts without its context

Technical notes:

  • Documentation only; no code, schema or behaviour is touched by this commit
  • The fixture rows themselves live in the local database and are not part of the repository, as storage/baseline is ignored by git

Страница 11 из 118. Всего: 1173

1 6 7 8 9 10 11 12 13 14 15 118
Хотите опробовать SLAED CMS в действии?
Идеи и предложения
Обратная связь
Подтверждение

Поделиться
QR-код

Предварительный просмотр