Skip to content

Commit 5abc7e3

Browse files
Merge branch '4.5.x' into dev
2 parents 2e2b04f + 603867f commit 5abc7e3

File tree

157 files changed

+47435
-3191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+47435
-3191
lines changed

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ body:
1515
placeholder: Beritahu kami, kendala apa yang Anda alami
1616
validations:
1717
required: true
18-
18+
1919
- type: textarea
2020
id: solusi
2121
attributes:
@@ -29,4 +29,4 @@ body:
2929
id: tambahan
3030
attributes:
3131
label: Tambahan
32-
description: Tambahan lain
32+
description: Tambahan lain

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,14 @@ writable/uploads/*
2828
!writable/uploads/index.html
2929

3030
writable/debugbar/*
31+
32+
# ----------------------------------------------------------
33+
# PUBLIC BUILD
34+
# ----------------------------------------------------------
35+
public/build/vendors/tinymce/**
36+
!public/build/vendors/tinymce/**/
37+
!public/build/vendors/tinymce/**/*.min.js
38+
!public/build/vendors/tinymce/**/*.css
39+
!public/build/vendors/tinymce/**/*.gif
40+
!public/build/vendors/tinymce/**/*.swf
41+
!public/build/vendors/tinymce/skins/**

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "resources"]
2+
path = resources
3+
url = https://github.com/ataslangit/resources.git

.php-cs-fixer.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99
$finder = Finder::create()
1010
->in(__DIR__)
11-
->name('*.php')
12-
->ignoreDotFiles(true)
13-
->exclude(['donjo-app/Views', 'donjo-app/ThirdParty', 'donjo-sys']);
11+
->exclude(['donjo-app/Views', 'donjo-app/ThirdParty', 'donjo-sys', 'node_modules']);
1412

1513
$overrides = [];
1614

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"vendor-dir": "donjo-sys"
2525
},
2626
"scripts": {
27-
"csfix": "./donjo-sys/bin/php-cs-fixer fix"
27+
"csfix": "./donjo-sys/bin/php-cs-fixer fix",
28+
"update-resources": "git submodule update --init --remote resources"
2829
}
2930
}

composer.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/changelog/454.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "Changelog SID v4.5.4"
3+
---
4+
5+
# SID Versi v4.5.4
6+
7+
Rilis:
8+
9+
## :rocket: Peningkatan
10+
- Gabung url `../main/initial` sebagai default daripada `../main`
11+
- Hapus `index.php` dari url
12+
- Relokasi file assets berupa css, js dan plugin lain
13+
14+
## :link: Link
15+
-

donjo-app/Controllers/Data_persil.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,6 @@ public function detail($id = 0)
8787

8888
public function create($id = 0)
8989
{
90-
$this->load->helper('form');
91-
$this->load->library('form_validation');
92-
9390
$this->form_validation->set_rules('nama', 'Nama Jenis Persil', 'required');
9491

9592
$header = $this->header_model->get_data();
@@ -115,9 +112,6 @@ public function create($id = 0)
115112

116113
public function create_ext($id = 0)
117114
{
118-
$this->load->helper('form');
119-
$this->load->library('form_validation');
120-
121115
$this->form_validation->set_rules('nama', 'Nama Jenis Persil', 'required');
122116

123117
$header = $this->header_model->get_data();
@@ -133,9 +127,6 @@ public function create_ext($id = 0)
133127

134128
public function simpan_persil($page = 1)
135129
{
136-
$this->load->helper('form');
137-
$this->load->library('form_validation');
138-
139130
$this->form_validation->set_rules('nama', 'Nama Jenis Persil', 'required');
140131
$header = $this->header_model->get_data();
141132
echo view('header', $header);
@@ -175,9 +166,6 @@ public function peruntukan($apa = '', $page = 1)
175166

176167
public function persil_jenis($id = 0)
177168
{
178-
$this->load->helper('form');
179-
$this->load->library('form_validation');
180-
181169
$this->form_validation->set_rules('nama', 'Nama Jenis Persil', 'required');
182170
$header = $this->header_model->get_data();
183171
echo view('header', $header);
@@ -207,9 +195,6 @@ public function hapus_persil_jenis($id)
207195

208196
public function persil_peruntukan($id = 0)
209197
{
210-
$this->load->helper('form');
211-
$this->load->library('form_validation');
212-
213198
$this->form_validation->set_rules('nama', 'Nama Jenis Persil', 'required');
214199
$header = $this->header_model->get_data();
215200
echo view('header', $header);

donjo-app/Controllers/Main.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,13 @@ public function index()
5151
return redirect()->to('first');
5252
}
5353
} else {
54-
return redirect()->to('main/initial');
54+
return $this->initial();
5555
}
5656
}
5757

58+
/**
59+
* View halaman instalasi pertama
60+
*/
5861
public function initial()
5962
{
6063
echo view('install');

donjo-app/Controllers/Program_bantuan.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ public function peserta($cat = 0, $id = 0)
6969

7070
public function create()
7171
{
72-
$this->load->helper('form');
73-
$this->load->library('form_validation');
74-
7572
$this->form_validation->set_rules('cid', 'Sasaran', 'required');
7673
$this->form_validation->set_rules('nama', 'Nama Program', 'required');
7774
$this->form_validation->set_rules('sdate', 'Tanggal awal', 'required');
@@ -90,9 +87,6 @@ public function create()
9087

9188
public function edit($id)
9289
{
93-
$this->load->helper('form');
94-
$this->load->library('form_validation');
95-
9690
$this->form_validation->set_rules('cid', 'Sasaran', 'required');
9791
$this->form_validation->set_rules('nama', 'Nama Program', 'required');
9892
$this->form_validation->set_rules('sdate', 'Tanggal awal', 'required');

donjo-app/Helpers/donjolib_helper.php

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,65 @@
11
<?php
22

3+
/**
4+
* This function checks `manifest.json` from `FCPATH` . 'build', extracts the entire file and returns an array.
5+
*
6+
* @param string $file The file name to check.
7+
*
8+
* @return string The path to the file, or `null` if the file does not exist.
9+
*/
10+
function asset(string $file): string
11+
{
12+
// Check if the manifest file exists.
13+
$manifest_path = FCPATH . 'build' . DIRECTORY_SEPARATOR . 'manifest.json';
14+
15+
if (! file_exists($manifest_path)) {
16+
return '';
17+
}
18+
19+
// Decode the JSON file.
20+
$manifest = json_decode(file_get_contents($manifest_path), true);
21+
22+
// Check if the file exists in the manifest file.
23+
if (! isset($manifest[$file])) {
24+
return '';
25+
}
26+
27+
// Return the path to the file.
28+
return base_url('build/' . $manifest[$file]['file']);
29+
}
30+
31+
if (! function_exists('view')) {
32+
/**
33+
* fungsi view() untuk menggantikan $this->load->view()
34+
*/
35+
function view(string $view, array $data = [], bool $return = false)
36+
{
37+
$CI = &get_instance();
38+
39+
$CI->load->view($view, $data, $return);
40+
}
41+
}
42+
43+
if (! function_exists('dd')) {
44+
/**
45+
* Dump & die
46+
*
47+
* @param mixed ...$args
48+
*
49+
* @return void
50+
*/
51+
function dd(...$args)
52+
{
53+
if (ENVIRONMENT === 'development') {
54+
var_dump($args);
55+
56+
exit;
57+
}
58+
}
59+
}
60+
61+
// --------------------------------------------------------------------------
62+
363
function Rpt($str = 0)
464
{
565
$satuan = ['', ' satu', ' dua', ' tiga', ' empat', ' lima', ' enam', ' tujuh', ' delapan', ' sembilan'];

donjo-app/Models/Analisis_import_model.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ class Analisis_import_model extends CI_Model
99
public function __construct()
1010
{
1111
parent::__construct();
12-
$this->load->helper('excel');
1312
}
1413

1514
public function import_excel()

donjo-app/Models/Analisis_respon_model.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class Analisis_respon_model extends CI_Model
1010
public function __construct()
1111
{
1212
parent::__construct();
13-
$this->load->helper('excel');
1413
}
1514

1615
public function autocomplete()
@@ -785,8 +784,8 @@ public function data_unduh($p = 0, $o = 0)
785784
$par = $query2->result_array();
786785
$data[$i]['par'] = $par;
787786

788-
// $j++;
789-
// }
787+
// $j++;
788+
// }
790789
} else {
791790
$data[$i]['par'] = null;
792791
}
@@ -1052,7 +1051,7 @@ public function import_respon($op = 0)
10521051
$n++;
10531052
}
10541053
}
1055-
// }
1054+
// }
10561055
} else {
10571056
$sql = 'SELECT id FROM analisis_parameter WHERE id_indikator = ? AND jawaban = ?;';
10581057
$query = $this->db->query($sql, [$indi['id'], $isi]);
@@ -1190,7 +1189,7 @@ public function satu_jiwa($op = 0)
11901189
$n++;
11911190
}
11921191
}
1193-
// }
1192+
// }
11941193
} else {
11951194
$sql = 'SELECT id FROM analisis_parameter WHERE id_indikator = ? AND jawaban = ?;';
11961195
$query = $this->db->query($sql, [$indi['id'], $isi]);
@@ -1322,7 +1321,7 @@ public function dua_dunia($op = 0)
13221321
$n++;
13231322
}
13241323
}
1325-
// }
1324+
// }
13261325
} else {
13271326
$sql = 'SELECT id FROM analisis_parameter WHERE id_indikator = ? AND jawaban = ?;';
13281327
$query = $this->db->query($sql, [$indi['id'], $isi]);

donjo-app/Models/Export_model.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,6 @@ public function lombok()
262262
public function backup()
263263
{
264264
$this->load->dbutil();
265-
$this->load->helper('download');
266-
$this->load->helper('file');
267265

268266
$prefs = [
269267
'format' => 'sql',

donjo-app/Models/Import_model.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ public function __construct()
1111
parent::__construct();
1212
ini_set('memory_limit', '512M');
1313
set_time_limit(3600);
14-
$this->load->helper('excel');
1514
}
1615

1716
public function import_siak()

donjo-app/Models/Penduduk_model.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ public function log_sql()
326326
return $log_sql;
327327
}
328328
$log_sql = '';
329+
329330
// $log_sql= " AND u.status_dasar = 1 ";
330331
return $log_sql;
331332
}

