You know the drill, Updates

This commit is contained in:
2023-05-01 19:51:20 -07:00
parent af6f76fbcb
commit 006e3d3314
105 changed files with 1725 additions and 1430 deletions

View File

@ -503,11 +503,11 @@ function yourls_die( $message = '', $title = '', $header_code = 200 ) {
* Return an "Edit" row for the main table
*
* @param string $keyword Keyword to edit
* @param string $id
* @return string HTML of the edit row
*/
function yourls_table_edit_row( $keyword ) {
function yourls_table_edit_row( $keyword, $id ) {
$keyword = yourls_sanitize_keyword($keyword);
$id = yourls_unique_element_id();
$url = yourls_get_keyword_longurl( $keyword );
$title = htmlspecialchars( yourls_get_keyword_title( $keyword ) );
$safe_url = yourls_esc_attr( $url );
@ -545,11 +545,12 @@ RETURN;
* @param string $ip IP
* @param string|int $clicks Number of clicks
* @param string $timestamp Timestamp
* @param int $row_id Numeric value used to form row IDs, defaults to one
* @return string HTML of the row
*/
function yourls_table_add_row( $keyword, $url, $title, $ip, $clicks, $timestamp ) {
function yourls_table_add_row( $keyword, $url, $title, $ip, $clicks, $timestamp, $row_id = 1 ) {
$keyword = yourls_sanitize_keyword($keyword);
$id = yourls_unique_element_id();
$id = yourls_unique_element_id('yid', $row_id);
$shorturl = yourls_link( $keyword );
$statlink = yourls_statlink( $keyword );
@ -905,7 +906,10 @@ function yourls_page( $page ) {
}
yourls_do_action( 'pre_page', $page );
include_once( YOURLS_PAGEDIR . "/$page.php" );
$load = yourls_include_file_sandbox(YOURLS_PAGEDIR . "/$page.php");
if (is_string($load)) {
yourls_die( $load, yourls__('Not found'), 404 );
}
yourls_do_action( 'post_page', $page );
}