Commit 57cbb71d authored by lrargerich's avatar lrargerich

Drawings history added

parent 2d17f264
......@@ -76,7 +76,7 @@ class TikiLib {
{
return $this->getOne("select dsn from tiki_dsn where name='$name'");
}
/*shared*/ function replace_note($user,$noteId,$name,$data)
{
......@@ -3806,19 +3806,20 @@ class TikiLib {
}
$pars=join('/',$pars);
if(preg_match_all("/\{draw +name=([A-Za-z_\-0-9]+) *\}/",$data,$draws)) {
//$this->invalidate_cache($page);
for($i=0;$i<count($draws[0]);$i++) {
$id = $draws[1][$i];
$repl='';
$name=$id.'.gif';
if(file_exists("img/wiki/$name")) {
if($tiki_p_edit_drawings == 'y' || $tiki_p_admin_drawings == 'y') {
$repl="<a href='#' onClick=\"javascript:window.open('tiki-editdrawing.php?path=$pars&amp;drawing={$id}','','menubar=no,width=252,height=25');\"><img border='0' src='img/wiki/$name' alt='click to edit' /></a>";
$repl="<a href='#' onClick=\"javascript:window.open('tiki-editdrawing.php?page=$page&amp;path=$pars&amp;drawing={$id}','','menubar=no,width=252,height=25');\"><img border='0' src='img/wiki/$name' alt='click to edit' /></a>";
} else {
$repl="<img border='0' src='img/wiki/$name' alt='a drawing' />";
}
} else {
if($tiki_p_edit_drawings == 'y' || $tiki_p_admin_drawings == 'y') {
$repl="<a class='wiki' href='#' onClick=\"javascript:window.open('tiki-editdrawing.php?path=$pars&amp;drawing={$id}','','menubar=no,width=252,height=25');\">click here to create draw $id</a>";
$repl="<a class='wiki' href='#' onClick=\"javascript:window.open('tiki-editdrawing.php?page=$page&amp;path=$pars&amp;drawing={$id}','','menubar=no,width=252,height=25');\">click here to create draw $id</a>";
} else {
$repl=tra('drawing not found');
}
......
......@@ -568,55 +568,55 @@ if(isset($_REQUEST["homeforumprefs"])&&isset($_REQUEST["homeForum"])) {
}
if(isset($_REQUEST['imagegallistprefs'])) {
if(isset($_REQUEST["gal_list_name"]) && $_REQUEST["gal_list_name"]=="on") {
$tikilib->set_preference("gal_list_name",'y');
$smarty->assign("gal_list_name",'y');
} else {
$tikilib->set_preference("gal_list_name",'n');
$smarty->assign("gal_list_name",'n');
}
if(isset($_REQUEST["gal_list_description"]) && $_REQUEST["gal_list_description"]=="on") {
$tikilib->set_preference("gal_list_description",'y');
$smarty->assign("gal_list_description",'y');
} else {
$tikilib->set_preference("gal_list_description",'n');
$smarty->assign("gal_list_description",'n');
}
if(isset($_REQUEST["gal_list_created"]) && $_REQUEST["gal_list_created"]=="on") {
$tikilib->set_preference("gal_list_created",'y');
$smarty->assign("gal_list_created",'y');
} else {
$tikilib->set_preference("gal_list_created",'n');
$smarty->assign("gal_list_created",'n');
}
if(isset($_REQUEST["gal_list_lastmodif"]) && $_REQUEST["gal_list_lastmodif"]=="on") {
$tikilib->set_preference("gal_list_lastmodif",'y');
$smarty->assign("gal_list_lastmodif",'y');
} else {
$tikilib->set_preference("gal_list_lastmodif",'n');
$smarty->assign("gal_list_lastmodif",'n');
}
if(isset($_REQUEST["gal_list_user"]) && $_REQUEST["gal_list_user"]=="on") {
$tikilib->set_preference("gal_list_user",'y');
$smarty->assign("gal_list_user",'y');
} else {
$tikilib->set_preference("gal_list_user",'n');
$smarty->assign("gal_list_user",'n');
}
if(isset($_REQUEST["gal_list_imgs"]) && $_REQUEST["gal_list_imgs"]=="on") {
$tikilib->set_preference("gal_list_imgs",'y');
$smarty->assign("gal_list_imgs",'y');
} else {
$tikilib->set_preference("gal_list_imgs",'n');
$smarty->assign("gal_list_imgs",'n');
}
if(isset($_REQUEST["gal_list_visits"]) && $_REQUEST["gal_list_visits"]=="on") {
$tikilib->set_preference("gal_list_visits",'y');
$smarty->assign("gal_list_visits",'y');
} else {
$tikilib->set_preference("gal_list_visits",'n');
$smarty->assign("gal_list_visits",'n');
}
if(isset($_REQUEST["gal_list_name"]) && $_REQUEST["gal_list_name"]=="on") {
$tikilib->set_preference("gal_list_name",'y');
$smarty->assign("gal_list_name",'y');
} else {
$tikilib->set_preference("gal_list_name",'n');
$smarty->assign("gal_list_name",'n');
}
if(isset($_REQUEST["gal_list_description"]) && $_REQUEST["gal_list_description"]=="on") {
$tikilib->set_preference("gal_list_description",'y');
$smarty->assign("gal_list_description",'y');
} else {
$tikilib->set_preference("gal_list_description",'n');
$smarty->assign("gal_list_description",'n');
}
if(isset($_REQUEST["gal_list_created"]) && $_REQUEST["gal_list_created"]=="on") {
$tikilib->set_preference("gal_list_created",'y');
$smarty->assign("gal_list_created",'y');
} else {
$tikilib->set_preference("gal_list_created",'n');
$smarty->assign("gal_list_created",'n');
}
if(isset($_REQUEST["gal_list_lastmodif"]) && $_REQUEST["gal_list_lastmodif"]=="on") {
$tikilib->set_preference("gal_list_lastmodif",'y');
$smarty->assign("gal_list_lastmodif",'y');
} else {
$tikilib->set_preference("gal_list_lastmodif",'n');
$smarty->assign("gal_list_lastmodif",'n');
}
if(isset($_REQUEST["gal_list_user"]) && $_REQUEST["gal_list_user"]=="on") {
$tikilib->set_preference("gal_list_user",'y');
$smarty->assign("gal_list_user",'y');
} else {
$tikilib->set_preference("gal_list_user",'n');
$smarty->assign("gal_list_user",'n');
}
if(isset($_REQUEST["gal_list_imgs"]) && $_REQUEST["gal_list_imgs"]=="on") {
$tikilib->set_preference("gal_list_imgs",'y');
$smarty->assign("gal_list_imgs",'y');
} else {
$tikilib->set_preference("gal_list_imgs",'n');
$smarty->assign("gal_list_imgs",'n');
}
if(isset($_REQUEST["gal_list_visits"]) && $_REQUEST["gal_list_visits"]=="on") {
$tikilib->set_preference("gal_list_visits",'y');
$smarty->assign("gal_list_visits",'y');
} else {
$tikilib->set_preference("gal_list_visits",'n');
$smarty->assign("gal_list_visits",'n');
}
}
......@@ -1924,7 +1924,8 @@ $urlIndex = $tikilib->get_preference("urlIndex",'');
$validateUsers = $tikilib->get_preference("validateUsers",'n');
$forgotPass = $tikilib->get_preference("forgotPass",'n');
$maxVersions = $tikilib->get_preference("maxVersions", 20);
$maxVersions = $tikilib->get_preference("maxVersions", 0);
$keep_versions = $tikilib->get_preference("keep_versions", 1);
$maxRecords = $tikilib->get_preference("maxRecords",10);
$title = $tikilib->get_preference("title","");
$popupLinks = $tikilib->get_preference("popupLinks",'n');
......@@ -1940,6 +1941,7 @@ $smarty->assign_by_ref('useUrlIndex',$useUrlIndex);
$smarty->assign_by_ref('forgotPass',$forgotPass);
$smarty->assign_by_ref('validateUsers',$validateUsers);
$smarty->assign_by_ref('maxVersions',$maxVersions);
$smarty->assign_by_ref('keep_versions',$keep_versions);
$smarty->assign_by_ref('title',$title);
$smarty->assign_by_ref('maxRecords',$maxRecords);
......
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