un peu de debuggage
This commit is contained in:
parent
334dd55dee
commit
31b2c00956
4 changed files with 13 additions and 8 deletions
|
|
@ -243,9 +243,6 @@ class UserCtrl extends MotherCtrl {
|
|||
}
|
||||
}
|
||||
}
|
||||
if ($_POST['delete_image'] === '1') {
|
||||
$objUser->setImage('images.jpg');
|
||||
}
|
||||
|
||||
|
||||
if (count($arrError) == 0 && isset($strImageName)) {
|
||||
|
|
@ -283,10 +280,18 @@ class UserCtrl extends MotherCtrl {
|
|||
}
|
||||
|
||||
|
||||
if ($_POST['delete_image'] === '1') {
|
||||
$strOldImg = $objUser->getImage();
|
||||
if (!empty($strOldImg) && $strOldImg !== 'images.jpg') {
|
||||
$strOldFile = $_ENV['IMG_USER_PATH'] . $strOldImg;
|
||||
if (file_exists($strOldFile)) unlink($strOldFile);
|
||||
}
|
||||
$objUser->setImage('images.jpg');
|
||||
}
|
||||
$boolInsert = $objUserModel->update($objUser);
|
||||
|
||||
if ($boolInsert === true) {
|
||||
if (isset($strOldImg) && !empty($strOldImg) && isset($strImageName)) {
|
||||
if (isset($strOldImg) && !empty($strOldImg) && $strOldImg !== 'images.jpg' && isset($strImageName)) {
|
||||
$strOldFile = $_ENV['IMG_USER_PATH'] . $strOldImg;
|
||||
if (file_exists($strOldFile)) unlink($strOldFile);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
try{
|
||||
$this->_db = new PDO(
|
||||
"mysql:host=localhost;dbname=projet_folliow",
|
||||
"projet_user",
|
||||
"F0lliowRules!",
|
||||
"root",
|
||||
"",
|
||||
array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC)
|
||||
);
|
||||
$this->_db->exec("SET CHARACTER SET utf8");
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 3 KiB |
BIN
uploads/profiles/images.jpg
Normal file
BIN
uploads/profiles/images.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Loading…
Add table
Add a link
Reference in a new issue