8000 Issue #3484 Fix edit will write first entry only by four-bytes-robby · Pull Request #3485 · YOURLS/YOURLS · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Issue #3484 Fix edit will write first entry only #3485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion admin/admin-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

case 'edit_display':
yourls_verify_nonce( 'edit-link_'.$_REQUEST['id'], $_REQUEST['nonce'], false, 'omg error' );
$row = yourls_table_edit_row ( $_REQUEST['keyword'] );
$row = yourls_table_edit_row ( $_REQUEST['keyword'], $_REQUEST['id'] );
echo json_encode( array('html' => $row) );
break;

Expand Down
4 changes: 2 additions & 2 deletions includes/functions-html.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
0