executeWithoutParams( "SELECT * FROM plugins INNER JOIN updates ON plugins.Id=updates.PluginId Where plugins.Id=$id" ); $row = $sth -> fetch(); // replacing update in the database Plugincache :: rrmdir( $row['FileName'] ); Plugincache :: zipExtraction( $row['UpdatePath'], rtrim( $row['FileName'], strtolower( $row['Name'] ) ) ); $db -> update( "plugins", array( 'Info' => $row['UpdateInfo'] ), "Id=$row[Id]" ); // deleting the previous update $db -> delete( "updates", array( 'id' => $row['s.no'] ), "s.no=:id" ); // if update is installed succesffully redirect to show success message header("Cache-Control: max-age=1"); header( "Location: index.php?page=plugins&result=8" ); throw new SystemExit(); } } }