Commit 5bc01934 authored by lrargerich's avatar lrargerich

Conflicts solved ?

parent dcffab76
......@@ -2261,6 +2261,8 @@ tiki/templates/tiki-admin-include-rss.tpl -text
tiki/templates/tiki-admin-include-trackers.tpl -text
tiki/templates/tiki-admin-include-userfiles.tpl -text
tiki/templates/tiki-admin-include-webmail.tpl -text
tiki/templates/tiki-admin-include-wiki-features.tpl -text
tiki/templates/tiki-admin-include-wiki-history.tpl -text
tiki/templates/tiki-admin-include-wiki.tpl -text
tiki/templates/tiki-admin.tpl -text
tiki/templates/tiki-admin_categories.tpl -text
......
<?php # $Header: /cvsroot/tikiwiki/tiki/commxmlrpc.php,v 1.7 2003-03-21 14:42:42 lrargerich Exp $
<?php # $Header: /cvsroot/tikiwiki/tiki/commxmlrpc.php,v 1.8 2003-05-04 21:10:32 lrargerich Exp $
include_once('db/tiki-db.php');
include_once('lib/tikilib.php');
......@@ -28,7 +28,8 @@ $s=new xmlrpc_server( $map );
/* Validates the user and returns user information */
function sendPage($params) {
// Get the page and store it in received_pages
global $tikilib,$userlib;
global $tikilib,$userlib,$commlib;
$pp=$params->getParam(0); $site=$pp->scalarval();
$pp=$params->getParam(1); $username=$pp->scalarval();
$pp=$params->getParam(2); $password=$pp->scalarval();
......@@ -37,6 +38,7 @@ function sendPage($params) {
$pp=$params->getParam(5); $comment=$pp->scalarval();
$pp=$params->getParam(6); $description=$pp->scalarval();
//
if(!$userlib->validate_user($username,$password,'','')) {
return new xmlrpcresp(0, 101, "Invalid username or password");
}
......@@ -47,21 +49,13 @@ function sendPage($params) {
}
// Store the page in the tiki_received_pages_table
$data = base64_decode($data);
$commlib->receive_page($pageName,$data,$comment,$site,$username,$description);
/*
if () {
return new xmlrpcresp(new xmlrpcval(1,"boolean"));
} else {
return new xmlrpcresp(0, 101, "Invalid username or password");
}
*/
return new xmlrpcresp(new xmlrpcval(1,"boolean"));
}
function sendArticle($params) {
// Get the page and store it in received_pages
global $tikilib,$userlib;
global $tikilib,$userlib,$commlib;
$pp=$params->getParam(0); $site=$pp->scalarval();
$pp=$params->getParam(1); $username=$pp->scalarval();
$pp=$params->getParam(2); $password=$pp->scalarval();
......@@ -103,6 +97,4 @@ function sendArticle($params) {
return new xmlrpcresp(new xmlrpcval(1,"boolean"));
}
?>
\ No newline at end of file
......@@ -1499,9 +1499,9 @@ INSERT INTO users_permissions(permName,type,permDesc) VALUES ('tiki_p_batch_uplo
### CHANGES FOR 1.6 ###
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_minor','wiki','Can save as minor edit','editor');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_rename','wiki','Can rename pages','editor');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_lock','wiki','Can lock pages','editor');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_minor','wiki','Can save as minor edit','editors');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_rename','wiki','Can rename pages','editors');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_lock','wiki','Can lock pages','editors');
drop table if exists tiki_extwiki;
create table tiki_extwiki(
......@@ -1604,7 +1604,7 @@ create table tiki_eph(
primary key(ephId)
);
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_eph_admin','tiki','Can admin ephemerides','editor');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_eph_admin','tiki','Can admin ephemerides','editors');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_userfiles','user','Can upload personal files','registered');
......@@ -1690,7 +1690,7 @@ create table tiki_user_tasks(
### Inter-user messages
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_messages','messu','Can use the messaging system','registered');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_broadcast','messu','Can broadcast messages to groups','editor');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_broadcast','messu','Can broadcast messages to groups','editors');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_broadcast_all','messu','Can broadcast messages to all user','admin');
drop table if exists messu_messages;
......@@ -1739,13 +1739,13 @@ INSERT INTO users_permissions(permName,type,permDesc) VALUES ('tiki_p_edit_struc
### DIRECTORIES BEGIN
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_admin_directory','directory','Can admin the directory','editor');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_admin_directory','directory','Can admin the directory','editors');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_view_directory','directory','Can use the directory','basic');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_admin_directory_cats','directory','Can admin directory categories','editor');
REPLACE INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_admin_directory_sites','directory','Can admin directory sites','editor');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_admin_directory_cats','directory','Can admin directory categories','editors');
REPLACE INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_admin_directory_sites','directory','Can admin directory sites','editors');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_submit_link','directory','Can submit sites to the directory','basic');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_autosubmit_link','directory','Submited links are valid','editor');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_validate_links','directory','Can validate submited links','editor');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_autosubmit_link','directory','Submited links are valid','editors');
INSERT INTO users_permissions(permName,type,permDesc,level) VALUES ('tiki_p_validate_links','directory','Can validate submited links','editors');
......@@ -1831,13 +1831,13 @@ create index ti_cr on tiki_images (created);
create index ti_hi on tiki_images (hits);
create index ti_us on tiki_images (user);
create index t_i_d_it on tiki_images_data (imageId,type);
create index tc_pi on tiki_comments(parentId);
# Optimization of others -- try yourself
#create index tg_u on tiki_galleries (user);
#create index ti_p_hi on tiki_pages (hits);
#create index ti_p_lm on tiki_pages (lastModif);
#create index up_t on users_permissions(type);
#create index tc_pi on tiki_comments(parentId);
#create index tf_n on tiki_forums(name);
#create index tf_lp on tiki_forums(lastPost);
#create index tf_h on tiki_forums(hits);
......
......@@ -397,13 +397,13 @@ create index ti_cr on tiki_images (created);
create index ti_hi on tiki_images (hits);
create index ti_us on tiki_images (user);
create index t_i_d_it on tiki_images_data (imageId,type);
create index tc_pi on tiki_comments(parentId);
# Optimization of others -- try yourself
#create index tg_u on tiki_galleries (user);
#create index ti_p_hi on tiki_pages (hits);
#create index ti_p_lm on tiki_pages (lastModif);
#create index up_t on users_permissions(type);
#create index tc_pi on tiki_comments(parentId);
#create index tf_n on tiki_forums(name);
#create index tf_lp on tiki_forums(lastPost);
#create index tf_h on tiki_forums(hits);
......
......@@ -765,6 +765,7 @@ $lang=Array(
"left modules" => "Module links",
"left" => "links",
"level" => "Stufe",
"Library to use for processing images" => "Bibliothek zur Bildbearbeitung",
"like pages" => "&auml;hnl. Seiten",
"Like pages" => "&Auml;hnliche Seiten",
"Link type" => "Linktyp",
......@@ -1793,12 +1794,12 @@ from MyTiki->modules.<br/>
have turned off the option 'display modules to all groups always'
from Admin->General
" => "
<b>Note 1</b>: if you allow your users to configure modules then assigned
modules won't be reflected in the screen until you configure them
from MyTiki->modules.<br/>
<b>Note 2</b>: If you assign modules to groups make sure that you
have turned off the option 'display modules to all groups always'
from Admin->General
<b>Bemerkung 1</b>: Wenn sie den Benutzern erlauben, Module zu konfigurieren,
dann werden die hier zugewiesenen Module f&uuml;r die Benuzer erst sichtbar,
wenn sie sie in MeinTiki->Module konfigurieren.<br/>
<b>Bemerkung 2</b>: Wenn sie den Modulen Gruppen zuweisen, dann gehen sie
sicher, da&szlig; sie die Option 'Module immer in allen Gruppen anzeigen'
in Admin-Allgemein abgestellt haben.
",
"Structures" => "Strukturen",
"Create new structure" => "Neue Struktur anlegen",
......@@ -1927,9 +1928,9 @@ from Admin->General
"Added" => "Hinzugef&uuml;gt",
"Add a new site" => "F&uuml;ge neue Site hinzu",
"Site added" => "Site hinzugef&uuml;gt",
"The following site was added and validation by admin may be needed before appearing on the lists" => "The following site was added and validation by admin may be needed before appearing on the lists",
"Directory ranking" => "Directory ranking",
"Mailin accounts" => "Mailin accounts",
"The following site was added and validation by admin may be needed before appearing on the lists" => "Folgende Site wurde Hinzugef&uuml;gt. Die Site erscheint erst nach &uuml;berpr&uuml;fung des Administrators in der Liste",
"Directory ranking" => "Verzeichniss ranking",
"Mailin accounts" => "Mailin Zugang",
"wiki-get" => "wiki-get",
"wiki-put" => "wiki-put",
"wiki-append" => "wiki-append",
......@@ -1937,7 +1938,7 @@ from Admin->General
"Return to messages" => "Zur&uuml;ck zu Nachrichten",
"replyall" => "replyall",
"Unflagg" => "Unflagg",
"Flag this message" => "Flag this message",
"Flag this message" => "Nachricht kennzeichnen",
"Compose message" => "Nachricht erstellen",
"CC" => "CC",
"BCC" => "BCC",
......@@ -1960,7 +1961,7 @@ from Admin->General
"Select the language to edit" => "Zu bearbeitende Sprache ausw&auml;hlen",
"Add a translation" => "&Uuml;bersetzung hinzuf&uuml;gen",
"Edit translations" => "&Uuml;bersetzungen bearbeiten",
"Translate recorded" => "Translate recorded",
"Translate recorded" => "Aufgezeichnetes &uuml;bersetzen",
"Original" => "Original",
"Translation" => "&Uuml;bersetzung",
"translate" => "&uuml;bersetzen",
......@@ -1987,33 +1988,28 @@ from Admin->General
"Write note" => "Notiz schreiben",
"User Files" => "Benutzer-Dateien",
"Theme Control Center: categories" => "Theme Kontrollcenter: Kategorien",
"If a theme is assigned to the individual object that theme is used." => "If a theme is assigned to the individual object that theme is used.",
"If not then if a theme is assigned to the object's category that theme is used" => "If not then if a theme is assigned to the object's category that theme is used",
"If not then a theme for the section is used" => "If not then a theme for the section is used",
"If none of the above was selected the user theme is used" => "If none of the above was selected the user theme is used",
"Finally if the user didn't select a theme the default theme is used" => "Finally if the user didn't select a theme the default theme is used",
"Control by Object" => "Control by Object",
"Control by Sections" => "Control by Sections",
"Assign themes to categories" => "Assign themes to categories",
"Control by Object" => "Theme Objekte",
"Control by Sections" => "Theme Sektionen",
"Assign themes to categories" => "Kathegorien Themes zuweisen",
"Assigned categories" => "Zugeordnete Kategorien",
"theme" => "theme",
"Admin ephemerides" => "Admin Terminkalender",
"All ephemerides" => "Alle Termine",
"Theme Control Center: Objects" => "Theme Kontrollcenter: Objekte",
"Control by category" => "Control by category",
"Assign themes to objects" => "Assign themes to objects",
"Control by category" => "Theme Kategorien",
"Assign themes to objects" => "Objekten Themen zuordnen",
"Object" => "Objekt",
"Assigned objects" => "Zugeordnete Objekte",
"Theme Control Center: sections" => "Theme Control Center: sections",
"Control by Categories" => "Control by Categories",
"Assign themes to sections" => "Assign themes to sections",
"Theme Control Center: sections" => "Theme Kontrollcenter: Sektionen",
"Control by Categories" => "Theme Kategorien",
"Assign themes to sections" => "Sektionen Themen zuweisen",
"Assigned sections" => "Zugeordnete Sektionen",
"Mini Calendar: Preferences" => "Mini-Kalender: Einstellungen",
"Daily" => "t&auml;glich",
"Weekly" => "w&ouml;chentlich",
"Calendar Interval in daily view" => "Calendar Interval in daily view",
"Start hour for days" => "Start hour for days",
"End hour for days" => "End hour for days",
"Calendar Interval in daily view" => "Kalender Intervall in Tagesansicht",
"Start hour for days" => "Startzeit f&uuml; Tage",
"End hour for days" => "Endzeit f&uuml; Tage",
"Upcoming events" => "n&auml;chste Termine",
"Reminders" => "Erinnerungen",
"no reminders" => "keine Erinnerungen",
......@@ -2062,7 +2058,7 @@ from Admin->General
"Searches" => "Searches",
"Visited links" => "Besuchte Links",
"TOP" => "TOP",
"Permission denied you can not view this section" => "Permission denied you can not view this section",
"Permission denied you can not view this section" => "Zugriff verweigert. Sie k&ouml;nnen diese Sektion nicht betrachten",
"Permission denied you cannot rebuild thumbnails in this gallery" => "Neuerstellung der Thumbnails in dieser Galerie nicht gestattet",
"Permission denied you cannot rotate images in this gallery" => "Rotation der Bilder in dieser Galerie nicht gestattet",
"You can not use the same password again" => "Dasselbe Pa&szlig;wort noch einmal ist nicht erlaubt",
......@@ -2123,5 +2119,46 @@ from Admin->General
"LDAP Member Is DN" => "LDAP Member Is DN",
"LDAP Admin User" => "LDAP Admin User",
"LDAP Admin Pwd" => "LDAP Admin Pwd",
"unlocked" => "entsperrt",
"no description" => "keine Beschreibung",
"Dont use external mail validation" => "Keine externe Mail&uuml;berpr&uuml;fung benutzen",
"Use external mail validation" => "Externe Mail&uuml;berpr&uuml;fung benutzen",
"MyTiki (click!)" => "Mein Tiki (click!)",
"Sections" => "Sektionen",
"Destroy the structure and remove the pages" => "Struktur und Seiten entfernen",
"Destroy the structure leaving the wiki pages" => "Nur Struktur entfernen",
"remove structure" => "Struktur entfernen",
"Minor" => "geringf&uuml;gig",
"Top pages" => "Top Seiten",
"Wiki top pages" => "Wiki top Seiten",
"Most relevant pages" => "Relevanteste Seiten",
"Last pages" => "Letzte Seiten",
"Wiki top galleries" => "Wiki top Galerieen",
"You have to create a gallery first!" => "Sie m&uuml;ssen erst eine Galerie erstellen!",
"gal_ranking_last_images" => "gal_ranking_last_images",
"gal_ranking_top_galleries" => "gal_ranking_top_galleries",
"gal_ranking_top_images" => "gal_ranking_top_images",
"Allow viewing HTML mails?" => "Anzeigen von HTML mails erlauben?",
"Workflow engine" => "Workflow engine",
"You have to enter a title and text" => "Sie m&uuml;ssen Titel und Text eingeben",
"Re:" => "Aw:",
"Monitor" => "&Uuml;berwachen",
"Cancel monitoring" => "&Uuml;berwachung beenden",
"Your email address has been added to the list of addresses monitoring this tracker" => "Ihre email Adresse wurde zu der Liste der Adressen, die diesen Tracker &uuml;berwachen hinzugef&uuml;gt",
"Your email address has been removed from the list of addresses monitoring this tracker" => "Ihre email Adresse wurde von der Liste der Adressen, die diesen Tracker &uuml;berwachen entfernt",
"Hi" => "Hallo",
"you or someone registered this email address at" => "sie oder jemand anderes haben ihre email Adresse bei",
"If you want to be a registered user in this site you will have to use" => "registriert. Wenn sie ein registrierter Benutzer der Site werden wollen,",
"the following link to login for the first time" => "dann klicken sie auf den folgenden Link, um sich das erste mal anzumelden",
"Enjoy the site!" => "Viel Spass auf der Site!",
"You will receive an email with information to login for the first time into this site" => "Sie erhalten in k&uuml;rze eine email, die Informationen enthalten, wie sie sich zum ersten mal anmelden",
"Your Tiki information registration" => "Ihre Tiki Registrierungsinformationen",
"You have to create a topic first" => "Sie m&uuml;ssen zuerst ein Thema erstellen",
"Theme is selected as follows" => "Die Theme wird folgenderma&szlig;en gew&auml;hlt",
"If a theme is assigned to the individual object that theme is used." => "Wenn eine Theme einem individuellem Objekt zugewiesen ist, wird diese verwendet",
"If not then if a theme is assigned to the object's category that theme is used" => "Wenn nicht, dann wird die Theme, die der Kategorie des Objekts zugewiesen ist gew&auml;hlt",
"If not then a theme for the section is used" => "Wenn nicht, dann wird die Theme, die Theme der Sektion gew&auml;hlt",
"If none of the above was selected the user theme is used" => "Wenn nicht, dann wird die Theme des Benutzers gew&auml;hlt",
"Finally if the user didn't select a theme the default theme is used" => "Trifft nichts der obrigen Punkte zu, dann wird die default-Theme benutzt",
"##end###" => "###end###");
?>
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2044,6 +2044,7 @@ da Admin->Generale
"Remember me" => "Ricorda",
"Tiki Logo" => "Logo Tiki",
"User tasks" => "User tasks",
<<<<<<< language.php
"You have" => "Hai",
"new message" => "nuovo messaggio",
"new messages" => "nuovi messaggi",
......@@ -2053,6 +2054,15 @@ da Admin->Generale
"Sites to validate" => "Siti da validare",
"Searches" => "Ricerche",
"Visited links" => "Link visitati",
=======
"You have" => "Hai",
"new message" => "nuovo messaggio",
"Last Sites" => "U_ltimi Siti",
"Top Sites" => "Siti Top",
"Directory Stats" => "Statistiche Directory",
"Sites to validate" => "Siti da validare",
"Searches" => "Ricerche",
"Visited links" => "Link visitati",
"TOP" => "TOP",
"Permission denied you can not view this section" => "Permesso negato, non puoi vedere questa sezione",
"Permission denied you cannot rebuild thumbnails in this gallery" => "Permesso negato, non puoi rigenerare i thumbnails in questa galleria",
......@@ -2100,5 +2110,34 @@ da Admin->Generale
"LDAP Member Is DN" => "LDAP Member Is DN",
"LDAP Admin User" => "LDAP Admin User",
"LDAP Admin Pwd" => "LDAP Admin Pwd",
=======
"Permission denied you can not view this section" => "Permesso negato, non puoi vedere questa sezione",
"Permission denied you cannot rebuild thumbnails in this gallery" => "Permesso negato, non puoi rigenerare i thumbnails in questa galleria",
"Permission denied you cannot rotate images in this gallery" => "Permesso negato, non puoi ruotare le immagini in questa galleria",
"You can not use the same password again" => "Non puoi usare nuovamente la stessa password",
"Permission denied" => "Permesso negato",
"Mus enter a name to add a site" => "Bisogna inserire un url per aggiungere un sito",
"Must enter a url to add a site" => "Bisogna inserire un url per aggiungere un sito",
"Must select a category" => "Bisogna selezionare una categoria",
"You can not download files" => "Non puoi scaricare file",
"No structure indicated" => "Nessuna struttura specificata",
"Invalid email address. You must enter a valid email address" => "Indirizzo email non valido. Inserire un indirizzo valido",
"No site indicated" => "Nessun sito indicato",
"Must enter a name to add a site" => "Inserire un nome per aggiungere un sito",
"URL already added to the directory. Duplicate site?" => "L'URL gi presente nella directory. Sito duplicato?",
"URL cannot be accessed wrong URL or site is offline and cannot be added to the directory" => "L'URL non pu essere verificato, l'URL errato o il sito offline e non pu essere aggiunto alla directory",
"You are not logged in and no user indicated" => "Non hai effettuato il login e nessun utente specificato",
"The user has choosen to make his information private" => "L'utente ha scelto di rendere private le informazioni personali",
"Shortname must be 2 Characters" => "Lo shortname deve essere di 2 caratteri",
"You must provide a longname" => "Devi fornire un longname",
"Language created" => "Linguaggio creato",
"Page must be defined inside a structure to use this feature" => "La pagina deve essere definita all'interno di una struttura per usare questa feature",
"Must be logged to use this feature" => "Devi effettuare il login per poter usare questa feature",
"No server indicated" => "Nessun server specificato",
"Cannot connect to" => "Non possibile connettersi a",
"Missing information to read news (server,port,username,password,group) required" => "Mancano informazioni richieste per leggere le news (server,port,username,password,group)",
"Cannot get messages" => "Errore nel caricamento dei messaggi",
"File is too big" => "IL file troppo grande",
"No note indicated" => "Nessuna nota specificata",
"##end###" => "###end###");
?>
This diff is collapsed.
......@@ -354,7 +354,7 @@ class Comments extends TikiLib {
function get_comment_replies($id,$sort_mode,$offset,$max,$threshold=0) {
$query = "select threadId,title,userName,points,commentDate,parentId from tiki_comments where average>=$threshold and parentId=$id order by $sort_mode,commentDate desc limit $offset,$max";
$query = "select threadId,title,userName,points,commentDate,parentId from tiki_comments where parentId=$id and average>=$threshold order by $sort_mode,commentDate desc limit $offset,$max";
$result = $this->query($query);
$retval=Array();
$retval["numReplies"]=$result->numRows();
......@@ -442,9 +442,9 @@ class Comments extends TikiLib {
$query = "select count(*) from tiki_comments where object='$hash' and average<$threshold";
$below = $this->getOne($query);
if($find) {
$mid=" where type='s' and average>=$threshold and object='$hash' and parentId=$parentId and (title like '%".$find."%' or data like '%".$find."%') ";
$mid=" where object='$hash' and parentId=$parentId and type='s' and average>=$threshold and (title like '%".$find."%' or data like '%".$find."%') ";
} else {
$mid=" where type='s' and average>=$threshold and object='$hash' and parentId=$parentId ";
$mid=" where object='$hash' and parentId=$parentId and type='s' and average>=$threshold ";
}
$query = "select * from tiki_comments $mid $extra order by $sort_mode,threadId limit $offset,$maxRecords";
//print("$query<br/>");
......@@ -481,9 +481,9 @@ class Comments extends TikiLib {
// Now the non-sticky
$ret = Array();
if($find) {
$mid=" where type<>'s' and average>=$threshold and object='$hash' and parentId=$parentId and (title like '%".$find."%' or data like '%".$find."%') ";
$mid=" where object='$hash' and parentId=$parentId and type<>'s' and average>=$threshold and (title like '%".$find."%' or data like '%".$find."%') ";
} else {
$mid=" where type<>'s' and average>=$threshold and object='$hash' and parentId=$parentId ";
$mid=" where object='$hash' and parentId=$parentId and type<>'s' and average>=$threshold ";
}
$query = "select * from tiki_comments $mid order by $sort_mode limit $offset,$maxRecords";
//print("$query<br/>");
......@@ -662,4 +662,4 @@ function r_compare_lastPost($ar1,$ar2) {
return $ar2["lastPost"] - $ar1["lastPost"];
}
?>
\ No newline at end of file
?>
......@@ -75,17 +75,6 @@ class DCSLib extends TikiLib {
return $res["data"];
}
function get_actual_content($contentId)
{
$data ='';
$now = date("U");
$query = "select max(publishDate) from tiki_programmed_content where contentId=$contentId and publishDate<=$now";
$res = $this->getOne($query);
if(!$res) return '';
$query = "select data from tiki_programmed_content where contentId=$contentId and publishDate=$res";
$data = $this->getOne($query);
return $data;
}
function get_next_content($contentId)
{
......
......@@ -602,9 +602,9 @@ $dirlib= new DirLib($dbTiki);
function compare_paths($p1,$p2) {
if($p1["path"]<$p2["path"]) {
return +1;
} elseif($p1["path"]>$p2["path"]) {
return -1;
} elseif($p1["path"]>$p2["path"]) {
return +1;
} else {
return 0;
}
......
......@@ -168,50 +168,50 @@ class FileGalLib extends TikiLib {
$description = addslashes($description);
include_once('lib/pclzip.lib.php');
include_once('lib/mime/mimelib.php');
$archive = new PclZip($file);
$archive->extract('temp');
$files=Array();
$h = opendir("temp");
$gal_info = $this->get_gallery($galleryId);
while (($file = readdir($h)) !== false) {
if( $file!='.' && $file!='..' && is_file("temp/$file") && $file!='license.txt' ) {
$files[]=$file;
// check filters
$upl=1;
if(!empty($fgal_match_regex)) {
if(!preg_match("/$gal_match_regex/",$file,$reqs)) $upl=0;
}
if(!empty($fgal_nmatch_regex)) {
if(preg_match("/$gal_nmatch_regex/",$file,$reqs)) $upl=0;
}
$fp = fopen('temp/'.$file,"rb");
$data = '';
$fhash='';
if($fgal_use_db == 'n') {
$fhash = md5($name = $file);
@$fw = fopen($fgal_use_dir.$fhash,"w");
if(!$fw) {
$smarty->assign('msg',tra('Cannot write to this file:').$fhash);
$smarty->display("styles/$style_base/error.tpl");
die;
}
}
while(!feof($fp)) {
if($fgal_use_db == 'y') {
$data .= fread($fp,8192*16);
} else {
$data = fread($fp,8192*16);
fwrite($fw,$data);
}
}
fclose($fp);
if($fgal_use_db == 'n') {
fclose($fw);
$data='';
}
$size = filesize('temp/'.$file);
$name = $file;
$archive = new PclZip($file);
$archive->extract('temp');
$files=Array();
$h = opendir("temp");
$gal_info = $this->get_file_gallery_info($galleryId);
while (($file = readdir($h)) !== false) {
if( $file!='.' && $file!='..' && is_file("temp/$file") && $file!='license.txt' ) {
$files[]=$file;
// check filters
$upl=1;
if(!empty($fgal_match_regex)) {
if(!preg_match("/$fgal_match_regex/",$file,$reqs)) $upl=0;
}
if(!empty($fgal_nmatch_regex)) {
if(preg_match("/$fgal_nmatch_regex/",$file,$reqs)) $upl=0;
}
$fp = fopen('temp/'.$file,"rb");
$data = '';
$fhash='';
if($fgal_use_db == 'n') {
$fhash = md5($name = $file);
@$fw = fopen($fgal_use_dir.$fhash,"w");
if(!$fw) {
$smarty->assign('msg',tra('Cannot write to this file:').$fhash);
$smarty->display("styles/$style_base/error.tpl");
die;
}
}
while(!feof($fp)) {
if($fgal_use_db == 'y') {
$data .= fread($fp,8192*16);
} else {
$data = fread($fp,8192*16);
fwrite($fw,$data);
}
}
fclose($fp);
if($fgal_use_db == 'n') {
fclose($fw);
$data='';
}
$size = filesize('temp/'.$file);
$name = $file;
$type = tiki_get_mime('temp/'.$file);
$fileId = $this->insert_file($galleryId,$name,$description,$name, $data, $size, $type, $user,$fhash);
unlink('temp/'.$file);
......
This diff is collapsed.
......@@ -104,18 +104,21 @@ class Messu extends Tikilib {
function flag_message($user, $msgId, $flag, $val)
{
if(!$msgId) return false;
$query = "update messu_messages set $flag='$val' where user='$user' and msgId=$msgId";
$this->query($query);
}
function delete_message($user, $msgId)
{
if(!$msgId) return false;
$query = "delete from messu_messages where user='$user' and msgId=$msgId";
$this->query($query);
}
function get_next_message($user,$msgId, $sort_mode, $find, $flag, $flagval,$prio)
{
if(!$msgId) return 0;
if($prio) {
$prio = " and priority=$prio ";
}
......@@ -138,6 +141,7 @@ class Messu extends Tikilib {
function get_prev_message($user,$msgId, $sort_mode, $find, $flag, $flagval,$prio)
{
if(!$msgId) return 0;
if($prio) {
$prio = " and priority=$prio ";
}
......
......@@ -13,7 +13,8 @@ class RegistrationLib extends TikiLib {
// Validate emails...
function SnowCheckMail($Email,$Debug=false)
{
$HTTP_HOST=$_SERVER['HTTP_HOST'];
global $system_os;
$HTTP_HOST=$_SERVER['SERVER_NAME'];
$Return =array();
// Variable for return.
// $Return[0] : [true|false]
......@@ -36,6 +37,8 @@ class RegistrationLib extends TikiLib {
// split function reference : http://www.php.net/manual/en/function.split.php
list ( $Username, $Domain ) = split ("@",$Email);
if($system_os == 'windows') return $Return;
// That MX(mail exchanger) record exists in domain check .
// checkdnsrr function reference : http://www.php.net/manual/en/function.checkdnsrr.php
if ( checkdnsrr ( $Domain, "MX" ) ) {
......
......@@ -50,10 +50,10 @@ class SurveyLib extends TikiLib {
// Remove all the options for each question
while($res = $result->fetchRow(DB_FETCHMODE_ASSOC)) {
$questionId = $res["questionId"];
$query2 = "update tiki_survey_question_options set average=0, votes=0 where questionId=$questionId";
$query2 = "update tiki_survey_question_options set votes=0 where questionId=$questionId";
$result2 = $this->query($query2);
}
$query = "update tiki_survey_questions set value=0,votes=0 where surveyId=$surveyId";
$query = "update tiki_survey_questions set average=0,value=0,votes=0 where surveyId=$surveyId";
$result = $this->query($query);
}
......@@ -265,4 +265,4 @@ class SurveyLib extends TikiLib {
} # class SurveyLib
$srvlib= new SurveyLib($dbTiki);
?>
\ No newline at end of file
?>
......@@ -336,6 +336,19 @@ class TikiLib {
return $ret;
}
/*shared*/ function get_actual_content($contentId)
{
$data ='';
$now = date("U");
$query = "select max(publishDate) from tiki_programmed_content where contentId=$contentId and publishDate<=$now";
$res = $this->getOne($query);
if(!$res) return '';
$query = "select data from tiki_programmed_content where contentId=$contentId and publishDate=$res";
$data = $this->getOne($query);
return $data;
}
/*shared*/ function get_quiz($quizId)
{
......@@ -554,6 +567,33 @@ class TikiLib {
return $res;
}
/*shared*/ function get_random_image($galleryId = -1)
{
$whgal = "";
if (((int)$galleryId) != -1) { $whgal = " where galleryId = " . $galleryId; }
$query = "select count(*) from tiki_images" . $whgal;
$cant = $this->getOne($query);
$pick = rand(0,$cant-1);
$ret = Array();
$query = "select imageId,galleryId,name from tiki_images" . $whgal . " limit $pick,1";
$result=$this->query($query);
$res = $result->fetchRow(DB_FETCHMODE_ASSOC);
$ret["galleryId"] = $res["galleryId"];
$ret["imageId"] = $res["imageId"];
$ret["name"] = $res["name"];
$query = "select name from tiki_galleries where galleryId = " . $res["galleryId"];
$ret["gallery"] = $this->getOne($query);
return($ret);
}
/*shared*/ function get_gallery($id)
{
$query = "select * from tiki_galleries where galleryId='$id'";
$result = $this->query($query);
$res = $result->fetchRow(DB_FETCHMODE_ASSOC);
return $res;
}
// Last visit module ////
/*shared*/ function get_news_from_last_visit($user)
{
......@@ -1312,7 +1352,7 @@ class TikiLib {
// $cant=$this->getOne("select count(*) from tiki_semaphores where semName='$semName'");
$query = "delete from tiki_semaphores where semName='$semName'";
$this->query($query);
$query = "insert into tiki_semaphores(semName,timestamp,user) values('$semName',$now,'$user')";
$query = "replace into tiki_semaphores(semName,timestamp,user) values('$semName',$now,'$user')";
$result = $this->query($query);
return $now;
}
......@@ -1893,6 +1933,9 @@ class TikiLib {
$groups = addslashes($groups);
$query = "delete from tiki_modules where name='$name'";
$result = $this->query($query);
//check for valid values
$cache_time=is_int($cache_time) ? $cache_time : 0 ;
$rows=is_int($rows) ? $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;
......@@ -2833,12 +2876,12 @@ class TikiLib {