diff --git a/app/app.php b/app/app.php index 0ff7c9d..3135dfd 100644 --- a/app/app.php +++ b/app/app.php @@ -1,6 +1,6 @@ 'VERSION', - 'POT-Creation-Date' => '2017-01-07 17:18+0000', - 'PO-Revision-Date' => '2017-01-07 17:18+0000', + 'POT-Creation-Date' => '2017-01-22 07:59+0000', + 'PO-Revision-Date' => '2017-01-22 07:59+0000', 'Last-Translator' => 'FULL NAME ', 'Language-Team' => 'LANGUAGE TEAM ', 'Language' => 'id', @@ -18,6 +18,9 @@ $translation_plural = array ( 'function' => '$index = (int)(0); return ($index < 1) ? $index : 1 - 1;', ); $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" => [ 0 => "Email tidak benar", ], @@ -2271,6 +2274,21 @@ $translation_table = [ "Print and log errors" => [ 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" => [ 0 => "Bahasa default", ], @@ -2295,6 +2313,9 @@ $translation_table = [ "Unchecked languages won't be used in your website." => [ 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" => [ 0 => "Alihkan ini jika ingin mengaktifkan atau menonaktifkan penyimpanan ini", ], @@ -2361,6 +2382,12 @@ $translation_table = [ "You need a Facebook app for this." => [ 0 => "Anda memerlukan sebuah Facebook app untuk hal ini.", ], + "Facebook app id" => [ + 0 => "id app Facebook", + ], + "Facebook app secret" => [ + 0 => "Rahasia app Facebook", + ], "You need a Twitter app for this." => [ 0 => "Anda membutuhkan sebuah Apliksi Twitter untuk hal ini.", ], @@ -2547,6 +2574,9 @@ $translation_table = [ "Register date" => [ 0 => "Tanggal pendaftaran", ], + "Registration IP" => [ + 0 => "Pendaftaran IP", + ], "Status" => [ 0 => "Status", ], diff --git a/app/content/languages/id.po b/app/content/languages/id.po index 1dcf4b7..a97df50 100644 --- a/app/content/languages/id.po +++ b/app/content/languages/id.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: VERSION\n" -"POT-Creation-Date: 2017-01-07 17:18+0000\n" -"PO-Revision-Date: 2017-01-07 17:18+0000\n" +"POT-Creation-Date: 2017-01-22 07:59+0000\n" +"PO-Revision-Date: 2017-01-22 07:59+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE TEAM \n" "Language: id\n" @@ -11,6 +11,9 @@ msgstr "" "Content-Transfer-Encoding: 8bit\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:1177 #: ../../../app/install/installer.php:1180 @@ -3546,6 +3549,21 @@ msgstr "Cetak kesalahan tanpa log kesalahan" msgid "Print and log errors" 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 msgid "Default language" msgstr "Bahasa default" @@ -3578,6 +3596,10 @@ msgstr "Bahasa diaktifkan" msgid "Unchecked languages won't be used in your website." 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 msgid "Toggle this to enable or disable this storage" msgstr "Alihkan ini jika ingin mengaktifkan atau menonaktifkan penyimpanan ini" @@ -3668,6 +3690,14 @@ msgstr "jaringan sosial" msgid "You need a Facebook app for this." msgstr "Anda memerlukan sebuah Facebook app 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 msgid "You need a Twitter app for this." msgstr "Anda membutuhkan sebuah Apliksi Twitter untuk hal ini." @@ -3922,6 +3952,10 @@ msgstr "Menghapus pengguna" msgid "Register date" msgstr "Tanggal pendaftaran" +#: ../../../app/themes/Peafowl/views/settings.php:91 +msgid "Registration IP" +msgstr "Pendaftaran IP" + #: ../../../app/themes/Peafowl/views/settings.php:105 msgid "Status" msgstr "Status" diff --git a/app/install/installer.php b/app/install/installer.php index 0b8cabf..26f022e 100644 --- a/app/install/installer.php +++ b/app/install/installer.php @@ -226,7 +226,8 @@ try { ], '1.0.6' => [ '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_rename = []; diff --git a/app/lib/classes/class.user.php b/app/lib/classes/class.user.php index e78f09c..dfad6e8 100644 --- a/app/lib/classes/class.user.php +++ b/app/lib/classes/class.user.php @@ -495,7 +495,7 @@ class User { } if(isset($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'])) { diff --git a/app/lib/functions.php b/app/lib/functions.php index 768ea83..94b8296 100644 --- a/app/lib/functions.php +++ b/app/lib/functions.php @@ -550,7 +550,7 @@ function upload_to_content_images($source, $what) { $typeArr[$k . '_homepage'] = array_merge($typeArr[$k], ['name' => 'logo_homepage']); } 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']; @@ -628,7 +628,7 @@ function upload_to_content_images($source, $what) { $file = str_replace($uploaded['fileinfo']['filename'], $filename, $uploaded['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; diff --git a/app/lib/functions.render.php b/app/lib/functions.render.php index 8d0fca0..f22742b 100644 --- a/app/lib/functions.render.php +++ b/app/lib/functions.render.php @@ -680,7 +680,9 @@ function getFriendlyExif($Exif) { ]; $ExifRelevant = []; 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) [ 'Simple' => (object) [ @@ -696,8 +698,14 @@ function getFriendlyExif($Exif) { 'FocalLength' => $FocalLength ], $ExifRelevant) ]; - foreach($return->Full as $k => $v) { - if(!$v) unset($return->Full->{$k}); + // Clean all this stuff + 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; } diff --git a/lib/G/G.php b/lib/G/G.php index c52cad3..a8f74c8 100644 --- a/lib/G/G.php +++ b/lib/G/G.php @@ -18,7 +18,7 @@ namespace G; 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 @ini_set('log_errors', TRUE); diff --git a/lib/G/functions.php b/lib/G/functions.php index dc0d29e..2c7fe0c 100644 --- a/lib/G/functions.php +++ b/lib/G/functions.php @@ -126,7 +126,7 @@ namespace G { */ function random_string($length) { switch(true) { - case function_exists('random_bytes') : + case function_exists('random_bytes') : $r = random_bytes($length); break; case function_exists('openssl_random_pseudo_bytes') : @@ -1280,10 +1280,7 @@ namespace G { } if(strlen($suffix) == 1) { - $ini_to_suffix = [ - 'M' => 'MB', - ]; - $suffix = $ini_to_suffix[$suffix]; + $suffix .= 'B'; // Adds missing "B" for shorthand ini notation (Turns 1G into 1GB) } if(!in_array($suffix, $units)) { return $size;