Page MenuHomePhabricator

D12735.diff
No OneTemporary

D12735.diff

Index: admin/modules/setting/controllers/General.php
===================================================================
--- admin/modules/setting/controllers/General.php
+++ admin/modules/setting/controllers/General.php
@@ -42,7 +42,7 @@
public function upload()
{
// handle logo upload
- $folder = "./asset/img/";
+ $folder = FCPATH."asset/img/";
$uploaded = $_FILES['fFile'];
$response = array();
@@ -60,16 +60,16 @@
if($get_size_image[0] == "")
{
- $response = array('status'=>'Gambar gagal di upload karena ini bukan gambar', 'status'=>'error');
+ $response = array('message'=>'Gambar gagal di upload karena ini bukan gambar', 'status'=>'error');
}
else
{
- if( $get_size_image[0] > 85 OR $get_size_image[1] > 85 )
- {
- $response = array('status'=>'Gambar gagal di upload karena panjang atau lebar gambar melebihi yang disarankan', 'status'=>'error');
- }
- else
- {
+ //if( $get_size_image[0] > 85 OR $get_size_image[1] > 85 )
+ //{
+ //$response = array('message'=>'Gambar gagal di upload karena panjang atau lebar gambar melebihi yang disarankan', 'status'=>'error');
+ //}
+ //else
+ //{
// hapus gambar lama
if(general_data('app_logo'))
{
@@ -82,7 +82,7 @@
move_uploaded_file($tmp_name, $folder.$file);
$this->general_model->save(array('app_logo' => $file));
$response = array('message'=>'Sukses Merubah Logo', 'status'=>'success');
- }
+ //}
}
}
else

File Metadata

Mime Type
text/plain
Expires
Tue, Oct 15, 8:27 AM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6712082
Default Alt Text
D12735.diff (1 KB)

Event Timeline