Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/umum' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
agungsugiarto committed May 1, 2023
2 parents a849756 + 41647c7 commit 3501241
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 93 deletions.
32 changes: 16 additions & 16 deletions donjo-app/helpers/opensid_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ function get_dynamic_title_page_from_path()

for ($i = 0; $i < count($explo); $i++) {
$t = trim($explo[$i]);
if (!empty($t) && $t != '1' && $t != '0') {
if (! empty($t) && $t != '1' && $t != '0') {
$title .= ((is_numeric($t)) ? ' ' : ' - ') . $t;
}
}
Expand Down Expand Up @@ -488,26 +488,26 @@ function get_external_ip()
// https://stackoverflow.com/questions/2050859/copy-entire-contents-of-a-directory-to-another-using-php
function xcopy($src = '', $dest = '', $exclude = [], $only = [])
{
if (!file_exists($dest)) {
if (! file_exists($dest)) {
mkdir($dest, 0755, true);
}

foreach (scandir($src) as $file) {
$srcfile = rtrim($src, '/') . '/' . $file;
$destfile = rtrim($dest, '/') . '/' . $file;

if (!is_readable($srcfile) || ($exclude && in_array($file, $exclude))) {
if (! is_readable($srcfile) || ($exclude && in_array($file, $exclude))) {
continue;
}

if ($file != '.' && $file != '..') {
if (is_dir($srcfile)) {
if (!file_exists($destfile)) {
if (! file_exists($destfile)) {
mkdir($destfile);
}
xcopy($srcfile, $destfile, $exclude, $only);
} else {
if ($only && !in_array($file, $only)) {
if ($only && ! in_array($file, $only)) {
continue;
}

Expand Down Expand Up @@ -557,7 +557,7 @@ function ambilBerkas($nama_berkas, $redirect_url = null, $unique_id = null, $lok
$pathBerkas = FCPATH . $lokasi . $nama_berkas;
$pathBerkas = str_replace('/', DIRECTORY_SEPARATOR, $pathBerkas);
// Redirect ke halaman surat masuk jika path berkas kosong atau berkasnya tidak ada
if (!file_exists($pathBerkas)) {
if (! file_exists($pathBerkas)) {
$_SESSION['success'] = -1;
$_SESSION['error_msg'] = 'Berkas tidak ditemukan';
if ($redirect_url) {
Expand Down Expand Up @@ -736,7 +736,7 @@ function readfile_chunked($filename, $retbytes = true)
return false;
}

while (!feof($handle)) {
while (! feof($handle)) {
$buffer = fread($handle, $chunksize);
echo $buffer;
if ($retbytes) {
Expand Down Expand Up @@ -873,7 +873,7 @@ function alamat_web($str)
}

// Format wanrna #803c3c dan rgba(131,127,127,1)
if (!function_exists('warna')) {
if (! function_exists('warna')) {
function warna($str)
{
return preg_replace('/[^a-zA-Z0-9\\#\\,\\.\\(\\)]/', '', $str ?? '#000000');
Expand Down Expand Up @@ -914,10 +914,10 @@ function list_mutasi($mutasi = [])
$div = ($item['jenis_mutasi'] == 2) ? 'class="error"' : null;
$hasil = "<p {$div}>";
$hasil .= $item['sebabmutasi'];
$hasil .= !empty($item['no_c_desa']) ? ' ' . ket_mutasi_persil($item['jenis_mutasi']) . ' C No ' . sprintf('%04s', $item['no_c_desa']) : null;
$hasil .= !empty($item['luasmutasi']) ? ', Seluas ' . number_format($item['luasmutasi']) . ' m<sup>2</sup>, ' : null;
$hasil .= !empty($item['tanggalmutasi']) ? tgl_indo_out($item['tanggalmutasi']) . '<br />' : null;
$hasil .= !empty($item['keterangan']) ? $item['keterangan'] : null;
$hasil .= ! empty($item['no_c_desa']) ? ' ' . ket_mutasi_persil($item['jenis_mutasi']) . ' C No ' . sprintf('%04s', $item['no_c_desa']) : null;
$hasil .= ! empty($item['luasmutasi']) ? ', Seluas ' . number_format($item['luasmutasi']) . ' m<sup>2</sup>, ' : null;
$hasil .= ! empty($item['tanggalmutasi']) ? tgl_indo_out($item['tanggalmutasi']) . '<br />' : null;
$hasil .= ! empty($item['keterangan']) ? $item['keterangan'] : null;
$hasil .= '</p>';

echo $hasil;
Expand All @@ -943,7 +943,7 @@ function status_sukses($outp, $gagal_saja = false, $msg = '')
$CI->session->error_msg = $msg;
}
if ($gagal_saja) {
if (!$outp) {
if (! $outp) {
$CI->session->success = -1;
}
} else {
Expand Down Expand Up @@ -988,7 +988,7 @@ function getUrlContent($url)

return false;
}
if (!in_array(explode(':', $url)[0], ['http', 'https'])) {
if (! in_array(explode(':', $url)[0], ['http', 'https'])) {
throw new Exception('URL harus http atau https');

return false;
Expand Down Expand Up @@ -1061,7 +1061,7 @@ function format_telpon(string $no_telpon, $kode_negara = '+62')
// https://stackoverflow.com/questions/6158761/recursive-php-function-to-replace-characters/24482733
function strReplaceArrayRecursive($replacement = [], $strArray = false, $isReplaceKey = false)
{
if (!is_array($strArray)) {
if (! is_array($strArray)) {
return str_replace(array_keys($replacement), array_values($replacement), $strArray);
}

Expand Down Expand Up @@ -1112,7 +1112,7 @@ function isLocalIPAddress($IPAddress)
return true;
}

return !filter_var($IPAddress, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE);
return ! filter_var($IPAddress, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE);
}

function unique_slug($tabel = null, $judul = null, $id = null)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion vendor/doctrine/inflector/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"php": "^7.2 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^10",
"doctrine/coding-standard": "^9",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
"phpstan/phpstan-strict-rules": "^1.3",
Expand Down
35 changes: 8 additions & 27 deletions vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public function __construct($host, $port = 22, $timeout = 10)
// yields inconsistent behavior depending on how php is compiled. so we left shift -1 (which, in
// two's compliment, consists of all 1 bits) by 31. on 64-bit systems this'll yield 0xFFFFFFFF80000000.
// that's not a problem, however, and 'anded' and a 32-bit number, as all the leading 1 bits are ignored.
(PHP_INT_SIZE == 4 ? -1 : 0xFFFFFFFF) => 'NET_SFTP_ATTR_EXTENDED'
(-1 << 31) & 0xFFFFFFFF => 'NET_SFTP_ATTR_EXTENDED'
];
// http://tools.ietf.org/html/draft-ietf-secsh-filexfer-04#section-6.3
// the flag definitions change somewhat in SFTPv5+. if SFTPv5+ support is added to this library, maybe name
Expand Down Expand Up @@ -1003,12 +1003,6 @@ private function nlist_helper($dir, $recursive, $relativeDir)
{
$files = $this->readlist($dir, false);

// If we get an int back, then that is an "unexpected" status.
// We do not have a file list, so return false.
if (is_int($files)) {
return false;
}

if (!$recursive || $files === false) {
return $files;
}
Expand Down Expand Up @@ -1041,13 +1035,6 @@ private function nlist_helper($dir, $recursive, $relativeDir)
public function rawlist($dir = '.', $recursive = false)
{
$files = $this->readlist($dir, true);

// If we get an int back, then that is an "unexpected" status.
// We do not have a file list, so return false.
if (is_int($files)) {
return false;
}

if (!$recursive || $files === false) {
return $files;
}
Expand Down Expand Up @@ -1113,9 +1100,8 @@ private function readlist($dir, $raw = true)
break;
case NET_SFTP_STATUS:
// presumably SSH_FX_NO_SUCH_FILE or SSH_FX_PERMISSION_DENIED
list($status) = Strings::unpackSSH2('N', $response);
$this->logError($response, $status);
return $status;
$this->logError($response);
return false;
default:
throw new \UnexpectedValueException('Expected NET_SFTP_HANDLE or NET_SFTP_STATUS. '
. 'Got packet type: ' . $this->packet_type);
Expand Down Expand Up @@ -1168,7 +1154,7 @@ private function readlist($dir, $raw = true)
list($status) = Strings::unpackSSH2('N', $response);
if ($status != NET_SFTP_STATUS_EOF) {
$this->logError($response, $status);
return $status;
return false;
}
break 2;
default:
Expand Down Expand Up @@ -1796,7 +1782,7 @@ private function setstat_recursive($path, $attr, &$i)
$i = 0;
$entries = $this->readlist($path, true);

if ($entries === false || is_int($entries)) {
if ($entries === false) {
return $this->setstat($path, $attr, false);
}

Expand Down Expand Up @@ -2595,14 +2581,9 @@ private function delete_recursive($path, &$i)
$i = 0;
$entries = $this->readlist($path, true);

// The folder does not exist at all, so we cannot delete it.
if ($entries === NET_SFTP_STATUS_NO_SUCH_FILE) {
return false;
}

// Normally $entries would have at least . and .. but it might not if the directories
// permissions didn't allow reading. If this happens then default to an empty list of files.
if ($entries === false || is_int($entries)) {
// normally $entries would have at least . and .. but it might not if the directories
// permissions didn't allow reading
if (empty($entries)) {
$entries = [];
}

Expand Down
2 changes: 1 addition & 1 deletion vendor/tecnickcom/tcpdf/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.6.2
6.5.0
Loading

0 comments on commit 3501241

Please sign in to comment.