Skip to content

Commit

Permalink
bug add and join instance
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorarnau committed Nov 22, 2019
1 parent fb6282e commit 2cb54f3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/admin/Helper/EditoraHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,25 @@ function _activeDate($date_init, $date_end = null)

}

if (!function_exists('_getFileSize')) {
if (!function_exists('_getLocalFileSize')) {
function _getLocalFileSize($file)
{
if(file_exists($file)){
return filesize($file);
}
return 0;
}
}

if (!function_exists('_getRemoteFileSize')) {
function _getRemoteFileSize($file)
{
$head = array_change_key_case(get_headers($file, 1));
$size = isset($head['content-length']) ? $head['content-length'] : 0;
return $size;
}

}
if (!function_exists('_getFileSize')) {
function _getFileSize($file)
{
$size = 0;
Expand Down
10 changes: 9 additions & 1 deletion src/admin/accions/admin_new_instance2.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,25 @@ public function render()
'p_mode' => 'V',
'p_acces_type' => 'A'
);

$instance = $at->getInstanceAttributes($p_mode, $params_redirect);
$parents=$ly_t->paintParentsList($instances->getParents($params_redirect), $params_redirect);
$redirect_class_id = $params_redirect['param1'];
$redirect_inst_id = $params_redirect['param2'];
} else {// No vengo del relacionar
$params['param2'] = $res;
$instance = $at->getInstanceAttributes($p_mode, $params);
$parents=$ly_t->paintParentsList($instances->getParents($params), $params);
$redirect_class_id = $params['param1'];
$redirect_inst_id = $params['param2'];
}
$inst_id=$params['param2'];
$class_id = $params['param1'];
$inst_id = $params['param2'];
$instances->instance_update_date_and_backup($inst_id);
$_REQUEST['view']='container';
return redirect(route('editora.action', 'view_instance?p_pagina=1&p_class_id='.$redirect_class_id.'&p_inst_id='. $redirect_inst_id));
}

}
$instance['instance_info']['class_id']=$params['param1'];
$viewData = array_merge($menu, [
Expand Down
2 changes: 1 addition & 1 deletion src/admin/views/templates/parents_menu.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@if(isset($parents) && !empty($parents))
@if(isset($parents) && !empty($parents) && is_array($parents))
<div id="relations-menu">
<header class="side-menu-header">
<span class="tit">{{getMessage('container_objetos_padre')}}</span>
Expand Down

0 comments on commit 2cb54f3

Please sign in to comment.