anmerkung: contenido-cvs-2005-11-25.tar

Gesperrt
HerrB
Beiträge: 6935
Registriert: Do 22. Mai 2003, 12:44
Wohnort: Berlin
Kontaktdaten:

anmerkung: contenido-cvs-2005-11-25.tar

Beitrag von HerrB »

So, mein erster Patch. Das war ein Aufwand, Jesus...

Ich hoffe, das nützt jetzt mehr, als es Arbeit ist. Patch ist gegen angegebene CVS-Version.

Fixt bekannte Probleme bei Newsletter (Übertragungsfehler V4.6.0 ... 2) und Frontend-Usern (Rechte).

Code: Alles auswählen

Index: contenido/classes/class.newsletter.php
===================================================================
RCS file: /Development/CVSRepository/contenido_sources/contenido/classes/class.newsletter.php,v
retrieving revision 1.1
diff -u -r1.1 class.newsletter.php
--- contenido/classes/class.newsletter.php	1 Dec 2005 22:18:16 -0000	1.1
+++ contenido/classes/class.newsletter.php	1 Dec 2005 22:41:54 -0000
@@ -4,11 +4,11 @@
 * File      :   $RCSfile: class.newsletter.php,v $
 * Project   :   Contenido
 * Descr     :   Newsletter recipient class
-* Modified  :   $Date: 2005/12/01 22:18:16 $
+* Modified  :   $Date: 2005/11/02 10:53:52 $
 *
 * © four for business AG, www.4fb.de, generated by HerrB (01.08.2004)
 *
-* $Id: class.newsletter.php,v 1.1 2005/12/01 22:18:16 bbehrens Exp $
+* $Id: class.newsletter.php,v 1.6 2005/11/02 10:53:52 timo.hummel Exp $
 ******************************************/
 
 cInclude("classes", "class.properties.php");
@@ -313,14 +313,13 @@
 							{
 								$result[] = $name." (".$to."): ".sprintf(i18n("Newsletter to %s could not be sent (recipient has an incompatible or empty key)."), $to);
 							}
-							$counter ++;
 						}
-						
+						$counter ++;
 					}
 				}
 			}
-			return $result;
 		}
+		return $result;
 	}
 }
 
Index: contenido/includes/include.frontend.group_edit.php
===================================================================
RCS file: /Development/CVSRepository/contenido_sources/contenido/includes/include.frontend.group_edit.php,v
retrieving revision 1.1
diff -u -r1.1 include.frontend.group_edit.php
--- contenido/includes/include.frontend.group_edit.php	1 Dec 2005 22:17:48 -0000	1.1
+++ contenido/includes/include.frontend.group_edit.php	1 Dec 2005 22:41:59 -0000
@@ -1,13 +1,13 @@
 <?php
 /*****************************************
-* File      :   $RCSfile: include.frontend.group_edit.php,v $
+* File      :   $RCSfile: include.frontend.user_edit.php,v $
 * Project   :   Contenido
 * Descr     :   Frontend group editor
-* Modified  :   $Date: 2005/12/01 22:17:48 $
+* Modified  :   $Date: 2004/01/14 17:30:48 $
 *
 * © four for business AG, www.4fb.de
 *
-* $Id: include.frontend.group_edit.php,v 1.1 2005/12/01 22:17:48 bbehrens Exp $
+* $Id: include.frontend.user_edit.php,v 1.2 2004/01/14 17:30:48 timo.hummel Exp $
 ******************************************/
 cInclude("classes", "widgets/class.widgets.page.php");
 cInclude("classes", "class.ui.php");
@@ -20,30 +20,29 @@
 $groupmembers = new FrontendGroupMemberCollection;
 $fegroup->loadByPrimaryKey($idfrontendgroup);
 
