Allow upgrading opensearch plugin from LibreQR 1.1.0 + use standardised opensearch parameters
This commit is contained in:
parent
b6827bcd36
commit
92846965f4
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
.directory
|
||||
temp/*
|
||||
|
@ -7,8 +7,28 @@
|
||||
foreach($themeDimensionsIcons as $dimIcon) {
|
||||
echo ' <Image height="' . $dimIcon . '" width="' . $dimIcon . '" type="image/png">' . $instPath . 'themes/' . $theme . '/icons/' . $dimIcon . '.png</Image>' . "\n";
|
||||
} ?>
|
||||
<Language>fr</Language>
|
||||
<Language>*</Language>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<Url type="text/html" template="<?php echo $instPath; ?>?txt={searchTerms}&redondancy=<?php if (isset($_GET['redondancy'])) { echo $_GET['redondancy']; } ?>&margin=<?= $_GET['margin'] ?>&size=<?= $_GET['size'] ?>&bgColor=<?= urlencode($_GET['bgColor']) ?>&mainColor=<?= urlencode($_GET['mainColor']) ?>"/>
|
||||
<Url type="application/opensearchdescription+xml" rel="self" template="<?php echo $instPath; ?>opensearch.php" />
|
||||
<?php
|
||||
$redondancy = htmlspecialchars((isset($_GET['redondancy'])) ? $_GET['redondancy'] : 'H');
|
||||
$margin = htmlspecialchars((isset($_GET['margin'])) ? $_GET['margin'] : '2');
|
||||
$size = htmlspecialchars((isset($_GET['size'])) ? $_GET['size'] : '4');
|
||||
$bgColor = htmlspecialchars(urlencode((isset($_GET['bgColor'])) ? $_GET['bgColor'] : '%23FFFFFF'));
|
||||
$mainColor = htmlspecialchars(urlencode((isset($_GET['mainColor'])) ? $_GET['mainColor'] : '%23000000'));
|
||||
?>
|
||||
<Url type="text/html" template="<?= $instPath; ?>">
|
||||
<Param name="txt" value="{searchTerms}"/>
|
||||
<Param name="redondancy" value="<?= $redondancy ?>"/>
|
||||
<Param name="margin" value="<?= $margin ?>"/>
|
||||
<Param name="size" value="<?= $size ?>"/>
|
||||
<Param name="bgColor" value="<?= $bgColor ?>"/>
|
||||
<Param name="mainColor" value="<?= $mainColor ?>"/>
|
||||
</Url>
|
||||
<Url type="application/opensearchdescription+xml" rel="self" template="<?= $instPath; ?>opensearch.php">
|
||||
<Param name="redondancy" value="<?= $redondancy ?>"/>
|
||||
<Param name="margin" value="<?= $margin ?>"/>
|
||||
<Param name="size" value="<?= $size ?>"/>
|
||||
<Param name="bgColor" value="<?= $bgColor ?>"/>
|
||||
<Param name="mainColor" value="<?= $mainColor ?>"/>
|
||||
</Url>
|
||||
</OpenSearchDescription>
|
||||
|
@ -27,5 +27,5 @@ if (php_sapi_name() == "cli") {
|
||||
}
|
||||
|
||||
} else {
|
||||
echo "Available only via CLI for security reasons. Use 'php themes/resize.php'";
|
||||
echo "Available only via CLI for security reasons. Use 'php themes/resize.php <theme name>'";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user