edit_texts.php
\file \brief Manage active texts
Call: edit_texts.php?.... ... markaction=[opcode] ... do actions on marked texts ... del=[textid] ... do delete ... arch=[textid] ... do archive ... op=Check ... do check ... op=Save ... do insert new ... op=Change ... do update ... op=Save+and+Open ... do insert new and open ... op=Change+and+Open ... do update and open ... new=1 ... display new text screen ... chg=[textid] ... display edit screen ... filterlang=[langid] ... language filter ... sort=[sortcode] ... sort ... page=[pageno] ... page ... query=[titlefilter] ... title filter
PHP version 8.1
Tags
Table of Contents
Functions
- edit_texts_get_wh_query() : string
 - Get the value of $wh_query.
 - edit_texts_get_wh_tag() : string
 - Return the value for $wh_tag.
 - edit_texts_mark_action() : array<string|int, null|string>
 - When a mark action is in use, do the action.
 - edit_texts_delete() : string
 - Delete an existing text.
 - edit_texts_archive() : string
 - Archive a text.
 - edit_texts_do_operation() : string
 - Do an operation on texts.
 - edit_texts_form() : void
 - Display the main form for text creation and edition.
 - edit_texts_new() : void
 - Create a window to make a new text in the target language.
 - edit_texts_change() : void
 - Create the main window to edit an existing text.
 - edit_texts_filters_form() : void
 - Do the filters form for texts display.
 - edit_texts_other_pages() : void
 - Make links to navigate to other pages if necessary.
 - edit_texts_show_text_row() : void
 - Display the content of a table row for text edition.
 - edit_texts_texts_form() : void
 - Main form for displaying multiple texts.
 - edit_texts_display() : void
 - Main display for the edit text functionality.
 - edit_texts_do_page() : void
 - Main function for displaying the edit_texts page.
 
Functions
edit_texts_get_wh_query()
Get the value of $wh_query.
    
                    edit_texts_get_wh_query(string $currentquery, string $currentquerymode, string $currentregexmode) : string
    
        Parameters
- $currentquery : string
 - 
                    
Current database query
 - $currentquerymode : string
 - $currentregexmode : string
 
Return values
string —Content for $wh_query.
edit_texts_get_wh_tag()
Return the value for $wh_tag.
    
                    edit_texts_get_wh_tag(string|int $currentlang) : string
    
        Parameters
- $currentlang : string|int
 - 
                    
Current language ID
 
Return values
string —Content for $wh_tag.
edit_texts_mark_action()
When a mark action is in use, do the action.
    
                    edit_texts_mark_action(string $markaction, array<string|int, mixed> $marked, string $actiondata) : array<string|int, null|string>
    
        Parameters
- $markaction : string
 - 
                    
Type of action
 - $marked : array<string|int, mixed>
 - 
                    
Texts marked.
 - $actiondata : string
 - 
                    
Values to insert to the database
 
Tags
Return values
array<string|int, null|string> —Number of rows edited, the second element is always null.
edit_texts_delete()
Delete an existing text.
    
                    edit_texts_delete(string|int $txid) : string
    
        Parameters
- $txid : string|int
 - 
                    
Text ID
 
Tags
Return values
string —Texts, sentences, and text items deleted.
edit_texts_archive()
Archive a text.
    
                    edit_texts_archive(int $txid) : string
    
        Parameters
- $txid : int
 - 
                    
text ID
 
Tags
Return values
string —Number of archives saved, texts deleted, sentences deleted, text items deleted.
edit_texts_do_operation()
Do an operation on texts.
    
                    edit_texts_do_operation(string $op, mixed $message1, int|bool $no_pagestart) : string
    
        Parameters
- $op : string
 - 
                    
Operation name
 - $message1 : mixed
 - 
                    
Unnused
 - $no_pagestart : int|bool
 - 
                    
If you don't want a page
 
Tags
Return values
string —Edition message (number of rows edited)
edit_texts_form()
Display the main form for text creation and edition.
    
                    edit_texts_form(Text $text, bool $annotated) : void
    
        Parameters
- $text : Text
 - 
                    
Text object to edit
 - $annotated : bool
 - 
                    
True if this text has annotations
 
edit_texts_new()
Create a window to make a new text in the target language.
    
                    edit_texts_new(int $lid) : void
    
        Parameters
- $lid : int
 - 
                    
Language ID
 
Tags
edit_texts_change()
Create the main window to edit an existing text.
    
                    edit_texts_change(int $txid) : void
    
        Parameters
- $txid : int
 - 
                    
Text ID
 
Tags
edit_texts_filters_form()
Do the filters form for texts display.
    
                    edit_texts_filters_form(string $currentlang, int $recno, int $currentpage, int $pages) : void
    
        Parameters
- $currentlang : string
 - 
                    
Current language ID
 - $recno : int
 - $currentpage : int
 - 
                    
Current page number
 - $pages : int
 - 
                    
Total number of pages
 
edit_texts_other_pages()
Make links to navigate to other pages if necessary.
    
                    edit_texts_other_pages(int $recno) : void
    
        Parameters
- $recno : int
 - 
                    
Record number
 
edit_texts_show_text_row()
Display the content of a table row for text edition.
    
                    edit_texts_show_text_row(array<string|int, mixed> $txrecord, string $currentlang, array{: int<0, 5>|98|99, : array{: string, : string}} $statuses) : void
    
        Parameters
- $txrecord : array<string|int, mixed>
 - 
                    
Various information about the text should contain 'TxID' at least.
 - $currentlang : string
 - 
                    
Current language ID
 - $statuses : array{: int<0, 5>|98|99, : array{: string, : string}}
 - 
                    
List of statuses WITH unknown words (status 0)
 
Tags
edit_texts_texts_form()
Main form for displaying multiple texts.
    
                    edit_texts_texts_form(string $currentlang, string $showCounts, string $sql, int $recno) : void
    
        Parameters
- $currentlang : string
 - 
                    
Current language ID
 - $showCounts : string
 - 
                    
Number of items to show, put into a string
 - $sql : string
 - 
                    
SQL string to execute
 - $recno : int
 - 
                    
Record number
 
Tags
edit_texts_display()
Main display for the edit text functionality.
    
                    edit_texts_display(string $message) : void
    
        Parameters
- $message : string
 - 
                    
Message to display.
 
Tags
edit_texts_do_page()
Main function for displaying the edit_texts page.
    
                    edit_texts_do_page() : void