-if ($action == "frontendgroup_create" && $perm->have_perm_area_action("frontend", "frontendgroup_create"))
-{
-		$fegroup = $fegroups->create(" ".i18n("-- new group --"));
-		$idfrontendgroup = $fegroup->get("idfrontendgroup");
-		
-}
-
-if ($action == "frontendgroups_user_delete")
-{
-	$groupmembers->remove($idfrontendgroup, $idfrontenduser);
-}
-
-if ($action == "frontendgroup_delete" && $perm->have_perm_area_action("frontend", "frontendgroup_delete"))
-{
-	$fegroups->delete($idfrontendgroup);
-	$idfrontendgroup= 0;
-	$fegroup = new FrontendGroup;	
-}
-
-$page = new cPage;
-
-if ($fegroup->virgin == false && $fegroup->get("idclient") == $client)
-{
-	if ($action == "frontendgroup_save_group")
+if ($action == "frontendgroup_create" && $perm->have_perm_area_action($area, $action)) 
+{ 
+	$fegroup = $fegroups->create(" ".i18n("-- new group --")); 
+	$idfrontendgroup = $fegroup->get("idfrontendgroup");   
+} 
+
+if ($action == "frontendgroups_user_delete" && $perm->have_perm_area_action($area, $action)) 
+{ 
+	$groupmembers->remove($idfrontendgroup, $idfrontenduser); 
+} 
+
+if ($action == "frontendgroup_delete" && $perm->have_perm_area_action($area, $action)) 
+{ 
+	$fegroups->delete($idfrontendgroup); 
+	$idfrontendgroup= 0; 
+	$fegroup = new FrontendGroup;    
+} 
+
+$page = new cPage; 
+
+if ($fegroup->virgin == false && $fegroup->get("idclient") == $client) 
+{ 
+	if ($action == "frontendgroup_save_group" && $perm->have_perm_area_action($area, $action))
 	{
 		$messages = array();
 		
Index: contenido/includes/include.newsletter_edit.php
===================================================================
RCS file: /Development/CVSRepository/contenido_sources/contenido/includes/include.newsletter_edit.php,v
retrieving revision 1.1
diff -u -r1.1 include.newsletter_edit.php
--- contenido/includes/include.newsletter_edit.php	1 Dec 2005 22:17:44 -0000	1.1
+++ contenido/includes/include.newsletter_edit.php	1 Dec 2005 22:41:59 -0000
@@ -3,11 +3,11 @@
 * File      :   $RCSfile: include.newsletter_edit.php,v $
 * Project   :   Contenido
 * Descr     :   Frontend user editor
-* Modified  :   $Date: 2005/12/01 22:17:44 $
+* Modified  :   $Date: 2005/10/31 13:10:27 $
 *
 * © four for business AG, www.4fb.de, updated by HerrB
 *
-* $Id: include.newsletter_edit.php,v 1.1 2005/12/01 22:17:44 bbehrens Exp $
+* $Id: include.newsletter_edit.php,v 1.11 2005/10/31 13:10:27 timo.hummel Exp $
 ******************************************/
 cInclude("classes", "widgets/class.widgets.page.php");
 cInclude("classes", "class.ui.php");
@@ -46,11 +46,11 @@
 		$page->setReload();
 		$messages = array();
 
-	/* Changing e.g. \' back to ' (magic_quotes) */
-      $name     = stripslashes($name);
-      $newsfrom = stripslashes($newsfrom);
-      $subject  = stripslashes($subject);
-      $message  = stripslashes($message);
+		/* Changing e.g. \' back to ' (magic_quotes) */
+		$name     = stripslashes($name);
+		$newsfrom = stripslashes($newsfrom);
+		$subject  = stripslashes($subject);
+		$message  = stripslashes($message);
       		
 		if ($newsletter->get("name") != $name) {
 				$newsletters->resetQuery();
@@ -59,7 +59,6 @@
 				$newsletters->setWhere("idlang", $lang);
 				$newsletters->query();
 				
-    			$newsletters->select("name='$name' and idclient='$client' AND idlang='$lang'");
     			if ($newsletters->next()) {
     				$messages[] = i18n("Could not set new newsletter name: name already exists");	
     			} else {
@@ -164,7 +163,6 @@
 		$form->add(i18n("Last modified by"), $classuser->getUserName($newsletter->get("modifiedby")). " (". $newsletter->get("modified").")" );	
 	}
 	$page->setContent($notis . $form->render(true));
-	// $page->setReload();
 } else {
 	$page->setContent($notis . "");
 }
Index: contenido/includes/include.newsletter_send.php
===================================================================
RCS file: /Development/CVSRepository/contenido_sources/contenido/includes/include.newsletter_send.php,v
retrieving revision 1.1
diff -u -r1.1 include.newsletter_send.php
--- contenido/includes/include.newsletter_send.php	1 Dec 2005 22:17:43 -0000	1.1
+++ contenido/includes/include.newsletter_send.php	1 Dec 2005 22:41:59 -0000
@@ -3,11 +3,11 @@
 * File      :   $RCSfile: include.newsletter_send.php,v $
 * Project   :   Contenido
 * Descr     :   Newsletter Send Function
-* Modified  :   $Date: 2005/12/01 22:17:43 $
+* Modified  :   $Date: 2005/10/08 00:20:58 $
 *
 * © four for business AG, www.4fb.de, updated by HerrB
 *
-* $Id: include.newsletter_send.php,v 1.1 2005/12/01 22:17:43 bbehrens Exp $
+* $Id: include.newsletter_send.php,v 1.11 2005/10/08 00:20:58 wirths Exp $
 ******************************************/
 cInclude("classes", "widgets/class.widgets.page.php");
 cInclude("classes", "class.ui.php");
@@ -73,7 +73,7 @@
 		$iDispatchCount = 0;
 		$iDispatchDelay = 0;
 	}
-	// echo $sSelGroups;
+	
 	$aResult = $oNewsletter->send($iIDCatArt, $sSendOption, $aSelGroups, $iDispatchCount, $_REQUEST["chunk"]);
 	if ($iDispatchCount > 0 && $aResult[0] != 0) {
 
@@ -89,8 +89,7 @@
 			$oForm = new UI_Table_Form("properties");
 			$oForm->addHeader(i18n("Newsletter has been sent ...")." (".i18n("Chunk")." ".($_REQUEST["chunk"] + 1)."/".ceil($aResult[0]/$iDispatchCount).")");
 
-			//$oPage->addScript("Refresh", '<meta http-equiv="refresh" content="'.$iDispatchDelay.'; URL='.$sPathNext.'">');
-			//$oForm->setActionButton("submit", $cfg['path']['contenido_fullhtml']."images/but_ok.gif", i18n("Save changes"), "s");
+			$oPage->addScript("Refresh", '<meta http-equiv="refresh" content="'.$iDispatchDelay.'; URL='.$sPathNext.'">');
 			$oForm->unsetActionButton("submit");
 			$oForm->setActionButton("cancel", $cfg['path']['contenido_fullhtml']."images/but_cancel.gif", i18n("Stop sending"), "c");
 		}
@@ -107,6 +106,11 @@
 			}
 		}
 	}
