suche
This commit is contained in:
parent
9a359b265c
commit
25de46c9f0
|
@ -374,9 +374,7 @@ class UserController extends AppController {
|
|||
$result = $this->DreamjobPageImage->delete($page,false);
|
||||
}else
|
||||
$result = $this->DreamjobPageText->delete($page['DreamjobPageInh']['id'],false);
|
||||
if($result){
|
||||
$result = $this->DreamjobPageInh->delete($page['DreamjobPageInh']['id'],false);
|
||||
}
|
||||
|
||||
if($result){
|
||||
$this->MiconwareSession->refreshCache();
|
||||
$profil = $this->MiconwareSession->getWorker();
|
||||
|
|
|
@ -124,10 +124,13 @@ public function processUpload($check=array()) {
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
public function delete($id = NULL, $cascade = true){
|
||||
public function delete($id = NULL, $cascade = false){
|
||||
$dataSource = $this->getDataSource();
|
||||
$dataSource->begin();
|
||||
$result = $this->delete($id['DreamjobPageInh']['id'],false);
|
||||
$result = $this->delete($id['DreamjobPageInh']['id'],$cascade);
|
||||
if($result){
|
||||
$result = $this->DreamjobPageInh->delete($id['DreamjobPageInh']['id'],$cascade);
|
||||
}
|
||||
if($result){
|
||||
$filename = WWW_ROOT . $this->uploadDir . DS .$id['DreamjobPageImage']['image'];
|
||||
chmod($filename,0755);
|
||||
|
|
|
@ -40,6 +40,21 @@ class DreamjobPageText extends AppModel {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public function delete($id = NULL, $cascade = false){
|
||||
$dataSource = $this->getDataSource();
|
||||
$dataSource->begin();
|
||||
$result = $this->delete($id,$cascade);
|
||||
if($result){
|
||||
$result = $this->DreamjobPageInh->delete($id,$cascade);
|
||||
}
|
||||
if ($result) {
|
||||
$dataSource->commit();
|
||||
return true;
|
||||
} else {
|
||||
$dataSource->rollback();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public $validate = array(
|
||||
'page_ptr_id' => array(
|
||||
'numeric' => array(
|
||||
|
|
|
@ -21,7 +21,7 @@ if($profil['AppUser']['take_systemwide']){
|
|||
else
|
||||
$url = $MEDIA.DS.$profil['AppUser']['avatar'];
|
||||
if($edit and isset($url))
|
||||
$url = 'img/icon_user.png';
|
||||
$url = 'img/icon_company.png';
|
||||
?>
|
||||
<img src="<?=$url;?>"/>
|
||||
<?php if($edit): ?>
|
||||
|
|
Loading…
Reference in New Issue