pull/10/head 1.0.7
Rodolfo Berrios 2017-01-22 15:50:02 -03:00
parent 572f961697
commit 02807b42ae
9 changed files with 88 additions and 18 deletions

View File

@ -1,6 +1,6 @@
<?php <?php
define('G_APP_NAME', 'Chevereto Free'); define('G_APP_NAME', 'Chevereto Free');
define('G_APP_VERSION', '1.0.6'); define('G_APP_VERSION', '1.0.7');
define('G_APP_GITHUB_OWNER', 'Chevereto'); define('G_APP_GITHUB_OWNER', 'Chevereto');
define('G_APP_GITHUB_REPO', 'Chevereto-Free'); define('G_APP_GITHUB_REPO', 'Chevereto-Free');
define('G_APP_GITHUB_REPO_URL', 'https://github.com/' . G_APP_GITHUB_OWNER . '/' . G_APP_GITHUB_REPO); define('G_APP_GITHUB_REPO_URL', 'https://github.com/' . G_APP_GITHUB_OWNER . '/' . G_APP_GITHUB_REPO);

View File

@ -1,8 +1,8 @@
<?php <?php
$translation_header = array ( $translation_header = array (
'Project-Id-Version' => 'VERSION', 'Project-Id-Version' => 'VERSION',
'POT-Creation-Date' => '2017-01-07 17:18+0000', 'POT-Creation-Date' => '2017-01-22 07:59+0000',
'PO-Revision-Date' => '2017-01-07 17:18+0000', 'PO-Revision-Date' => '2017-01-22 07:59+0000',
'Last-Translator' => 'FULL NAME <EMAIL@ADDRESS>', 'Last-Translator' => 'FULL NAME <EMAIL@ADDRESS>',
'Language-Team' => 'LANGUAGE TEAM <EMAIL@ADDRESS>', 'Language-Team' => 'LANGUAGE TEAM <EMAIL@ADDRESS>',
'Language' => 'id', 'Language' => 'id',
@ -18,6 +18,9 @@ $translation_plural = array (
'function' => '$index = (int)(0); return ($index < 1) ? $index : 1 - 1;', 'function' => '$index = (int)(0); return ($index < 1) ? $index : 1 - 1;',
); );
$translation_table = [ $translation_table = [
"Images greater than this size will show a button to load full resolution image." => [
0 => "Gambar lebih besar dari ukuran ini akan ditampilkan sebagai sebuah tombol untuk ditampilkan dalam resolusi penuh.",
],
"Invalid email" => [ "Invalid email" => [
0 => "Email tidak benar", 0 => "Email tidak benar",
], ],
@ -2271,6 +2274,21 @@ $translation_table = [
"Print and log errors" => [ "Print and log errors" => [
0 => "Cetak dan log kesalahan", 0 => "Cetak dan log kesalahan",
], ],
"Image routing" => [
0 => "Pengarahan Gambar",
],
"Routing for %s" => [
0 => "Pengarahan untuk %s",
],
"Album routing" => [
0 => "Pengarahan Album",
],
"Custom language strings" => [
0 => "string bahasa kustom",
],
"language strings" => [
0 => "string bahasa",
],
"Default language" => [ "Default language" => [
0 => "Bahasa default", 0 => "Bahasa default",
], ],
@ -2295,6 +2313,9 @@ $translation_table = [
"Unchecked languages won't be used in your website." => [ "Unchecked languages won't be used in your website." => [
0 => "Bahasa yang tidak dicentang tidak akan digunakan di website anda.", 0 => "Bahasa yang tidak dicentang tidak akan digunakan di website anda.",
], ],
"Toggle this to enable or disable HTTPS" => [
0 => "Alihkan ini untuk mengaktifkan atau menonaktifkan HTTPS",
],
"Toggle this to enable or disable this storage" => [ "Toggle this to enable or disable this storage" => [
0 => "Alihkan ini jika ingin mengaktifkan atau menonaktifkan penyimpanan ini", 0 => "Alihkan ini jika ingin mengaktifkan atau menonaktifkan penyimpanan ini",
], ],
@ -2361,6 +2382,12 @@ $translation_table = [
"You need a <a href=\"https://developers.facebook.com/\" target=\"_blank\">Facebook app</a> for this." => [ "You need a <a href=\"https://developers.facebook.com/\" target=\"_blank\">Facebook app</a> for this." => [
0 => "Anda memerlukan sebuah <a href=\"https://developers.facebook.com/\" target=\"_blank\">Facebook app</a> untuk hal ini.", 0 => "Anda memerlukan sebuah <a href=\"https://developers.facebook.com/\" target=\"_blank\">Facebook app</a> untuk hal ini.",
], ],
"Facebook app id" => [
0 => "id app Facebook",
],
"Facebook app secret" => [
0 => "Rahasia app Facebook",
],
"You need a <a href=\"https://apps.twitter.com\" target=\"_blank\">Twitter app</a> for this." => [ "You need a <a href=\"https://apps.twitter.com\" target=\"_blank\">Twitter app</a> for this." => [
0 => "Anda membutuhkan sebuah <a href=\"https://apps.twitter.com\" target=\"_blank\">Apliksi Twitter</a> untuk hal ini.", 0 => "Anda membutuhkan sebuah <a href=\"https://apps.twitter.com\" target=\"_blank\">Apliksi Twitter</a> untuk hal ini.",
], ],
@ -2547,6 +2574,9 @@ $translation_table = [
"Register date" => [ "Register date" => [
0 => "Tanggal pendaftaran", 0 => "Tanggal pendaftaran",
], ],
"Registration IP" => [
0 => "Pendaftaran IP",
],
"Status" => [ "Status" => [
0 => "Status", 0 => "Status",
], ],

View File

@ -1,8 +1,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: VERSION\n" "Project-Id-Version: VERSION\n"
"POT-Creation-Date: 2017-01-07 17:18+0000\n" "POT-Creation-Date: 2017-01-22 07:59+0000\n"
"PO-Revision-Date: 2017-01-07 17:18+0000\n" "PO-Revision-Date: 2017-01-22 07:59+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE TEAM <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE TEAM <EMAIL@ADDRESS>\n"
"Language: id\n" "Language: id\n"
@ -11,6 +11,9 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
msgid "Images greater than this size will show a button to load full resolution image."
msgstr "Gambar lebih besar dari ukuran ini akan ditampilkan sebagai sebuah tombol untuk ditampilkan dalam resolusi penuh."
#: ../../../app/install/installer.php:1168 #: ../../../app/install/installer.php:1168
#: ../../../app/install/installer.php:1177 #: ../../../app/install/installer.php:1177
#: ../../../app/install/installer.php:1180 #: ../../../app/install/installer.php:1180
@ -3546,6 +3549,21 @@ msgstr "Cetak kesalahan tanpa log kesalahan"
msgid "Print and log errors" msgid "Print and log errors"
msgstr "Cetak dan log kesalahan" msgstr "Cetak dan log kesalahan"
msgid "Image routing"
msgstr "Pengarahan Gambar"
msgid "Routing for %s"
msgstr "Pengarahan untuk %s"
msgid "Album routing"
msgstr "Pengarahan Album"
msgid "Custom language strings"
msgstr "string bahasa kustom"
msgid "language strings"
msgstr "string bahasa"
#: ../../../app/themes/Peafowl/views/dashboard.php:1611 #: ../../../app/themes/Peafowl/views/dashboard.php:1611
msgid "Default language" msgid "Default language"
msgstr "Bahasa default" msgstr "Bahasa default"
@ -3578,6 +3596,10 @@ msgstr "Bahasa diaktifkan"
msgid "Unchecked languages won't be used in your website." msgid "Unchecked languages won't be used in your website."
msgstr "Bahasa yang tidak dicentang tidak akan digunakan di website anda." msgstr "Bahasa yang tidak dicentang tidak akan digunakan di website anda."
#: ../../../app/themes/Peafowl/views/dashboard.php:1679
msgid "Toggle this to enable or disable HTTPS"
msgstr "Alihkan ini untuk mengaktifkan atau menonaktifkan HTTPS"
#: ../../../app/themes/Peafowl/views/dashboard.php:1680 #: ../../../app/themes/Peafowl/views/dashboard.php:1680
msgid "Toggle this to enable or disable this storage" msgid "Toggle this to enable or disable this storage"
msgstr "Alihkan ini jika ingin mengaktifkan atau menonaktifkan penyimpanan ini" msgstr "Alihkan ini jika ingin mengaktifkan atau menonaktifkan penyimpanan ini"
@ -3668,6 +3690,14 @@ msgstr "jaringan sosial"
msgid "You need a <a href=\"https://developers.facebook.com/\" target=\"_blank\">Facebook app</a> for this." msgid "You need a <a href=\"https://developers.facebook.com/\" target=\"_blank\">Facebook app</a> for this."
msgstr "Anda memerlukan sebuah <a href=\"https://developers.facebook.com/\" target=\"_blank\">Facebook app</a> untuk hal ini." msgstr "Anda memerlukan sebuah <a href=\"https://developers.facebook.com/\" target=\"_blank\">Facebook app</a> untuk hal ini."
#: ../../../app/themes/Peafowl/views/dashboard.php:1843
msgid "Facebook app id"
msgstr "id app Facebook"
#: ../../../app/themes/Peafowl/views/dashboard.php:1848
msgid "Facebook app secret"
msgstr "Rahasia app Facebook"
#: ../../../app/themes/Peafowl/views/dashboard.php:1864 #: ../../../app/themes/Peafowl/views/dashboard.php:1864
msgid "You need a <a href=\"https://apps.twitter.com\" target=\"_blank\">Twitter app</a> for this." msgid "You need a <a href=\"https://apps.twitter.com\" target=\"_blank\">Twitter app</a> for this."
msgstr "Anda membutuhkan sebuah <a href=\"https://apps.twitter.com\" target=\"_blank\">Apliksi Twitter</a> untuk hal ini." msgstr "Anda membutuhkan sebuah <a href=\"https://apps.twitter.com\" target=\"_blank\">Apliksi Twitter</a> untuk hal ini."
@ -3922,6 +3952,10 @@ msgstr "Menghapus pengguna"
msgid "Register date" msgid "Register date"
msgstr "Tanggal pendaftaran" msgstr "Tanggal pendaftaran"
#: ../../../app/themes/Peafowl/views/settings.php:91
msgid "Registration IP"
msgstr "Pendaftaran IP"
#: ../../../app/themes/Peafowl/views/settings.php:105 #: ../../../app/themes/Peafowl/views/settings.php:105
msgid "Status" msgid "Status"
msgstr "Status" msgstr "Status"

View File

@ -226,7 +226,8 @@ try {
], ],
'1.0.6' => [ '1.0.6' => [
'image_load_max_filesize_mb' => '3', 'image_load_max_filesize_mb' => '3',
] ],
'1.0.7' => NULL,
]; ];
// Settings that must be renamed from NAME to NEW NAME and DELETE old NAME // Settings that must be renamed from NAME to NEW NAME and DELETE old NAME
$settings_rename = []; $settings_rename = [];

View File

@ -495,7 +495,7 @@ class User {
} }
if(isset($user['bio'])) { if(isset($user['bio'])) {
$user['bio_safe_html'] = G\safe_html($user['bio']); $user['bio_safe_html'] = G\safe_html($user['bio']);
$user['bio_linkify'] = $user['is_admin'] ? G\linkify($user['bio'], ['attr' => ['target' => '_blank']]) : linkify_redirector($user['bio']); $user['bio_linkify'] = $user['is_admin'] ? G\linkify($user['bio_safe_html'], ['attr' => ['target' => '_blank']]) : linkify_redirector($user['bio_safe_html']);
} }
if(empty($user['name'])) { if(empty($user['name'])) {

View File

@ -550,7 +550,7 @@ function upload_to_content_images($source, $what) {
$typeArr[$k . '_homepage'] = array_merge($typeArr[$k], ['name' => 'logo_homepage']); $typeArr[$k . '_homepage'] = array_merge($typeArr[$k], ['name' => 'logo_homepage']);
} }
foreach($typeArr as $k => &$v) { foreach($typeArr as $k => &$v) {
$v['name'] .= '_' . round(microtime(TRUE) * 1000) . '_' . G\random_string(6); // prevent hard cache issues $v['name'] .= '_' . number_format(round(microtime(TRUE) * 1000), 0, '', '') . '_' . G\random_string(6); // prevent hard cache issues
} }
$name = $typeArr[$what]['name']; $name = $typeArr[$what]['name'];
@ -628,7 +628,7 @@ function upload_to_content_images($source, $what) {
$file = str_replace($uploaded['fileinfo']['filename'], $filename, $uploaded['file']); $file = str_replace($uploaded['fileinfo']['filename'], $filename, $uploaded['file']);
if(!@rename($uploaded['file'], $file)) { if(!@rename($uploaded['file'], $file)) {
throw new Exception("Can't rename uploaded ".$name." file", 500); throw new Exception("Can't rename uploaded " . $name . " file", 500);
} }
$remove_old = isset($remove_old) ? $remove_old : TRUE; $remove_old = isset($remove_old) ? $remove_old : TRUE;

View File

@ -680,7 +680,9 @@ function getFriendlyExif($Exif) {
]; ];
$ExifRelevant = []; $ExifRelevant = [];
foreach($exif_relevant as $v) { foreach($exif_relevant as $v) {
$ExifRelevant[$v] = exifReadableValue($Exif, $v); if(array_key_exists($v, $Exif) && strlen($Exif->{$v}) > 0) {
$ExifRelevant[$v] = exifReadableValue($Exif, $v);
}
} }
$return = (object) [ $return = (object) [
'Simple' => (object) [ 'Simple' => (object) [
@ -696,8 +698,14 @@ function getFriendlyExif($Exif) {
'FocalLength' => $FocalLength 'FocalLength' => $FocalLength
], $ExifRelevant) ], $ExifRelevant)
]; ];
foreach($return->Full as $k => $v) { // Clean all this stuff
if(!$v) unset($return->Full->{$k}); foreach($return as $k => &$v) {
if($k == 'Full') {
$v = (object) array_filter((array) $v, 'strlen');
}
foreach($v as $kk => $vv) {
$return->{$k}->{$kk} = G\safe_html(strip_tags($vv));
}
} }
return $return; return $return;
} }

View File

@ -18,7 +18,7 @@ namespace G;
if(!defined('access') or !access) die("This file cannot be directly accessed."); if(!defined('access') or !access) die("This file cannot be directly accessed.");
define('G_VERSION', '1.0.34'); define('G_VERSION', '1.0.35');
// Error reporting setup // Error reporting setup
@ini_set('log_errors', TRUE); @ini_set('log_errors', TRUE);

View File

@ -126,7 +126,7 @@ namespace G {
*/ */
function random_string($length) { function random_string($length) {
switch(true) { switch(true) {
case function_exists('random_bytes') : case function_exists('random_bytes') :
$r = random_bytes($length); $r = random_bytes($length);
break; break;
case function_exists('openssl_random_pseudo_bytes') : case function_exists('openssl_random_pseudo_bytes') :
@ -1280,10 +1280,7 @@ namespace G {
} }
if(strlen($suffix) == 1) { if(strlen($suffix) == 1) {
$ini_to_suffix = [ $suffix .= 'B'; // Adds missing "B" for shorthand ini notation (Turns 1G into 1GB)
'M' => 'MB',
];
$suffix = $ini_to_suffix[$suffix];
} }
if(!in_array($suffix, $units)) { if(!in_array($suffix, $units)) {
return $size; return $size;