Skip to content

Commit

Permalink
Merge pull request #38 from phalox/subfolder_fix
Browse files Browse the repository at this point in the history
Fixed some issues with subdir install of yourls
  • Loading branch information
joshp23 authored Jul 22, 2020
2 parents ff1de51 + 88496dc commit 25be3ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion iqrcodes/assets/iqrcodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function iqrcodes(url, site) {
}
else {
var shorturl = ( url == null ? $( '#copylink' ).val() : url );
var base_url = window.location.origin;
var base_url = YOURLS_SITE;

$.ajax({
type: "POST",
Expand Down
4 changes: 4 additions & 0 deletions iqrcodes/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ function iqrcodes_js($context) {
$data = yourls_get_plugin_data( $file );
$v = $data['Version'];
echo "\n<! --------------------------IQRCodes Start-------------------------- >\n";
echo "<script type=\"text/javascript\">\n";
echo "var YOURLS_SITE = '".YOURLS_SITE."';\n";
echo "</script>\n";
echo "<script type=\"text/javascript\">var iqrcodes_imagetype=\"".$opt[5]."\";</script>\n";
echo "<script src=\"".$loc."/assets/md5.min.js?v=".$v."\" type=\"text/javascript\"></script>\n" ;
echo "<script src=\"".$loc."/assets/iqrcodes.js?v=".$v."\" type=\"text/javascript\"></script>\n" ;
Expand Down Expand Up @@ -675,6 +678,7 @@ function iqrcodes_mass_chk() {

yourls_add_action( 'loader_failed', 'iqrcode_dot_qr' );
function iqrcode_dot_qr( $request ) {
$base = YOURLS_SITE;
// Get authorized charset in keywords and make a regexp pattern
$pattern = yourls_make_regexp_pattern( yourls_get_shorturl_charset() );

Expand Down

0 comments on commit 25be3ed

Please sign in to comment.