donjo-app/Views/analisis_master/form.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<script src="<?php echo base_url('assets/tiny_mce/jquery.tinymce.min.js') ?>"></script>
2-
<script src="<?php echo base_url('assets/tiny_mce/tinymce.min.js') ?>"></script>
1+
<script src="<?php echo base_url('build/vendors/tinymce/jquery.tinymce.min.js') ?>"></script>
2+
<script src="<?php echo base_url('build/vendors/tinymce/tinymce.min.js') ?>"></script>
33
<script>
44
tinymce.init({
55
selector: 'textarea',

donjo-app/Views/gallery/table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
});
88

99
</script>
10-
<script src="<?php echo base_url('assets/front/js/jquery.colorbox.js')?>"></script>
10+
<script src="<?= base_url('build/vendors/jquery.colorbox-min.js') ?>"></script>
1111
<script>
1212
$(document).ready(function() {
1313
$(".color2").colorbox({
@@ -17,7 +17,7 @@
1717
});
1818

1919
</script>
20-
<link href="<?php echo base_url('assets/front/css/colorbox.css') ?>" rel="stylesheet">
20+
<link href="<?= asset('resources/css/colorbox.css') ?>" rel="stylesheet">
2121
<div id="pageC">
2222
<table class="inner">
2323
<tr style="vertical-align:top">

0 commit comments

Comments
 (0)