summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gruntfile.js10
-rw-r--r--LICENSE2
-rw-r--r--README.md8
-rw-r--r--js/pomf.js17
-rw-r--r--package.json2
-rw-r--r--pages/banners/donate.swig2
-rw-r--r--pages/banners/virusscans.swig2
-rw-r--r--pages/bannersca.json3
-rw-r--r--pages/bannersca.swig25
-rw-r--r--pages/bannersca/donate.swig39
-rw-r--r--pages/bannersca/virusscans.swig25
-rw-r--r--pages/check_fileapica.swig4
-rw-r--r--pages/check_scriptca.swig3
-rw-r--r--pages/faqca.swig46
-rw-r--r--pages/index.swig5
-rw-r--r--pages/indexca.swig (renamed from pages/ca.swig)11
-rw-r--r--pages/layoutca.swig5
-rw-r--r--pages/nav.swig4
-rw-r--r--pages/navca.swig33
-rw-r--r--pages/nojs.swig5
-rw-r--r--pages/nojsca.swig35
-rw-r--r--pages/otherca.swig38
-rw-r--r--pages/toolsca.swig79
-rw-r--r--pages/upload_form.swig2
-rw-r--r--pages/upload_form_nojs.swig8
-rw-r--r--pages/upload_formca.swig3
-rwxr-xr-xstatic/classes/Response.class.php4
-rw-r--r--static/classes/UploadedFile.class.php1
-rw-r--r--static/upload.php2
29 files changed, 371 insertions, 52 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index d090cbf..ae01b75 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -17,7 +17,11 @@ module.exports = function (grunt) {
'pages/tools.swig',
'pages/other.swig',
'pages/nojs.swig',
- 'pages/ca.swig'
+ 'pages/indexca.swig',
+ 'pages/faqca.swig',
+ 'pages/toolsca.swig',
+ 'pages/otherca.swig',
+ 'pages/nojsca.swig'
],
siteUrl: 'https://pantsu.cat/',
production: false,
@@ -41,8 +45,8 @@ module.exports = function (grunt) {
uglify: {
options: {
banner: '/*! <%= pkg.name %> (<%= pkg.repository.url %>) @ <%= grunt.template.today("yyyy-mm-dd") %> */\n' +
- '// @source https://git.pantsu.cat/pantsu/pomf/src/master/js\n' +
- '// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat\n',
+ '// @source https://git.pantsu.cat/pantsu/pomf/src/master/js\n' +
+ '// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat\n',
footer: '\n// @license-end',
screwIE8: true
},
diff --git a/LICENSE b/LICENSE
index b387246..1dc0fa2 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,5 +1,3 @@
-The MIT License (MIT)
-
Copyright (c) 2013, 2014, 2015 Eric Johansson <neku@pomf.se>
Copyright (c) 2013, 2014 Peter Lejeck <peter.lejeck@gmail.com>
Copyright (c) 2015 cenci0 <alchimist94@gmail.com>
diff --git a/README.md b/README.md
index 5f567e0..c6b5caf 100644
--- a/README.md
+++ b/README.md
@@ -37,8 +37,8 @@ however, client-side configuration for max size, the `data-max-size` attribute
on the file input in `pages/upload_form.swig`.
Make sure to disable PHP from being executed on the file download
-domain/directory (e.g a.site.com), otherwise a attacker can upload a malicious
-.php file and execute it on your server.
+domain/directory (e.g., `a.pomf.example`), otherwise an attacker can upload a
+malicious `.php` file and execute it on your server.
### Apache
@@ -52,8 +52,8 @@ configuration file.
## License
-Pomf is free software, and is released under the terms of the MIT (Expat)
-license. See LICENSE.
+Pomf is free software, and is released under the terms of the Expat license. See
+`LICENSE`.
## Contact
diff --git a/js/pomf.js b/js/pomf.js
index 10c36cf..c3f52bc 100644
--- a/js/pomf.js
+++ b/js/pomf.js
@@ -1,5 +1,6 @@
/**
* Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com>
+ * Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -23,7 +24,7 @@
/* jshint browser:true, jquery:true */
$(function() {
var uploadInput = $('#upload-input'),
- uploadBtn = $('#upload-btn'),
+ uploadBtn = $('#upload-btn'),
uploadFiles = $('#upload-filelist');
var btnContent = '';
@@ -76,7 +77,7 @@ $(function() {
rowName = $('<span class=file-name>'),
rowProg = $('<div class="file-progress progress-outer">'),
rowSize = $('<span class=file-size>'),
- rowUrl = $('<span class=file-url>');
+ rowUrl = $('<span class=file-url>');
rowItem.addClass(extra || '');
@@ -103,11 +104,12 @@ $(function() {
var totalRow = createRow('', files.humanSize, 'total');
totalRow.appendTo(uploadFiles);
+ var totalName = $('.file-name', totalRow);
+
if (files.size > MAX_SIZE) {
uploadFiles.addClass('error');
- $('.file-name', totalRow).html('onii-chan y-your upload is t-too ' +
- 'big&hellip;');
+ totalName.html('onii-chan y-your upload is t-too big&hellip;');
return;
}
@@ -123,8 +125,6 @@ $(function() {
});
};
- var totalName = $('.file-name', totalRow);
-
up.on('uploadprogress', function(e, files) {
eachRow(files, function(row, file, files) {
$('.progress-inner', row).width((file.percentUploaded * 100) + '%');
@@ -134,7 +134,7 @@ $(function() {
up.on('uploadcomplete', function(e) {
$('.progress-inner').width('100%');
- totalName.text('Grabbing URLs...');
+ totalName.html('Grabbing URLs&hellip;');
});
up.on('load', function(e, res) {
@@ -143,8 +143,7 @@ $(function() {
var res = JSON.parse(res);
if (!res.success) {
uploadFiles.addClass('error');
- $('.file-name', totalRow).text('Something went wrong; try again ' +
- 'later.');
+ totalName.text('Something went wrong; try again later.');
break;
}
eachRow(res.files, function(row, file, files) {
diff --git a/package.json b/package.json
index de8aeea..442c1f2 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,7 @@
"grunt": "^0.4.1",
"grunt-contrib-copy": "^0.8.1",
"grunt-contrib-cssmin": "^0.14.0",
- "grunt-contrib-htmlmin": "^0.4.0",
+ "grunt-contrib-htmlmin": "^0.5.0",
"grunt-contrib-imagemin": "^0.9.4",
"grunt-contrib-jshint": "^0.11.3",
"grunt-contrib-uglify": "^0.9.2",
diff --git a/pages/banners/donate.swig b/pages/banners/donate.swig
index 1ec4073..f4706c9 100644
--- a/pages/banners/donate.swig
+++ b/pages/banners/donate.swig
@@ -20,7 +20,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#}
<p class="alert alert-info">
- <strong>pomf.se is a free service, but our hosting bill isn't</strong> &mdash; we need almost $100 a month for that. Donations help keep pomf.se free, online, and fast. Everything (after fees) goes to the hosting bill.
+ <strong>pomf.se is a free service, but our hosting bill isn't</strong> &mdash; we need almost $100 a month for that. Donations help keep pomf.se free, online, and fast. Everything (after fees) goes to the hosting bill.
<span class="donate-btns">
<a class="donate-btn donate-paypal" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=BHUVEZY96YZ6N" target="_BLANK">
<span class="icon icon-paypal"></span>
diff --git a/pages/banners/virusscans.swig b/pages/banners/virusscans.swig
index dddfde7..4a3d5a8 100644
--- a/pages/banners/virusscans.swig
+++ b/pages/banners/virusscans.swig
@@ -19,6 +19,6 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#}
-<p class="alert alert-error">
+<p class="alert alert-info">
<strong>Virus scans are now a daily routine</strong> &mdash; if a file gets detected it will be removed without further notice.
</p>
diff --git a/pages/bannersca.json b/pages/bannersca.json
new file mode 100644
index 0000000..105c5c0
--- /dev/null
+++ b/pages/bannersca.json
@@ -0,0 +1,3 @@
+[
+ "bannersca/virusscans.swig"
+]
diff --git a/pages/bannersca.swig b/pages/bannersca.swig
new file mode 100644
index 0000000..a6e9361
--- /dev/null
+++ b/pages/bannersca.swig
@@ -0,0 +1,25 @@
+{#
+Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com>
+Copyright (c) 2015 Cupkle <cupkle@openmailbox.org>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#}
+
+{% for banner in bannersca %}
+ {% include banner %}
+{% endfor %}
diff --git a/pages/bannersca/donate.swig b/pages/bannersca/donate.swig
new file mode 100644
index 0000000..d246b35
--- /dev/null
+++ b/pages/bannersca/donate.swig
@@ -0,0 +1,39 @@
+{#
+Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com>
+Copyright (c) 2015 Cupkle <cupkle@openmailbox.org>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#}
+
+<p class="alert alert-info">
+ <strong>pomf.se es un servici gratuït, però la nostra factura d'allotjament no ho és</strong> &mdash; necessitem al menys 100$ per mes. Les donacions ajuden a pomf.se a seguir sent gratuït, en línia i ràpid. Tot (quotes includes) està destinat a pagar l'allotjament.
+ <span class="donate-btns">
+ <a class="donate-btn donate-paypal" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=BHUVEZY96YZ6N" target="_BLANK">
+ <span class="icon icon-paypal"></span>
+ PayPal
+ </a>
+ <a class="donate-btn donate-bitcoin" href="bitcoin:1CrbCGSTFM5ccmjFoU4jRSQod44Ttu8nHY?label=pomf.se&amp;message=Hosting%20Bills" target="_BLANK">
+ <span class="icon icon-bitcoin"></span>
+ Bitcoin
+ </a>
+ <a class="donate-btn donate-flattr" href="https://flattr.com/submit/auto?user_id=neku&amp;url=http://pomf.se" target="_BLANK">
+ <span class="icon icon-flattr"></span>
+ Flattr
+ </a>
+ </span>
+</p>
diff --git a/pages/bannersca/virusscans.swig b/pages/bannersca/virusscans.swig
new file mode 100644
index 0000000..23244f9
--- /dev/null
+++ b/pages/bannersca/virusscans.swig
@@ -0,0 +1,25 @@
+{#
+Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com>
+Copyright (c) 2015 Cupkle <cupkle@openmailbox.org>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#}
+
+<p class="alert alert-info">
+ <strong>Fem ànalisis de virus diariament</strong> &mdash; si es detecta un arxiu infectat, serà borrat sense previ avís.
+</p>
diff --git a/pages/check_fileapica.swig b/pages/check_fileapica.swig
index fe99a28..aa8943e 100644
--- a/pages/check_fileapica.swig
+++ b/pages/check_fileapica.swig
@@ -1,6 +1,6 @@
{#
Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com>
-Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat>
+Copyright (c) 2015 Cupkle <cupkle@openmailbox.org>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
@@ -21,5 +21,5 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#}
<p id="no-file-api" class="alert alert-error">
- <strong>El seu navegador és una merda.</strong> Instal l'última <a href="http://firefox.com/">Firefox</a> o <a href="http://chrome.google.com/">Botnet</a> i tornar &lt;3
+ <strong>El teu navegador és una merda.</strong> Instal·la el <a href="http://firefox.com/">Firefox</a> més recent o <a href="http://chrome.google.com/">Botnet</a> i torna &lt;3
</p>
diff --git a/pages/check_scriptca.swig b/pages/check_scriptca.swig
index 3541084..ac4737c 100644
--- a/pages/check_scriptca.swig
+++ b/pages/check_scriptca.swig
@@ -1,5 +1,6 @@
{#
Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat>
+Copyright (c) 2015 Cupkle <cupkle@openmailbox.org>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
@@ -20,5 +21,5 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#}
<noscript>
- <p class="alert alert-error"><a href="https://no.pantsu.cat">Javascript versió gratuïta</a></p>
+ <p class="alert alert-error"><a href="https://no.pantsu.cat">Versió sense Javascript</a></p>
</noscript>
diff --git a/pages/faqca.swig b/pages/faqca.swig
new file mode 100644
index 0000000..4debd8c
--- /dev/null
+++ b/pages/faqca.swig
@@ -0,0 +1,46 @@
+{#
+Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com>
+Copyright (c) 2014 Eric Johansson <neku@pomf.se>
+Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat>
+Copyright (c) 2015 Cupkle <cupkle@openmailbox.org>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#}
+
+{% extends "layoutca.swig" %}
+
+{% block title %}FAQ{% endblock %}
+{% block body %}
+<div class="jumbotron">
+ <h1>FAQ</h1>
+ {% include "navca.swig" %}
+</div>
+<ul>
+ <li>Pantsu no soporta Internet Explorer o versions velles de Firefox, Chrome, Opera o Safari.</li>
+ <li>Existeixen estris de pujada per a Pantsu en <a href="/toolsca.html">Estris</a>.</li>
+ <li>El pes màxim per fitxer és de {{max_upload_size}}MiB. Per favor, no abuseu el servici.</li>
+ <li>No es permiteix pornografia infantil o virus.</li>
+ <li>Qualsevol tipus de fitxer està permitit (gif,exe,jpg,rar,ass,srt,etc,etc).</li>
+ <li>No guardem ningun tipus de dades sobre els usuaris, cosa que no canviarà. No utilitzem Cloudflare</li>
+ <li>Contacteu l'administrador amb l'adreça <a href="mailto:contact@pantsu.cat">contact@pantsu.cat</a> (en anglés).</li>
+ <li>Envieu qualsevol petició DMCA a <a href="mailto:abuse@pantsu.cat">abuse@pantsu.cat</a></li>
+ <li>Si canviem la nostra política, t'informarem.</li>
+ <li>La pàgina intenta ser el més transparent possible. Qualsevol arxiu borrat serà llistat públicament amb la còpia de l'avís DMCA. Per a més informació, visiteu <a href="//transparency.pantsu.cat">informació de transparència</a> page.</li>
+</ul>
+{% include "bannersca.swig" %}
+{% endblock %}
diff --git a/pages/index.swig b/pages/index.swig
index f56e12e..ff7db42 100644
--- a/pages/index.swig
+++ b/pages/index.swig
@@ -24,10 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{% block body %}
<div class="jumbotron">
- <header>
- <h1>Pantsu~</h1>
- <p lang="ca">Ropa Interior~</p>
- </header>
+ <h1>Pantsu~</h1>
<p class="lead">Max upload size is {{max_upload_size}}MiB, read the <a href="faq.html">FAQ</a></p>
{% include "check_script.swig" %}
{% include "check_fileapi.swig" %}
diff --git a/pages/ca.swig b/pages/indexca.swig
index 310efa0..d7b468c 100644
--- a/pages/ca.swig
+++ b/pages/indexca.swig
@@ -1,6 +1,7 @@
{#
Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com>
Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat>
+Copyright (c) 2015 Cupkle <cupkle@openmailbox.org>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
@@ -24,15 +25,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{% block body %}
<div class="jumbotron">
- <header>
- <h1>Ropa Interior~</h1>
- </header>
- <p class="lead">Màxima grandària de pujada {{max_upload_size}}MiB, read the <a href="faq.html">FAQ</a></p>
+ <h1>Pantsu~</h1>
+ <p class="lead">Màxima grandària de pujada {{max_upload_size}}MiB, llig la <a href="faqca.html">FAQ</a></p>
{% include "check_scriptca.swig" %}
{% include "check_fileapica.swig" %}
{% include "upload_formca.swig" %}
</div>
-{% include "banners.swig" %}
-{% include "nav.swig" %}
+{% include "bannersca.swig" %}
+{% include "navca.swig" %}
<script src="pomf.min.js"></script>
{% endblock %}
diff --git a/pages/layoutca.swig b/pages/layoutca.swig
index 62129d7..264cedd 100644
--- a/pages/layoutca.swig
+++ b/pages/layoutca.swig
@@ -1,6 +1,7 @@
{#
Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com>
Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat>
+Copyright (c) 2015 Cupkle <cupkle@openmailbox.org>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
@@ -25,13 +26,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <title>Ropa Interior.cat &middot; {% block title %}Allotjament d'arxius valent{% endblock %}</title>
+ <title>Pantsu.cat &middot; {% block title %}Allotjament d'Arxius Kawaii{% endblock %}</title>
<link rel="icon" href="favicon.ico">
<link rel="stylesheet" href="pomf.min.css">
</head>
<body>
<div class="container">
- {% block body %}What the fuck are you doing here, baka?{% endblock %}
+ {% block body %}Què cony fas ací, baka?{% endblock %}
</div>
</body>
</html>
diff --git a/pages/nav.swig b/pages/nav.swig
index 85f29d2..90aec20 100644
--- a/pages/nav.swig
+++ b/pages/nav.swig
@@ -21,12 +21,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<nav>
<ul>
- <li><a href="//pantsu.cat/">Pantsu</a></li>
+ <li><a href="/">Pantsu</a></li>
<li><a href="//p.pantsu.cat/">Paste</a></li>
<li><a href="tools.html">Tools</a></li>
<li><a href="//git.pantsu.cat/pantsu/pomf">Git</a></li>
<li><a href="other.html">Other</a></li>
<li><a href="//transparency.pantsu.cat">Transparency</a></li>
- <li><a href="ca.html">Catalan</a></li>
+ <li lang="ca"><a href="indexca.html">Català</a></li>
</ul>
</nav>
diff --git a/pages/navca.swig b/pages/navca.swig
new file mode 100644
index 0000000..748b421
--- /dev/null
+++ b/pages/navca.swig
@@ -0,0 +1,33 @@
+{#
+Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat>
+Copyright (c) 2015 Cupkle <cupkle@openmailbox.org>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#}
+
+<nav>
+ <ul>
+ <li><a href="indexca.html">Pantsu</a></li>
+ <li><a href="//p.pantsu.cat/">Text</a></li>
+ <li><a href="toolsca.html">Estris</a></li>
+ <li><a href="//git.pantsu.cat/pantsu/pomf">Git</a></li>
+ <li><a href="otherca.html">Altres</a></li>
+ <li><a href="//transparency.pantsu.cat">Transparència</a></li>
+ <li lang="en"><a href="/">English</a></li>
+ </ul>
+</nav>
diff --git a/pages/nojs.swig b/pages/nojs.swig
index c5f815a..24d702b 100644
--- a/pages/nojs.swig
+++ b/pages/nojs.swig
@@ -24,10 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{% block body %}
<div class="jumbotron">
- <header>
- <h1>Pantsu~</h1>
- <p lang="ca">Ropa Interior~</p>
- </header>
+ <h1>Pantsu~</h1>
<p class="lead">Max upload size is {{max_upload_size}}MiB, read the <a href="faq.html">FAQ</a></p>
{% include "check_fileapi.swig" %}
{% include "upload_form_nojs.swig" %}
diff --git a/pages/nojsca.swig b/pages/nojsca.swig
new file mode 100644
index 0000000..76378ff
--- /dev/null
+++ b/pages/nojsca.swig
@@ -0,0 +1,35 @@
+{#
+Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com>
+Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat>
+Copyright (c) 2015 Cupkle <cupkle@openmailbox.org>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#}
+
+{% extends "layoutca.swig" %}
+
+{% block body %}
+<div class="jumbotron">
+ <h1>Pantsu~</h1>
+ <p class="lead">Màxima grandària de pujada: {{max_upload_size}}MiB, llig la <a href="faqca.html">FAQ</a></p>
+ {% include "check_fileapica.swig" %}
+ {% include "upload_form_nojs.swig" %}
+</div>
+{% include "bannersca.swig" %}
+{% include "navca.swig" %}
+{% endblock %}
diff --git a/pages/otherca.swig b/pages/otherca.swig
new file mode 100644
index 0000000..9f963eb
--- /dev/null
+++ b/pages/otherca.swig
@@ -0,0 +1,38 @@
+{#
+Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com>
+Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat>
+Copyright (c) 2015 Cupkle <cupkle@openmailbox.org>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#}
+
+{% extends "layoutca.swig" %}
+
+{% block title %}Altres Servicis{% endblock %}
+{% block body %}
+<div class="jumbotron">
+ <h1>Altres Servicis</h1>
+</div>
+<ul>
+ <li><a href="//git.pantsu.cat">Git</a></li>
+ <li><a href="firefox/">/g/uia de Firefox</a></li>
+ <li><a href="http://mg7aqol36qpx7oij.onion/">Servici Ocult</a>
+ <li><a href="//no.pantsu.cat">Versió sense JS</a>
+</ul>
+{% include "nav.swig" %}
+{% endblock %}
diff --git a/pages/toolsca.swig b/pages/toolsca.swig
new file mode 100644
index 0000000..e037073
--- /dev/null
+++ b/pages/toolsca.swig
@@ -0,0 +1,79 @@
+{#
+Copyright (c) 2013, 2014 Peter Lejeck <peter.lejeck@gmail.com>
+Copyright (c) 2013, 2014 Eric Johansson <neku@pomf.se>
+Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat>
+Copyright (c) 2015 Cupkle <cupkle@openmailbox.org>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#}
+
+{% extends "layoutca.swig" %}
+
+{% block title %}Estris{% endblock %}
+{% block body %}
+<div class="jumbotron">
+<h1>Pomf Tools</h1>
+{% include "nav.swig" %}
+</div>
+<section>
+ <h2>pomfload</h2>
+ <dl>
+ <dt>Descàrrega</dt>
+ <dd><a href="https://git.pantsu.cat/pantsu/pomfload">https://git.pantsu.cat/pantsu/pomfload</a></dd>
+ <dt>Contacte</dt>
+ <dd><a href="https://twitter.com/AnonymousLink">https://twitter.com/AnonymousLink</a></dd>
+ </dl>
+</section>
+<section>
+ <h2>limf</h2>
+ <dl>
+ <dt>Descàrrega</dt>
+ <dd><a href="https://github.com/lich/limf">https://github.com/lich/limf</a></dd>
+ <dt>Contacte</dt>
+ <dd><a href="http://lich.github.io/">http://lich.github.io/</a></dd>
+ </dl>
+</section>
+<section>
+ <h2>1339secure</h2>
+ <dl>
+ <dt>Descàrrega</dt>
+ <dd><a href="https://git.pantsu.cat/pantsucat/pomfsecure">https://git.pantsu.cat/pantsucat/pomfsecure</a></dd>
+ <dt>Contacte</dt>
+ <dd><a href="mailto:adriankoshcha@teknik.io">adriankoshcha@teknik.io</a></dd>
+ </dl>
+</section>
+<section>
+ <h2>Sharex</h2>
+ <dl>
+ <dt>Descàrrega</dt>
+ <dd><a href="https://code.google.com/p/sharex/">https://code.google.com/p/sharex/</a></dd>
+ <dt>Configuració</dt>
+ <dd><a href="https://p.pantsu.cat/view/raw/fcaeab90">https://p.pantsu.cat/view/raw/fcaeab90</a></dd>
+ </dl>
+</section>
+<section>
+ <h2>Client Gyazo (com el de Puush)</h2>
+ <dl>
+ <dt>Descàrrega</dt>
+ <dd><a href="https://github.com/pantsu/gyazowin">https://github.com/pantsu/gyazowin</a></dd>
+ <dd><a href="https://i.pantsu.cat/hnpgjr.exe">https://i.pantsu.cat/hnpgjr.exe</a></dd>
+ <dt>Contacte</dt>
+ <dd><a href="https://twitter.com/4vailable">https://twitter.com/4vailable</a></dd>
+ </dl>
+</section>
+{% endblock %}
diff --git a/pages/upload_form.swig b/pages/upload_form.swig
index 91a28e8..7266f2b 100644
--- a/pages/upload_form.swig
+++ b/pages/upload_form.swig
@@ -19,6 +19,6 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#}
-<a href="javascript:;" id="upload-btn" class="btn">Select <span>or drop </span> file(s)</a>
+<button id="upload-btn" class="btn" type="button">Select or drop file(s)</button>
<input type="file" id="upload-input" name="files[]" multiple data-max-size="{{max_upload_size}}MiB">
<ul id="upload-filelist"></ul>
diff --git a/pages/upload_form_nojs.swig b/pages/upload_form_nojs.swig
index 258389b..378a1d5 100644
--- a/pages/upload_form_nojs.swig
+++ b/pages/upload_form_nojs.swig
@@ -20,9 +20,9 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#}
-<form enctype="multipart/form-data" method="post" action="upload.php?output=html">
- <input type="file" name="files[]" multiple data-max-size="{{max_upload_size}}MiB">
- <br>
- <input type="submit" value="Submit">
+<form enctype="multipart/form-data" method="post" action="upload.php">
+ <input type="hidden" name="output" value="html">
+ <input type="file" name="files[]" multiple data-max-size="{{max_upload_size}}MiB">
+ <input type="submit" value="Submit">
</form>
<ul id="upload-filelist"></ul>
diff --git a/pages/upload_formca.swig b/pages/upload_formca.swig
index 54410c6..2ba2210 100644
--- a/pages/upload_formca.swig
+++ b/pages/upload_formca.swig
@@ -1,6 +1,7 @@
{#
Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com>
Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat>
+Copyright (c) 2015 Cupkle <cupkle@openmailbox.org>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
@@ -20,6 +21,6 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#}
-<a href="javascript:;" id="upload-btn" class="btn">Seleccionar <span>o deixar anar </span> expedient(s)</a>
+<button id="upload-btn" class="btn" type="button">Selecciona o arrastra fitxers(s) ací</button>
<input type="file" id="upload-input" name="files[]" multiple data-max-size="{{max_upload_size}}MiB">
<ul id="upload-filelist"></ul>
diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php
index 9d0c80e..3afcfdb 100755
--- a/static/classes/Response.class.php
+++ b/static/classes/Response.class.php
@@ -130,7 +130,7 @@ class Response
return POMF_URL.$files[0]['url'];
}
- private static function txt_error($code, $description)
+ private static function text_error($code, $description)
{
return 'ERROR: ('.$code.') '.$description;
}
@@ -146,7 +146,7 @@ class Response
private static function html_error($code, $description)
{
- return 'ERROR: ('.$code.') '.$description;
+ return '<p>ERROR: ('.$code.') '.$description.'</p>';
}
private static function html_success($files)
diff --git a/static/classes/UploadedFile.class.php b/static/classes/UploadedFile.class.php
index 74ed5c9..ac39646 100644
--- a/static/classes/UploadedFile.class.php
+++ b/static/classes/UploadedFile.class.php
@@ -33,7 +33,6 @@ class UploadedFile
/* Cached checksums */
private $sha1;
- private $crc32;
/**
* Generates the SHA1 or returns the cached SHA1 hash for the file.
diff --git a/static/upload.php b/static/upload.php
index 3d90a4f..655dd9c 100644
--- a/static/upload.php
+++ b/static/upload.php
@@ -64,7 +64,7 @@ function generate_name($file)
do {
// Iterate until we reach the maximum number of retries
- if ($tries-- == 0) {
+ if ($tries-- === 0) {
throw new Exception('Gave up trying to find an unused name', 500);
}