diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2010-02-19 04:07:21 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2010-02-19 04:14:24 +0100 |
commit | 10a9b20a5eecf6b932716cb4250a5a53214519b4 (patch) | |
tree | d3f1ab857682b8aeecb61e981b2022d187c323e5 /paste/include/storage/MysqlStorage.php | |
parent | 501b26ef4cc1e36be6ceb994b3571eb0eff964e6 (diff) | |
download | rafb-nopaste-10a9b20a5eecf6b932716cb4250a5a53214519b4.tar.gz rafb-nopaste-10a9b20a5eecf6b932716cb4250a5a53214519b4.tar.xz rafb-nopaste-10a9b20a5eecf6b932716cb4250a5a53214519b4.zip |
fixed behaviour with short paths
Diffstat (limited to 'paste/include/storage/MysqlStorage.php')
-rw-r--r-- | paste/include/storage/MysqlStorage.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/paste/include/storage/MysqlStorage.php b/paste/include/storage/MysqlStorage.php index bd532b5..14aefa6 100644 --- a/paste/include/storage/MysqlStorage.php +++ b/paste/include/storage/MysqlStorage.php @@ -98,7 +98,7 @@ INDEX (nick) } if (isset($config['short_results_path'])) - return $config['short_results_path'] . $pid; + return $config['short_results_path'] . $name . '.html'; return $config['site_domain'] . $config['site_path'] . 'get.php?p=' . $name; } @@ -130,6 +130,9 @@ INDEX (nick) $stmt->close(); $get_url = $config['site_domain'] . $config['site_path'] . 'get.php?p=' . $pid; + if (isset($config['short_results_path'])) + $get_url = $config['short_results_path'] . $pid . '.html'; + $remove_url = $config['site_domain'] . $config['site_path'] . 'remove.php?p=' . $pid . '&t=' . $this->generateToken($pid); echo PastifyText($content, $lang, $description, $get_url, $remove_url); } |