+	
+	if ($bLogToFile) { 
+		$oForm->add("", '<a href="'.$cfgClient[$client]["path"]["htmlpath"]."logs/errorlog.txt".'" target="blank">'.i18n("Click here to open the logfile").'</a>'); 
+	}
+
 	$oPage->setContent($notis . $oForm->render(true));
 } else {
 	$oPage->setContent("");
Index: contenido/includes/include.recipients.group_edit.php
===================================================================
RCS file: /Development/CVSRepository/contenido_sources/contenido/includes/include.recipients.group_edit.php,v
retrieving revision 1.1
diff -u -r1.1 include.recipients.group_edit.php
--- contenido/includes/include.recipients.group_edit.php	1 Dec 2005 22:17:51 -0000	1.1
+++ contenido/includes/include.recipients.group_edit.php	1 Dec 2005 22:41:59 -0000
@@ -3,11 +3,11 @@
 * File      :   $RCSfile: include.recipients.group_edit.php,v $
 * Project   :   Contenido
 * Descr     :   Recipient group editor
-* Modified  :   $Date: 2005/12/01 22:17:51 $
+* Modified  :   $Date: 2005/10/31 13:10:27 $
 *
 * © four for business AG, www.4fb.de, generated by HerrB (01.08.2004)
 *
-* $Id: include.recipients.group_edit.php,v 1.1 2005/12/01 22:17:51 bbehrens Exp $
+* $Id: include.recipients.group_edit.php,v 1.4 2005/10/31 13:10:27 timo.hummel Exp $
 ******************************************/
 cInclude("classes", "widgets/class.widgets.page.php");
 cInclude("classes", "class.ui.php");
@@ -24,17 +24,17 @@
 
 $rgroup->loadByPrimaryKey($idrecipientgroup);
 
-if ($action == "recipientgroup_create" && $perm->have_perm_area_action("recipients", "recipientgroup_create")) {
-	$rgroup = $rgroups->create(" ".i18n("-- new group --"));
-	$idrecipientgroup = $rgroup->get("idnewsgroup");
-	$page->setReload();	
-} elseif ($action == "recipientgroup_recipient_delete" && $perm->have_perm_area_action("recipients", "recipientgroup_recipient_delete")) {
-	$groupmembers->remove($idrecipientgroup, $idrecipient);
-} elseif ($action == "recipientgroup_delete" && $perm->have_perm_area_action("recipients", "recipientgroup_delete")) {
-	$rgroups->delete($idrecipientgroup);
-	$idrecipientgroup= 0;
-	$rgroup = new RecipientGroup;
-	$page->setReload();
+if ($action == "recipientgroup_create" && $perm->have_perm_area_action($area, $action)) { 
+	$rgroup = $rgroups->create(" ".i18n("-- new group --")); 
+	$idrecipientgroup = $rgroup->get("idnewsgroup"); 
+	$page->setReload();    
+} elseif ($action == "recipientgroup_recipient_delete" && $perm->have_perm_area_action($area, $action)) { 
+	$groupmembers->remove($idrecipientgroup, $idrecipient); 
+} elseif ($action == "recipientgroup_delete" && $perm->have_perm_area_action($area, $action)) { 
+	$rgroups->delete($idrecipientgroup); 
+	$idrecipientgroup= 0; 
+	$rgroup = new RecipientGroup; 
+	$page->setReload(); 
 }
 
 if ($rgroup->virgin == false && $rgroup->get("idclient") == $client && $rgroup->get("idlang") == $lang) {
Index: contenido/includes/include.recipients_edit.php
===================================================================
RCS file: /Development/CVSRepository/contenido_sources/contenido/includes/include.recipients_edit.php,v
retrieving revision 1.1
diff -u -r1.1 include.recipients_edit.php
--- contenido/includes/include.recipients_edit.php	1 Dec 2005 22:17:50 -0000	1.1
+++ contenido/includes/include.recipients_edit.php	1 Dec 2005 22:41:59 -0000
@@ -3,11 +3,11 @@
 * File      :   $RCSfile: include.recipients_edit.php,v $
 * Project   :   Contenido
 * Descr     :   Frontend user editor
-* Modified  :   $Date: 2005/12/01 22:17:50 $
+* Modified  :   $Date: 2005/10/31 13:10:27 $
 *
 * © four for business AG, www.4fb.de, updated by HerrB
 *
-* $Id: include.recipients_edit.php,v 1.1 2005/12/01 22:17:50 bbehrens Exp $
+* $Id: include.recipients_edit.php,v 1.12 2005/10/31 13:10:27 timo.hummel Exp $
 ******************************************/
 cInclude("classes", "widgets/class.widgets.page.php");
 cInclude("classes", "class.ui.php");
@@ -154,7 +154,6 @@
 		$form->add(i18n("Last modified by"), $classuser->getUserName($recipient->get("modifiedby")). " (". $recipient->get("lastmodified").")" );
 	}
 	$page->setContent($notis . $form->render(true));
-	$page->setReload();
 } else {
 	$page->setContent($notis . "");	
 }
Index: contenido/includes/include.recipients_menu.php
===================================================================
RCS file: /Development/CVSRepository/contenido_sources/contenido/includes/include.recipients_menu.php,v
retrieving revision 1.1
diff -u -r1.1 include.recipients_menu.php
--- contenido/includes/include.recipients_menu.php	1 Dec 2005 22:17:50 -0000	1.1
+++ contenido/includes/include.recipients_menu.php	1 Dec 2005 22:41:59 -0000
@@ -3,11 +3,11 @@
 * File      :   $RCSfile: include.recipients_menu.php,v $
 * Project   :   Contenido
 * Descr     :   Recipient user list
-* Modified  :   $Date: 2005/12/01 22:17:50 $
+* Modified  :   $Date: 2005/10/31 13:10:27 $
 *
 * © four for business AG, www.4fb.de, updated by HerrB (25.06.2005)
 *
-* $Id: include.recipients_menu.php,v 1.1 2005/12/01 22:17:50 bbehrens Exp $
+* $Id: include.recipients_menu.php,v 1.15 2005/10/31 13:10:27 timo.hummel Exp $
 ******************************************/
 cInclude("classes", "widgets/class.widgets.page.php");
 cInclude("classes", "widgets/class.widgets.foldingrow.php");
@@ -68,7 +68,6 @@
 
 $properties = new PropertyCollection;
 $iTimeframe = $properties->getValue("clientsetting", $client, "newsletter", "purgetimeframe");
-// $iTimeframe = getSystemProperty("newsletter","purgetimeframe");
 if (!$iTimeframe || !is_numeric($iTimeframe)) {
 	$iTimeframe = 30;
 }
@@ -76,7 +75,6 @@
 if (isset($_REQUEST["purgetimeframe"]) && is_numeric($_REQUEST["purgetimeframe"]) && $_REQUEST["purgetimeframe"] > 0 && $_REQUEST["purgetimeframe"] != $iTimeframe) {
 	$iTimeframe = $_REQUEST["purgetimeframe"];
 	$properties->setValue("clientsetting", $client, "newsletter", "purgetimeframe", $iTimeframe);
-	// setSystemProperty("newsletter","purgetimeframe", $iTimeframe);
 }
 
 $purgeTitle = i18n("Purge recipients");
@@ -171,7 +169,7 @@
 $oSubmit = new cHTMLButton("submit", i18n("Apply"));
 
 $sContent  = '<div style="border-bottom: 1px solid black; background: '.$cfg['color']['table_dark'].';">'.chr(10);
-$sContent .= '<form onsubmit="append_registered_parameters(this);" id="filter" name="filter" method="get" action="main.php?1">'.chr(10);
+$sContent .= '<form onsubmit="append_registered_parameters(this);" id="filterform" name="filterform" method="get" action="main.php?1">'.chr(10);
 $sContent .= '   <input type="hidden" name="area" value="'.$area.'">'.chr(10);
 $sContent .= '   <input type="hidden" name="frame" value="'.$frame.'">'.chr(10);
 $sContent .= '   <input type="hidden" name="contenido" value="'.$sess->id.'">'.chr(10);
@@ -343,8 +341,7 @@
 
         /* Function for deleting recipients */
         function deleteRecipient(idrecipient) {
-            //oForm = document.getElementById("filter");
-            oForm = document.forms("filter");
+            oForm = document.getElementById("filterform");
 
             url  = "main.php?area=recipients";
             url += "&action=recipients_delete";
@@ -367,8 +364,7 @@
 
         /* Function for purging recipients */
         function purgeRecipients() {
-            //oForm = document.getElementById("filter");
-            oForm = document.forms("filter");
+            oForm = document.getElementById("filterform");
 
             url  = "main.php?area=recipients";
             url += "&action=recipients_purge";
Gruß
HerrB
Bitte keine unaufgeforderten PMs oder E-Mails -> use da Forum!

Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net
emergence
Beiträge: 10653
Registriert: Mo 28. Jul 2003, 12:49
Wohnort: Austria
Kontaktdaten:

Re: anmerkung: contenido-cvs-2005-11-25.tar

Beitrag von emergence »

HerrB hat geschrieben:Ich hoffe, das nützt jetzt mehr, als es Arbeit ist.
da bin ich auch neugierig ob das mehr nützt...
*** make your own tools (wishlist :: thx)
timo
Beiträge: 6284
Registriert: Do 15. Mai 2003, 18:32
Wohnort: Da findet ihr mich nie!
Kontaktdaten:

Beitrag von timo »

wenns nicht funktionieren würde, würde man diff/patch im OpenSource-Bereich nicht einsetzen ;)

Und einen Patch finde ich wesentlich eleganter als das manuelle Editieren - passieren einfach weniger Fehler.

Und wenn wir (irgendwann einmal) ein Readonly-CVS haben, ist das wirklich nur ein Klacks - Auschecken, munter ändern, patch erzeugen, fertig.

Snapshot wurde erzeugt ;)
jost
Beiträge: 322
Registriert: Mo 10. Jan 2005, 20:12
Kontaktdaten:

Beitrag von jost »

Glückwunsch zum ersten Patch. Hoffentlich kein Patchwork ;-)
HerrB
Beiträge: 6935
Registriert: Do 22. Mai 2003, 12:44
Wohnort: Berlin
Kontaktdaten:

Beitrag von HerrB »

Geschlossen.

Gruß
HerrB
Bitte keine unaufgeforderten PMs oder E-Mails -> use da Forum!

Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net
Gesperrt