Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../var/softacul.../yourls
File: orig_upgrade.php
<?php
[0] Fix | Delete
define( 'YOURLS_ADMIN', true );
[1] Fix | Delete
define( 'YOURLS_UPGRADING', true );
[2] Fix | Delete
require_once( dirname( __DIR__ ).'/includes/load-yourls.php' );
[3] Fix | Delete
yourls_maybe_require_auth();
[4] Fix | Delete
[5] Fix | Delete
yourls_html_head( 'upgrade', yourls__( 'Upgrade YOURLS' ) );
[6] Fix | Delete
yourls_html_logo();
[7] Fix | Delete
yourls_html_menu();
[8] Fix | Delete
?>
[9] Fix | Delete
<h2><?php yourls_e( 'Upgrade YOURLS' ); ?></h2>
[10] Fix | Delete
<?php
[11] Fix | Delete
[12] Fix | Delete
// Check if upgrade is needed
[13] Fix | Delete
if ( !yourls_upgrade_is_needed() ) {
[14] Fix | Delete
echo '<p>' . yourls_s( 'Upgrade not required. Go <a href="%s">back to play</a>!', yourls_admin_url('index.php') ) . '</p>';
[15] Fix | Delete
[16] Fix | Delete
[17] Fix | Delete
} else {
[18] Fix | Delete
/*
[19] Fix | Delete
step 1: create new tables and populate them, update old tables structure,
[20] Fix | Delete
step 2: convert each row of outdated tables if needed
[21] Fix | Delete
step 3: - if applicable finish updating outdated tables (indexes etc)
[22] Fix | Delete
- update version & db_version in options, this is all done!
[23] Fix | Delete
*/
[24] Fix | Delete
[25] Fix | Delete
// From what are we upgrading?
[26] Fix | Delete
if ( isset( $_GET['oldver'] ) && isset( $_GET['oldsql'] ) ) {
[27] Fix | Delete
$oldver = yourls_sanitize_version($_GET['oldver']);
[28] Fix | Delete
$oldsql = intval($_GET['oldsql']);
[29] Fix | Delete
} else {
[30] Fix | Delete
list( $oldver, $oldsql ) = yourls_get_current_version_from_sql();
[31] Fix | Delete
}
[32] Fix | Delete
[33] Fix | Delete
// To what are we upgrading ?
[34] Fix | Delete
$newver = YOURLS_VERSION;
[35] Fix | Delete
$newsql = YOURLS_DB_VERSION;
[36] Fix | Delete
[37] Fix | Delete
// Verbose & ugly details
[38] Fix | Delete
yourls_debug_mode(true);
[39] Fix | Delete
[40] Fix | Delete
// Let's go
[41] Fix | Delete
$step = ( isset( $_GET['step'] ) ? intval( $_GET['step'] ) : 0 );
[42] Fix | Delete
switch( $step ) {
[43] Fix | Delete
[44] Fix | Delete
default:
[45] Fix | Delete
case 0:
[46] Fix | Delete
?>
[47] Fix | Delete
<p><?php yourls_e( 'Your current installation needs to be upgraded.' ); ?></p>
[48] Fix | Delete
<p><?php yourls_e( 'Please, pretty please, it is recommended that you <strong>backup</strong> your database<br/>(you should do this regularly anyway)' ); ?></p>
[49] Fix | Delete
<p><?php yourls_e( "Nothing awful <em>should</em> happen, but this doesn't mean it <em>won't</em> happen, right? ;)" ); ?></p>
[50] Fix | Delete
<p><?php yourls_e( "On every step, if <span class='error'>something goes wrong</span>, you'll see a message and hopefully a way to fix." ); ?></p>
[51] Fix | Delete
<p><?php yourls_e( 'If everything goes too fast and you cannot read, <span class="success">good for you</span>, let it go :)' ); ?></p>
[52] Fix | Delete
<p><?php yourls_e( 'Once you are ready, press "Upgrade" !' ); ?></p>
[53] Fix | Delete
<?php
[54] Fix | Delete
echo "
[55] Fix | Delete
<form action='upgrade.php?' method='get'>
[56] Fix | Delete
<input type='hidden' name='step' value='1' />
[57] Fix | Delete
<input type='hidden' name='oldver' value='$oldver' />
[58] Fix | Delete
<input type='hidden' name='newver' value='$newver' />
[59] Fix | Delete
<input type='hidden' name='oldsql' value='$oldsql' />
[60] Fix | Delete
<input type='hidden' name='newsql' value='$newsql' />
[61] Fix | Delete
<input type='submit' class='primary' value='" . yourls_esc_attr__( 'Upgrade' ) . "' />
[62] Fix | Delete
</form>";
[63] Fix | Delete
[64] Fix | Delete
break;
[65] Fix | Delete
[66] Fix | Delete
case 1:
[67] Fix | Delete
case 2:
[68] Fix | Delete
$upgrade = yourls_upgrade( $step, $oldver, $newver, $oldsql, $newsql );
[69] Fix | Delete
break;
[70] Fix | Delete
[71] Fix | Delete
case 3:
[72] Fix | Delete
$upgrade = yourls_upgrade( 3, $oldver, $newver, $oldsql, $newsql );
[73] Fix | Delete
echo '<p>' . yourls__( 'Your installation is now up to date ! ' ) . '</p>';
[74] Fix | Delete
echo '<p>' . yourls_s( 'Go back to <a href="%s">the admin interface</a>', yourls_admin_url('index.php') ) . '</p>';
[75] Fix | Delete
}
[76] Fix | Delete
[77] Fix | Delete
}
[78] Fix | Delete
[79] Fix | Delete
?>
[80] Fix | Delete
[81] Fix | Delete
<?php yourls_html_footer(); ?>
[82] Fix | Delete
[83] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function