Commit 793c2d2d authored by redflo's avatar redflo

Bugids fixed:

737106,737004 and some bugs in file galleries
Thanks to Nick H (plmk), Patrice Levesque (ptaff)
parent 7ae17d0e
......@@ -1988,7 +1988,7 @@ class TikiLib {
$result = $this->query($query);
//check for valid values
$cache_time=is_int($cache_time) ? $cache_time : 0 ;
$rows=is_int($rows) ? $rows : 10 ;
$rows=is_numeric($rows) ? floor($rows) : 10 ;
$query = "insert into tiki_modules(name,title,position,ord,cache_time,rows,groups,params) values('$name','$title','$position',$order,$cache_time,$rows,'$groups','$params')";
$result = $this->query($query);
return true;
......@@ -3392,7 +3392,7 @@ class TikiLib {
$page = addslashes($page);
$query = "update tiki_pages set flag='L' where pageName='$page'";
$result = $this->query($query);
if($user) {
if(isset($user)) {
$query = "update tiki_pages set user='$user' where pageName='$page'";
$result = $this->query($query);
}
......
......@@ -83,14 +83,14 @@
<td class="listfgalactionsodd">
{if $tiki_p_admin_file_galleries eq 'y' or ($user and $galleries[changes].user eq $user)}
{if ($tiki_p_admin eq 'y') or ($galleries[changes].individual eq 'n') or ($galleries[changes].individual_tiki_p_create_file_galleries eq 'y' ) }
<a class="fgallink" href="tiki-file_galleries.php?offset={$offset}&amp;sort_mode={$sort_mode}&amp;edit_mode=1&amp;galleryId={$galleries[changes].id}">Edit</a>
<a class="fgallink" href="tiki-file_galleries.php?offset={$offset}&amp;sort_mode={$sort_mode}&amp;removegal={$galleries[changes].id}">Remove</a>
<a class="fgallink" href="tiki-file_galleries.php?offset={$offset}&amp;sort_mode={$sort_mode}&amp;edit_mode=1&amp;galleryId={$galleries[changes].id}">{tr}Edit{/tr}</a>
<a class="fgallink" href="tiki-file_galleries.php?offset={$offset}&amp;sort_mode={$sort_mode}&amp;removegal={$galleries[changes].id}">{tr}Remove{/tr}</a>
{/if}
{/if}
{if $tiki_p_upload_files eq 'y'}
{if ($tiki_p_admin eq 'y') or ($galleries[changes].individual eq 'n') or ($galleries[changes].individual_tiki_p_upload_files eq 'y' ) }
{if $tiki_p_admin_file_galleries eq 'y' or ($user and $galleries[changes].user eq $user) or $galleries[changes].public eq 'y'}
<a class="fgallink" href="tiki-upload_file.php?galleryId={$galleries[changes].id}">Upload</a>
<a class="fgallink" href="tiki-upload_file.php?galleryId={$galleries[changes].id}">{tr}Upload{/tr}</a>
{/if}
{/if}
{/if}
......@@ -124,7 +124,7 @@
{if $tiki_p_admin_file_galleries eq 'y' or ($user and $galleries[changes].user eq $user) or $galleries[changes].public eq 'y'}
{if $tiki_p_upload_files eq 'y'}
{if ($tiki_p_admin eq 'y') or ($galleries[changes].individual eq 'n') or ($galleries[changes].individual_tiki_p_upload_files eq 'y' ) }
<a class="fgallink" href="tiki-upload_file.php?galleryId={$galleries[changes].id}">Upload</a>
<a class="fgallink" href="tiki-upload_file.php?galleryId={$galleries[changes].id}">{tr}Upload{/tr}</a>
{/if}
{/if}
{/if}
......
......@@ -64,7 +64,7 @@ if(isset($_REQUEST["clear_cache"])) {
$module_groups=Array();
if(isset($_REQUEST["edit_assign"])) {
$_REQUEST["edit_assing"]=urldecode($_REQUEST["edit_assign"]);
$_REQUEST["edit_assign"]=urldecode($_REQUEST["edit_assign"]);
$info = $tikilib->get_assigned_module($_REQUEST["edit_assign"]);
$grps='';
if($info["groups"]) {
......@@ -88,7 +88,7 @@ if(isset($_REQUEST["edit_assign"])) {
}
if(isset($_REQUEST["unassign"])) {
$_REQUEST["unassing"]=urldecode($_REQUEST["unassign"]);
$_REQUEST["unassign"]=urldecode($_REQUEST["unassign"]);
$tikilib->unassign_module($_REQUEST["unassign"]);
}
......@@ -155,7 +155,7 @@ if(isset($_REQUEST["preview"])) {
}
if(isset($_REQUEST["assign"])) {
$_REQUEST["assing"]=urldecode($_REQUEST["assign"]);
$_REQUEST["assign"]=urldecode($_REQUEST["assign"]);
$smarty->assign_by_ref('assign_name',$_REQUEST["assign_name"]);
//$smarty->assign_by_ref('assign_title',$_REQUEST["assign_title"]);
$smarty->assign_by_ref('assign_position',$_REQUEST["assign_position"]);
......@@ -231,4 +231,4 @@ $smarty->assign('mid','tiki-admin_modules.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
?>
......@@ -115,6 +115,11 @@ if(isset($_REQUEST["upload"])) {
}
$fp = fopen($_FILES['userfile1']['tmp_name'],"rb");
if(!$fp) {
$smarty->assign('msg',tra('Cannot read file'));
$smarty->display("styles/$style_base/error.tpl");
die;
}
$data = '';
$fhash='';
if($fgal_use_db == 'n') {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment