[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] email/inc new_nav.js, 1.2 selectboxes.js, 1.3 hook_se
From: |
skwashd |
Subject: |
[Phpgroupware-cvs] email/inc new_nav.js, 1.2 selectboxes.js, 1.3 hook_settings.inc.php, 1.5 hook_preferences.inc.php, 1.16 class.bomessage.inc.php, 1.16 class.bopreferences.inc.php, 1.25 class.bosend.inc.php, 1.13 class.bojsaddressbook.inc.php, 1.3 class.boindex.inc.php, 1.32 class.bofilters.inc.php, 1.16 class.bofolder.inc.php, 1.10 class.html_widgets.inc.php, 1.5 class.mail_dcom.inc.php, 1.12 class.mail_dcom_nntp.inc.php, 1.6 class.mail_dcom_nntp_sock.inc.php, 1.6 class.mail_dcom_imap_sock.inc.php, 1.17 class.mail_dcom_imap.inc.php, 1.23 class.mail_dcom_base.inc.php, 1.11 class.mail_dcom_base_sock.inc.php, 1.26 class.bocompose.inc.php, 1.10 class.boattach_file.inc.php, 1.6 class.boaction.inc.php, 1.19 class.mail_dcom_pop3.inc.php, 1.13 class.mail_dcom_pop3_sock.inc.php, 1.21 class.uijsaddressbook.inc.php, 1.5 class.uimessage.inc.php, 1.13 class.uiindex.inc.php, 1.24 class.uifolder.inc.php, 1.7 class.uicompose.inc.php, 1.7 class.uifilters.inc.php, 1.16 class.uipreferences.inc.php, 1.19 class.uisearch.inc.php, 1.3 ho ok_notifywindow.inc.php, 1.13 hook_notifywindow_simple.inc.php, 1.11 hook_manual.inc.php, 1.10 hook_home.inc.php, 1.58 functions.inc.php, 1.119 hook_admin.inc.php, 1.9 class.uiattach_file.inc.php, 1.4 class.ui_mail_debug.inc.php, 1.4 class.mail_msg_wrappers.inc.php, 1.40 class.mail_send.inc.php, 1.13 class.mail_msg_display.inc.php, 1.43 class.mail_msg_base.inc.php, 1.81 class.mail_filters.inc.php, 1.9 class.mail_msg.inc.php, 1.6 class.msg_bootstrap.inc.php, 1.4 class.so_mail_msg.inc.php, 1.3 class.svc_debug.inc.php, 1.3 class.svc_nextmatches.inc.php, 1.4 class.spell_svc_php.inc.php, 1.4 class.spell_svc_none.inc.php, 1.4 class.spell.inc.php, 1.4 class.spell_struct.inc.php, 1.4 |
Date: |
Mon, 14 Mar 2005 00:22:00 +0100 |
Update of email/inc
Modified Files:
Branch: MAIN
new_nav.js lines: +0 -940
selectboxes.js lines: +0 -1024
hook_settings.inc.php lines: +4 -4
hook_preferences.inc.php lines: +0 -0
class.bomessage.inc.php lines: +74 -47
class.bopreferences.inc.php lines: +134 -107
class.bosend.inc.php lines: +391 -831
class.bojsaddressbook.inc.php lines: +14 -14
class.boindex.inc.php lines: +30 -19
class.bofilters.inc.php lines: +155 -155
class.bofolder.inc.php lines: +18 -18
class.html_widgets.inc.php lines: +12 -12
class.mail_dcom.inc.php lines: +14 -14
class.mail_dcom_nntp.inc.php lines: +2 -2
class.mail_dcom_nntp_sock.inc.php lines: +2 -2
class.mail_dcom_imap_sock.inc.php lines: +103 -103
class.mail_dcom_imap.inc.php lines: +20 -3
class.mail_dcom_base.inc.php lines: +18 -18
class.mail_dcom_base_sock.inc.php lines: +8 -8
class.bocompose.inc.php lines: +120 -216
class.boattach_file.inc.php lines: +65 -133
class.boaction.inc.php lines: +104 -229
class.mail_dcom_pop3.inc.php lines: +0 -0
class.mail_dcom_pop3_sock.inc.php lines: +180 -180
class.uijsaddressbook.inc.php lines: +3 -3
class.uimessage.inc.php lines: +79 -60
class.uiindex.inc.php lines: +86 -64
class.uifolder.inc.php lines: +20 -20
class.uicompose.inc.php lines: +22 -22
class.uifilters.inc.php lines: +141 -141
class.uipreferences.inc.php lines: +109 -109
class.uisearch.inc.php lines: +2 -2
hook_notifywindow.inc.php lines: +6 -6
hook_notifywindow_simple.inc.php lines: +2 -2
hook_manual.inc.php lines: +0 -0
hook_home.inc.php lines: +4 -4
functions.inc.php lines: +2 -2
hook_admin.inc.php lines: +0 -0
class.uiattach_file.inc.php lines: +3 -3
class.ui_mail_debug.inc.php lines: +139 -140
class.mail_msg_wrappers.inc.php lines: +463 -434
class.mail_send.inc.php lines: +0 -0
class.mail_msg_display.inc.php lines: +81 -81
class.mail_msg_base.inc.php lines: +397 -397
class.mail_filters.inc.php lines: +18 -18
class.mail_msg.inc.php lines: +0 -0
class.msg_bootstrap.inc.php lines: +16 -16
class.so_mail_msg.inc.php lines: +75 -75
class.svc_debug.inc.php lines: +4 -4
class.svc_nextmatches.inc.php lines: +19 -19
class.spell_svc_php.inc.php lines: +0 -0
class.spell_svc_none.inc.php lines: +0 -0
class.spell.inc.php lines: +45 -45
class.spell_struct.inc.php lines: +0 -0
Log Message:
should have done this a while ago - SaD code
====================================================
Index: email/inc/new_nav.js
diff -u email/inc/new_nav.js:1.1 email/inc/new_nav.js:1.2
--- email/inc/new_nav.js:1.1 Thu Mar 13 20:03:17 2003
+++ email/inc/new_nav.js Sun Mar 13 23:22:44 2005
@@ -1,940 +0,0 @@
-<script type="text/javascript" language="javascript"
src="phpgwapi/templates/justweb/navcond.js"></script>
-
-<script type="text/javascript" language="javascript">
-/******************************************
-* navcond.js - Condensed version of *
-* dhtmllib.js and navbar.js. *
-* Copyright 2000 by Mike Hall. *
-* Web address: http://www.brainjar.com *
-* Last update: July 17, 2000. *
-******************************************/
- var isMinNS4 = (navigator.appName.indexOf("Netscape")>=0 &&
parseFloat(navigator.appVersion)>=4)?1:0;
- var isMinIE4 = (document.all)?1:0;
- var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.")>=0)?1:0;
-
- function hideLayer(layer) {
- if (isMinNS4) layer.visibility = "hide";
- if (isMinIE4) layer.style.visibility = "hidden";
- }
- function showLayer(layer) {
- if (isMinNS4) layer.visibility = "show";
- if (isMinIE4) layer.style.visibility = "visible";
- }
- function inheritLayer(layer) {
- if (isMinNS4) layer.visibility = "inherit";
- if (isMinIE4) layer.style.visibility = "inherit";
- }
- function getVisibility(layer) {
- if (isMinNS4) {
- if (layer.visibility=="show") return "visible";
- if (layer.visibility=="hide") return "hidden";
- return layer.visibility;
- }
- if (isMinIE4) return layer.style.visibility;
- return "";
- }
- function moveLayerTo(layer,x,y) {
- if (isMinNS4) layer.moveTo(x,y);
- if (isMinIE4) {
- layer.style.left = x;
- layer.style.top = y;
- }
- }
- function moveLayerBy(layer,dx,dy) {
- if (isMinNS4) {
- layer.moveBy(dx,dy);
- }
- if (isMinIE4) {
- layer.style.pixelLeft += dx;
- layer.style.pixelTop += dy;
- }
- }
- function getLeft(layer) {
- if (isMinNS4) return layer.left;
- if (isMinIE4) return layer.style.pixelLeft;
- return -1;
- }
- function getTop(layer) {
- if (isMinNS4) return layer.top;
- if (isMinIE4) return layer.style.pixelTop;
- return -1;
- }
- function getRight(layer) {
- if (isMinNS4) return layer.left + getWidth(layer);
- if (isMinIE4) return layer.style.pixelLeft + getWidth(layer);
- return -1;
- }
- function getBottom(layer) {
- if (isMinNS4) return layer.top + getHeight(layer);
- if (isMinIE4) return layer.style.pixelTop + getHeight(layer);
- return -1;
- }
- function getPageLeft(layer) {
- var x;
- if (isMinNS4) return layer.pageX;
- if (isMinIE4) {
- x = 0;
- while(layer.offsetParent != null) {
- x += layer.offsetLeft;
- layer = layer.offsetParent;
- }
- x += layer.offsetLeft;
- return x;
- }
- return -1;
- }
- function getPageTop(layer) {
- var y;
- if (isMinNS4) return layer.pageY;
- if (isMinIE4) {
- y = 0;
- while (layer.offsetParent!=null) {
- y += layer.offsetTop;
- layer = layer.offsetParent;
- }
- y += layer.offsetTop;
- return y;
- }
- return -1;
- }
- function getWidth(layer) {
- if (isMinNS4) {
- if (layer.document.width) return layer.document.width;
- else return layer.clip.right-layer.clip.left;
- }
- if (isMinIE4) {
- if (layer.style.pixelWidth) return
layer.style.pixelWidth;
- else return layer.clientWidth;
- }
- return -1;
- }
- function getHeight(layer) {
- if (isMinNS4) {
- if (layer.document.height) return layer.document.height;
- else return layer.clip.bottom-layer.clip.top;
- }
- if (isMinIE4) {
- if (layer.style.pixelHeight) return
layer.style.pixelHeight;
- else return layer.clientHeight;
- }
- return -1;
- }
- function getzIndex(layer) {
- if (isMinNS4) return layer.zIndex;
- if (isMinIE4) return layer.style.zIndex;
- return -1;
- }
- function setzIndex(layer,z) {
- if (isMinNS4) layer.zIndex = z;
- if (isMinIE4) layer.style.zIndex = z;
- }
- function clipLayer(layer, clipleft, cliptop, clipright, clipbottom) {
- if (isMinNS4) {
- layer.clip.left = clipleft;
- layer.clip.top = cliptop;
- layer.clip.right = clipright;
- layer.clip.bottom = clipbottom;
- }
- if (isMinIE4) layer.style.clip = 'rect('+cliptop+'
'+clipright+' '+clipbottom+' '+clipleft+')';
- }
- function getClipLeft(layer) {
- if (isMinNS4) return layer.clip.left;
- if (isMinIE4) {
- var str = layer.style.clip;
- if (!str) return 0;
- var clip = getIEClipValues(layer.style.clip);
- return(clip[3]);
- }
- return -1;
- }
- function getClipTop(layer) {
- if (isMinNS4) return layer.clip.top;
- if (isMinIE4) {
- var str = layer.style.clip;
- if (!str) return 0;
- var clip = getIEClipValues(layer.style.clip);
- return clip[0];
- }
- return-1;
- }
- function getClipRight(layer) {
- if (isMinNS4) {
- return layer.clip.right;
- }
- if (isMinIE4) {
- var str = layer.style.clip;
- if (!str) return layer.style.pixelWidth;
- var clip = getIEClipValues(layer.style.clip);
- return clip[1];
- }
- return -1;
- }
- function getClipBottom(layer) {
- if (isMinNS4) return layer.clip.bottom;
- if (isMinIE4) {
- var str = layer.style.clip;
- if (!str) return layer.style.pixelHeight;
- var clip = getIEClipValues(layer.style.clip);
- return clip[2];
- }
- return -1;
- }
- function getClipWidth(layer)
- if (isMinNS4) return layer.clip.width;
- if (isMinIE4) {
- var str = layer.style.clip;
- if (!str) return layer.style.pixelWidth;
- var clip = getIEClipValues(layer.style.clip);
- return clip[1]-clip[3];
- }
- return -1;
- }
- function getClipHeight(layer) {
- if (isMinNS4) return layer.clip.height;
- if (isMinIE4) {
- var str = layer.style.clip;
- if (!str) return layer.style.pixelHeight;
- var clip = getIEClipValues(layer.style.clip);
- return clip[2]-clip[0];
- }
- return-1;
- }
- function getIEClipValues(str) {
- var clip = new Array();
- var i;
- i = str.indexOf("(");
- clip[0] = parseInt(str.substring(i+1,str.length),10);
- i = str.indexOf(" ",i+1);
- clip[1] = parseInt(str.substring(i+1,str.length),10);
- i = str.indexOf(" ",i+1);
- clip[2] = parseInt(str.substring(i+1,str.length),10);
- i = str.indexOf(" ",i+1);
- clip[3] = parseInt(str.substring(i+1,str.length),10);
- return clip;
- }
- function scrollLayerTo(layer,x,y,bound) {
- var dx = getClipLeft(layer)-x;
- var dy = getClipTop(layer)-y;
- scrollLayerBy(layer, -dx, -dy, bound);
- }
- function scrollLayerBy(layer,dx,dy,bound) {
- var cl = getClipLeft(layer);
- var ct = getClipTop(layer);
- var cr = getClipRight(layer);
- var cb = getClipBottom(layer);
- if (bound) {
- if (cl+dx<0) dx = -cl;
- else if (cr+dx>getWidth(layer)) dx = getWidth(layer)-cr;
- if (ct+dy<0) dy=-ct;
- else if (cb+dy>getHeight(layer)) dy =
getHeight(layer)-cb;
- }
- clipLayer(layer, cl+dx, ct+dy, cr+dx, cb+dy);
- moveLayerBy(layer, -dx, -dy);
- }
- function setBgColor(layer,color) {
- if (isMinNS4) layer.bgColor = color;
- if (isMinIE4) layer.style.backgroundColor = color;
- }
- function setBgImage(layer,src) {
- if (isMinNS4) layer.background.src = src;
- if (isMinIE4) layer.style.backgroundImage = "url("+src+")";
- }
- function getLayer(name) {
- if (isMinNS4) return findLayer(name,document);
- if (isMinIE4) return eval('document.all.'+name);
- return null;
- }
- function findLayer(name,doc) {
- var i,layer;
- for(i=0;i<doc.layers.length;i++) {
- layer = doc.layers[i];
- if (layer.name == name) {
- return layer;
- }
- if (layer.document.layers.length>0) {
- if ((layer = findLayer(name,layer.document)) !=
null) {
- return layer;
- }
- }
- }
- return null;
- }
- function getImage(name) {
- if (isMinNS4) {
- return findImage(name,document);
- }
- if (isMinIE4) {
- return eval('document.all.'+name);
- }
- return null;
- }
- function findImage(name,doc) {
- var i,img;
- for(i=0;i<doc.images.length;i++) {
- if (doc.images[i].name == name) return doc.images[i];
- }
- for(i=0;i<doc.layers.length;i++) {
- if ((img = findImage(name,doc.layers[i].document)) !=
null) {
- img.container = doc.layers[i];
- return img;
- }
- }
- return null;
- }
- function getImagePageLeft(img) {
- var x,obj;
- if (isMinNS4) {
- if (img.container != null) return img.container.pageX +
img.x;
- else return img.x;
- }
- if (isMinIE4) {
- x = 0;
- obj = img;
- while(obj.offsetParent!=null) {
- x += obj.offsetLeft;
- obj = obj.offsetParent;
- }
- x += obj.offsetLeft;
- return x;
- }
- return -1;
- }
- function getImagePageTop(img) {
- var y,obj;
- if (isMinNS4) {
- if (img.container != null) return
img.container.pageY+img.y;
- else return img.y;
- }
- if (isMinIE4) {
- y = 0;
- obj = img;
- while(obj.offsetParent != null) {
- y += obj.offsetTop;
- obj = obj.offsetParent;
- }
- y += obj.offsetTop;
- return y;
- }
- return -1;
- }
- function getWindowWidth() {
- if (isMinNS4) return window.innerWidth;
- if (isMinIE4) return document.body.clientWidth;
- return -1;
- }
- function getWindowHeight() {
- if (isMinNS4) return window.innerHeight;
- if (isMinIE4) return document.body.clientHeight;
- return -1;
- }
- function getPageWidth() {
- if (isMinNS4) return document.width;
- if (isMinIE4) return document.body.scrollWidth;
- return -1;
- }
- function getPageHeight() {
- if (isMinNS4) return document.height;
- if (isMinIE4) return document.body.scrollHeight;
- return -1;
- }
- function getPageScrollX() {
- if (isMinNS4) return window.pageXOffset;
- if (isMinIE4) return document.body.scrollLeft;
- return -1;
- }
- function getPageScrollY() {
- if (isMinNS4) return window.pageYOffset;
- if (isMinIE4) return document.body.scrollTop;
- return -1;
- }
-
- var isMinIE5_5 = (isMinIE5&&navigator.appVersion.indexOf("5.5")>=0)?1:0;
- var navBars = new Array();
-
- function NavBarMenuItem(text, link) {
- this.text = text;
- this.link = link;
- }
- function NavBarMenu(hdrWidth, menuWidth) {
- this.hdrWidth = hdrWidth;
- this.width = menuWidth;
- this.height = 0;
- this.items = new Array();
- this.addItem = navBarMenuAddItem;
- }
- function navBarMenuAddItem(item) {
- this.items[this.items.length] = item;
- }
- function NavBar(width) {
- this.x = 0;
- this.y = 0;
- this.width = width;
- this.height = 0;
- this.align = "left";
- this.minWidth = 0;
- this.inverted = false;
- this.menus = new Array();
- this.created = false;
- this.border = 2;
- this.padding = 4;
- this.separator = 1;
- this.borderColor = "#000000";
- this.hdrFgColor = "#000000";
- this.hdrBgColor = "#999999";
- this.hdrHiFgColor = "#ffffff";
- this.hdrHiBgColor = "#666666";
- this.itmFgColor = "#000000";
- this.itmBgColor = "#cccccc";
- this.itmHiFgColor = "#ffffff";
- this.itmHiBgColor = "#000080";
- this.hdrFontFamily = "Arial,Helvetica,sans-serif";
- this.hdrFontStyle = "plain";
- this.hdrFontWeight = "bold";
- this.hdrFontSize = "10pt";
- this.itmFontFamily = "MS Sans Serif,Arial,Helvetica,sans-serif";
- this.itmFontStyle = "plain";
- this.itmFontWeight = "bold";
- this.itmFontSize = "8pt";
- this.setSizes = navBarSetSizes;
- this.setColors = navBarSetColors;
- this.setFonts = navBarSetFonts;
- this.addMenu = navBarAddMenu;
- this.create = navBarCreate;
- this.hide = navBarHide;
- this.show = navBarShow;
- this.moveTo = navBarMoveTo;
- this.moveBy = navBarMoveBy;
- this.getzIndex = navBarGetzIndex;
- this.setzIndex = navBarSetzIndex;
- this.getWidth = navBarGetWidth;
- this.getMinWidth = navBarGetMinWidth;
- this.getAlign = navBarGetAlign;
- this.setAlign = navBarSetAlign;
- this.resize = navBarResize;
- this.invert = navBarInvert;
- this.isInverted = navBarIsInverted;
- this.index = navBars.length;
- navBars[this.index] = this;
- }
- function navBarSetSizes(border,padding,separator) {
- if (!this.created) {
- this.border = border;
- this.padding = padding;
- this.separator = separator;
- }
- }
- function navBarSetColors(bdColor, hdrFgColor, hdrBgColor, hdrHiFgColor,
hdrHiBgColor, itmFgColor, itmBgColor, itmHiFgColor, itmHiBgColor) {
- if (!this.created) {
- this.borderColor = bdColor;
- this.hdrFgColor = hdrFgColor;
- this.hdrBgColor = hdrBgColor;
- this.hdrHiFgColor = hdrHiFgColor;
- this.hdrHiBgColor = hdrHiBgColor;
- this.itmFgColor = itmFgColor;
- this.itmBgColor = itmBgColor;
- this.itmHiFgColor = itmHiFgColor;
- this.itmHiBgColor = itmHiBgColor;
- }
- }
- function navBarSetFonts(hdrFamily, hdrStyle,hdrWeight, hdrSize,
itmFamily, itmStyle, itmWeight, itmSize) {
- if (!this.created) {
- this.hdrFontFamily = hdrFamily;
- this.hdrFontStyle = hdrStyle;
- this.hdrFontWeight = hdrWeight;
- this.hdrFontSize = hdrSize;
- this.itmFontFamily = itmFamily;
- this.itmFontStyle = itmStyle;
- this.itmFontWeight = itmWeight;
- this.itmFontSize = itmSize;
- }
- }
- function navBarAddMenu(menu) {
- if (!this.created)this.menus[this.menus.length] = menu;
- }
- function navBarCreate() {
- var str;
- var i, j;
- var norm, high, end;
- var width, height;
- var x, y;
- var scrX, scrY;
- if (this.created||(!isMinNS4 && !isMinIE4)) return;
- str = "";
- if (isMinIE4 && !isMinIE5) {
- scrX = getPageScrollX();
- scrY = getPageScrollY();
- window.scrollTo(getPageWidth(), getPageHeight());
- }
- if (isMinNS4) {
- str += '<layer
name="navBar'+this.index+'_filler"></layer>\n<layer
name="navBar'+this.index+'_hdrsBase">\n';
- }
- if (isMinIE4) {
- str += '<div id="navBar'+this.index+'_filler"
style="position:absolute;"></div>\n<div id="navBar'+this.index+'_hdrsBase"
style="position:absolute;">\n';
- }
- for(i=0;i<this.menus.length;i++) {
- norm = '<table border=0 cellpadding='+this.padding+'
cellspacing=0'+(this.menus[i].hdrWidth>0?'
width='+this.menus[i].hdrWidth:'')+((isMinIE4&&!isMinIE5)?'
id="navBar'+this.index+'_tbl'+i+'"':'')+'><tr><td'+(this.menus[i].hdrWidth==0?'
nowrap=1'+this.menus[i].hdrWidth:'')+'><span
style="color:'+this.hdrFgColor+';font-family:'+this.hdrFontFamily+';font-size:'+this.hdrFontSize+';font-style:'+this.hdrFontStyle+';font-weight:'+this.hdrFontWeight+';">';
- high = '<table border=0 cellpadding='+this.padding+'
cellspacing=0'+(this.menus[i].hdrWidth>0?'
width='+this.menus[i].hdrWidth:'')+'><tr><td'+(this.menus[i].hdrWidth==0?'
nowrap=1'+this.menus[i].hdrWidth:'')+'><span
style="color:'+this.hdrHiFgColor+';font-family:'+this.hdrFontFamily+';font-size:'+this.hdrFontSize+';font-style:'+this.hdrFontStyle+';font-weight:'+this.hdrFontWeight+';">';
- end = '</span></td></tr></table>';
- if (isMinNS4) {
- str += '<layer
name="navBar'+this.index+'_head'+i+'">'+norm+this.menus[i].items[0].text+end+'</layer>\n<layer
name="navBar'+this.index+'_headHigh'+i+'">'+high+this.menus[i].items[0].text+end+'</layer>\n<layer
name="navBar'+this.index+'_headDummy'+i+'"></layer>\n';
- }
- if (isMinIE4) {
- str += '<div
id="navBar'+this.index+'_head'+i+'"
style="position:absolute;">'+norm+this.menus[i].items[0].text+end+'</div>\n<div
id="navBar'+this.index+'_headHigh'+i+'"
style="position:absolute;">'+high+this.menus[i].items[0].text+end+'</div>\n<div
id="navBar'+this.index+'_headDummy'+i+'" style="position:absolute;">';
- if (isMinIE5_5) {
- str += '<table cellspacing=0
width="100%" height="100%"><tr><td> </td></tr></table>';
- str += '</div>\n';
- }
- }
- }
- if (isMinNS4) {
- str += '</layer>\n';
- this.baseLayer = new Layer(this.width);
- this.baseLayer.document.open();
- this.baseLayer.document.write(str);
- this.baseLayer.document.close();
- }
- if (isMinIE4) {
- str += '</div>\n';
- str = '<div id="navBar'+this.index+'"
style="position:absolute;left:0px;top:0px;">\n'+str+'</div>\n';
- document.body.insertAdjacentHTML("beforeEnd", str);
- this.baseLayer = getLayer("navBar"+this.index);
- }
- width = 0;
- height = 0;
- for(i=0;i<this.menus.length;i++) {
- this.menus[i].hdrNormLayer =
getLayer('navBar'+this.index+'_head'+i);
- this.menus[i].hdrHighLayer =
getLayer('navBar'+this.index+'_headHigh'+i);
- this.menus[i].hdrDmmyLayer =
getLayer('navBar'+this.index+'_headDummy'+i);
- height =
Math.max(height,getHeight(this.menus[i].hdrNormLayer));
- this.height = height+2*this.border;
- if (isMinIE4 && !isMinIE5) {
- width = this.menus[i].hdrWidth;
- if (width==0) {
- width =
eval('document.all.navBar'+this.index+'_tbl'+i+'.clientWidth');
- }
- navBarIEResizeLayer(this.menus[i].hdrNormLayer,
width, height);
- navBarIEResizeLayer(this.menus[i].hdrHighLayer,
width, height);
- navBarIEResizeLayer(this.menus[i].hdrDmmyLayer,
width, height);
- }
- }
- x = this.border;
- y = this.border;
- for(i=0;i<this.menus.length;i++) {
- width = Math.max(this.menus[i].hdrWidth,
getWidth(this.menus[i].hdrNormLayer));
- if (this.menus[i].width==0) {
- this.menus[i].width = width+2*this.border;
- }
- moveLayerTo(this.menus[i].hdrNormLayer, x, y);
- setBgColor(this.menus[i].hdrNormLayer, this.hdrBgColor);
- clipLayer(this.menus[i].hdrNormLayer, 0, 0,
width,height);
- inheritLayer(this.menus[i].hdrNormLayer);
- moveLayerTo(this.menus[i].hdrHighLayer, x, y);
- setBgColor(this.menus[i].hdrHighLayer,
this.hdrHiBgColor);
- clipLayer(this.menus[i].hdrHighLayer, 0, 0,
width,height);
- hideLayer(this.menus[i].hdrHighLayer);
- moveLayerTo(this.menus[i].hdrDmmyLayer, x, y);
- if (isMinIE4) {
- navBarIEResizeLayer(this.menus[i].hdrDmmyLayer,
width,height);
- }
- clipLayer(this.menus[i].hdrDmmyLayer,0,0,width,height);
- inheritLayer(this.menus[i].hdrDmmyLayer);
- this.menus[i].hdrDmmyLayer.highLayer =
this.menus[i].hdrHighLayer;
- this.menus[i].hdrLeft = x;
- x += width+this.border;
- this.menus[i].hdrRight = x;
- }
- this.minWidth = x;
- this.width = Math.max(this.minWidth, this.width);
- moveLayerTo(this.baseLayer, this.x, this.y);
- setBgColor(this.baseLayer, this.borderColor);
- if (isMinIE4) {
- navBarIEResizeLayer(this.baseLayer, this.width,
this.height);
- }
- clipLayer(this.baseLayer, 0, 0, this.width, this.height);
- this.fillerLayer = getLayer('navBar'+this.index+'_filler');
- moveLayerTo(this.fillerLayer, this.border, this.border);
- setBgColor(this.fillerLayer, this.hdrBgColor);
- width = this.width-2*this.border;
- height = this.height-2*this.border;
- if (isMinIE4) {
- navBarIEResizeLayer(this.fillerLayer, width, height);
- }
- clipLayer(this.fillerLayer, 0, 0, width,height);
- inheritLayer(this.fillerLayer);
- this.hdrsBaseLayer = getLayer('navBar'+this.index+'_hdrsBase');
- if (this.align=="left") {
- this.hdrsOffsetX = 0;
- }
- else if (this.align=="center") {
- this.hdrsOffsetX =
Math.round((this.width-this.minWidth)/2);
- }
- else if (this.align=="right") {
- this.hdrsOffsetX = this.width-this.minWidth;
- }
- else {
- this.hdrsOffsetX = Math.min(parseInt(this.align,10),
this.width-this.minWidth);
- }
- moveLayerTo(this.hdrsBaseLayer, this.hdrsOffsetX, 0);
- setBgColor(this.hdrsBaseLayer, this.borderColor);
- if (isMinIE4) {
- navBarIEResizeLayer(this.hdrsBaseLayer, this.minWidth,
this.height);
- }
- clipLayer(this.hdrsBaseLayer, 0, 0, this.minWidth, this.height);
- inheritLayer(this.hdrsBaseLayer);
- for(i=0;i<this.menus.length;i++) {
- this.menus[i].hdrDmmyLayer.index = this.index;
- this.menus[i].hdrDmmyLayer.offsetX =
this.menus[i].hdrLeft-this.border;
- if
(this.menus[i].hdrDmmyLayer.offsetX+this.menus[i].width>this.width) {
- this.menus[i].hdrDmmyLayer.offsetX =
this.menus[i].hdrRight-this.menus[i].width;
- }
- this.menus[i].hdrDmmyLayer.offsetY =
this.height-this.border;
- this.menus[i].hdrDmmyLayer.onmouseover = navBarHeaderOn;
- this.menus[i].hdrDmmyLayer.onmouseout = navBarHeaderOff;
- if (isMinNS4) {
- this.menus[i].hdrDmmyLayer.document.highLayer =
this.menus[i].hdrHighLayer;
- this.menus[i].hdrDmmyLayer.document.link =
this.menus[i].items[0].link;
-
this.menus[i].hdrDmmyLayer.document.captureEvents(Event.MOUSEUP);
- this.menus[i].hdrDmmyLayer.document.onmouseup =
navBarItemClick;
- }
- if (isMinIE4) {
- this.menus[i].hdrDmmyLayer.highLayer =
this.menus[i].hdrHighLayer;
- this.menus[i].hdrDmmyLayer.link =
this.menus[i].items[0].link;
- this.menus[i].hdrDmmyLayer.onclick =
navBarItemClick;
- }
- }
- norm = '<table border=0 cellpadding='+this.padding+'
cellspacing=0 width="100%"><tr><td><span
style="color:'+this.itmFgColor+';font-family:'+this.itmFontFamily+';font-size:'+this.itmFontSize+';font-style:'+this.itmFontStyle+';font-weight:'+this.itmFontWeight+';">';
- high = '<table border=0 cellpadding='+this.padding+'
cellspacing=0 width="100%"><tr><td><span
style="color:'+this.itmHiFgColor+';font-family:'+this.itmFontFamily+';font-size:'+this.itmFontSize+';font-style:'+this.itmFontStyle+';font-weight:'+this.itmFontWeight+';">';
- end = '</span></td></tr></table>';
- for(i=0;i<this.menus.length;i++) {
- width = this.menus[i].width-2*this.border;str="";
- for(j=1;j<this.menus[i].items.length;j++) {
- if (isMinNS4)str += '<layer
name="navBar'+this.index+'_menu'+i+'_norm'+j+'"
width='+width+'>'+norm+this.menus[i].items[j].text+end+'</layer>\n<layer
name="navBar'+this.index+'_menu'+i+'_high'+j+'"
width='+width+'>'+high+this.menus[i].items[j].text+end+'</layer>\n<layer
name="navBar'+this.index+'_menu'+i+'_dmmy'+j+'" width='+width+'></layer>\n';
- if (isMinIE4) {
- str += '<div
id="navBar'+this.index+'_menu'+i+'_norm'+j+'"
style="position:absolute;width:'+width+'px;">'+norm+this.menus[i].items[j].text+end+'</div>\n<div
id="navBar'+this.index+'_menu'+i+'_high'+j+'"
style="position:absolute;width:'+width+'px;">'+high+this.menus[i].items[j].text+end+'</div>\n<div
id="navBar'+this.index+'_menu'+i+'_dmmy'+j+'"
style="position:absolute;width:'+width+'px;">';
- if (isMinIE5_5) {
- str += '<table cellspacing=0
width="100%" height="100%"><tr><td> </td></tr></table>';
- }
- str += '</div>\n';
- }
- }
- if (isMinNS4) {
- this.menus[i].baseLayer = new
Layer(this.menus[i].width);
- this.menus[i].baseLayer.document.open();
- this.menus[i].baseLayer.document.write(str);
- this.menus[i].baseLayer.document.close();
- }
- if (isMinIE4) {
- str = '<div id="navBar'+this.index+'_menu'+i+'"
style="position:absolute;left:0px;
top:0px;width:'+this.menus[i].width+'px;visibility:hidden;">\n'+str+'</div>\n';
-
document.body.insertAdjacentHTML("beforeEnd",str);
- this.menus[i].baseLayer =
getLayer("navBar"+this.index+"_menu"+i);
- }
- }
- if (isMinIE4 && !isMinIE5) {
- window.scrollTo(x, y);
- }
- for (i=0;i<this.menus.length;i++) {
- moveLayerTo(this.menus[i].baseLayer,
this.menus[i].hdrDmmyLayer.offsetX, this.menus[i].hdrDmmyLayer.offsetY);
- setBgColor(this.menus[i].baseLayer,this.borderColor);
- if (this.menus[i].items.length>1) {
- this.menus[i].hdrDmmyLayer.menuLayer =
this.menus[i].baseLayer;
- if
(isMinNS4)this.menus[i].hdrDmmyLayer.document.menuLayer =
this.menus[i].baseLayer;
- }else{
- this.menus[i].hdrDmmyLayer.menuLayer = null;
- if
(isMinNS4)this.menus[i].hdrDmmyLayer.document.menuLayer =
this.menus[i].baseLayer;
- }
- x = this.border;
- y = this.border;
- width = this.menus[i].width-2*this.border;
- for(j=1;j<this.menus[i].items.length;j++) {
- this.menus[i].items[j].normLayer =
getLayer('navBar'+this.index+'_menu'+i+'_norm'+j);
- this.menus[i].items[j].highLayer =
getLayer('navBar'+this.index+'_menu'+i+'_high'+j);
- this.menus[i].items[j].dmmyLayer =
getLayer('navBar'+this.index+'_menu'+i+'_dmmy'+j);
- height =
getHeight(this.menus[i].items[j].normLayer);
-
moveLayerTo(this.menus[i].items[j].normLayer,x,y);
-
setBgColor(this.menus[i].items[j].normLayer,this.itmBgColor);
-
clipLayer(this.menus[i].items[j].normLayer,0,0,width,height);
- inheritLayer(this.menus[i].items[j].normLayer);
-
moveLayerTo(this.menus[i].items[j].highLayer,x,y);
-
setBgColor(this.menus[i].items[j].highLayer,this.itmHiBgColor);
-
clipLayer(this.menus[i].items[j].highLayer,0,0,width,height);
- hideLayer(this.menus[i].items[j].highLayer);
-
moveLayerTo(this.menus[i].items[j].dmmyLayer,x,y);
- if
(isMinIE4)navBarIEResizeLayer(this.menus[i].items[j].dmmyLayer,width,height);
-
clipLayer(this.menus[i].items[j].dmmyLayer,0,0,width,height);
- inheritLayer(this.menus[i].items[j].dmmyLayer);
- this.menus[i].items[j].dmmyLayer.highLayer =
this.menus[i].items[j].highLayer;
- this.menus[i].items[j].dmmyLayer.onmouseover =
navBarItemOn;
- this.menus[i].items[j].dmmyLayer.onmouseout =
navBarItemOff;
- if (isMinNS4) {
-
this.menus[i].items[j].dmmyLayer.document.highLayer =
this.menus[i].items[j].highLayer;
-
this.menus[i].items[j].dmmyLayer.document.parentHighLayer =
this.menus[i].hdrHighLayer;
-
this.menus[i].items[j].dmmyLayer.document.menuLayer = this.menus[i].baseLayer;
-
this.menus[i].items[j].dmmyLayer.document.link = this.menus[i].items[j].link;
-
this.menus[i].items[j].dmmyLayer.document.captureEvents(Event.MOUSEUP);
-
this.menus[i].items[j].dmmyLayer.document.onmouseup = navBarItemClick;
- }
- if (isMinIE4) {
-
this.menus[i].items[j].dmmyLayer.highLayer = this.menus[i].items[j].highLayer;
-
this.menus[i].items[j].dmmyLayer.parentHighLayer = this.menus[i].hdrHighLayer;
-
this.menus[i].items[j].dmmyLayer.menuLayer = this.menus[i].baseLayer;
- this.menus[i].items[j].dmmyLayer.link =
this.menus[i].items[j].link;
-
this.menus[i].items[j].dmmyLayer.onclick = navBarItemClick;
- }
- y += height+this.separator;
- }
- width = this.menus[i].width;
- height = y-this.separator+this.border;
- this.menus[i].baseLayer.width = this.menus[i].width;
- this.menus[i].baseLayer.height = height;
- if (isMinIE4) {
- navBarIEResizeLayer(this.menus[i].baseLayer,
width, height);
- }
- clipLayer(this.menus[i].baseLayer, 0, 0, width, height);
- this.menus[i].baseLayer.parentHighLayer =
this.menus[i].hdrHighLayer;
- this.menus[i].baseLayer.onmouseout = navBarMenuOff;
- }
- this.created = true;
- this.resize(this.width);
- showLayer(this.baseLayer);
- }
- function navBarHide() {
- if (this.created)hideLayer(this.baseLayer);
- }
- function navBarShow() {
- if (this.created)showLayer(this.baseLayer);
- }
- function navBarMoveTo(x,y) {
- this.x = x;
- this.y = y;
- if (this.created) {
- moveLayerTo(this.baseLayer, this.x, this.y);
- }
- }
- function navBarMoveBy(dx,dy) {
- this.x += dx;
- this.y+= dy;
- if (this.created) moveLayerTo(this.baseLayer,this.x,this.y);
- }
- function navBarGetzIndex() {
- if (this.created) return getzIndex(this.baseLayer);
- return 0;
- }
- function navBarSetzIndex(z) {
- var i;
- if (this.created) {
- setzIndex(this.baseLayer,z);
- for(i=0;i<this.menus.length;i++) {
- setzIndex(this.menus[i].baseLayer,z);
- }
- }
- }
- function navBarGetWidth() {
- return this.width;
- }
- function navBarGetMinWidth() {
- return this.minWidth;
- }
- function navBarGetAlign() {
- return this.align;
- }
- function navBarSetAlign(align) {
- this.align = align;
- if (this.created)this.resize(this.width);
- }
- function navBarResize(width) {
- if (this.created) {
- this.width = Math.max(width,this.minWidth);
- if (isMinIE4) {
-
navBarIEResizeLayer(this.fillerLayer,this.width-2*this.border,this.height-2*this.border);
-
navBarIEResizeLayer(this.baseLayer,this.width,this.height);
- }
-
clipLayer(this.fillerLayer,0,0,this.width-2*this.border,this.height-2*this.border);
- clipLayer(this.baseLayer,0,0,this.width,this.height);
- if (this.align=="left") {
- this.hdrsOffsetX = 0;
- } else if (this.align=="center") {
- this.hdrsOffsetX =
Math.round((this.width-this.minWidth)/2);
- }
- else if (this.align=="right") {
- this.hdrsOffsetX = this.width-this.minWidth;
- }
- else {
- this.hdrsOffsetX =
Math.min(parseInt(this.align,10),this.width-this.minWidth);
- }
- moveLayerTo(this.hdrsBaseLayer,this.hdrsOffsetX,0);
- for(i=0;i<this.menus.length;i++) {
- this.menus[i].hdrDmmyLayer.offsetX =
this.menus[i].hdrLeft-this.border;
- if
(this.hdrsOffsetX+this.menus[i].hdrDmmyLayer.offsetX+this.menus[i].width>this.width)this.menus[i].hdrDmmyLayer.offsetX
= this.menus[i].hdrRight-this.menus[i].width;
- }
- }
- else this.width = width;
- }
- function navBarInvert() {
- this.inverted =!this.inverted;
- }
- function navBarIsInverted() {
- return this.inverted;
- }
- function navBarIEResizeLayer(layer,width,height) {
- layer.style.pixelWidth = width;
- layer.style.pixelHeight = height;
- }
- function navBarHeaderOn(e) {
- var bar;
- var x,y;
- bar = navBars[this.index];
- if (this.menuLayer!=null) {
- x = bar.x+bar.hdrsOffsetX+this.offsetX;
- y = bar.y+this.offsetY;
- if (bar.inverted)y =
bar.y-this.menuLayer.height+bar.border;
- moveLayerTo(this.menuLayer,x,y);
- this.menuLayer.left = getPageLeft(this.menuLayer);
- this.menuLayer.top = getPageTop(this.menuLayer);
- this.menuLayer.right =
this.menuLayer.left+this.menuLayer.width+1;
- this.menuLayer.bottom =
this.menuLayer.top+this.menuLayer.height+1;
- }
- if (isMinIE4) {
- if (bar.activeHeader!=null&&bar.activeHeader!=this) {
- hideLayer(bar.activeHeader.highLayer);
- if
(bar.activeHeader.menuLayer!=null)hideLayer(bar.activeHeader.menuLayer);
- }
- bar.activeHeader = this;
- }
- showLayer(this.highLayer);
- if (this.menuLayer!=null)showLayer(this.menuLayer);
- }
- function navBarHeaderOff(e) {
- if (this.menuLayer!=null) {
- if (isMinIE4) {
- mouseX =
window.event.clientX+document.body.scrollLeft;
- mouseY =
window.event.clientY+document.body.scrollTop;
- }
- if
(mouseX>=this.menuLayer.left&&mouseX<=this.menuLayer.right&&mouseY>=this.menuLayer.top&&mouseY<=this.menuLayer.bottom)
return;
- hideLayer(this.menuLayer);
- }
- hideLayer(this.highLayer);
- }
- function navBarMenuOff(e) {
- if (isMinIE4) {
- mouseX = window.event.clientX+document.body.scrollLeft;
- mouseY = window.event.clientY+document.body.scrollTop;
- if
(mouseX>=this.left&&mouseX<=this.right&&mouseY>=this.top&&mouseY<=this.bottom)
return;
- }
- hideLayer(this);
- hideLayer(this.parentHighLayer);
- }
- function navBarItemOn() {
- showLayer(this.highLayer);
- }
- function navBarItemOff() {
- hideLayer(this.highLayer);
- }
- function navBarItemClick(e) {
- if (this.link=="") return true;
- if (this.menuLayer!=null) {
- hideLayer(this.menuLayer);
- }
- if (this.parentHighLayer!=null) {
- hideLayer(this.parentHighLayer);
- }
- hideLayer(this.highLayer);
- if (this.link.indexOf("javascript:")==0) {
- eval(this.link);
- } else {
- window.location.href = this.link;
- }
- return true;
- }
-
- var mouseX = 0;
- var mouseY = 0;
- if (isMinNS4) {
- document.captureEvents(Event.MOUSEMOVE);
- }
- document.onmousemove = navBarGetMousePosition;
-
- function navBarGetMousePosition(e) {
- if (isMinNS4) {
- mouseX = e.pageX;
- mouseY = e.pageY;
- }
- if (isMinIE4) {
- mouseX = window.event.clientX+document.body.scrollLeft;
- mouseY = window.event.clientY+document.body.scrollTop;
- }
- }
-
- var origWidth;
- var origHeight;
-
- if (isMinNS4) {
- origWidth = window.innerWidth;
- origHeight = window.innerHeight;
- }
-
- window.onresize = navBarReload;
-
- function navBarReload() {
- if (isMinNS4 && origWidth==window.innerWidth &&
origHeight==window.innerHeight) return;
- if (isMinIE4) {
- setTimeout('window.location.href =
window.location.href',2000);
- }
- else window.location.href = window.location.href;
- }
-
-</script>
-
-
-
-
-
-<script type="text/javascript" language="javascript">
- var myNavBar1 = new NavBar(0);
- var dhtmlMenu;
-
- //define menu items (first parameter of NavBarMenu specifies main
category width, second specifies sub category width in pixels)
- //add more menus simply by adding more "blocks" of same code below
-
- dhtmlMenu = new NavBarMenu(60, 120);
- dhtmlMenu.addItem(new NavBarMenuItem("Home",
"http://brick.earthlink.net/mail/index.php"));
- myNavBar1.addMenu(dhtmlMenu);
-
- dhtmlMenu = new NavBarMenu(60, 140);
- dhtmlMenu.addItem(new NavBarMenuItem("Edit", ""));
- dhtmlMenu.addItem(new NavBarMenuItem("Add new Appointment",
"http://brick.earthlink.net/mail/index.php?menuaction=calendar.uicalendar.day"));
- dhtmlMenu.addItem(new NavBarMenuItem("Add new Todo",
"http://brick.earthlink.net/mail/index.php?menuaction=todo.uitodo.add"));
- myNavBar1.addMenu(dhtmlMenu);
-
- dhtmlMenu = new NavBarMenu(125, 140);
- dhtmlMenu.addItem(new NavBarMenuItem("Preferences", ""));
- dhtmlMenu.addItem(new NavBarMenuItem("General",
"http://brick.earthlink.net/mail/preferences/index.php"));
- dhtmlMenu.addItem(new NavBarMenuItem("Email",
"http://brick.earthlink.net/mail/index.php?menuaction=email.uipreferences.preferences"));
- dhtmlMenu.addItem(new NavBarMenuItem("Calendar",
"http://brick.earthlink.net/mail/index.php?menuaction=calendar.uipreferences.preferences"));
- dhtmlMenu.addItem(new NavBarMenuItem("Addressbook",
"http://brick.earthlink.net/mail/index.php?menuaction=addressbook.uiaddressbook.preferences"));
- myNavBar1.addMenu(dhtmlMenu);
-
- dhtmlMenu = new NavBarMenu(62, 120);
- dhtmlMenu.addItem(new NavBarMenuItem("Help", ""));
- dhtmlMenu.addItem(new NavBarMenuItem("General", ""));
- myNavBar1.addMenu(dhtmlMenu);
-
- //set menu colors
- myNavBar1.setColors("#343434", "#eeeeee", "#60707C", "#ffffff",
"#888888", "#eeeeee", "#60707C", "#ffffff", "#777777")
- myNavBar1.setFonts("Verdana", "Normal", "Normal", "10pt", "Verdana",
"Normal", "Normal", "10pt");
-
- //uncomment below line to center the menu (valid values are "left",
"center", and "right"
- //myNavBar1.setAlign("center")
-
- var fullWidth;
-
- function init() {
- // Get width of window, need to account for scrollbar width in
Netscape.
- fullWidth = getWindowWidth() - (isMinNS4 && getWindowHeight() <
getPageHeight() ? 16 : 0);
-
- myNavBar1.moveTo(10,36);
- myNavBar1.resize(500 /*fullWidth*/);
- myNavBar1.setSizes(0,1,1);
- myNavBar1.create();
- myNavBar1.setzIndex(2);
- }
-</script>
\ No newline at end of file
====================================================
Index: email/inc/selectboxes.js
diff -u email/inc/selectboxes.js:1.2 email/inc/selectboxes.js:1.3
--- email/inc/selectboxes.js:1.2 Fri Mar 14 04:01:54 2003
+++ email/inc/selectboxes.js Sun Mar 13 23:22:44 2005
@@ -1,1024 +0,0 @@
-/**************************************************************************\
- * phpGroupWare - Todo list *
- * http://www.phpgroupware.org *
- * Written by Alex Borges <address@hidden> *
- * Low Level Design also by Dave Hall address@hidden
*
- * UI Design and market research by Gerardo Ramirez address@hidden
- * Code ripped off deveral public domain and gpl sites. Credits in each
function
- * for those
- *----------------------------------------------- *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU General Public License as published by the *
- * Free Software Foundation; either version 2 of the License, or (at your *
- * option) any later version. *
- \**************************************************************************/
-
-
-
-
-//@class box_parser
-//@abstract Class that represents a csv list of strings. Each string has to
hold an email address
-//@discussion This object is all mine. Its an interface to parse csv lists of
"name" <email> style
-//entries such as those found in the to,cc,bcc boxes of a webmail client.
-//Example: ["Name Of Destiny Mail"][<address@hidden>]
-//@param str The constructor takes as input the string of csv's addresses and
immediatly
-//parses it into an array csvlist, one entry per value in the string
-function box_parser(str)
-{
- //This is a class attribute that constitutes an array of strings
- var csvlist;
- var i;
- //This is just an attribute that gets used by other functions
- var tempstr;
- //This is the input text, the one received as parameter by the
constructor
- var thetext;
- var comma;
- //-------------------------------------------
- //This are class method declarations as public for each method
-
- this.csvparse=csvparse;
- this.get_index_of=get_index_of;
- this.remove_entry=remove_entry;
- this.parse_out=parse_out;
- this.add_entry=add_entry;
- //---------------------------------------------
- //---------------------------------------------
- //Attribute initializations
- //The input string gets parsed by the csvparse method
- //and the attribute csvlist is initialized with the
- //array said fucntion generates
- this.csvlist=this.csvparse(str);
-
-
-
-}
-//@function parse_out
-//@abstract Generates a string from the internal array of strings
-//@discussion This function will take the csvlist array and parse it back into
csv....its quite simple
-//actually it just calls the toString method on the array
-function parse_out()
-{
- return this.csvlist.toString();
-}
-
-//@function remove_entry
-//@abstract Removes an element from the csvlist array
-//@param str The string or substring that will matcha against the removed
element
-//@discussion This function takes a string as a parameter.
-//It will be searched as per the get_index_of method throughout the whole
-//csvlist array. When it finds the string that matches with its input,
-//it will remove it from the array.
-//POSTCONDITION: If no such string is found, this function will return -2
-function remove_entry(str)
-{
- var index;
- index=this.get_index_of(str);
- if(index!=-2)
- {
- this.csvlist.splice(index,1);
- }
-}
-
-//@function add_entry
-//@abstract This function takes the full thing (a string) as parameter
-//and adds it to the end of the list.
-//@param completeout The string that u want added to this object's csvlist
-//@discussion When u parse_out this object
-//this string will be appended to the resulting string
-function add_entry(completeout)
-{
- //alert("adding"+completeout);
- this.csvlist[this.csvlist.length]=completeout;
-}
-
-//@function get_index_of
-//@abstract This function gets you the index number for a particular string.
-//@param str The string u want searched within each of the elements of the
csvlist array
-//@discussion Its a free regular expression search within each string of the
array
-//The first match is what it returns as a string
-//POSTCONDITION: If no such string is found, this function will return -2
-function get_index_of(str)
-{
- var emailfind;
- var i;
- emailfind=new RegExp("(.*)("+str+")(.*)");
- for(var i=0;i<this.csvlist.length;i++)
- {
- if(emailfind.test(this.csvlist[i]))
- {
- //alert("str "+str+" found in index "+i+" record is
"+this.csvlist[i]);
- return i;
- }
- }
- //Lets avoid the 0/false problem
- //alert("str "+str+" Not found");
- return -2;
-}
-//@function csvparse
-//@abstract Parses a csv into an array
-//@discussion This function splits the incoming string
-//into an array, an element per csv value in it
-function csvparse(str)
-{
- return str.split(',');
-
-}
-
-
-//@class getObj
-//@abstract An object that can search within a document object
-//any html element, div or layer
-//@param name The name of the box type element we want to search for
-//@discussion This simple functions get us whatever element we want from
-//the current document .... its pretty damn cool
-//since we can get any div regardless of browser type
-//http://www.xs4all.nl/~ppk/js/ there is the guy that made it
-
-function getObj(name)
-{
- if (document.getElementById)
- {
- this.obj = document.getElementById(name);
- this.style = document.getElementById(name).style;
- }
- else if (document.all)
- {
- this.obj = document.all[name];
- this.style = document.all[name].style;
- }
- else if (document.layers)
- {
- this.obj = getObjNN4(document,name);
- this.style = this.obj;
- }
-}
-//@function getObjNN4
-//@abstract internal function that allows getObj to work with netscape4
-function getObjNN4(obj,name)
-{
- var x = obj.layers;
- var thereturn;
- for (var i=0;i<x.length;i++)
- {
- if (x[i].id == name)
- thereturn = x[i];
- else if (x[i].layers.length)
- var tmp = getObjNN4(x[i],name);
- if (tmp) thereturn = tmp;
- }
- return thereturn;
-}
-
-//@function hider
-//@param oname The element name as per ID="name"
-//@param hidunhid A flag. If its 0, it will unhide it, if its 1 it will hide it
-//@discusion A free function that allows us to hide or unhide a box type
element
-//such as a div or a textarea
-function hider(oname,hidunhid)
-{
- var DHTML = (document.getElementById || document.all ||
document.layers);
- if (!DHTML) return;
- var x = new getObj(oname);
- x.style.visibility = (hidunhid) ? 'hidden' : 'visible'
-}
-
-
-
-//This code blatantly ripped off from http://javascript.internet.com/
-//@class SelObj
-//@abstract Suposedly, this represents a select box....
-//@discussion I dont understand this code throughly yet
-//i only use it for autocompletion so, dont trust this object
-//as an abstraction of the selectbox html element
-function
-SelObj (formname, selname, textname, str)
-{
- this.formname = formname;
- this.selname = selname;
- this.textname = textname;
- this.select_str = str || '';
- this.selectArr = new Array ();
- this.initialize = initialize;
- this.bldInitial = bldInitial;
- this.bldUpdate = bldUpdate;
-}
-
-function
-initialize ()
-{
- if (this.select_str == '')
- {
- for (var
- i = 0;
- i < document.forms[this.formname][this.selname].options.length;
- i++)
- {
- this.selectArr[i] =
- document.forms[this.formname][this.selname].options[i];
- this.select_str +=
- document.forms[this.formname][this.selname].options[i].value +
- ":" +
- document.forms[this.formname][this.selname].options[i].text + ",";
- }
- }
- else
- {
- var tempArr = this.select_str.split (',');
- for (var i = 0; i < tempArr.length; i++)
- {
- var prop = tempArr[i].split (':');
- this.selectArr[i] = new Option (prop[1], prop[0]);
- }
- }
- return;
-}
-
-function
-bldInitial ()
-{
- this.initialize ();
- for (var i = 0; i < this.selectArr.length; i++)
- document.forms[this.formname][this.selname].options[i] =
- this.selectArr[i];
- document.forms[this.formname][this.selname].options.length =
- this.selectArr.length;
- return;
-}
-
-function
-bldUpdate ()
-{
- var str =
- document.forms[this.formname][this.textname].value.replace ('^\\s*', '');
- if (str == '')
- {
- this.bldInitial ();
- return;
- }
- this.initialize ();
- var j = 0;
- pattern1 = new RegExp ("^" + str, "i");
- for (var i = 0; i < this.selectArr.length; i++)
- if (pattern1.test (this.selectArr[i].text))
- document.forms[this.formname][this.selname].options[j++] =
- this.selectArr[i];
- document.forms[this.formname][this.selname].options.length = j;
- if (j == 1)
- {
- document.forms[this.formname][this.selname].options[0].selected = true;
-//document.forms[this.formname][this.textname].value =
-// document.forms[this.formname][this.selname].options[0].text;
- }
-}
-//@function This function serves us to instantiate two objects
-//@discussion Both SelObj and selectMover need the formname as
-//parameter for them to function. This is where we instantiate them
-//and pass them what they need for instantiation
-//SelObj needs also the textbox to autocomplete for and the name of the
selectbox
-//where autocompletion is supposed to happen.
-function
-setUpVisual (form, selectbox, textbox)
-{
- obj1 = new SelObj (form, selectbox, textbox);
- mover = new selectMover(form);
-// menuform is the name of the form you use
-// itemlist is the name of the select pulldown menu you use
-// entry is the name of text box you use for typing in
- obj1.bldInitial ();
- return obj1;
-}
-//@class selectMover
-//@abstract This object encapsulates many selectbox functions
-//@param formname The name of the form where all the selectboxes are.
-//All selectboxes need to be in the same form for this to work!
-//@discussion This object is very stupidly built. As i was needing function
-//I just started pushing them here. Thus, this needs braking down into
-//a bunch of objects. One interesting thing however is that
-//it does provide many generic selectbox functions that easy handling of
-//selctbox data by name. This is important because in php we almost allways
-//need selectboxes to be named like selectbox[index] so that php gives us back
arrays
-//and, of course, form.selectbox[1] means another thing completely.
-//So this provides many functions to encapsulate that.
-//
-function
-selectMover(formname)
-{
- //@param formname
- //@abstract This is a class attribute, the name of the form all
selectboxes are in
- //-------------------
- //Public functions declarations
- this.formname=formname;
- this.moveSelectedOptions=moveSelectedOptions;
- this.killLeftOver=killLeftOver;
- this.moveOption=moveOption;
- this.moveAll=moveAll;
- this.sortSelect=sortSelect;
- this.selectToParser=selectToParser;
- this.stringToTextbox=stringToTextbox;
- this.numberSelectedOptions=numberSelectedOptions;
- this.selectAll=selectAll;
- this.getSelectedIdx=getSelectedIdx;
- this.optionvalue=optionvalue;
- this.option2get=option2get;
- this.getSize=getSize;
- this.removeSelectedFromParser=removeSelectedFromParser;
- this.update_emails=update_emails;
- this.removeParsedFromSelect=removeParsedFromSelect;
- this.selectOptionOfValue=selectOptionOfValue;
- this.unselectAll=unselectAll;
- this.clearSelectbox=clearSelectbox;
- //--------- End decalrations
- //Important class attributes that get filled up with the update_emails
method
- //The removeParsedFromSelect and removeFromParser depend on the
update_emails
- //function to be called before, so it knows exactly the available
emails that
- //we have in the html document.... emails are a very large issue of
this applicacion
- //We generaly have two places where we can get them. Look at the
discussion on this functions
- //to know what i mean.
- this.email_values=Array();
- this.email_keys=Array();
-}
-//@function update_emails
-//@abstract This function will update the email_keys and email_values class
attributes
-//@param emails a javascript array with email addresses
-//@param keys a javascript array with addressbook id's
-//@discussion Searches hidden fields from the document looking for type=hidden
name=email[id]
-//address@hidden tags, it also receives the emails and keys arrays that may
be set
-//by the secondary frame given a set_destboxes event
-//PRECONDIDTION: The email and keys should be tied by array key. Where
email[i] has an id in
-//the addressbook backend given by keys[i]
-function
-update_emails(emails,keys)
-{
- var retstring;
- var pseudov;
- var selectbox;
- var sizeextra;
- var exlude;
- var reg_obj;
- var keyextractor;
- var emailidx;
- emailidx=0;
- //We need to extract the keys from the forms...this keys are
inside the name
- //as emails[key] ....so, we need to extract it with a regexp
- keyextractor=RegExp("^emails.?([0-9]+).?$",'g');
- retstring="";
- if(keys)
- {
- sizeextra=keys.length;
- }
- else
- {
- sizeextra=0;
- }
- //We look for emails and keys in the form
- for(var j=0;j<document.forms[this.formname].elements.length;j++)
- {
- //This regex helps us find a field with name "emails"
- reg_obj=RegExp(".*emails.*",'g');
-
if(reg_obj.test(document.forms[this.formname].elements[j].name))
- {
- //found an email[ named field, this is for us
-
this.email_values[emailidx]=document.forms[this.formname].elements[j].value;
-
this.email_keys[emailidx]=document.forms[this.formname].elements[j].name.replace(keyextractor,'$1');
- //alert("email,key pair found in hidden email
"+this.email_values[emailidx]+" key "+this.email_keys[emailidx]);
- emailidx++;
- }
- else
- {
-
- //alert("this does not qualify as hidden good
info "+document.forms[this.formname].elements[j].name);
- }
- }
- //Now we see if we look for emails and keys in the javascript
arrays
- if(sizeextra != 0)
- {
- for(var i=0;i<sizeextra;i++)
- {
- this.email_values[emailidx]=emails[i];
- this.email_keys[emailidx]=keys[i];
- // alert("email,key pair found in updated email
"+this.email_values[emailidx]+" key "+this.email_keys[emailidx]);
- emailidx++;
- }
- }
-// alert("Emails updated emails-> "+this.email_values);
-// alert("Keys updated keys-> "+this.email_keys);
- return this.email_values;
-
-}
-//@function index_of_value
-//@param ar Array to search in
-//@param value Value to search for
-//@discussion Free function to search any value in any array
-function index_of_value(ar,value)
-{
- for(var i=0;i<ar.length;i++)
- {
- //alert("Searching "+ar[i]+" != "+value);
- if(ar[i]==value)
- {
- //alert("Found key for id "+value);
- return i;
- }
- }
- return -2;
-}
-//@function removeParsedFromSelect
-//@param select The selectbox's name from which we will remove anything not
found in the parser
-//@param parser A parser object in which we will search all options from the
selectbox. Every option
-//not found in the corresponding parser will be killed and buried
-//@discussion Will remove the options from the selectbox not matching
-//addresses found in the parser.... IM your daddy!!!
-//This is used when the mainframe is loaded to sync the destination boxes with
their parsers.
-// The final efect is that, if you remove by hand from the compose destination
textboxes, the
-//the selectboxes will not include that element for the user
-function
-removeParsedFromSelect(select,parser)
-{
- var fromlen;
- var tolen;
- var j;
- var debuggs;
- var selidx;
- var namelen;
- namelen=document.forms[this.formname]['nameselect[]'].options.length;
- fromlen=document.forms[this.formname][select].length;
- fromlimit=fromlen;
- for (var i = 0; i < fromlimit; i=i+1)
- {
-
selidx=index_of_value(this.email_keys,document.forms[this.formname][select].options[i].value);
- if(selidx != -2)
- {
- //This option is not in the parser, killit!
- if(parser.get_index_of(this.email_values[selidx])==-2)
- {
- //By default, put this back into the nameselect
-
document.forms[this.formname]['nameselect[]'].options[namelen]=new
Option(document.forms[this.formname][select].options[i].text,
-
document.forms[this.formname][select].options[i].value);
-
document.forms[this.formname][select].options[i].text="";
-
document.forms[this.formname][select].options[i].value="";
- }
-
- }
-
- }
- this.killLeftOver(document.forms[this.formname][select]);
- this.sortSelect(select);
- this.sortSelect('nameselect[]');
-
-}
-//@function removeSelectedFromParser
-//@param selectfrom The selectbox whose selected options are to be removed
from the parser
-//@param parser The parser from which we will remove all matching addresses
that have been selected
-//@discussion Will remove the selected options on a given selectbox from
-//the parser received. The update emails function shoulve been
-//called first.
-//This is used when the remove event is called for the destination boxes.
-//When u hit remove, the next chain of events happen:
-// 1.- The framework turns on the set destination boxes flag, and the remove
selected flag
-// and calls the go_triggers function
-// 2.- As a result, the go triggers function tells the frameset to go and
update the destination
-// boxes values in the server through the secondary frame
-// 3.- The server invariably returns an array of keys, emails and name of all
the ppl selected in the destination boxes
-// and triggers the destination boxes set event
-// 4.- As a result, the frameset updates its emails/keys/names arrays and
calles the destination boxes set event on the
-// mainframe.
-// 5.- Since the mainframe has the remove selected flag turned on, the
destination boxes set event will call this function
-// for each of the destination boxes right after calling the update_emails
function.
-// 6.- This function will then remove from the parser all emails matching the
selections
-// from the destination boxes as they are being removed
-function
-removeSelectedFromParser(selectfrom,parser)
-{
- var fromlen;
- var tolen;
- var j;
- var debuggs;
- var selidx;
- fromlen=document.forms[this.formname][selectfrom].length;
- fromlimit=fromlen;
-// alert("Parser, pre removal"+parser.parse_out());
-// Look in the selectbox for selected options
- for (var i = 0; i < fromlimit; i=i+1)
- {
- if(document.forms[this.formname][selectfrom].options[i])
- {
- debuggs=debuggs+"
\n"+document.forms[this.formname][selectfrom].options[i];
- // alert("This is selected
"+document.forms[this.formname][selectfrom].options[i].text+" "+
-//
document.forms[this.formname][selectfrom].options[i].value);
-
if(document.forms[this.formname][selectfrom].options[i].selected)
- {
-
selidx=index_of_value(this.email_keys,document.forms[this.formname][selectfrom].options[i].value);
- if(selidx != -2)
- {
-
parser.remove_entry(this.email_values[selidx]);
-
- }
- }
-
- }
- }
- //alert("Parser, post removal"+parser.parse_out());
-
- return;
-}
-//@function sortSelect A selectbox sorter
-//@param selname The to-be-sorted selectbox's name
-//@Discussion
-//This robbed off the great
http://www.mattkruse.com/javascript/selectbox/source.html
-//Um... it sorts a selectbox by option.text
-function sortSelect(selname)
-{
- var o = new Array();
- var nex;
- var obj;
- obj=document.forms[this.formname][selname];
- if(obj.length < 1)
- {
- return 0;
- }
- for (var i=0; i<obj.options.length; i++)
- {
- o[o.length] = new Option( obj.options[i].text,
obj.options[i].value, obj.options[i].defaultSelected, obj.options[i].selected) ;
- }
- nex = o.sort(
- function(a,b)
- {
- if ((a.text+"") < (b.text+""))
- {
- return -1;
- }
- if ((a.text+"") > (b.text+""))
- {
- return 1;
- }
- return 0;
- }
- );
-
- for (var i=0; i<nex.length; i++)
- {
- obj.options[i] = new Option(o[i].text, o[i].value,
o[i].defaultSelected, o[i].selected);
- }
-}
-//@function moveSelectedOptions
-//@param selectfrom The name of the selectbox from which we are moving options
-//@param selectto The name of the selectbox to which we are moving options
-//@Discussion
-//Will copy the options from one select box to another
-function
-moveSelectedOptions(selectfrom,selectto)
-{
- var fromlen;
- var tolen;
- var j;
- var debuggs;
- var selidx;
- fromlen=document.forms[this.formname][selectfrom].length;
- tolen=document.forms[this.formname][selectto].length;
- j=tolen;
- fromlimit=fromlen;
- debuggs="Select From "+selectfrom+" Select To"+selectto;
-
- for (var i = 0; i < fromlimit; i=i+1)
- {
- if(document.forms[this.formname][selectfrom].options[i])
- {
-
if(document.forms[this.formname][selectfrom].options[i].selected)
- {
- debuggs=debuggs+"
\n"+document.forms[this.formname][selectfrom].options[i];
-
-
document.forms[this.formname][selectto].options[j]=new
Option(document.forms[this.formname][selectfrom].options[i].text,
document.forms[this.formname][selectfrom].options[i].value);
- j++;
-
document.forms[this.formname][selectfrom].options[i].name="";
-
document.forms[this.formname][selectfrom].options[i].value="";
-
- }
- }
- }
- //Important.... we need killleftover every time we attempt to move
anything out of a selctbox...see bellow
- this.killLeftOver(document.forms[this.formname][selectfrom]);
- this.sortSelect(selectfrom);
- this.sortSelect(selectto);
- return;
-}
-//function moveOption
-//And THIS IS MINE..... and thus, GPL
-//Will copy the option pointed to by index
-//@param selectfrom is the name of the box from where we copy
-//@param selectto is the name of the box to where we are copying the option
-//@param fromoption depends on indexkind DEPRECATED
-//@param indexkind is "text", fromoption has the text of the option.
DEPRECATED
-//As this can be repeated, it will stop at the first
-//if indexkind is "value", fromoption has the value of the option
-//if indexkind is "index". fromoption has the directo position of our option
-//@discussion Actually, the last two arguments where never implemented
-//this moves the given fromoption, which is the array index to the options
-//array int he source box, to the last of the selectto selectbox
-function moveOption(selectfrom,selectto,fromoption,indexkind)
-{
- var fromlen;
- var tolen;
- var j;
- var debuggs;
- var selidx;
- tolen=document.forms[this.formname][selectto].length;
- document.forms[this.formname][selectto].options[tolen]=new
Option(document.forms[this.formname][selectfrom].options[fromoption].text,
document.forms[this.formname][selectfrom].options[fromoption].value);
- j++;
- document.forms[this.formname][selectfrom].options[fromoption].name="";
- document.forms[this.formname][selectfrom].options[fromoption].value="";
-}
-
-//@function moveAll
-//@param selectfrom Name of the selectbox we are moving from
-//@param selectto Name of the selectbox we are moving to
-//@discussion uses moveOption to move option by option all of the options in
the
-//from selectbox into the to selectbox
-//POSTCONDITION: This function sorts and kills leftover values from both
selectboxes
-
-function moveAll(selectfrom,selectto)
-{
- var fromlen;
- var tolen;
- var j;
- var debuggs;
- var selidx;
- fromlen=document.forms[this.formname][selectfrom].length;
- tolen=document.forms[this.formname][selectto].length;
- j=tolen;
- fromlimit=fromlen;
- debuggs="Select From "+selectfrom+" Select To"+selectto;
- for (var i = 0; i < fromlimit; i++)
- {
- if(document.forms[this.formname][selectfrom].options[i])
- {
- this.moveOption(selectfrom,selectto,i,'index');
- }
- }
- this.killLeftOver(document.forms[this.formname][selectfrom]);
- this.killLeftOver(document.forms[this.formname][selectto]);
- this.sortSelect(selectfrom);
- this.sortSelect(selectto);
-
-
-}
-//@function killLeftOver
-//@param selectbox a selectbox OBJECT... NOT THE NAME
-//@discussion This interesting function removes all options
-//which have a value equal to "" from the selectbox
-//This is important because until we actually call this function
-//All move operations will only set the value of the text of the moved options
-//to "".
-//The problem is that javascript is pretty week in this respect, so this is a
-//recursive function that ensures that we only have valid text values and
-//that the length of the given selectbox is correct....
-
-function killLeftOver(selectbox)
-{
- for(var i=0; i<selectbox.options.length; i++)
- {
- if(selectbox.options[i].value == "")
- {
- for(var j=i; j<selectbox.options.length-1; j++)
- {
- selectbox.options[j].value =
selectbox.options[j+1].value;
- selectbox.options[j].text =
selectbox.options[j+1].text;
- selectbox.options[j].selected=null;
-
- }
-
- var ln = i;
- break;
- }
-
- }
-
- if(ln < selectbox.options.length)
- {
- selectbox.options.length -= 1;
- killLeftOver(selectbox);
- }
-}
-//@function selectToParser Perhaps should be named another way
-//@param sbox The selectbox that we are going to send into the parser
-//@param keys Array of keys sent by the framework
-//@param names corresponding names to the keys array
-//@param emails corresponding emails to the keys array
-//@param parser the destination parser
-//@discussion This is a very speciffic function, we know destination boxes
(passed as sbox)
-//have values like 122321 which are the id numbers of the entries of the emails
-//in the contacts backend (no matter if its sql or ldap)
-//Furthermore, our phpcode passes back hidden form fields named email[122321]
-//where the number corresponds to the said uid for the selectboxe's value
-//This means that php is passing us back the corresponding emails in this
hidden
-//values.
-//BUT, thats not all, there are times where you can have several ppl in the
destination
-//boxes but u dont have the email info here, in this cases, the js framework
queries
-//the php backend through the secondary frame and the
uijsaddressbook.set_destboxes method.
-//In javascript, this happens in the primary frame template whenever the
trigger_save_destboxes
-//function is called. This function calles the frameset's set_destboxes
function which, in turn
-//sends the secondary frame (through a location=uri call), the url containing
the information
-//of what the user has selected in the destination boxes.
-//We convert the destination boxes to GET values to be used on the url that
gets passed to the secondary
-//frame using the option2get function.
-//The php method gets the sent selectboxes and saves in cache whatever we are
sending back to it though GET
-//AND gives back the emails,names and ids of this
missing-in-cache/missing-in-hidden people
-//It does this by outputing three arrays to the secondary frame plus the
function destboxes_set that
-//tells the frameset it has loaded this arrays for us. The frameset gets those
arrays into its own
-//variables expresly declared for that and calls the event_destboxes_set
function on the main frame
-//This function selecetivly calls other functions depending on the state of
the addressbook
-//the case where this function, selectToString gets called is when the
addressbook needs to write
-//the destination boxes to a string where the actual comma separated list of
name and email pairs
-//should go. For example, in the mail app, this would be the To,cc and bcc
textboxes.
-//The original text of those destination strings is the exclude parameter, in
which we search
-//if the email we have in the destbox is already there.... that being the
case, we exclude it
-//from the output. The keys, names and emails parameters are the arrays the
php framework passes
-//back. They are here so we can contstruct the email addresses even if there
are no corresponding
-//hidden email[] field for a given selection in the destination boxes.
-function selectToParser(sbox,keys,names,emails,parser)
-{
- var retstring;
- var pseudov;
- var selectbox;
- var sizeextra;
- var exlude;
- var reg_obj;
- var i;
- var j;
- retstring="";
- if(keys)
- {
- sizeextra=keys.length;
- }
- else
- {
- sizeextra=0;
- }
-// alert("CAlle to selectroparser!");
- selectbox=document.forms[this.formname][sbox];
- if(selectbox.options.length<1)
- {
- return "";
- }
- for(var i=0;i<selectbox.options.length;i++)
- {
- pseudov="emails["+selectbox.options[i].value+"]";
- for(var j=0;j<document.forms[this.formname].elements.length;j++)
- {
- //find corresponding mail address
-
if(document.forms[this.formname].elements[j].name==pseudov)
- {
-// alert("document length
"+document.forms[this.formname].elements.length+" j = "+j+" slectbox ln
"+selectbox.options.length+
- // "selectbox value "+selectbox.options[i].value+"
i= "+i);
-
if(document.forms[this.formname].elements[j].value != "undefined")
- {
-
if(document.forms[this.formname].elements[j].value == "")
- {
- alert("Contact
"+selectbox.options[i].text+" \n has no email field in your addressbook
record");
- }
- else
- {
-
if(parser.get_index_of(document.forms[this.formname].elements[j].value) == -2)
- {
-
parser.add_entry(appendmailstring("","",selectbox.options[i].text,document.forms[this.formname].elements[j].value));
- }
- }
- }
- if(sizeextra > 0)
- {
- for(var k=0;k<sizeextra;k++)
- {
-
if(keys[k]==selectbox.options[i].value)
- {
- keys[k]=-33;
- }
- }
- }
-
- }
- }
- }
- if(sizeextra > 0)//we have extra info to build
- {
- for(var k=0;k<sizeextra;k++)
- {
- if(keys[k] != -33)
- {
- if(parser.get_index_of(emails[k]) == -2)
- {
-
parser.add_entry(appendmailstring("","",names[k],emails[k]));
- }
-
- }
- }
- }
- return parser;
-}
-//@function appendmailstring
-//@param st the appended string
-//@param comma just the separator between the st, and what we are building
-//@param name should be the name as in "name" <email>
-//@param email should be the email as in "name" <email>
-//@discussion Auxiliary to the previous function. This one builds propper
email addreses
-//as per "name" <email>
-function appendmailstring(st,comma,name,email)
-{
- return st+comma+'"'+name+'" <'+email+'>';
-
-}
-//@function stringToTextbox
-//@param str The string we are setting
-//@param tbox An input of type textbox object (real form element)
-//@discussion We just kill leftover commas and set the value of the textbox to
the input string
-function stringToTextbox(str,tbox)
-{
- var commakill;
- commakill=/^,(.*)$/;
- tbox.value=str.replace(commakill,"$1");
-}
-//@function numberSelectedOptions
-//@param selbox The name of the selectbox
-//@discussion We use this to count the number of selected options in the given
select box
-function numberSelectedOptions(selbox)
-{
- var len;
- var sbox;
- var j;
- sbox=document.forms[this.formname][selbox];
- len=sbox.options.length;
- if(len<1)
- {
- return "";
- }
- j=0;
- for(var i=0;i<len;i++)
- {
- if(sbox.options[i].selected)
- {
- j++;
- }
- }
- return j;
-}
-//@function option2get
-//@param selbox The name of the selectbox
-//@discussion
-//We use this function to turn all options of a selectbox into GET parameters
-//for the php server backend. For example, the toselectbox[] select box's
options
-//would reach the server as a toselectbox[] array in HTTP_POST_VAR
-//We turn that into HTTP_GET_VAR variables by building a GET variable style
-//array for the selectbox.
-//ATTENTION: This does NOT discriminate between selected options or not,
-//it takes all of the options....
-function option2get(selbox)
-{
- var len;
- var sbox;
- var j;
- var retstr;
- retstr='';
- sbox=document.forms[this.formname][selbox];
- len=sbox.options.length;
- if(len<1)
- {
- return "";
- }
- for(var i=0;i<len;i++)
- {
- retstr=retstr+"&";
-
retstr=retstr+selbox+"["+sbox.options[i].value+"]="+sbox.options[i].text;
- }
- return retstr;
-}
-//@function selectAll
-//@param selbox the selectboxe's name
-//@discussion It selects all options within a selectbox
-
-function selectAll(selbox)
-{
- var len;
- var sbox;
- var j;
- sbox=document.forms[this.formname][selbox];
- len=sbox.options.length;
- if(len<1)
- {
- return "";
- }
- for(var i=0;i<len;i++)
- {
- sbox.options[i].selected=1;
- }
-}
-//@function unselectAll
-//@param selbox the selectbox's name
-//@discussion This function unselects all values on a selectbox
-function unselectAll(selbox)
-{
- var len;
- var sbox;
- var j;
- sbox=document.forms[this.formname][selbox];
- len=sbox.options.length;
- if(len<1)
- {
- return "";
- }
- for(var i=0;i<len;i++)
- {
- sbox.options[i].selected=0;
- }
-}
-//@function selectOptionOfValue
-//@param selbox the selectbox's name
-//@param value the value we are looking for
-function selectOptionOfValue(selbox,value)
-{
- var len;
- var sbox;
- var j;
- sbox=document.forms[this.formname][selbox];
- len=sbox.options.length;
- if(len<1)
- {
- return "";
- }
- for(var i=0;i<len;i++)
- {
- if(sbox.options[i].value==value)
- {
- sbox.options[i].selected=1;
- return true;
- }
- }
- return false;
-
-}
-//@param selbox the selectbox's name
-//@discussion This function unselects all values on a selectbox
-function unselectAll(selbox)
-{
- var len;
- var sbox;
- var j;
- sbox=document.forms[this.formname][selbox];
- len=sbox.options.length;
- if(len<1)
- {
- return "";
- }
- for(var i=0;i<len;i++)
- {
- sbox.options[i].selected=0;
- }
-}
-//@function clearSelectbox
-//@param selbox the selectbox's name
-//@discussion Sets all values of a selectbox to ""
-//POSTCONDITION: U MUST call killLeftOver on the selectbox after calling this
-//if you want NO option elements in the selectbox
-function clearSelectbox(selbox)
-{
- var len;
- var sbox;
- var j;
- sbox=document.forms[this.formname][selbox];
- len=sbox.options.length;
- if(len<1)
- {
- return "";
- }
- for(var i=0;i<len;i++)
- {
- sbox.options[i].value="";
- }
-
-}
-//@function getSize
-//@param sbox The name of the selectbox
-//@discussion Returns the number of options in the selectbox
-function getSize(sbox)
-{
- return document.forms[this.formname][sbox].options.length;
-}
-//@function getSelectedIdx
-//@param selbox The name of the selectbox
-//@discussion Returns the selected index as normal js selectedIndex call
-//We only use this because we use funny names for our selectboxes
-function getSelectedIdx(selbox)
-{
- var len;
- var sbox;
- var j;
- sbox=document.forms[this.formname][selbox];
- return sbox.selectedIndex;
-}
-//@function optionvalue
-//@param selectbox The name of the selectbox
-//@param selectedidx The index of the selected option
-//@discussion Returns the value of the option pointed to by selectedidx
-function optionvalue(selectbox,selectedidx)
-{
- var sbox;
- sbox=document.forms[this.formname][selectbox];
- return sbox.options[selectedidx].value;
-}
====================================================
Index: email/inc/hook_settings.inc.php
diff -u email/inc/hook_settings.inc.php:1.4 email/inc/hook_settings.inc.php:1.5
--- email/inc/hook_settings.inc.php:1.4 Thu Dec 30 23:13:50 2004
+++ email/inc/hook_settings.inc.php Sun Mar 13 23:22:44 2005
@@ -17,7 +17,7 @@
if ($acctnum)
{
create_check_box('enable this email
account','ex_account_enabled',
- 'THIS PREF CURRENTLY DOES NOTHING<br>Users may have
more than one email account. In the future it is anticipated that automatic
actions may be performedon these accounts, such as automatic new mail checks,
auto filtering, etc... Perhaps the user may want to disable an account so that
these automatic actions do not occur for that account. This is one possible
use.<br>Also, an admin may want to disable accounts from time to time.');
+ 'THIS PREF CURRENTLY DOES NOTHING<br />Users may have
more than one email account. In the future it is anticipated that automatic
actions may be performedon these accounts, such as automatic new mail checks,
auto filtering, etc... Perhaps the user may want to disable an account so that
these automatic actions do not occur for that account. This is one possible
use.<br />Also, an admin may want to disable accounts from time to time.');
}
create_input_box('Account Name','account_name',
'This is the name that appears in the account combobox. If for
leave this blank, your accounts will be given a standard name like Account[1]:
Jane Doe, where Jane Doe is the name you give below as "Your full name". If you
want to give an account a special name you can fill this in. No matter what,
this is for your use, your emails will still use "Your full name" as your FROM
name for email messages. Note that "Your full name" for your email account 0 is
the name you gave in the phpgroupware setup.');
@@ -77,7 +77,7 @@
'ReplyTo' => lang('ReplyTo')
);
create_select_box('Show sender\'s email address with
name','show_addresses',$options,
- 'This confusing and often misunderstood option is left
over from this email apps origins as Aeromail by Mark Cushman. When viewing a
list of emails in a folder, the FROM column may show you<br>a) the senders name
only, if a name was provided,<br>b) the senders From email address, in addition
to the senders name, or<br>c) the senders reply to address if it is different
from the senders<br>from address, in addition to the senders name if it was
provided. Typically users set this to none, which will show only the senders
name. If no name was supplied by the sender, then the senders FROM email
address will be shown, whether a seperate reply to address is provided has no
effect on this, the FROM address is always used if the senders name is not
provided.');
+ 'This confusing and often misunderstood option is left
over from this email apps origins as Aeromail by Mark Cushman. When viewing a
list of emails in a folder, the FROM column may show you<br />a) the senders
name only, if a name was provided,<br />b) the senders From email address, in
addition to the senders name, or<br />c) the senders reply to address if it is
different from the senders<br />from address, in addition to the senders name
if it was provided. Typically users set this to none, which will show only the
senders name. If no name was supplied by the sender, then the senders FROM
email address will be shown, whether a seperate reply to address is provided
has no effect on this, the FROM address is always used if the senders name is
not provided.');
create_check_box('show new messages on main
screen','mainscreen_showmail',
'Each user has a summary page which can display a
variety of information. This option will show a small list of email messages in
the INBOX of the users default email account onthe users summary home page.');
@@ -105,7 +105,7 @@
'lex' => lang('Javascript')
);
create_select_box('Select your style for the addressbook. The
traditional, simple style. Or the new javascript enabled complex addressbook',
- 'addressbook_choice',$options,'We have recently added this new
addressbook so that users can choose to have a more complex addressbook that
features<br>a) Easy, point and click searching,<br>b) Best suited for
organizations with large central addressbooks with many categories.<br>You can
choose here which addressbook do you prefer.');
+ 'addressbook_choice',$options,'We have recently added this new
addressbook so that users can choose to have a more complex addressbook that
features<br />a) Easy, point and click searching,<br />b) Best suited for
organizations with large central addressbooks with many categories.<br />You
can choose here which addressbook do you prefer.');
$options = array(
'900' =>'1200x1600',
====================================================
====================================================
Index: email/inc/class.bomessage.inc.php
diff -u email/inc/class.bomessage.inc.php:1.15
email/inc/class.bomessage.inc.php:1.16
--- email/inc/class.bomessage.inc.php:1.15 Thu Dec 30 23:13:50 2004
+++ email/inc/class.bomessage.inc.php Sun Mar 13 23:22:43 2005
@@ -51,6 +51,8 @@
//var $show_debug_parts_summary=1;
var $debug_nav = 0;
+
+ var $flags = array();
// prefs should fill this in with users preference
//var $icon_theme='evo';
@@ -73,7 +75,7 @@
*/
function bomessage()
{
- if ($this->debug > 0) { echo 'ENTERING:
email.bomessage.*constructor*'.'<br>'; }
+ if ($this->debug > 0) { echo 'ENTERING:
email.bomessage.*constructor*'.'<br />'; }
// should "msg_bootstrap" code go here?
@@ -95,6 +97,7 @@
$this->xi['lang_reply_all'] = lang('reply all');
$this->xi['lang_forward'] = lang('forward');
$this->xi['lang_delete'] = lang('delete');
+ $this->xi['lang_edit'] = lang('edit');
$this->xi['lang_view_headers'] = lang('view headers');
$this->xi['lang_view_raw_message'] = lang('raw
message');
$this->xi['lang_message'] = lang('message');
@@ -169,7 +172,7 @@
if ($this->debug > 2) { echo
'class.bomessage.*constructor* ('.__LINE__.'): langs put in $this->xi
DUMP:<pre>'; print_r($this->xi); echo '</pre>'; }
- if ($this->debug > 0) { echo 'LEAVING:
email.bomessage.*constructor*'.'<br>'; }
+ if ($this->debug > 0) { echo 'LEAVING:
email.bomessage.*constructor*'.'<br />'; }
// also, this "return" *may* (need to check) effect
constructor of a a inherit-ee roll thru the constructoes
// uncomment the return when we understand implications
of it geing here.
@@ -194,7 +197,7 @@
$this->msg =& $GLOBALS['phpgw']->msg;
}
// now we can use msg object debug calls
- if ($this->debug > 0) {
$this->msg->dbug->out('ENTERING:
email.bomessage.message_data('.__LINE__.')'.'<br>'); }
+ if ($this->debug > 0) {
$this->msg->dbug->out('ENTERING:
email.bomessage.message_data('.__LINE__.')'.'<br />'); }
// ---- BEGIN BOMESSAGE ----
@@ -333,10 +336,17 @@
// expire the cached "phpgw_header" for this
specific message,
// cached data says the message is unseen, yet
we are about to see it right now!
$specific_key =
(string)$msgball['msgnum'].'_'.$msgball['folder'];
- if ($this->debug > 1) { echo
'email.bomessage.message_data: cached SEEN-UNSEEN "phpgw_header" needs expired
this specific message we are about to VIEW, $specific_key
['.$specific_key.']<br>'; }
+ if ($this->debug > 1) { echo
'email.bomessage.message_data: cached SEEN-UNSEEN "phpgw_header" needs expired
this specific message we are about to VIEW, $specific_key
['.$specific_key.']<br />'; }
$GLOBALS['phpgw']->msg->expire_session_cache_item('phpgw_header',
$msgball['acctnum'], $specific_key);
}
*/
+
+ $this->flags = array( //we only grab the important ones
:)
+ 'Flagged' =>
$msg_headers->Flagged == 'F',
+ 'Answered' =>
$msg_headers->Answered == 'A',
+ 'Deleted' =>
$msg_headers->Deleted == 'D',
+ 'Draft' => $msg_headers->Draft
== 'X'
+ );
$folder_info = array();
$folder_info =
$GLOBALS['phpgw']->msg->get_folder_status_info();
@@ -356,7 +366,7 @@
{
$msg_date2 = substr($msg_date2,$comma + 2);
}
- //echo 'Msg Date : '.$msg_date."<br>\n";
+ //echo 'Msg Date : '.$msg_date."<br />\n";
$dta = array();
$ta = array();
@@ -389,11 +399,11 @@
$new_time2=gmdate("D, d M Y H:m:s",$new_time)." GMT";
$msg_headers->date = $new_time2;
$msg_headers->udate = $new_time;
-#echo("<br>Hora cojonuda: $new_time2");
-#echo"udate $msg_headers->udate<br>";
-#echo"date $msg_headers->date<br>";
-#echo"$new_time<br>";
-#echo("estamos en bomessage 589<br>");
+#echo("<br />Hora cojonuda: $new_time2");
+#echo"udate $msg_headers->udate<br />";
+#echo"date $msg_headers->date<br />";
+#echo"$new_time<br />";
+#echo("estamos en bomessage 589<br />");
# end GMT handling by "acros"
*/
@@ -502,7 +512,7 @@
}
- //if ($this->debug > 0) { echo 'messages.php step3
$nav_data[] $ilnk_prev_msg: '.$ilnk_prev_msg.'<br>'; }
+ //if ($this->debug > 0) { echo 'messages.php step3
$nav_data[] $ilnk_prev_msg: '.$ilnk_prev_msg.'<br />'; }
// ---- "Go To Next Message" Handling -----
// should be moved to emil / class.svc_nextmatches
@@ -527,7 +537,7 @@
$ilnk_next_msg =
$GLOBALS['phpgw']->msg->img_maketag($GLOBALS['phpgw']->msg->_image_on('email',$this->icon_theme.'/arrow-right-no-24','_on'),$this->xi['lang__no_next_message'],'','','0');
}
- //if ($this->debug > 0) { echo 'messages.php step4
$nav_data[] $ilnk_next_msg: '.$ilnk_next_msg.'<br>'; }
+ //if ($this->debug > 0) { echo 'messages.php step4
$nav_data[] $ilnk_next_msg: '.$ilnk_next_msg.'<br />'; }
// these are HREF clickable text for prev and next text
navigation
$this->xi['href_prev_msg'] = $href_prev_msg;
@@ -946,8 +956,23 @@
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start')
.$this->no_fmt);
+
$href_delete=
$GLOBALS['phpgw']->msg->href_maketag_class($delete_url,
$this->xi['lang_delete'], 'c_replybar');
$ilnk_delete =
$GLOBALS['phpgw']->msg->href_maketag($delete_url, $delete_img);
+
+ $edit_img =
$GLOBALS['phpgw']->msg->img_maketag($GLOBALS['phpgw']->msg->_image_on('email',$this->icon_theme.'/compose-message-'.$this->icon_size,'_on'),$this->xi['lang_edit'],'','','0');
+ $edit_url = $GLOBALS['phpgw']->link(
+ '/index.php',
+ 'menuaction=email.uicompose.compose'
+ .'&action=edit'
+ .'&'.$msgball['uri']
+ .$first_presentable
+ // preserve these things for when we
return to the message list after the send
+
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
+
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
+
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start'));
+ $href_edit =
$GLOBALS['phpgw']->msg->href_maketag_class($edit_url, $this->xi['lang_edit'],
'c_replybar');
+ $ilnk_edit =
$GLOBALS['phpgw']->msg->href_maketag($edit_url, $edit_img);
$this->xi['theme_font'] =
$GLOBALS['phpgw_info']['theme']['font'];
$this->xi['reply_btns_bkcolor'] =
$GLOBALS['phpgw_info']['theme']['em_folder'];
@@ -958,10 +983,12 @@
$this->xi['href_replyall'] = $href_replyall;
$this->xi['href_forward'] = $href_forward;
$this->xi['href_delete'] = $href_delete;
+ $this->xi['href_edit'] = $href_edit;
$this->xi['ilnk_reply'] = $ilnk_reply;
$this->xi['ilnk_replyall'] = $ilnk_replyall;
$this->xi['ilnk_forward'] = $ilnk_forward;
$this->xi['ilnk_delete'] = $ilnk_delete;
+ $this->xi['ilnk_edit'] = $ilnk_edit;
// ---- DEBUG: Show Information About Each Part -----
if ($this->show_debug_parts_summary > 0)
@@ -1219,7 +1246,7 @@
$count_part_nice = count($this->part_nice);
for ($i = 0; $i < $count_part_nice; $i++)
{
- if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): disp loop:
'.($i+1).' of '.$count_part_nice.'<br>'); }
+ if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): disp loop:
'.($i+1).' of '.$count_part_nice.'<br />'); }
if ($this->debug > 3) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop:
$this->part_nice[$i] DUMP:', $this->part_nice[$i]); }
// Do We Break out of this Loop Block
if ($done_processing)
@@ -1241,7 +1268,7 @@
&& (($this->part_nice[$i]['m_description'] ==
'container')
|| ($this->part_nice[$i]['m_description'] ==
'packagelist')) )
{
- if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop:
"Mime-Ignorant Email Server", Num Parts is 1 AND part is a container OR
packagelist <br>'); }
+ if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop:
"Mime-Ignorant Email Server", Num Parts is 1 AND part is a container OR
packagelist <br />'); }
// ==== MIME IGNORANT SERVER ====
$title_text = ' Mime-Ignorant
Email Server: ';
@@ -1269,20 +1296,20 @@
}
$boundary = trim($boundary);
/*
- $dsp = '<br><br> === API STRUCT ====
<br><br>'
+ $dsp = '<br /><br /> === API STRUCT
==== <br /><br />'
.'<pre>'.serialize($msg_struct).'</pre>'
- //.'<br><br> === HEADERS ====
<br><br>'
+ //.'<br /><br /> === HEADERS
==== <br /><br />'
//.'<pre>'.$msg_raw_headers.'</pre>'
- .'<br><br> ===
struct->parameters ==== <br><br>'
+ .'<br /><br /> ===
struct->parameters ==== <br /><br />'
.'<pre>'.serialize($msg_struct->parameters).'</pre>'
- .'<br><br> === BOUNDRY ====
<br><br>'
+ .'<br /><br /> === BOUNDRY ====
<br /><br />'
.'<pre>'.serialize($boundary).'</pre>'
- .'<br><br> === BODY ====
<br><br>';
+ .'<br /><br /> === BODY ====
<br /><br />';
.'<pre>'.serialize($msg_body).'</pre>';
*/
- $dsp = '<br> === BOUNDRY ==== <br>'
- .'<pre>'.$boundary.'</pre> <br>'
- .'<br> === BODY ==== <br><br>';
+ $dsp = '<br /> === BOUNDRY ==== <br />'
+ .'<pre>'.$boundary.'</pre> <br
/>'
+ .'<br /> === BODY ==== <br
/><br />';
$this_msgball = $msgball;
$this_msgball['part_no'] =
$this->part_nice[$i]['m_part_num_mime'];
$dsp .=
$GLOBALS['phpgw']->msg->phpgw_fetchbody($this_msgball);
@@ -1303,7 +1330,7 @@
&& (($this->part_nice[$i]['m_part_num_mime'] ==
1) || ((string)$this->part_nice[$i]['m_part_num_mime'] == '1.1'))
&& ((int)$this->part_nice[$i]['bytes'] >
$force_echo_size))
{
- if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: ECHO
OUT: part meets five criteria <br>'); }
+ if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: ECHO
OUT: part meets five criteria <br />'); }
$title_text =
' '.$this->xi['lang_message'].': ';
$display_str =
$this->xi['lang_keywords'].': '.$this->part_nice[$i]['m_keywords'].' -
'.$GLOBALS['phpgw']->msg->format_byte_size($this->part_nice[$i]['bytes'])
@@ -1355,7 +1382,7 @@
// enriched = part of APPLE MAIL multipart /
alternative subpart where the html part usually is
// HOWEVER enriched is not complete html so it
will not render anything special in a browser so we can NOT treat enriched like
html
{
- if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
is HTML, presentable <br>'); }
+ if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
is HTML, presentable <br />'); }
// get the body
$this_msgball = $msgball;
@@ -1408,7 +1435,7 @@
//||
(stristr($this->part_nice[$parent_idx]['subtype'], 'RELATED')))
)
{
- if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: *
part is RELATED, HTML, presentable <br>'); }
+ if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: *
part is RELATED, HTML, presentable <br />'); }
// typically it's the NEXT mime
part that should be inserted into this one
for ($rel = $i+1; $rel <
count($this->part_nice)+1; $rel++)
{
@@ -1423,8 +1450,8 @@
$part_href =
$this->part_nice[$rel]['ex_part_href'];
//$part_href =
'"'.$this->part_nice[$rel]['ex_part_href'].'"';
- //echo '<br>
**replace_id (pre-processing): ' .$replace_id .'<br>';
- //echo
'part_href (processed): ' .$part_href .'<br>';
+ //echo '<br />
**replace_id (pre-processing): ' .$replace_id .'<br />';
+ //echo
'part_href (processed): ' .$part_href .'<br />';
// strip < and
> from this ID
$replace_id =
ereg_replace( '^<','',$replace_id);
@@ -1432,7 +1459,7 @@
// id
references are typically preceeded with "cid:"
$replace_id =
'cid:' .$replace_id;
- //echo
'**replace_id (post-processing): ' .$replace_id .'<br>';
+ //echo
'**replace_id (post-processing): ' .$replace_id .'<br />';
// Attempt the
Search and Replace
$dsp =
str_replace($replace_id, $part_href, $dsp);
@@ -1451,7 +1478,7 @@
if
(preg_match("/<iframe.*>.*<\/iframe>/ismx", $dsp))
{
- if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
** HAS IFRAME <br>'); }
+ if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
** HAS IFRAME <br />'); }
//$this->part_nice[$i]['d_threat_level'] .= 'warn_HAS_IFRAME_maybe_KLEZ ';
$this->part_nice[$i]['d_threat_level'] .=
$this->xi['lang_warn_has_iframe_maybe_klez'].' ';
}
@@ -1567,7 +1594,7 @@
// DETECT IFRAME TRICK
//if (stristr($dsp, '<iframe'))
//{
- // if ($this->debug > 2) { echo
'email.bomessage.message_data: d_loop: part ** HAS IFRAME <br>'; }
+ // if ($this->debug > 2) { echo
'email.bomessage.message_data: d_loop: part ** HAS IFRAME <br />'; }
//
$this->part_nice[$i]['d_threat_level'] .= 'warn_HAS_IFRAME_maybe_KLEZ ';
//}
@@ -1582,7 +1609,7 @@
&& ($this->hide_alt_hide == True))
{
// is this a multipart alternative set,
and this is the plain part, and do not want to show it
- if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
is presentable BUT it is alt_hide so we do NOT want to show it <br>'); }
+ if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
is presentable BUT it is alt_hide so we do NOT want to show it <br />'); }
// ---- DISPLAY INSTRUCTIONS ----
$this->part_nice[$i]['d_instructions']
= 'skip';
@@ -1593,7 +1620,7 @@
}
elseif ($this->part_nice[$i]['m_description']
== 'presentable')
{
- if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
is presentable (non-html) <br>'); }
+ if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
is presentable (non-html) <br />'); }
// ----- get the part from the server
$this_msgball = $msgball;
@@ -1618,7 +1645,7 @@
$colon = chr(58);
$dsp = str_replace($colon, " colon ",
$dsp);
- echo
'<br>'.$this->part_nice[$i]['m_part_num_mime'].'<br>';
+ echo '<br
/>'.$this->part_nice[$i]['m_part_num_mime'].'<br />';
var_dump($dsp);
*/
@@ -1694,10 +1721,10 @@
//$dsp =
$GLOBALS['phpgw']->msg->space_to_nbsp($dsp);
//}
$dsp =
$GLOBALS['phpgw']->msg->make_clickable($dsp,
$GLOBALS['phpgw']->msg->get_arg_value('["msgball"]["folder"]'));
- // (OPT 2) THIS
CONVERTS UNFORMATTED TEXT TO *VERY* SIMPLE HTML - adds only <br>
- $dsp =
ereg_replace("\r\n","<br>",$dsp);
+ // (OPT 2) THIS
CONVERTS UNFORMATTED TEXT TO *VERY* SIMPLE HTML - adds only <br />
+ $dsp =
ereg_replace("\r\n","<br />",$dsp);
// add a line after the
last line of the message
- $dsp = $dsp .'<br><br>';
+ $dsp = $dsp .'<br /><br
/>';
// alternate (toggle)
to view unformatted, for this we add "&no_fmt=1" to the URL
$view_option =
$GLOBALS['phpgw']->msg->href_maketag($view_option_url.'&no_fmt=1',
$this->xi['lang_view_unformatted']);
$view_option_ilnk =
$GLOBALS['phpgw']->msg->href_maketag($view_option_url.'&no_fmt=1',
$view_unformatted_img);
@@ -1744,7 +1771,7 @@
&& ($this->hide_alt_hide == True))
{
// is this a multipart alternative set,
and this is the plain part, and do not want to show it
- if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
is presentable IMAGE BUT it is alt_hide because it is html related to a parent
so we do NOT want to show it again<br>'); }
+ if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
is presentable IMAGE BUT it is alt_hide because it is html related to a parent
so we do NOT want to show it again<br />'); }
// ---- DISPLAY INSTRUCTIONS ----
$this->part_nice[$i]['d_instructions']
= 'skip';
@@ -1755,7 +1782,7 @@
}
elseif ($this->part_nice[$i]['m_description']
== 'presentable/image')
{
- if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
is presentable image <br>'); }
+ if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
is presentable image <br />'); }
$title_text =
$this->xi['lang_section'].': '.$this->part_nice[$i]['m_part_num_mime'];
$display_str =
$GLOBALS['phpgw']->msg->decode_header_string($this->part_nice[$i]['ex_part_name'])
@@ -1777,12 +1804,12 @@
}
elseif ($this->part_nice[$i]['m_description']
== 'attachment')
{
- if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
is attachment <br>'); }
+ if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
is attachment <br />'); }
// if this is a 1 part message with
only this attachment, WARN
if (count($this->part_nice) == 1)
{
- if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: *
WARN message has only 1 part and it is an attachment <br>'); }
+ if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: *
WARN message has only 1 part and it is an attachment <br />'); }
//$this->part_nice[$i]['d_threat_level'] .= 'warn_attachment_only_mail ';
$this->part_nice[$i]['d_threat_level'] .=
$this->xi['lang_warn_attachment_only_mail'].' ';
}
@@ -1790,7 +1817,7 @@
// warn for typically BAD attachments
bat, inf, pif, con, reg, vbs, scr
if
(preg_match('/^.*\.(bat|inf|pif|com|exe|reg|vbs|scr)$/',
$this->part_nice[$i]['ex_part_name']))
{
- if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: *
WARN attachment has NEFARIOUS filename extension, ex_part_name:
'.$this->part_nice[$i]['ex_part_name'].'<br>'); }
+ if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: *
WARN attachment has NEFARIOUS filename extension, ex_part_name:
'.$this->part_nice[$i]['ex_part_name'].'<br />'); }
//$this->part_nice[$i]['d_threat_level'] .= 'warn_attachment_name_DANGEROUS ';
$this->part_nice[$i]['d_threat_level'] .=
$this->xi['lang_warn_attachment_name_dangerous'].' ';
}
@@ -1804,7 +1831,7 @@
.'
'.$this->part_nice[$i]['ex_part_clickable']
.'
'.$this->xi['lang_size'].':
'.$GLOBALS['phpgw']->msg->format_byte_size((int)$this->part_nice[$i]['bytes'])
.'
'.'<b>'.$this->part_nice[$i]['d_threat_level'].'</b>'
- .'<br><br>';
+ .'<br /><br />';
$this->part_nice[$i]['message_body'] =
$msg_text;
@@ -1820,7 +1847,7 @@
elseif (($this->part_nice[$i]['m_description']
!= 'container')
&& ($this->part_nice[$i]['m_description'] !=
'packagelist'))
{
- if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
is ERROR - unknown <br>'); }
+ if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part
is ERROR - unknown <br />'); }
// if we get here then we've got some
kind of error, all things we know about are handle above
$title_text =
$this->xi['lang_section'].': '.$this->part_nice[$i]['m_part_num_mime'];
@@ -1833,14 +1860,14 @@
$msg_text = '';
// UNKNOWN DATA
- $msg_text = $msg_text
.'<br><strong>'.$this->xi['lang_error_unknown_message_data'].'</strong><br>';
+ $msg_text = $msg_text .'<br
/><strong>'.$this->xi['lang_error_unknown_message_data'].'</strong><br />';
if ($this->part_nice[$i]['encoding'] ==
'base64')
{
$this_msgball =
$msgball;
$this_msgball['part_no'] = $this->part_nice[$i]['m_part_num_mime'];
$dsp =
$GLOBALS['phpgw']->msg->phpgw_fetchbody($this_msgball);
//$dsp =
$GLOBALS['phpgw']->dcom->fetchbody($mailbox,
$GLOBALS['phpgw']->msg->get_arg_value('msgnum'),
$this->part_nice[$i]['m_part_num_mime']);
- //$processed_msg_body =
$processed_msg_body . base64_decode($dsp) .'<br>' ."\r\n";
+ //$processed_msg_body =
$processed_msg_body . base64_decode($dsp) .'<br />' ."\r\n";
$msg_text = $msg_text . 'actual
part size: ' .strlen($dsp);
}
//$GLOBALS['phpgw']->template->set_var('message_body',$msg_text);
@@ -1886,7 +1913,7 @@
// DO NOT end request yet because the "echo_out" part
(if exists) will require this connection
//$GLOBALS['phpgw']->msg->end_request();
if ($this->debug > 2) {
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'):
$this->part_nice (With Instructions) DUMP:', $this->part_nice); }
-
+
}
}
?>
====================================================
Index: email/inc/class.bopreferences.inc.php
diff -u email/inc/class.bopreferences.inc.php:1.24
email/inc/class.bopreferences.inc.php:1.25
--- email/inc/class.bopreferences.inc.php:1.24 Thu Dec 30 23:13:50 2004
+++ email/inc/class.bopreferences.inc.php Sun Mar 13 23:22:43 2005
@@ -57,7 +57,7 @@
function bopreferences()
{
- if ($this->debug_set_prefs > 0) { echo
'email.bopreferences *constructor*: ENTERING <br>'; }
+ if ($this->debug_set_prefs > 0) { echo
'email.bopreferences *constructor*: ENTERING <br />'; }
/*!
@capability initialize class mail_msg object but do not
login
@abstract we need functions in class mail_msg but we
not want a login
@@ -72,14 +72,14 @@
//$this->msg_bootstrap->set_do_login(False);
// USE NEW login instructions, defined in bootstrap
class
$this->msg_bootstrap->set_do_login(BS_LOGIN_NEVER);
- if ($this->debug_set_prefs > 1) { echo
'email.bopreferences. *constructor*: call
this->msg_bootstrap->ensure_mail_msg_exists, msg_bootstrap->get_do_login():
'.serialize($this->msg_bootstrap->get_do_login()).'<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'email.bopreferences. *constructor*: call
this->msg_bootstrap->ensure_mail_msg_exists, msg_bootstrap->get_do_login():
'.serialize($this->msg_bootstrap->get_do_login()).'<br />'; }
$this->msg_bootstrap->ensure_mail_msg_exists('email.bopreferences.
*constructor*', $this->debug_set_prefs);
// make the convience reference
if ($this->msg == '##NOTHING##')
{
$this->msg =& $GLOBALS['phpgw']->msg;
}
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences. *constructor*: LEAVING<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences. *constructor*: LEAVING<br />'); }
//return;
}
@@ -107,7 +107,7 @@
*/
function init_available_prefs()
{
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.init_available_prefs: ENTERING, use
debug level 4 for a data dump on leaving<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.init_available_prefs: ENTERING, use
debug level 4 for a data dump on leaving<br />'); }
$this->std_prefs = Array();
$i = 0;
@@ -363,6 +363,33 @@
'values' => array(),
'long_desc' => lang('If " Sent messages
folder " is checked, a copy of your sent mail will be stored in the folder
name you type in this box. If this folder does not exist, it will be created
for you automatically. Default name is "Sent". This will be your
"Sent" folder, but it does not have to actually be called
"Sent", you can name it anything. Only works with IMAP servers, POP
servers do not have folders.')
);
+ $i++;
+ $this->std_prefs[$i] = Array(
+ 'id' => 'use_draft_folder',
+ 'type' => 'exists',
+ 'widget' => 'checkbox',
+ 'accts_usage' => 'default, extra_accounts',
+ 'write_props' => '',
+ //'lang_blurb' => lang('Sent messages saved to
folder:'),
+ //'lang_blurb' => lang('save Sent messages in
folder named below'),
+ 'lang_blurb' => htmlentities(lang('draft
messages saved in "draft" folder')),
+ 'init_default' => 'set_or_not,not_set',
+ 'values' => array(),
+ 'long_desc' => htmlentities(lang('If
checked, you will be able to create draft messages and save them in the "draft"
folder name which you specify in the box for "draft messages folder". Only
works with IMAP servers, POP servers do not have folders.'))
+ );
+ $i++;
+ $this->std_prefs[$i] = Array(
+ 'id' => 'draft_folder_name',
+ 'type' => 'user_string',
+ 'widget' => 'textbox',
+ 'accts_usage' => 'default, extra_accounts',
+ 'write_props' => '',
+ //'lang_blurb' => lang('Sent messages folder
name'),
+ 'lang_blurb' => lang('Sent messages folder'),
+ 'init_default' => 'string,Drafts',
+ 'values' => array(),
+ 'long_desc' => htmlentities(lang('If "draft
messages folder" is checked, copies of your draft messages will be stored in
the folder name you type in this box. If this folder does not exist, it will be
created for you automatically, when you first save a draft message. Default
name is "drafts". This will be your "drafts" folder, but it does not have to
actually be called "drafts", you can name it anything. Only works with IMAP
servers, POP servers do not have folders.'))
+ );
/*
$i++;
$this->std_prefs[$i] = Array(
@@ -599,8 +626,8 @@
'values' => array(),
'long_desc' => lang('Only needed with the
University of Washington "UWash" IMAP server. The default value is
"mail" which means your mail folders, other then INBOX, are located
in a directory called "mail" directly under your "HOME"
directory. This box may be left empty, which means your mail folders are
located in your "HOME" directory, not a subdirectory. If your mail
folders are located in a subdirectory of "HOME" then put the name of
that subdirectory here. Generally, it is not necessary to use any special
slashes or tildes, "HOME" is always considered the base directory,
and the slash bewteen "HOME" and the subdirectory will be added for
you automatically, do not put the slash in this box.')
);
- if ($this->debug_set_prefs > 3) {
$this->msg->dbug->out('email.bopreferences.init_available_prefs: data dump:
calling debug_dump_prefs<br>'); $this->debug_dump_prefs(); }
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.init_available_prefs: LEAVING<br>');
}
+ if ($this->debug_set_prefs > 3) {
$this->msg->dbug->out('email.bopreferences.init_available_prefs: data dump:
calling debug_dump_prefs<br />'); $this->debug_dump_prefs(); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.init_available_prefs: LEAVING<br
/>'); }
}
@@ -608,7 +635,7 @@
function debug_dump_prefs()
{
// DEBUG begin
- //$this->msg->dbug->out('<br><br>');
+ //$this->msg->dbug->out('<br /><br />');
$this->msg->dbug->out('email.bopreferences.debug_dump_prefs: std_prefs var
DUMP:', $this->std_prefs);
$this->msg->dbug->out('email.bopreferences.debug_dump_prefs: cust_prefs var
DUMP:', $this->cust_prefs);
//Header('Location: ' .
$GLOBALS['phpgw']->link('/preferences/index.php'));
@@ -657,7 +684,7 @@
*/
function grab_set_prefs()
{
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences: call to grab_set_prefs<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences: call to grab_set_prefs<br />'); }
// better make sure we have created the available prefs
schema
$this->init_available_prefs();
@@ -671,8 +698,8 @@
}
else
{
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences: call to grab_set_prefs CALLER
UNKNOWN<br>'); }
- $this->pref_errors .= 'email: bopreferences:
grab_set_prefs: unsupported "caller" variable<br>';
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences: call to grab_set_prefs CALLER
UNKNOWN<br />'); }
+ $this->pref_errors .= 'email: bopreferences:
grab_set_prefs: unsupported "caller" variable<br />';
}
}
@@ -697,7 +724,7 @@
*/
function grab_set_prefs_args_gpc()
{
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences: call to
grab_set_prefs_args_gpc<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences: call to grab_set_prefs_args_gpc<br
/>'); }
// ---- HANDLE GRABBING PREFERENCE GPC HTTP_POST_VARS
ARGS -------
// for abstraction from phpgw UI and from PHP's GPC
data, put the submitted GPC data
// into a class var $this->args[] array. This array is
then used to represent the submitted
@@ -707,7 +734,7 @@
// ---- DEFAULT EMAIL ACCOUNT ----
if
(isset($GLOBALS['phpgw']->msg->ref_POST[$this->submit_token]))
{
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences: INSIDE grab_set_prefs_args_gpc for
Default Email Account data<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences: INSIDE grab_set_prefs_args_gpc for
Default Email Account data<br />'); }
// EXPIRE stuff that may get stale by changing
prefs
$this->expire_related_cached_items(0);
@@ -723,14 +750,14 @@
// existence of $this->submit_token
indicates this data is intended for the default email account
if
(!stristr($this->std_prefs[$i]['accts_usage'], 'default'))
{
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (std pref) _SKIP_ this item
['.$this->std_prefs[$i]['id'].'], it does not apply to the default email
account<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (std pref) _SKIP_ this item
['.$this->std_prefs[$i]['id'].'], it does not apply to the default email
account<br />'); }
}
else
{
// ok, we have a pref item that
applies to the default email account
$this_pref_name =
$this->std_prefs[$i]['id'];
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (std pref) $this_pref_name:
'.$this_pref_name.'<br>'); }
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (std pref)
$GLOBALS[HTTP_POST_VARS][$this_pref_name]:
'.$GLOBALS['phpgw']->msg->ref_POST[$this_pref_name].'<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (std pref) $this_pref_name:
'.$this_pref_name.'<br />'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (std pref)
$GLOBALS[HTTP_POST_VARS][$this_pref_name]:
'.$GLOBALS['phpgw']->msg->ref_POST[$this_pref_name].'<br />'); }
if
(isset($GLOBALS['phpgw']->msg->ref_POST[$this_pref_name]))
{
$this->args[$this_pref_name] =
$GLOBALS['phpgw']->msg->ref_POST[$this_pref_name];
@@ -746,14 +773,14 @@
// existence of $this->submit_token
indicates this data is intended for the default email account
if
(!stristr($this->cust_prefs[$i]['accts_usage'], 'default'))
{
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (cust pref) _SKIP_ this item
['.$this->cust_prefs[$i]['id'].'], it does not apply to the default email
account<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (cust pref) _SKIP_ this item
['.$this->cust_prefs[$i]['id'].'], it does not apply to the default email
account<br />'); }
}
else
{
// ok, we have a pref item that
applies to the default email account
$this_pref_name =
$this->cust_prefs[$i]['id'];
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (cust pref) $this_pref_name:
'.$this_pref_name.'<br>'); }
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (cust pref)
$GLOBALS[HTTP_POST_VARS][$this_pref_name]:
'.$GLOBALS['phpgw']->msg->ref_POST[$this_pref_name].'<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (cust pref) $this_pref_name:
'.$this_pref_name.'<br />'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (cust pref)
$GLOBALS[HTTP_POST_VARS][$this_pref_name]:
'.$GLOBALS['phpgw']->msg->ref_POST[$this_pref_name].'<br />'); }
if
(isset($GLOBALS['phpgw']->msg->ref_POST[$this_pref_name]))
{
$this->args[$this_pref_name] =
$GLOBALS['phpgw']->msg->ref_POST[$this_pref_name];
@@ -764,7 +791,7 @@
// ---- EXTRA EMAIL ACCOUNTS ----
elseif
(isset($GLOBALS['phpgw']->msg->ref_POST[$this->submit_token_extra_accounts]))
{
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences: INSIDE grab_set_prefs_args_gpc for
EXTRA EMAIL ACCOUNTS data<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences: INSIDE grab_set_prefs_args_gpc for
EXTRA EMAIL ACCOUNTS data<br />'); }
//$this->args['submit_prefs'] =
$GLOBALS['phpgw']->msg->ref_POST['submit_prefs'];
$this->args[$this->submit_token_extra_accounts]
= $GLOBALS['phpgw']->msg->ref_POST[$this->submit_token_extra_accounts];
@@ -789,14 +816,14 @@
// extra email accounts
if
(!stristr($this->std_prefs[$i]['accts_usage'], 'extra_accounts'))
{
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (std pref) _SKIP_ this item
['.$this->std_prefs[$i]['id'].'], it does not apply to extra email
accounts<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (std pref) _SKIP_ this item
['.$this->std_prefs[$i]['id'].'], it does not apply to extra email accounts<br
/>'); }
}
else
{
// ok, we have a pref item that
applies to the default email account
$this_pref_name =
$this->std_prefs[$i]['id'];
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (std pref) $this_pref_name:
'.$this_pref_name.'<br>'); }
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (std pref)
$GLOBALS[HTTP_POST_VARS][$this->acctnum('.$this->acctnum.')][$this_pref_name('.$this_pref_name.')]:
['.$GLOBALS['phpgw']->msg->ref_POST[$this->acctnum][$this_pref_name].']<br>');
}
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (std pref) $this_pref_name:
'.$this_pref_name.'<br />'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (std pref)
$GLOBALS[HTTP_POST_VARS][$this->acctnum('.$this->acctnum.')][$this_pref_name('.$this_pref_name.')]:
['.$GLOBALS['phpgw']->msg->ref_POST[$this->acctnum][$this_pref_name].']<br
/>'); }
if
(isset($GLOBALS['phpgw']->msg->ref_POST[$this->acctnum][$this_pref_name]))
{
$this->args[$this->acctnum][$this_pref_name] =
$GLOBALS['phpgw']->msg->ref_POST[$this->acctnum][$this_pref_name];
@@ -813,14 +840,14 @@
// extra email accounts
if
(!stristr($this->cust_prefs[$i]['accts_usage'], 'extra_accounts'))
{
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (cust pref) _SKIP_ this item
['.$this->cust_prefs[$i]['id'].'], it does not apply to extra email
accounts<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (cust pref) _SKIP_ this item
['.$this->cust_prefs[$i]['id'].'], it does not apply to extra email accounts<br
/>'); }
}
else
{
// ok, we have a pref item that
applies to extra email accounts
$this_pref_name =
$this->cust_prefs[$i]['id'];
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (cust pref) $this_pref_name:
'.$this_pref_name.'<br>'); }
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (cust pref)
$GLOBALS[HTTP_POST_VARS][$this->acctnum('.$this->acctnum.')][$this_pref_name('.$this_pref_name.')]:
['.$GLOBALS['phpgw']->msg->ref_POST[$this->acctnum][$this_pref_name].']<br>');
}
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (cust pref) $this_pref_name:
'.$this_pref_name.'<br />'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out(' * * (cust pref)
$GLOBALS[HTTP_POST_VARS][$this->acctnum('.$this->acctnum.')][$this_pref_name('.$this_pref_name.')]:
['.$GLOBALS['phpgw']->msg->ref_POST[$this->acctnum][$this_pref_name].']<br
/>'); }
if
(isset($GLOBALS['phpgw']->msg->ref_POST[$this->acctnum][$this_pref_name]))
{
$this->args[$this->acctnum][$this_pref_name] =
$GLOBALS['phpgw']->msg->ref_POST[$this->acctnum][$this_pref_name];
@@ -845,7 +872,7 @@
function grab_set_prefs_args_xmlrpc()
{
// STUB, for future use
- $this->msg->dbug->out('email boprefs: call to
un-implemented function grab_set_prefs_args_xmlrpc<br>');
+ $this->msg->dbug->out('email boprefs: call to
un-implemented function grab_set_prefs_args_xmlrpc<br />');
}
/*!
@@ -868,13 +895,13 @@
$c_prefs = count($prefs_set);
if ($c_prefs == 0)
{
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences: process_submitted_prefs: empty
array, no prefs set supplied, exiting<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences: process_submitted_prefs: empty
array, no prefs set supplied, exiting<br />'); }
return False;
}
for($i=0;$i<$c_prefs;$i++)
{
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences: process_submitted_prefs: inside
preferences loop ['.$i.']<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences: process_submitted_prefs: inside
preferences loop ['.$i.']<br />'); }
$this_pref = $prefs_set[$i];
@@ -886,7 +913,7 @@
// we are not supposed to show this
item for the default account, skip this pref item
// continue is used within looping
structures to skip the rest of the current loop
// iteration and continue execution at
the beginning of the next iteration
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences: process_submitted_prefs: _SKIP_
this item ["'.$this_pref['id'].'"], it does not apply to the default email
account<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences: process_submitted_prefs: _SKIP_
this item ["'.$this_pref['id'].'"], it does not apply to the default email
account<br />'); }
continue;
}
@@ -898,7 +925,7 @@
// ---- OR an empty string was
submitted for this pref item ----
// so how do we handle this, for this
pref...
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences: process_submitted_prefs:
submitted_pref for ["'.$this_pref['id'].'"] not set or empty string<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences: process_submitted_prefs:
submitted_pref for ["'.$this_pref['id'].'"] not set or empty string<br />'); }
if (stristr($this_pref['write_props'],
'empty_no_delete'))
{
// DO NOT DELETE
@@ -906,7 +933,7 @@
// note there may or may not
actually be an existing value in the prefs table
// but it does not matter here,
because we do not touch this items value at all.
// Typical Usage: passwords
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences: no change to repository for
empty or blank ["'.$this_pref['id'].'"] because of "empty_no_delete"<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences: no change to repository for
empty or blank ["'.$this_pref['id'].'"] because of "empty_no_delete"<br />'); }
}
elseif
(stristr($this_pref['write_props'], 'empty_string_ok'))
{
@@ -914,7 +941,7 @@
// i.e. this pref can take an
empty string as a valid value
// whereas most other prefs are
simply deleted from the repository if value is empty
// Typical Usage: email sig,
UWash Mail Folder
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences: save empty string to repository
for ["'.$this_pref['id'].'"] because of "empty_string_ok"<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences: save empty string to repository
for ["'.$this_pref['id'].'"] because of "empty_string_ok"<br />'); }
// a) as always, delete the
pref before we assign a value
$GLOBALS['phpgw']->preferences->delete('email',$this_pref['id']);
// b) now assign a blank string
value
@@ -923,7 +950,7 @@
else
{
// just delete it from the
preferences repository
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences: deleting empty or blank pref
["'.$this_pref['id'].'"] from the repository<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences: deleting empty or blank pref
["'.$this_pref['id'].'"] from the repository<br />'); }
$GLOBALS['phpgw']->preferences->delete('email',$this_pref['id']);
}
}
@@ -935,7 +962,7 @@
$submitted_pref =
$this->args[$this_pref['id']];
// init a var to hold the processed
submitted_pref
$processed_pref = '';
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('* * ** email: bopreferences: process_submitted_prefs:
submitted_pref: ['.$submitted_pref.']<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('* * ** email: bopreferences: process_submitted_prefs:
submitted_pref: ['.$submitted_pref.']<br />'); }
// most "user_string"s need special
processing before they can go into the repository
if ($this_pref['type'] == 'user_string')
@@ -1007,13 +1034,13 @@
*/
function preferences()
{
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.preferences(): ENTERING<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.preferences(): ENTERING<br />'); }
// establish all available prefs for email
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.preferences(): about to call
$this->init_available_prefs()<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.preferences(): about to call
$this->init_available_prefs()<br />'); }
$this->init_available_prefs();
// this will fill $this->args[] array with any
submitted prefs args
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.preferences(): about to call
$this->grab_set_prefs()<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.preferences(): about to call
$this->grab_set_prefs()<br />'); }
$this->grab_set_prefs();
// ---- HANDLE SETING PREFERENCE -------
@@ -1025,25 +1052,25 @@
// constructor will initialize
$GLOBALS['phpgw']->msg
// --- Process Standard Prefs ---
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.preferences: about to process
Standard Prefs<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.preferences: about to process
Standard Prefs<br />'); }
$this->process_submitted_prefs($this->std_prefs);
// --- Process Custom Prefs ---
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.preferences: about to process Custom
Prefs<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.preferences: about to process Custom
Prefs<br />'); }
if (isset($this->args['use_custom_settings']))
{
// custom settings are in use, process
them
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.preferences: custom prefs are in
use, calling $this->process_submitted_prefs($this->cust_prefs)<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.preferences: custom prefs are in
use, calling $this->process_submitted_prefs($this->cust_prefs)<br />'); }
$this->process_submitted_prefs($this->cust_prefs);
}
else
{
// custom settings are NOT being used,
DELETE them from the repository
$c_prefs = count($this->cust_prefs);
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.preferences: custom prefs NOT in
use, deleting them<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.preferences: custom prefs NOT in
use, deleting them<br />'); }
for($i=0;$i<$c_prefs;$i++)
{
- if ($this->debug_set_prefs > 2)
{ $this->msg->dbug->out(' *(loop)* email.bopreferences: preferences: deleting
custom pref $this->cust_prefs['.$i.'][id] :
['.$this->cust_prefs[$i]['id'].']<br>'); }
+ if ($this->debug_set_prefs > 2)
{ $this->msg->dbug->out(' *(loop)* email.bopreferences: preferences: deleting
custom pref $this->cust_prefs['.$i.'][id] :
['.$this->cust_prefs[$i]['id'].']<br />'); }
$GLOBALS['phpgw']->preferences->delete('email',$this->cust_prefs[$i]['id']);
}
}
@@ -1051,11 +1078,11 @@
// DONE processing prefs, SAVE to the Repository
if ($this->debug_set_prefs > 1)
{
-
$this->msg->dbug->out('email.bopreferences.preferences(): *debug* at
['.$this->debug_set_prefs.'] so skipping save_repository<br>');
+
$this->msg->dbug->out('email.bopreferences.preferences(): *debug* at
['.$this->debug_set_prefs.'] so skipping save_repository<br />');
}
else
{
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.preferences(): SAVING
REPOSITORY<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.preferences(): SAVING REPOSITORY<br
/>'); }
$GLOBALS['phpgw']->preferences->save_repository();
}
// end the email session
@@ -1065,14 +1092,14 @@
$take_me_to_url = $GLOBALS['phpgw']->link(
'/preferences/index.php');
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.preferences(): almost LEAVING, about
to issue a redirect to:<br>'.$take_me_to_url.'<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.preferences(): almost LEAVING, about
to issue a redirect to:<br />'.$take_me_to_url.'<br />'); }
if ($this->debug_set_prefs > 1)
{
-
$this->msg->dbug->out('email.bopreferences.preferences(): LEAVING, *debug* at
['.$this->debug_set_prefs.'] so skipping Header redirection to:
['.$take_me_to_url.']<br>');
+
$this->msg->dbug->out('email.bopreferences.preferences(): LEAVING, *debug* at
['.$this->debug_set_prefs.'] so skipping Header redirection to:
['.$take_me_to_url.']<br />');
}
else
{
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.preferences: LEAVING with redirect
to: <br>'.$take_me_to_url.'<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.preferences: LEAVING with redirect
to: <br />'.$take_me_to_url.'<br />'); }
Header('Location: ' . $take_me_to_url);
}
}
@@ -1212,7 +1239,7 @@
}
if ($this->debug_set_prefs > 1)
{
- echo 'email.bopreferences: *debug*
skipping save_repository<br>';
+ echo 'email.bopreferences: *debug*
skipping save_repository<br />';
}
else
{
@@ -1222,7 +1249,7 @@
}
if ($this->debug_set_prefs > 1)
{
- echo 'email.bopreferences: *debug* skipping
Header redirection<br>';
+ echo 'email.bopreferences: *debug* skipping
Header redirection<br />';
}
else
{
@@ -1240,7 +1267,7 @@
*/
function process_ex_accounts_submitted_prefs($prefs_set='')
{
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: ENTERING<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: ENTERING<br />'); }
// basicly, copy and paste the real
"process_submitted_prefs" and tweak for extra_accounts applicablility
if(!$prefs_set)
{
@@ -1249,22 +1276,22 @@
$c_prefs = count($prefs_set);
if ($c_prefs == 0)
{
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: LEAVING, empty array, no prefs set
supplied<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: LEAVING, empty array, no prefs set
supplied<br />'); }
return False;
}
// ==== ACCTNUM ====
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: pre discovery $this->acctnum :
['.serialize($this->acctnum).']<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: pre discovery $this->acctnum :
['.serialize($this->acctnum).']<br />'); }
if ((!isset($this->acctnum))
|| ((string)$this->acctnum == ''))
{
$this->acctnum = $this->obtain_ex_acctnum();
}
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: post discovery $this->acctnum :
['.serialize($this->acctnum).']<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: post discovery $this->acctnum :
['.serialize($this->acctnum).']<br />'); }
for($i=0;$i<$c_prefs;$i++)
{
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out(' <b>* (next loop) *</b> email: bopreferences:
process_ex_accounts_submitted_prefs: inside preferences loop ['.$i.']<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out(' <b>* (next loop) *</b> email: bopreferences:
process_ex_accounts_submitted_prefs: inside preferences loop ['.$i.']<br />'); }
$this_pref = $prefs_set[$i];
if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: $this_pref = $prefs_set['.$i.'] :
$this_pref DUMP:', $prefs_set[$i]); }
@@ -1276,7 +1303,7 @@
// we are not supposed to handle this
item for the extra email accounts, skip this pref item
// continue is used within looping
structures to skip the rest of the current loop
// iteration and continue execution at
the beginning of the next iteration
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: _SKIP_ this item ["'.$this_pref['id'].'"],
it does not apply to Extra Email Accounts <br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: _SKIP_ this item ["'.$this_pref['id'].'"],
it does not apply to Extra Email Accounts <br />'); }
continue;
}
@@ -1286,7 +1313,7 @@
{
// nothing submitted for this
preference item
// OR an empty string was submitted for
this pref item
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: submitted_pref for
["'.$this_pref['id'].'"] not set or empty string<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: submitted_pref for
["'.$this_pref['id'].'"] not set or empty string<br />'); }
if (stristr($this_pref['write_props'],
'empty_no_delete'))
{
// DO NOT DELETE
@@ -1294,7 +1321,7 @@
// note there may or may not
actually be an existing value in the prefs table
// but it does not matter here,
because we do not touch this items value at all.
// Typical Usage: passwords
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: no change to repository for empty or blank
["'.$this_pref['id'].'"] because of "empty_no_delete"<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: no change to repository for empty or blank
["'.$this_pref['id'].'"] because of "empty_no_delete"<br />'); }
}
elseif
(stristr($this_pref['write_props'], 'empty_string_ok'))
{
@@ -1302,21 +1329,21 @@
// i.e. this pref can take an
empty string as a valid value
// whereas most other prefs are
simply deleted from the repository if value is empty
// Typical Usage: email sig,
UWash Mail Folder
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences
process_ex_accounts_submitted_prefs: save empty string to repository for
["'.$this_pref['id'].'"] because of "empty_string_ok"<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences
process_ex_accounts_submitted_prefs: save empty string to repository for
["'.$this_pref['id'].'"] because of "empty_string_ok"<br />'); }
// a) as always, delete the
pref before we assign a value
$pref_struct_str =
'["ex_accounts"]['.$this->acctnum.']["'.$this_pref['id'].'"]';
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences
process_ex_accounts_submitted_prefs: using preferences->delete_struct("email",
$pref_struct_str) which will eval $pref_struct_str='.$pref_struct_str.'<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences
process_ex_accounts_submitted_prefs: using preferences->delete_struct("email",
$pref_struct_str) which will eval $pref_struct_str='.$pref_struct_str.'<br
/>'); }
$GLOBALS['phpgw']->preferences->delete_struct('email',$pref_struct_str);
// b) now assign a blank string
value
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: using preferences->add_struct("email",
$pref_struct_str, \'\') which will eval
$pref_struct_str='.$pref_struct_str.'<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: using preferences->add_struct("email",
$pref_struct_str, \'\') which will eval
$pref_struct_str='.$pref_struct_str.'<br />'); }
$GLOBALS['phpgw']->preferences->add_struct('email',$pref_struct_str,'');
}
else
{
// just delete it from the
preferences repository
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs deleting empty or blank pref
["'.$this_pref['id'].'"] from the repository<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs deleting empty or blank pref
["'.$this_pref['id'].'"] from the repository<br />'); }
$pref_struct_str =
'["ex_accounts"]['.$this->acctnum.']["'.$this_pref['id'].'"]';
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: using preferences->delete_struct("email",
$pref_struct_str) which will eval $pref_struct_str='.$pref_struct_str.'<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: using preferences->delete_struct("email",
$pref_struct_str) which will eval $pref_struct_str='.$pref_struct_str.'<br
/>'); }
$GLOBALS['phpgw']->preferences->delete_struct('email',$pref_struct_str);
}
}
@@ -1326,7 +1353,7 @@
$submitted_pref =
$this->args[$this->acctnum][$this_pref['id']];
// init a var to hold the processed
submitted_pref
$processed_pref = '';
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('* * email: bopreferences:
process_ex_accounts_submitted_prefs: submitted_pref:
['.$submitted_pref.']<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('* * email: bopreferences:
process_ex_accounts_submitted_prefs: submitted_pref: ['.$submitted_pref.']<br
/>'); }
// most "user_string"s need special
processing before they can go into the repository
if ($this_pref['type'] == 'user_string')
@@ -1370,10 +1397,10 @@
// a) as always, delete the pref before
we assign a value
$pref_struct_str =
'["ex_accounts"]['.$this->acctnum.']["'.$this_pref['id'].'"]';
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences
process_ex_accounts_submitted_prefs: using preferences->delete_struct("email",
$pref_struct_str) which will eval $pref_struct_str='.$pref_struct_str.'<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences
process_ex_accounts_submitted_prefs: using preferences->delete_struct("email",
$pref_struct_str) which will eval $pref_struct_str='.$pref_struct_str.'<br
/>'); }
$GLOBALS['phpgw']->preferences->delete_struct('email',$pref_struct_str);
// b) now assign that processed data to
this pref item in the repository
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: using preferences->add_struct("email",
$pref_struct_str, $processed_pref) which will eval
$pref_struct_str='.$pref_struct_str.'<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences:
process_ex_accounts_submitted_prefs: using preferences->add_struct("email",
$pref_struct_str, $processed_pref) which will eval
$pref_struct_str='.$pref_struct_str.'<br />'); }
$GLOBALS['phpgw']->preferences->add_struct('email', $pref_struct_str,
$processed_pref);
// SORT THAT ARRAY by key, so the
integer array heys go from lowest to hightest
ksort($GLOBALS['phpgw']->preferences->data['email']['ex_accounts']);
@@ -1393,7 +1420,7 @@
*/
function ex_accounts_delete($acctnum='')
{
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_delete ENTERING feed
acctnum: ['.serialize($acctnum).']<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_delete ENTERING feed
acctnum: ['.serialize($acctnum).']<br />'); }
if ($this->debug_set_prefs > 2) {
$this->msg->dbug->out('email: bopreferences.ex_accounts_delete:
$GLOBALS[HTTP_POST_VARS] DUMP:', $GLOBALS['phpgw']->msg->ref_POST); }
if ($this->debug_set_prefs > 2) {
$this->msg->dbug->out('email: bopreferences.ex_accounts_delete:
$GLOBALS[HTTP_GET_VARS] DUMP:', $GLOBALS['phpgw']->msg->ref_GET); }
@@ -1413,16 +1440,16 @@
}
$actually_did_something = False;
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_delete obtained acctnum
['.$this->acctnum.']<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_delete obtained acctnum
['.$this->acctnum.']<br />'); }
if ((isset($this->acctnum))
&& ((string)$this->acctnum != ''))
{
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_delete obtained VALID
acctnum ['.$this->acctnum.'], proceed...<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_delete obtained VALID
acctnum ['.$this->acctnum.'], proceed...<br />'); }
// delete the extra account pref item
$pref_struct_str =
'["ex_accounts"]['.$this->acctnum.']';
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences.ex_accounts_delete: using
preferences->delete_struct("email", $pref_struct_str) which will eval
$pref_struct_str='.$pref_struct_str.'<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences.ex_accounts_delete: using
preferences->delete_struct("email", $pref_struct_str) which will eval
$pref_struct_str='.$pref_struct_str.'<br />'); }
$GLOBALS['phpgw']->preferences->delete_struct('email',$pref_struct_str);
if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences.ex_accounts_delete:
$GLOBALS[phpgw]->preferences->data DUMP:',
$GLOBALS['phpgw']->preferences->data); }
@@ -1434,12 +1461,12 @@
if (!$actually_did_something)
{
// nothing happened above that requires saving
the repository
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_delete: nothing happened
that requires save_repository,
$actually_did_something='.serialize($actually_did_something).'<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_delete: nothing happened
that requires save_repository,
$actually_did_something='.serialize($actually_did_something).'<br />'); }
}
elseif ($this->debug_set_prefs > 2)
{
// we actually did something that requires
saving repository, but are we in debug mode
-
$this->msg->dbug->out('email.bopreferences.ex_accounts_delete: *debug* skipping
save_repository<br>');
+
$this->msg->dbug->out('email.bopreferences.ex_accounts_delete: *debug* skipping
save_repository<br />');
}
else
{
@@ -1454,7 +1481,7 @@
// redirect user back to main preferences page
if ($this->debug_set_prefs > 2)
{
-
$this->msg->dbug->out('email.bopreferences.ex_accounts_delete: *debug* skipping
Header redirection<br>');
+
$this->msg->dbug->out('email.bopreferences.ex_accounts_delete: *debug* skipping
Header redirection<br />');
}
else
{
@@ -1462,7 +1489,7 @@
'/index.php',
'menuaction=email.uipreferences.ex_accounts_list');
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_delete: LEAVING with
redirect to: ['.$take_me_to_url.']<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_delete: LEAVING with
redirect to: ['.$take_me_to_url.']<br />'); }
Header('Location: ' . $take_me_to_url);
}
}
@@ -1476,7 +1503,7 @@
*/
function ex_accounts_edit($acctnum='')
{
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit ENTERING <br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit ENTERING <br />'); }
if ($this->debug_set_prefs > 2) {
$this->msg->dbug->out('email: bopreferences.ex_accounts_edit:
$GLOBALS[HTTP_POST_VARS] DUMP:', $GLOBALS['phpgw']->msg->ref_POST); }
if ($this->debug_set_prefs > 2) {
$this->msg->dbug->out('email: bopreferences.ex_accounts_edit:
$GLOBALS[HTTP_GET_VARS] DUMP:', $GLOBALS['phpgw']->msg->ref_GET); }
@@ -1504,7 +1531,7 @@
// this will fill $this->args[] array with any
submitted prefs args
$this->grab_set_prefs();
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): just passed
this->grab_set_prefs<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): just passed
this->grab_set_prefs<br />'); }
// ---- HANDLE SETING PREFERENCE -------
if
(isset($this->args[$this->submit_token_extra_accounts]))
@@ -1518,39 +1545,39 @@
// constructor will (has taken care of)
initialize $GLOBALS['phpgw']->msg
// --- Process Standard Prefs ---
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): about to
process_ex_accounts_submitted_prefs Standard Prefs<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): about to
process_ex_accounts_submitted_prefs Standard Prefs<br />'); }
$this->process_ex_accounts_submitted_prefs($this->std_prefs);
// --- Process Custom Prefs ---
// CUSTOM PREFS ARE MANDATORY! FOR EXTRA
ACCOUNTS
// first, delete whatever value was there for
"use custom settings" (during pre-release, at times this actually was an
option, make sure it's gone grom the db)
$pref_struct_str =
'["ex_accounts"]['.$this->acctnum.']["'.$this->cust_prefs[0]['id'].'"]';
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences.ex_accounts_edit():
"use_custom_settings" pref, delete it, reference it by
["ex_accounts"][$this->acctnum]["$this->cust_prefs[0][id]"]<br>'); }
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences.ex_accounts_edit(): using
preferences->delete_struct("email", $pref_struct_str) which will eval
$pref_struct_str='.$pref_struct_str.'<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences.ex_accounts_edit():
"use_custom_settings" pref, delete it, reference it by
["ex_accounts"][$this->acctnum]["$this->cust_prefs[0][id]"]<br />'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email: bopreferences.ex_accounts_edit(): using
preferences->delete_struct("email", $pref_struct_str) which will eval
$pref_struct_str='.$pref_struct_str.'<br />'); }
$GLOBALS['phpgw']->preferences->delete_struct('email',$pref_struct_str);
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): about to
process_ex_accounts_submitted_prefs Custom Prefs, which are MANDATORY for extra
email accounts<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): about to
process_ex_accounts_submitted_prefs Custom Prefs, which are MANDATORY for extra
email accounts<br />'); }
$this->process_ex_accounts_submitted_prefs($this->cust_prefs);
/*
// --- Process Custom Prefs ---
// if they were not mandatory, but that does
not work
- if ($this->debug_set_prefs > 1) { echo
'email.bopreferences.ex_accounts_edit(): about to process Custom Prefs<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'email.bopreferences.ex_accounts_edit(): about to process Custom Prefs<br />'; }
if (isset($this->args['use_custom_settings']))
{
// custom settings are in use, process
them
- if ($this->debug_set_prefs > 1) { echo
'email.bopreferences.ex_accounts_edit(): custom prefs are in use<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'email.bopreferences.ex_accounts_edit(): custom prefs are in use<br />'; }
$this->process_ex_accounts_submitted_prefs($this->cust_prefs);
}
else
{
// custom settings are NOT being used,
DELETE them from the repository
$c_prefs = count($this->cust_prefs);
- if ($this->debug_set_prefs > 1) { echo
'email.bopreferences.ex_accounts_edit(): custom prefs NOT in use, deleting
them<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'email.bopreferences.ex_accounts_edit(): custom prefs NOT in use, deleting
them<br />'; }
for($i=0;$i<$c_prefs;$i++)
{
$pref_struct_str =
'["ex_accounts"]['.$this->acctnum.']["'.$this->cust_prefs[$i]['id'].'"]';
- if ($this->debug_set_prefs > 1)
{ echo ' ** (looping) email: bopreferences.ex_accounts_edit(): using
preferences->delete_struct("email", $pref_struct_str) which will eval
$pref_struct_str='.$pref_struct_str.'<br>'; }
+ if ($this->debug_set_prefs > 1)
{ echo ' ** (looping) email: bopreferences.ex_accounts_edit(): using
preferences->delete_struct("email", $pref_struct_str) which will eval
$pref_struct_str='.$pref_struct_str.'<br />'; }
$GLOBALS['phpgw']->preferences->delete_struct('email',$pref_struct_str);
}
}
@@ -1563,17 +1590,17 @@
if (!$actually_did_something)
{
// nothing happened above that requires saving
the repository
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): nothing happened
that requires save_repository,
$actually_did_something='.serialize($actually_did_something).'<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): nothing happened
that requires save_repository,
$actually_did_something='.serialize($actually_did_something).'<br />'); }
}
elseif ($this->debug_set_prefs > 1)
{
// we actually did something that requires
saving repository, but are we in debug mode
-
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): *debug* at
['.$this->debug_set_prefs.'] so skipping save_repository<br>');
+
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): *debug* at
['.$this->debug_set_prefs.'] so skipping save_repository<br />');
}
else
{
// we actually did something that requires
saving repository, and we have the go-ahead
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): SAVING
REPOSITORY<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): SAVING
REPOSITORY<br />'); }
$GLOBALS['phpgw']->preferences->save_repository();
}
@@ -1588,14 +1615,14 @@
'/index.php',
'menuaction=email.uipreferences.ex_accounts_list');
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): almost LEAVING,
about to issue a redirect to:<br>'.$take_me_to_url.'<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): almost LEAVING,
about to issue a redirect to:<br />'.$take_me_to_url.'<br />'); }
if ($this->debug_set_prefs > 1)
{
-
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): LEAVING, *debug*
at ['.$this->debug_set_prefs.'] so skipping Header redirection to:
['.$take_me_to_url.']<br>');
+
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit(): LEAVING, *debug*
at ['.$this->debug_set_prefs.'] so skipping Header redirection to:
['.$take_me_to_url.']<br />');
}
else
{
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit: LEAVING with
redirect to: <br>'.$take_me_to_url.'<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_edit: LEAVING with
redirect to: <br />'.$take_me_to_url.'<br />'); }
Header('Location: ' . $take_me_to_url);
}
}
@@ -1608,7 +1635,7 @@
*/
function ex_accounts_list()
{
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list: ENTERING<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list: ENTERING<br />'); }
// list accounts, except "empty" ones (show "enabled"
and "disabled"
$return_list = array();
@@ -1618,14 +1645,14 @@
$this_acctnum =
$GLOBALS['phpgw']->msg->extra_accounts[$i]['acctnum'];
$this_status =
$GLOBALS['phpgw']->msg->extra_accounts[$i]['status'];
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list:
$GLOBALS[phpgw]->msg->extra_accounts['.$i.'][acctnum]=['.$this_acctnum.'] ;
[status]=['.$this->extra_accounts[$i]['status'].'] <br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list:
$GLOBALS[phpgw]->msg->extra_accounts['.$i.'][acctnum]=['.$this_acctnum.'] ;
[status]=['.$this->extra_accounts[$i]['status'].'] <br />'); }
if ($this_status == 'empty')
{
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list:
$GLOBALS[phpgw]->msg->extra_accounts['.$i.'][status] == empty <br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list:
$GLOBALS[phpgw]->msg->extra_accounts['.$i.'][status] == empty <br />'); }
}
else
{
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list:
$GLOBALS[phpgw]->msg->extra_accounts['.$i.'][status] != empty <br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list:
$GLOBALS[phpgw]->msg->extra_accounts['.$i.'][status] != empty <br />'); }
$next_pos = count($return_list);
//$next_pos = $this_acctnum - 1;
$return_list[$next_pos]['acctnum'] =
$this_acctnum;
@@ -1694,11 +1721,11 @@
}
// NEXT: html encode the acctname string
// html encode entities on the fullname
so it's safe to display in the browser, and prefix with the acctnum
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list: fullname raw:
<code>'.serialize($accountname).'</code><br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list: fullname raw:
<code>'.serialize($accountname).'</code><br />'); }
$accountname =
$GLOBALS['phpgw']->msg->htmlspecialchars_decode($accountname);
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list: fullname B:
<code>'.serialize($accountname).'</code><br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list: fullname B:
<code>'.serialize($accountname).'</code><br />'); }
$accountname =
$GLOBALS['phpgw']->msg->htmlspecialchars_encode($accountname);
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list: fullname C:
<code>'.serialize($accountname).'</code><br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list: fullname C:
<code>'.serialize($accountname).'</code><br />'); }
// FINALLY we have a string we are
going to display to the user that is the name of the account
$return_list[$next_pos]['display_string'] = '['.$this_acctnum.'] '.$accountname;
@@ -1716,7 +1743,7 @@
}
}
if ($this->debug_set_prefs > 2) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list: returning
$return_list[] DUMP:', $return_list); }
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list: LEAVING, returning
$return_list <br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.ex_accounts_list: LEAVING, returning
$return_list <br />'); }
return $return_list;
}
@@ -1728,12 +1755,12 @@
*/
function get_first_empty_ex_acctnum()
{
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.get_first_empty_ex_acctnum:
ENTERING<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.get_first_empty_ex_acctnum:
ENTERING<br />'); }
if ($this->debug_set_prefs > 2) {
$this->msg->dbug->out('email: bopreferences.get_first_empty_ex_acctnum:
$GLOBALS[phpgw]->msg->extra_accounts DUMP:',
$GLOBALS['phpgw']->msg->extra_accounts); }
$loops = count($GLOBALS['phpgw']->msg->extra_accounts);
if ($loops == 0)
{
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.get_first_empty_ex_acctnum:
count($GLOBALS[phpgw]->msg->extra_accounts
=['.serialize(count($GLOBALS['phpgw']->msg->extra_accounts)).']<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.get_first_empty_ex_acctnum:
count($GLOBALS[phpgw]->msg->extra_accounts
=['.serialize(count($GLOBALS['phpgw']->msg->extra_accounts)).']<br />'); }
$first_empty_ex_acctnum = 1;
}
else
@@ -1744,10 +1771,10 @@
$this_acctnum =
$GLOBALS['phpgw']->msg->extra_accounts[$i]['acctnum'];
$this_status =
$GLOBALS['phpgw']->msg->extra_accounts[$i]['status'];
// loop =0 *would* = acctnum 1 *if*
acctnum slots are filled in order, they'd always be 1 apart
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.get_first_empty_ex_acctnum: in loop
['.$i.'] : status: ['.$this_status.'] ; acctnum: ['.$this_acctnum.']<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.get_first_empty_ex_acctnum: in loop
['.$i.'] : status: ['.$this_status.'] ; acctnum: ['.$this_acctnum.']<br />'); }
if ($this_status == 'empty')
{
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email.bopreferences.get_first_empty_ex_acctnum:
[status] == empty for acctnum ['.$this_acctnum.']<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email.bopreferences.get_first_empty_ex_acctnum:
[status] == empty for acctnum ['.$this_acctnum.']<br />'); }
$first_empty_ex_acctnum =
(int)$this_acctnum;
$did_get_acctnum = True;
break;
@@ -1755,7 +1782,7 @@
elseif ((int)($i+1) !=
(int)$this_acctnum)
{
$first_empty_ex_acctnum =
(int)($i+1);
- if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email.bopreferences.get_first_empty_ex_acctnum: slots
have an empty spot, unused $acctnum is ['.$first_empty_ex_acctnum.']<br>'); }
+ if ($this->debug_set_prefs > 1)
{ $this->msg->dbug->out('email.bopreferences.get_first_empty_ex_acctnum: slots
have an empty spot, unused $acctnum is ['.$first_empty_ex_acctnum.']<br />'); }
$did_get_acctnum = True;
break;
}
@@ -1766,10 +1793,10 @@
$first_empty_ex_acctnum =
count($GLOBALS['phpgw']->msg->extra_accounts);
// since extra accounts are not zero
based, add one to that count to get real next available
$first_empty_ex_acctnum++;
- if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.get_first_empty_ex_acctnum: no empty
spaces extra_accounts[], advance to next int: $first_empty_ex_acctnum
['.$first_empty_ex_acctnum.']<br>'); }
+ if ($this->debug_set_prefs > 1) {
$this->msg->dbug->out('email.bopreferences.get_first_empty_ex_acctnum: no empty
spaces extra_accounts[], advance to next int: $first_empty_ex_acctnum
['.$first_empty_ex_acctnum.']<br />'); }
}
}
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.get_first_empty_ex_acctnum: LEAVING,
returning $first_empty_ex_acctnum
['.serialize($first_empty_ex_acctnum).']<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.get_first_empty_ex_acctnum: LEAVING,
returning $first_empty_ex_acctnum ['.serialize($first_empty_ex_acctnum).']<br
/>'); }
return $first_empty_ex_acctnum;
}
@@ -1781,7 +1808,7 @@
*/
function obtain_ex_acctnum()
{
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email: bopreferences.obtain_ex_acctnum: ENTERING<br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email: bopreferences.obtain_ex_acctnum: ENTERING<br
/>'); }
if ($this->debug_set_prefs > 2) {
$this->msg->dbug->out('email: bopreferences.obtain_ex_acctnum:
$GLOBALS[HTTP_POST_VARS] DUMP:', $GLOBALS['phpgw']->msg->ref_POST); }
if ($this->debug_set_prefs > 2) {
$this->msg->dbug->out('email: bopreferences.obtain_ex_acctnum:
$GLOBALS[HTTP_GET_VARS] DUMP:', $GLOBALS['phpgw']->msg->ref_GET); }
// get fromPOST or GET
@@ -1812,7 +1839,7 @@
{
$final_acctnum = $prelim_acctnum;
}
- if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.obtain_ex_acctnum: LEAVING,
returning $final_acctnum: ['.serialize($final_acctnum).'] <br>'); }
+ if ($this->debug_set_prefs > 0) {
$this->msg->dbug->out('email.bopreferences.obtain_ex_acctnum: LEAVING,
returning $final_acctnum: ['.serialize($final_acctnum).'] <br />'); }
return $final_acctnum;
}
====================================================
Index: email/inc/class.bosend.inc.php
diff -u email/inc/class.bosend.inc.php:1.12 email/inc/class.bosend.inc.php:1.13
--- email/inc/class.bosend.inc.php:1.12 Thu Dec 30 23:13:50 2004
+++ email/inc/class.bosend.inc.php Sun Mar 13 23:22:44 2005
@@ -1,35 +1,35 @@
<?php
-
/**************************************************************************\
- * phpGroupWare - email send non-SMTP functions
*
- * http://www.phpgroupware.org
*
- * Written by Angelo (Angles) Puglisi <address@hidden> *
- * --------------------------------------------
*
- * This program is free software; you can redistribute it and/or modify
it *
- * under the terms of the GNU General Public License as published by
the *
- * Free Software Foundation; either version 2 of the License, or (at
your *
- * option) any later version.
*
-
\**************************************************************************/
+ /**
+ * phpGroupWare - email send non-SMTP functions
+ * @author Angelo (Angles) Puglisi <address@hidden>
+ * @author Dave Hall - skwashd at phpgroupware.org
+ * @copyright Portions Copyright (C) 2005 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @package email
+ * @version $Id$
+ */
- /* $Id$ */
-
- /*!
- @class bosend
- @abstract bo class for assembling messages for sending via class send
- @author Angles, server side attachment storage technique borrowed from
Squirrelmail,
+ /**
+ * class bosend
+ *
+ * bo class for assembling messages for sending via class send
+ * @internal server side attachment storage technique borrowed from
Squirrelmail
*/
class bosend
{
var $public_functions = array(
'sendorspell' => True,
'spellcheck' => True,
- 'send' => True
+ 'send' => True,
+ 'save_draft' => True,
);
var $mail_spell;
var $msg_bootstrap;
var $nextmatchs;
var $not_set='-1';
var $mail_out = array();
+ var $smtp;
var $xi;
// debug level between 0 to 3
@@ -43,7 +43,7 @@
function bosend()
{
- if ($this->debug_constructor > 0) { echo 'email.bosend
*constructor*: ENTERING<br>'; }
+ if ($this->debug_constructor > 0) { echo 'email.bosend
*constructor*: ENTERING<br />'; }
// May 9, 2003 Ryan Bonham adds company disclaimer code
// This Disclaimer will be added to any out going mail
@@ -53,15 +53,17 @@
$this->msg_bootstrap->ensure_mail_msg_exists('email.bosend.constructor',
$this->debug_send);
$this->not_set = $GLOBALS['phpgw']->msg->not_set;
- if ($this->debug_constructor > 0) { echo 'email.bosend
*constructor*: LEAVING<br>'; }
+ if ($this->debug_constructor > 0) { echo 'email.bosend
*constructor*: LEAVING<br />'; }
}
- /*!
- @function get_originating_ip
- @abstract the client IP for this phpgw user at the time the
send button was clicked
- @discussion Gets the value for the "X-Originating-IP" header.
That header is used
- by hotmail, for example, it looked like a "good thing" and was
a feature request, so we
- use it here too. Even if the IP private (such as on a LAN),
this can still be useful for the admin.
+ /**
+ * Get the IP address of the client sending this message
+ *
+ * Gets the value for the "X-Originating-IP" header, which is
used by hotmail,
+ * for example, it looked like a "good thing" so it here too.
+ * Even if the IP private (such as on a LAN), this can still be
useful for the admin.
+ * @author Angles
+ * @returns string client IP address
*/
function get_originating_ip()
{
@@ -70,9 +72,9 @@
{
$got_ip =
$GLOBALS['phpgw']->session->getuser_ip();
}
- elseif
(isset($GLOBALS['HTTP_SERVER_VARS']['REMOTE_ADDR']))
+ elseif (isset($_SERVER['REMOTE_ADDR']))
{
- $got_ip =
$GLOBALS['HTTP_SERVER_VARS']['REMOTE_ADDR'];
+ $got_ip = $_SERVER['REMOTE_ADDR'];
}
// did we get anything useful ?
@@ -85,28 +87,30 @@
- /*!
- @function copy_to_sent_folder
- @abstract Put a message in "Sent" Folder, if Applicable. This
MUST be a message that has been sent already!
- @result Boolean
- @author Angles
- @discussion If a message has already been sent, and IF the user
has set the pref enabling the use of the sent folder,
- only then should this function be used. If a message has not
actually been sent, it should NOT be copied to the "Sent"
- folder because that misrepresents to the user the history of
the message. Mostly this is an issue with automated
- messages sent from other apps. My .02 cents is that if a user
did not send a message by pressing the "Send" button,
- then the message does not belong in the Sent messages folder.
Other people may have a different opinion, so
- this function will not zap your keyboard if you think
differently. Nonetheless, if the user has not enabled
- the preference "Sent mail copied to Sent Folder", then noting
gets copied there no matter what. Note that we
- obtain these preference settings as shown in the example for
this function. If the folder does not already exist,
- class mail_msg has code to make every reasonable attempt to
create the folder automatically. Some servers
- just do things differently enough (unusual namespaces, sub
folder trees) that the auto create may not work,
- but it is nost likly that it can be created, and even more
likely that it already exists. NOTE: this particular class
- should be made availabllle to public use without the brain
damage that is the current learning curve for this
- code. BUT for now, this is a private function unless you really
know what you are doing. Even then, code
- in this class is subject to change.
- @access private - NEEDS TO BE MADE AVAILABLE FOR PUBLIC USE
+ /**
+ * Put a message in "Sent" Folder, if Applicable. This MUST be a
message that has been sent already!
+ *
+ * If a message has already been sent, and IF the user has set
the pref enabling the use of the sent folder,
+ * only then should this function be used. If a message has not
actually been sent, it should NOT be copied to the "Sent"
+ * folder because that misrepresents to the user the history of
the message. Mostly this is an issue with automated
+ * messages sent from other apps. My .02 cents is that if a user
did not send a message by pressing the "Send" button,
+ * then the message does not belong in the Sent messages folder.
Other people may have a different opinion, so
+ * this function will not zap your keyboard if you think
differently. Nonetheless, if the user has not enabled
+ * the preference "Sent mail copied to Sent Folder", then noting
gets copied there no matter what. Note that we
+ * obtain these preference settings as shown in the example for
this function. If the folder does not already exist,
+ * class mail_msg has code to make every reasonable attempt to
create the folder automatically. Some servers
+ * just do things differently enough (unusual namespaces, sub
folder trees) that the auto create may not work,
+ * but it is nost likly that it can be created, and even more
likely that it already exists. NOTE: this particular class
+ * should be made availabllle to public use without the brain
damage that is the current learning curve for this
+ * code. BUT for now, this is a private function unless you
really know what you are doing. Even then, code
+ * in this class is subject to change.
+ *
+ * @author Angles
+ * @access private
+ * @internal NEEDS TO BE MADE AVAILABLE FOR PUBLIC USE
+ * @returns bool was the message saved?
*/
- function copy_to_sent_folder()
+ function copy_to_sent_folder($message)
{
/*!
@capability (FUTURE CODE) append to sent folder without
a pre-existing mailsvr_stream.
@@ -127,78 +131,135 @@
// ERROR, THIS ACCT DOES NOT WANT SENT FOLDER
USED
return False;
}
-
-
- // note: what format should these folder name options
(sent and trash) be held in
- // i.e. long or short name form, in the prefs database
- $sent_folder_name =
$GLOBALS['phpgw']->msg->get_pref_value('sent_folder_name');
-
- // NOTE: append will open the stream automatically IF
it is not open
- //if
((($GLOBALS['phpgw']->msg->get_isset_arg('mailsvr_stream')))
- //&&
($GLOBALS['phpgw']->msg->get_arg_value('mailsvr_stream') != ''))
- //{
- // note: "append" will CHECK to make sure this
folder exists, and try to create it if it does not
- // also note, make sure there is a \r\n CRLF
empty last line sequence so Cyrus will be happy
- $success =
$GLOBALS['phpgw']->msg->phpgw_append($sent_folder_name,
-
$GLOBALS['phpgw']->mail_send->assembled_copy."\r\n",
- "\\Seen");
- //if ($success) { echo 'append to sent OK<br>';
} else { echo 'append to sent FAILED<br>'; echo 'imap_last_error:
'.imap_last_error().'<br>'; }
- //}
- //else
- //{
- //echo 'NO STREAM available for sent folder
append<br>';
- // return False;
- //}
-
- return $success;
+
+ return $this->save_message($message,
$GLOBALS['phpgw']->msg->get_pref_value('sent_folder_name'));
+ }
+
+ /**
+ * Save a message to the nominated folder
+ *
+ * @author skwashd
+ * @param string $msg the mail message
+ * @param string $folder the folder the message is to be saved in
+ * @param string $extra_flags any additional flags for message?
+ * @return bool was the message saved?
+ */
+ function save_message($msg, $folder, $extra_flags = '')
+ {
+ if(! ($msg && $folder) )
+ {
+ return False; //invalid args
+ }
+
+ /*
+ NOTES: "append" will CHECK to make sure this folder
exists, and try to create it if it does not
+ make sure there is a \r\n CRLF empty last line
sequence so Cyrus will be happy
+ */
+ return $GLOBALS['phpgw']->msg->phpgw_append($folder,
+ $msg . "\r\n",
+ "\\Seen
{$extra_flags}");
+ }
+
+ /**
+ * Marks a message as being replied to - like most other MUAs do
+ *
+ * @param array $msgball the message info
+ */
+ function mark_as_replied($msgball)
+ {
+ $GLOBALS['phpgw']->msg->phpgw_set_flag($msgball,
"\\Answered");
}
- // ------- This will be called just before leaving this page,
to clear / unset variables / objects -----------
+ /**
+ * This is called just before leaving this page, to clear /
unset variables / objects
+ */
function send_message_cleanup()
{
//echo 'send_message cleanup';
$GLOBALS['phpgw']->msg->end_request();
- // note: the next lines can be removed since php takes
care of memory management
- $this->mail_out = '';
- unset($this->mail_out);
- $GLOBALS['phpgw']->mail_send = '';
- unset($GLOBALS['phpgw']->mail_send);
+
+ $upload_dir = $GLOBALS['phpgw']->msg->att_files_dir;
+ if (file_exists($upload_dir))
+ {
+ $dh = dir($upload_dir);
+ while ( ($file = $dh->read() ) !== false )
+ {
+ if( $file != '.' && $file != '..' )
+ {
+ unlink($upload_dir . SEP .
$file);
+ }
+ }
+ $dh->close();
+ rmdir($upload_dir);
+ }
}
- /*!
- @function sendorspell
- @abstract detects whether the compose page was submitted as a
send or spellcheck, and acts accordingly
- @params none, uses GET and POST vars
- @author Angles
- @discussion Compose form submit action target is bosend,
naturally, however the spell check button submit is identical
- EXCEPT "btn_spellcheck" POST var will be set, which requires we
handoff the handling to the spell class.
+ /**
+ * Detects whether the compose page was submitted as a send or
spellcheck, and acts accordingly
+ *
+ * Compose form submit action target is bosend, naturally,
however the spell check button submit is identical
+ * EXCEPT "btn_spellcheck" POST var will be set, which requires
we handoff the handling to the spell class.
+ * @author Angles
*/
function sendorspell()
{
- if ($this->debug_sendorspell > 0) { echo 'ENTERING:
email.bosend.sendorspell'.'<br>'; }
+ if ($this->debug_sendorspell > 0)
+ {
+ echo 'ENTERING: email.bosend.sendorspell'.'<br
/>';
+ }
- if ($this->debug_sendorspell > 2) { echo
'email.bosend.sendorspell: data dump: $GLOBALS[HTTP_POST_VARS]<pre>';
print_r($GLOBALS['phpgw']->msg->ref_POST); echo '</pre>'."\r\n";
- echo
'email.bosend.sendorspell: data dump: $GLOBALS[HTTP_GET_VARS]<pre>';
print_r($GLOBALS['phpgw']->msg->ref_GET); echo '</pre>'."\r\n"; }
+ if ($this->debug_sendorspell > 2)
+ {
+ echo 'email.bosend.sendorspell: data dump:
$GLOBALS[HTTP_POST_VARS]<pre>';
+ print_r($GLOBALS['phpgw']->msg->ref_POST);
+ echo '</pre>'."\r\n";
+
+ echo 'email.bosend.sendorspell: data dump:
$GLOBALS[HTTP_GET_VARS]<pre>';
+ print_r($GLOBALS['phpgw']->msg->ref_GET);
+ echo '</pre>'."\r\n";
+ }
+
+ if ((isset($GLOBALS['phpgw']->msg->ref_POST['draft']))
+ && ($GLOBALS['phpgw']->msg->ref_POST['draft'] ==
'save'))
+ {
+ if ($this->debug_sendorspell > 1)
+ {
+ echo 'email.bosend.sendorspell: "draft"
is set && == save; calling $this->save_draftk()'.'<br />';
+ }
+ $this->save_draft();
+ }
if
((isset($GLOBALS['phpgw']->msg->ref_POST['btn_spellcheck']))
&& ($GLOBALS['phpgw']->msg->ref_POST['btn_spellcheck']
!= ''))
{
- if ($this->debug_sendorspell > 1) { echo
'email.bosend.sendorspell: "btn_spellcheck" is set; calling
$this->spellcheck()'.'<br>'; }
+ if ($this->debug_sendorspell > 1)
+ {
+ echo 'email.bosend.sendorspell:
"btn_spellcheck" is set; calling $this->spellcheck()'.'<br />';
+ }
$this->spellcheck();
}
elseif
((isset($GLOBALS['phpgw']->msg->ref_POST['btn_send']))
&& ($GLOBALS['phpgw']->msg->ref_POST['btn_send'] != ''))
{
- if ($this->debug_sendorspell > 1) { echo
'email.bosend.sendorspell: "btn_send" is set; calling $this->send()'.'<br>'; }
+ if ($this->debug_sendorspell > 1)
+ {
+ echo 'email.bosend.sendorspell:
"btn_send" is set; calling $this->send()'.'<br />';
+ }
$this->send();
}
else
{
- if ($this->debug_sendorspell > 1) { echo ':
email.bosend.sendorspell: ERROR: neither "btn_spellcheck" not "btn_send" is
set; fallback action $this->send()'.'<br>'; }
+ if ($this->debug_sendorspell > 1)
+ {
+ echo ': email.bosend.sendorspell:
ERROR: neither "btn_spellcheck" not "btn_send" is set; fallback action
$this->send()'.'<br />';
+ }
$this->send();
}
- if ($this->debug_sendorspell > 0) { echo 'LEAVING:
email.bosend.sendorspell'.'<br>'; }
+ if ($this->debug_sendorspell > 0)
+ {
+ echo 'LEAVING: email.bosend.sendorspell'.'<br
/>';
+ }
}
@@ -211,7 +272,7 @@
*/
function spellcheck()
{
- if ($this->debug_spellcheck > 0) { echo 'ENTERING:
email.bosend.spellcheck'.'<br>'; }
+ if ($this->debug_spellcheck > 0) { echo 'ENTERING:
email.bosend.spellcheck'.'<br />'; }
if ($this->debug_spellcheck > 2) { echo
'email.bosend.spellcheck: data dump: $GLOBALS[HTTP_POST_VARS]<pre>';
print_r($GLOBALS['phpgw']->msg->ref_POST); echo '</pre>'."\r\n";
echo
'email.bosend.spellcheck: data dump: $GLOBALS[HTTP_GET_VARS]<pre>';
print_r($GLOBALS['phpgw']->msg->ref_GET); echo '</pre>'."\r\n"; }
@@ -252,203 +313,160 @@
- if ($this->debug_spellcheck > 0) { echo 'LEAVING:
email.bosend.spellcheck'.'<br>'; }
+ if ($this->debug_spellcheck > 0) { echo 'LEAVING:
email.bosend.spellcheck'.'<br />'; }
}
- /*!
- @function send
- @abstract if the compose page was submitted as a pellcheck,
this function is called
- @params none, uses GET and POST vars, however this will be OOPd
for API use
- @discussion advanced function to send mail with all the
complexities of modern MIME usage.
- Currently handles forwarding as an "encapsulated" MIME part,
thus prewserving the original
- messages structure, including any attachments the original
message had.
- Of course the user can attach files, this includes attaching
additional files to a forwarded message which
- itself alsready has attachments.
+ /**
+ * Send a mail message.
+ *
+ * @internal a lot of this functionality is now in
prepare_message
+ * @author Angles
*/
function send()
{
- if ($this->debug_send> 0) { echo 'ENTERING:
email.bosend.send'.'<br>'; }
-
- if ($this->debug_send> 2) { echo
'email.bosend.send: data dump: $GLOBALS[HTTP_POST_VARS]<pre>';
print_r($GLOBALS['phpgw']->msg->ref_POST); echo '</pre>'."\r\n";
- echo
'email.bosend.send: data dump: $GLOBALS[HTTP_GET_VARS]<pre>';
print_r($GLOBALS['phpgw']->msg->ref_GET); echo '</pre>'."\r\n";
- return;
}
-
-
- // ---- BEGIN BO SEND LOGIC
- $not_set = $GLOBALS['phpgw']->msg->not_set;
- $msgball =
$GLOBALS['phpgw']->msg->get_arg_value('msgball');
+ $this->smtp = createObject('email.mail_smtp');
- // ------- Init Array Structure For Outgoing Mail
-----------
- $this->mail_out = Array();
- $this->mail_out['to'] = Array();
- $this->mail_out['cc'] = Array();
- $this->mail_out['bcc'] = Array();
- $this->mail_out['mta_to'] = Array();
- $this->mail_out['mta_from'] =
'<'.trim($GLOBALS['phpgw']->msg->get_pref_value('address')).'>';
- $this->mail_out['mta_elho_domain'] = '';
- $this->mail_out['message_id'] =
$GLOBALS['phpgw']->msg->make_message_id();
- $this->mail_out['boundary'] =
$GLOBALS['phpgw']->msg->make_boundary();
- $this->mail_out['date'] = '';
- $this->mail_out['originating_ip'] =
'['.$this->get_originating_ip().']';
- $this->mail_out['main_headers'] = Array();
- $this->mail_out['body'] = Array();
- $this->mail_out['is_multipart'] = False;
- $this->mail_out['num_attachments'] = 0;
- $this->mail_out['whitespace'] = chr(9);
- $this->mail_out['is_forward'] = False;
- $this->mail_out['fwd_proc'] = '';
- $this->mail_out['from'] = array();
- $this->mail_out['sender'] = '';
- $this->mail_out['charset'] = '';
- $this->mail_out['msgtype'] = '';
-
- // ------- Start Filling Array Structure For Outgoing
Mail -----------
-
- // ----- X-PHPGW flag (msgtype) ------
- /*!
- @var msgtype
- @abstract obsoleted way phpgw apps used to inter-operate
- @discussion NOTE this is a vestigal way for phpgw apps
to inter-operate,
- I *think* this is being obsoleted via n-tiering and
xml-rpc / soap methods.
- RARELY USED, maybe NEVER used, most email code for this
is now commented out
- "back in the day..." the "x-phpgw" header was specified
by a phpgw app *other* than the email app
- which was used to include special phpgw related
handling instructions in the message which
- to the message intentended to be noticed and processed
by the phpgw email app when the
- user open the mail for viewing, at which time the phpgw
email app would issue the
- special handling instructions contained in the
"x-phpgw" header.
- even before n-tiering of the phpgw apps and api begain,
I (angles) considered this a possible
- area of abuse and I commented out the code in the email
app that would notice, process and issue
- those instructions.
- */
- if (($GLOBALS['phpgw']->msg->get_isset_arg('msgtype'))
- && ($GLOBALS['phpgw']->msg->get_arg_value('msgtype') !=
''))
+ $this->prepare_message();
+
+ $returnccode = $this->smtp->Send();
+
+ if( !$this->smtp->ErrorInfo && !$returncode)//need to
work out why it does this sometimes!
{
- // convert script GPC args into useful mail_out
structure information
- $this->mail_out['msgtype'] =
$GLOBALS['phpgw']->msg->get_arg_value('msgtype');
- // after this, ONLY USE $this->mail_out
structure for this
+ $returncode = 1;
}
- // ----- CHARSET -----
- /*!
- @property charset
- @abstract not user specified, not a user var, not an
argument, not a paramater.
- @discussion charset could take up a lot of notes here,
suffice to say that email began life as a
- US-ASCII thing and still us-ascii chars are strictly
required for some headers, while other headers
- and the body have various alternative ways to deal with
other charsets, ways that are well documented
- in email and other RFC's and other literature. In the
rare event that the phpgw api is unable
- to provide us with a charset value, we use the RFC
specified default value of "US-ASCII"
+ /*
+ // ===== DEBUG =====
+ echo '<br />';
+ echo 'retain_copy:
'.serialize($GLOBALS['phpgw']->mail_send->retain_copy);
+ echo '<br />=== POST SEND ===<br />';
+ echo
'<pre>'.$GLOBALS['phpgw']->msg->htmlspecialchars_encode($GLOBALS['phpgw']->mail_send->assembled_copy).'</pre>';
+ echo '<br />';
+ // ===== DEBUG =====
*/
- if (lang('charset') != '')
+
+ if( $returnccode &&
$GLOBALS['phpgw']->msg->get_isset_pref('use_sent_folder') )
{
- $this->mail_out['charset'] = lang('charset');
+ $success =
$this->copy_to_sent_folder($this->smtp->getHeader() . "\n" .
$this->smtp->getBody());
}
- else
+
+ if( $is_reply && $returncode )
{
- // RFC default charset, if none is specified,
is US-ASCII
- $this->mail_out['charset'] = 'US-ASCII';
+ $this->mark_as_replied($msgball);
}
- // ----- FROM -----
- /*!
- @var from
- @abstract the mail's author, OPTIONAL, usually no need
to specify this as an arg passed to the script.
- @discussion Generally this var does not need to be
specified. When the mail is being sent from the
- user's default email account (or mail on behalf of the
user, like automated email notifications),
- we generate the "from" header for the user, hence no
custom "from" arg is necessary.
- This is the most common scenario, in which case we
generate the "from" value as follows:
- (1) the user's "fullname" (a.k.a. the "personal" part
of the address) is always picked up
- from the phpgw api's value that contains the users
name, and
- (2) the user's email address is either (2a) the default
value from the phpgw api which was
- passed into the user's preferences because the user
specified no custom email address preference, or
- (2b) the user specified a custom email address in the
email preferences in which case the aformentioned
- phpgw api default email address is not used in the
user's preferences array, this user supplied
- value is used instead.
- Providing a "from" arg is usually for extra email
accounts and/or alternative email profiles,
- where the user wants other than the "from" info
otherwise defaultly associated with this email acccount.
- NOTE: from != sender
- from is who the mail came from assuming that person is
also the mail's author.
- this is by far the most common scenario, "from" and
"author" are usually one in the same
- (see below for info on when to *also* use "sender" -
VERY rare)
- */
- if (($GLOBALS['phpgw']->msg->get_isset_arg('from'))
- && ($GLOBALS['phpgw']->msg->get_arg_value('from') !=
''))
- {
- $from_assembled =
$GLOBALS['phpgw']->msg->get_arg_value('sender');
- }
- else
- {
- $from_name =
$GLOBALS['phpgw']->msg->get_pref_value('fullname');
- //$from_name =
$GLOBALS['phpgw_info']['user']['fullname'];
- $from_address =
$GLOBALS['phpgw']->msg->get_pref_value('address');
- $from_assembled = '"'.$from_name.'"
<'.$from_address.'>';
- }
- // this array gets filled with functiuon
"make_rfc_addy_array", but it will have only 1 numbered array,
$this->mail_out['from'][0]
- // note that sending it through make_rfc_addy_array
will ensure correct formatting of non us-ascii chars (if any) in the use's
fullname
- $this->mail_out['from'] =
$GLOBALS['phpgw']->msg->make_rfc_addy_array($from_assembled);
+ $return_to_folder_href = $this->get_return_to();
- // ----- SENDER -----
- /*!
- @var sender
- @abstract OPTIONAL only used in the rare event that the
person sending the email
- is NOT that email's author.
- @discussion RFC2822 makes clear that the Sender header
is ONLY used if some one
- NOT the author (ex. the author's secretary) is sending
the author's email.
- RFC2822 considers that "From" = the author and the
"Sender" = the person who clicked the
- send button. Generally they are one in the same and
generally the Sender header (and hence this
- "sender" var) is NOT needed, not used, not included in
the email's headers.
- */
- if (($GLOBALS['phpgw']->msg->get_isset_arg('sender'))
- && ($GLOBALS['phpgw']->msg->get_arg_value('sender') !=
''))
+ if ($returnccode)
{
- // clean data of magic_quotes escaping (if any)
- $this->mail_out['sender'] =
$GLOBALS['phpgw']->msg->stripslashes_gpc($GLOBALS['phpgw']->msg->get_arg_value('sender'));
- // convert general address string into
structured data array of addresses, each has properties [plain] and [personal]
- // this array gets filled with functiuon
"make_rfc_addy_array", but it will have only 1 numbered array,
$this->mail_out['sender'][0]
- $sender_array =
$GLOBALS['phpgw']->msg->make_rfc_addy_array($this->mail_out['sender']);
- // realistically sender array should have no
more than one member (can there really be more than 1 sender?)
- if (count($sender_array) > 0)
+ // Success
+ if ($GLOBALS['phpgw']->mail_send->trace_flag >
0)
{
- $this->mail_out['sender'] =
$GLOBALS['phpgw']->msg->addy_array_to_str($sender_array);
- // bogus data check
- if (trim($this->mail_out['sender']) ==
'')
- {
- $this->mail_out['sender'] = '';
- }
+ // for debugging
+ echo '<html><body>'."\r\n";
+ echo '<h2>Here is the communication
from the MUA(phpgw) <--> MTA(smtp server) trace data dump</h2>'."\r\n";
+ echo '<h3>trace data flag set to
['.(string)$GLOBALS['phpgw']->mail_send->trace_flag.']</h3>'."\r\n";
+ echo '<pre>'."\r\n";
+ $this->smtp->ErrorInfo;
+ echo '</pre>'."\r\n";
+ echo '<p> <br /></p>'."\r\n";
+ echo '<p>To go back to the msg list,
click <a href="'.$return_to_folder_href.'">here</a></p><br />';
+ echo '</body></html>';
+ $this->send_message_cleanup();
}
else
{
- $this->mail_out['sender'] = '';
+ // unset some vars (is this necessary?)
+ $this->send_message_cleanup();
+ // redirect the browser to the index
page for the appropriate folder
+ //header('Location:
'.$return_to_folder_href);
+
$GLOBALS['phpgw']->redirect($return_to_folder_href);
+ // kill the rest of this script
+ if (is_object($GLOBALS['phpgw']->msg))
+ {
+ // close down ALL mailserver
streams
+
$GLOBALS['phpgw']->msg->end_request();
+ // destroy the object
+ $GLOBALS['phpgw']->msg = '';
+ unset($GLOBALS['phpgw']->msg);
+ }
+ // shut down this transaction
+
$GLOBALS['phpgw']->common->phpgw_exit(False);
}
- // after this, ONLY USE $this->mail_out[]
structure for this
- // it will either be blank string OR a string
which should be 1 email address
}
- // ----- DATE -----
- /*!
- @property date
- @abstract not user specified, not a user var, not an
argument, not a paramater.
- @discussion According to RFC2822 the Date header
*should* be the local time with the correct
- timezone offset relative to GMT, however this is
problematic on many Linux boxen, and
- in general I have found that reliably extracting this
data from the host OS can be tricky,
- so instead we use a fallback value which is simply GMT
time, which is allowed under RFC2822
- but not preferred.
- FUTURE: figure out a host independant way of getting
the correct rfc time and TZ offset
- */
- $this->mail_out['date'] = gmdate('D, d M Y H:i:s').'
+0000';
+ else
+ {
+ // ERROR - mail NOT sent
+ echo '<html><body>'."\r\n";
+ echo '<h2>Your message could <b>not</b> be
sent!</h2>'."\r\n";
+ echo '<h3>The mail server
returned:</h3>'."\r\n";
+ echo '<pre>';
+ $this->smtp->ErrorInfo;
+ echo '</pre>'."\r\n";
+ echo '<p>To go back to the msg list, click <a
href="'.$return_to_folder_href.'">here</a> </p>'."\r\n";
+ echo '</body></html>';
+ $this->send_message_cleanup();
+ }
+ }
+
+ /**
+ * Prepare a RFC 2822 Message
+ *
+ * @author skwashd
+ * @internal remnants of Angles' code remains
+ * @internal the old send code has been rewritten to use
phpmailer.sf.net - which makes our life so much easier
+ */
+ function prepare_message()
+ {
- // ----- MYMACHINE - The MTA HELO/ELHO DOMAIN ARG
-----
- /*!
- @property elho SMTP handshake domain value
- @abstract not user specified, not a user var, not an
argument, not a paramater.
- @discussion when class.msg_send conducts the handshake
with the SMTP server, this
- will be the required domain value that we supply to the
SMTP server. Phpgw is considered
- the client to the SMTP server.
- RFC2821 sect 4.1.1.1 specifies this value is almost
always the Fully Qualified Domain Name
- of the SMTP client machine, but rarely, when said
client machine has dynamic FQDN or no reverse
- mapping is available, this value *should* be "address
leteral" (see sect 4.1.3).
- Refer to the documentation for BIND for further reading
on reverse lookup issues.
- */
- $this->mail_out['mta_elho_mymachine'] =
trim($GLOBALS['phpgw_info']['server']['hostname']);
+ if ($this->debug_send > 0)
+ {
+ echo 'ENTERING: email.bosend.send'.'<br />';
+ }
+
+ if ($this->debug_send > 2)
+ {
+ echo 'email.bosend.send: data dump:
$GLOBALS[HTTP_POST_VARS]<pre>';
+ print_r($GLOBALS['phpgw']->msg->ref_POST);
+ echo '</pre>'."\r\n";
+
+ echo 'email.bosend.send: data dump:
$GLOBALS[HTTP_GET_VARS]<pre>';
+ print_r($GLOBALS['phpgw']->msg->ref_GET);
+ echo '</pre>'."\r\n";
+ return;
+ }
+
+ // ---- BEGIN BO SEND LOGIC
+
+ $not_set = $GLOBALS['phpgw']->msg->not_set;
+ $msgball =
$GLOBALS['phpgw']->msg->get_arg_value('msgball');
+
+ // ------- Init Array Structure For Outgoing Mail
-----------
+ $this->mail_out = Array();
+ $this->mail_out['whitespace'] = chr(9);
+ $this->mail_out['is_forward'] = False;
+ $this->mail_out['fwd_proc'] = '';
+
+ $is_reply = False;
+
+ $this->smtp->CharSet = (lang('charset') != 'charset*')
? lang('charset') : 'US-ASCII';
+
+ $this->smtp->Sender = (
$GLOBALS['phpgw']->msg->get_isset_arg('sender')
+ ?
$GLOBALS['phpgw']->msg->get_arg_value('sender')
+ : '');
+
+ $this->smtp->FromName =
$GLOBALS['phpgw']->msg->get_pref_value('fullname');
+
+ $this->smtp->From =
$GLOBALS['phpgw']->msg->get_pref_value('address');
+
+ $this->smtp->Subject =
$GLOBALS['phpgw']->msg->stripslashes_gpc($GLOBALS['phpgw']->msg->get_arg_value('subject'));
+
+ $this->smtp->Helo =
trim($GLOBALS['phpgw_info']['server']['hostname']);
+
+ $this->smtp->Body =
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($GLOBALS['phpgw']->msg->get_arg_value('body')));
+
+ $this->smtp->AddCustomHeader('X-Originating-IP: ' .
$this->get_originating_ip() );
// ---- Forwarding Detection -----
if (($GLOBALS['phpgw']->msg->get_isset_arg('action'))
@@ -466,49 +484,20 @@
// after this, ONLY USE $this->mail_out[]
structure for this
}
- // ---- Attachment Detection -----
- // some of this attachment uploading and handling code
is from squirrelmail (www.squirrelmail.org)
- $upload_dir = $GLOBALS['phpgw']->msg->att_files_dir;
- if (file_exists($upload_dir))
- {
- // DO WE REALLY need to set_time_limit here?
- //@set_time_limit(0);
- // how many attachments do we need to process?
- $dh = opendir($upload_dir);
- $num_expected = 0;
- while ($file = readdir($dh))
- {
- if (($file != '.')
- && ($file != '..')
- && (ereg("\.info",$file)))
- {
- $num_expected++;
- }
- }
- closedir($dh);
- if ($num_expected > 0)
- {
- $this->mail_out['num_attachments'] =
$num_expected;
- $this->mail_out['is_multipart'] = True;
- }
- }
-
// ------ get rid of the escape \ that magic_quotes
(if enabled) HTTP POST will add, " becomes \" and ' becomes \'
// convert script GPC args into useful mail_out
structure information
$to =
$GLOBALS['phpgw']->msg->stripslashes_gpc($GLOBALS['phpgw']->msg->get_arg_value('to'));
$cc =
$GLOBALS['phpgw']->msg->stripslashes_gpc($GLOBALS['phpgw']->msg->get_arg_value('cc'));
$bcc =
$GLOBALS['phpgw']->msg->stripslashes_gpc($GLOBALS['phpgw']->msg->get_arg_value('bcc'));
- $body =
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($GLOBALS['phpgw']->msg->get_arg_value('body')));
- $subject =
$GLOBALS['phpgw']->msg->stripslashes_gpc($GLOBALS['phpgw']->msg->get_arg_value('subject'));
// after this, do NOT use ->msg->get_arg_value() for
these anymore
// since arg "body" *may* be huge (and is now in local
var $body), lets clear it now
$GLOBALS['phpgw']->msg->set_arg_value('body', '');
- // ---- DE-code HTML SpecialChars in the body -----
- // THIS NEEDS TO BE CHANGED WHEN MULTIPLE PART FORWARDS
ARE ENABLED
- // BECAUSE WE CAN ONLY ALTER THE 1ST PART, I.E. THE
PART THE USER JUST TYPED IN
- /* email needs to be sent out as if it were PLAIN text
(at least the part we are handling here)
+ /* ---- DE-code HTML SpecialChars in the body -----
+ THIS NEEDS TO BE CHANGED WHEN MULTIPLE PART FORWARDS
ARE ENABLED
+ BECAUSE WE CAN ONLY ALTER THE 1ST PART, I.E. THE PART
THE USER JUST TYPED IN
+ email needs to be sent out as if it were PLAIN text (at
least the part we are handling here)
i.e. with NO ENCODED HTML ENTITIES, so use > instead of
$rt; and " instead of " . etc...
it's up to the endusers MUA to handle any
htmlspecialchars, whether to encode them or leave as it, the MUA should decide
*/
@@ -531,41 +520,39 @@
.'-- '."\r\n"
.$user_sig ."\r\n";
}
+
if ($this->company_disclaimer)
{
- $body = $body .$this->company_disclaimer;
+ $this->smtp->Body = $this->smtp->Body .
$this->company_disclaimer;
}
- // LINE LENGTH for "new" and our text of a forwarded
text are 78 chars,
- // which is SHORTER than for reply quoted bodies that
have ">" chars
- // this is only for text WE have written, not any other
part of the body
- // html textbox no longer adds hard wrap on submit, so
we handle it here now
- // NOTE reply bodies have already been handled as to
length when we quoted the text
- //if
(($GLOBALS['phpgw']->msg->get_isset_arg('orig_action'))
- //&& (
- //
($GLOBALS['phpgw']->msg->get_arg_value('orig_action') == 'new')
- // ||
($GLOBALS['phpgw']->msg->get_arg_value('orig_action') == 'forward')
- // )
- //)
+ /*
+ LINE LENGTH for "new" and our text of a forwarded text
are 78 chars,
+ which is SHORTER than for reply quoted bodies that have
">" chars
+ this is only for text WE have written, not any other
part of the body
+ html textbox no longer adds hard wrap on submit, so we
handle it here now
+ NOTE reply bodies have already been handled as to
length when we quoted the text
+ */
if (($GLOBALS['phpgw']->msg->recall_desired_action()==
'new')
|| ($GLOBALS['phpgw']->msg->recall_desired_action() ==
'forward'))
{
// WRAP BODY to lines of 78 chars then CRLF
// IS THIS TOO SHORT? what about code snippets
and stuff?or long URLs
- $body =
$GLOBALS['phpgw']->msg->body_hard_wrap($body, 78);
+ $this->smtp->Body =
$GLOBALS['phpgw']->msg->body_hard_wrap($this->smtp->Body, 78);
}
- elseif
(($GLOBALS['phpgw']->msg->recall_desired_action()== 'reply')
- || ($GLOBALS['phpgw']->msg->recall_desired_action()==
'replyall'))
+ elseif
(($GLOBALS['phpgw']->msg->recall_desired_action() == 'reply')
+ || ($GLOBALS['phpgw']->msg->recall_desired_action() ==
'replyall'))
{
+ $is_reply = True;
//echo 'entering recall_desired_action == reply
line length handling'."\r\n";
// ok we have already quoted the text of the
message we are replying to
// BUT we have yet to standardize line length
for the text WE just typed
// in this message, our own text,
// BUT we really should skip doing linebreaking
it _again_ for the quoted text, though
$body_array = array();
- $body_array = explode("\r\n", $body);
+ $body_array = explode("\r\n",
$this->smtp->Body);
// we do not use this again till we put
$new_body into it, so clear the memory
- $body = '';
+ $this->smtp->Body = '';
// process only our unquoted text
$body_array_count = count($body_array);
$in_unquoted_block = False;
@@ -631,61 +618,67 @@
$unquoted_text .= $this_line .
"\r\n";
}
}
+
+ //My new body :)
+ $this->smtp->Body = $new_body;
+
// cleanup
$body_array = array();
- // ok we have gone through the whole message,
put it in the bldy var
- $body = '';
- $body = $new_body;
$new_body = '';
$unquoted_text = '';
// end reply body line length landling block
}
- // Step One Addition
+ // Step One Addition - fixed by skwashd :P
// ---- Request Delivery Notification in Headers ----
if
(($GLOBALS['phpgw']->msg->get_isset_arg('req_notify'))
&& ($GLOBALS['phpgw']->msg->get_arg_value('req_notify')
!= ''))
- //cant imagine another check here, feel free to add
something
{
- //cant imagine another place to flag this....its a
yes/no thing
- $notify=true;
+ $this->smtp->ConfirmReadingTo =
$this->smtp->Sender;
}
+
// ---- Ensure To: and CC: and BCC: are properly
formatted -----
if ($to)
{
// mail_out[to] is an array of addresses, each
has properties [plain] and [personal]
- $this->mail_out['to'] =
$GLOBALS['phpgw']->msg->make_rfc_addy_array($to);
- // this will make a simple comma seperated
string of the plain addresses (False sets the "include_personal" arg)
- $mta_to =
$GLOBALS['phpgw']->msg->addy_array_to_str($this->mail_out['to'], False);
+ $to_array =
$GLOBALS['phpgw']->msg->make_rfc_addy_array($to);
+ if( $to_array && is_array($to_array) )
+ {
+ foreach( $to_array as $recip )
+ {
+
$this->smtp->AddAddress($recip['plain'], $recip['personal']);
+ }
+ }
+ unset($to_array);
}
if ($cc)
{
- $this->mail_out['cc'] =
$GLOBALS['phpgw']->msg->make_rfc_addy_array($cc);
- $mta_to .= ','
.$GLOBALS['phpgw']->msg->addy_array_to_str($this->mail_out['cc'], False);
+ $cc_array =
$GLOBALS['phpgw']->msg->make_rfc_addy_array($cc);
+ if( $cc_array && is_array($to_array) )
+ {
+ foreach( $cc_array as $recip )
+ {
+
$this->smtp->AddCC($recip['plain'], $recip['personal']);
+ }
+ }
+ unset($cc_array);
}
if ($bcc)
{
- // here we will add bcc addresses to the list
of adresses we will feed the MTA via the "RCPT TO" command
- // *however* this bcc data NEVER actually gets
put in the message headers
- $this->mail_out['bcc'] =
$GLOBALS['phpgw']->msg->make_rfc_addy_array($bcc);
- $mta_to .= ','
.$GLOBALS['phpgw']->msg->addy_array_to_str($this->mail_out['bcc'], False);
- }
- // now make mta_to an array because we will loop
through it in class mail_send
- $this->mail_out['mta_to'] = explode(',', $mta_to);
-
- // RFC2821 - RCPT TO: args (email addresses) should be
enclosed in brackets
- // when we constructed the $this->mail_out['mta_to']
var, we set "include_personal" to False, so this array has only "plain" email
addys
- for ($i=0; $i<count($this->mail_out['mta_to']); $i++)
- {
- if (!preg_match('/^<.*>$/',
$this->mail_out['mta_to'][$i]))
+ $bcc_array =
$GLOBALS['phpgw']->msg->make_rfc_addy_array($bcc);
+ if( $bcc_array && is_array($to_array) )
{
- $this->mail_out['mta_to'][$i] =
'<'.$this->mail_out['mta_to'][$i].'>';
+ foreach( $bcc_array as $recip )
+ {
+
$this->smtp->AddCC($recip['plain'], $recip['personal']);
+ }
}
+ unset($bcc_array);
}
/*
// ===== DEBUG =====
- echo '<br>';
+ echo '<br />';
//$dubug_info = $to;
//$dubug_info = ereg_replace("\r\n.", "CRLF_WSP",
$dubug_info);
//$dubug_info = ereg_replace("\r\n", "CRLF",
$dubug_info);
@@ -694,202 +687,51 @@
//echo serialize($dubug_info);
//$to = $GLOBALS['phpgw']->msg->addy_array_to_str($to,
True);
- //echo 'to including personal:
'.$GLOBALS['phpgw']->msg->htmlspecialchars_encode($to).'<br>';
+ //echo 'to including personal:
'.$GLOBALS['phpgw']->msg->htmlspecialchars_encode($to).'<br />';
- echo '<br> var dump mail_out <br>';
+ echo '<br /> var dump mail_out <br />';
var_dump($this->mail_out);
- //echo '<br> var dump cc <br>';
+ //echo '<br /> var dump cc <br />';
//var_dump($cc);
- echo '<br>';
+ echo '<br />';
$GLOBALS['phpgw']->common->phpgw_footer();
exit;
// ===== DEBUG =====
*/
- // ---- Send The Email == via CLASS MAIL SEND 2822
== -----
- // USE CLASS MAIL SEND 2822
- $GLOBALS['phpgw']->mail_send =
CreateObject("email.mail_send");
- $GLOBALS['phpgw']->mail_send->send_init();
// do we need to retain a copy of the sent message for
the "Sent" folder?
if($GLOBALS['phpgw']->msg->get_isset_pref('use_sent_folder'))
{
$GLOBALS['phpgw']->mail_send->retain_copy =
True;
}
-
- // initialize structure for 1st part
- $body_part_num = 0;
- $this->mail_out['body'][$body_part_num]['mime_headers']
= Array();
- $this->mail_out['body'][$body_part_num]['mime_body'] =
Array();
-
- // ----- ADD 1st PART's MIME HEADERS (if necessary)
-------
- if (($this->mail_out['is_multipart'] == True)
- || ($this->mail_out['is_forward'] == True))
- {
- // --- Add Mime Part Header to the First Body
Part
- // this part _should_ be text
- $m_line = 0;
-
$this->mail_out['body'][0]['mime_headers'][$m_line] = 'This is a multipart
message in MIME format';
- $m_line++;
-
$this->mail_out['body'][0]['mime_headers'][$m_line] = "\r\n";
- $m_line++;
-
$this->mail_out['body'][0]['mime_headers'][$m_line] = '--'
.$this->mail_out['boundary'];
- $m_line++;
-
$this->mail_out['body'][0]['mime_headers'][$m_line] = 'Content-Type:
text/plain; charset="'.$this->mail_out['charset'].'"';
- $m_line++;
- if ($this->mail_out['msgtype'] != '')
- {
- // "folded header" opens with a
"whitespace"
-
$this->mail_out['body'][0]['mime_headers'][$m_line] = '
phpgw-type="'.$this->mail_out['msgtype'].'"';
- $m_line++;
- }
- // 7 BIT vs. 8 BIT Content-Transfer-Encoding
- // 7 bit means that no chars > 127 can be in
the email, or else MTA's will get confused
- // if you really want to enforce 7 bit you
should qprint encode the email body
- // however, if you are forwarding via MIME
encapsulation then I do not believe it's cool to alter
- // the original message's content by qprinting
it if it was not already qprinted
- // in which case you should send it 8 bit
instead.
- // ALSO, the top most level encoding can not be
less restrictive than any embedded part's encoding
- // 7bit is more restrictive than 8 bit
- // OPTIONS:
- // 1) send it out with no encoding header -
against RFC's but the MTA will probably put it there for you
- // 2) do a scan for chars > 127, if so, send 8
bit and hope the MTA can handle 8 bit
- // 3) scan for > 127 then qprint what we can
(not embeded) then send out 7 bit
- // 4) listen to the initial string from the MTA
indicating if it can handle MIME8BIT
- // 5) just send it out 8 bit and hope for the
best (for now do this)
-
//$this->mail_out['body'][0]['mime_headers'][$m_line] =
'Content-Transfer-Encoding: 7bit';
- //$m_line++;
-
$this->mail_out['body'][0]['mime_headers'][$m_line] =
'Content-Transfer-Encoding: 8bit';
- $m_line++;
-
$this->mail_out['body'][0]['mime_headers'][$m_line] = 'Content-Disposition:
inline';
- $m_line++;
- }
-
- // ----- MAIN BODY PART (1st Part) ------
- // Explode Body into Array of strings
- $body = $GLOBALS['phpgw']->msg->normalize_crlf($body);
- $this->mail_out['body'][$body_part_num]['mime_body'] =
explode ("\r\n",$body);
- //$this->mail_out['body'][$body_part_num]['mime_body']
= $GLOBALS['phpgw']->msg->explode_linebreaks(trim($body));
- // for no real reason, I add a CRLF to the end of the
body
-
//$this->mail_out['body'][$body_part_num]['mime_body'][count($this->mail_out['body'][$body_part_num]['mime_body'])]
= " \r\n";
- // since var $body *may* be huge, lets clear it now
- $body = '';
-
- // ----- FORWARD HANDLING ------
- // Sanity Check - we can not "pushdown" a
multipart/mixed original mail, it must be encaposulated
- if (($this->mail_out['is_forward'] == True)
- && ($this->mail_out['fwd_proc'] == 'pushdown'))
+
+ // ---- Attachment Detection -----
+ // some of this attachment uploading and handling code
is from squirrelmail (www.squirrelmail.org)
+ $upload_dir = $GLOBALS['phpgw']->msg->att_files_dir;
+ if (file_exists($upload_dir))
{
- $msg_headers =
$GLOBALS['phpgw']->msg->phpgw_header('');
- $msg_struct =
$GLOBALS['phpgw']->msg->phpgw_fetchstructure('');
-
- $this->mail_out['fwd_info'] =
$GLOBALS['phpgw']->msg->pgw_msg_struct($msg_struct, $not_set, '1', 1, 1, 1);
- if (($this->mail_out['fwd_info']['type'] ==
'multipart')
- || ($this->mail_out['fwd_info']['subtype'] ==
'mixed'))
- {
- $this->mail_out['fwd_proc'] =
'encapsulate';
- }
- }
-
- // Add Forwarded Mail as An Additional Encapsulated
"message/rfc822" MIME Part
- if (($this->mail_out['is_forward'] == True)
- && ($this->mail_out['fwd_proc'] == 'pushdown'))
- {
- // ----- INCOMPLETE CODE HERE --------
- // ----- INCOMPLETE CODE HERE --------
- // ----- INCOMPLETE CODE HERE --------
- $body_part_num++;
-
$this->mail_out['body'][$body_part_num]['mime_headers'] = Array();
-
$this->mail_out['body'][$body_part_num]['mime_body'] = Array();
-
- // ---- General Information about The Original
Message -----
- $msg_headers =
$GLOBALS['phpgw']->msg->phpgw_header('');
- $msg_struct =
$GLOBALS['phpgw']->msg->phpgw_fetchstructure('');
-
- // use the "pgw_msg_struct" function to get the
orig message main header info
- $this->mail_out['fwd_info'] =
$GLOBALS['phpgw']->msg->pgw_msg_struct($msg_struct, $not_set, '1', 1, 1, 1);
- // add some more info
- $this->mail_out['fwd_info']['from'] =
$GLOBALS['phpgw']->msg->make_rfc2822_address($msg_headers->from[0]);
- $this->mail_out['fwd_info']['date'] =
$GLOBALS['phpgw']->common->show_date($msg_headers->udate);
- $this->mail_out['fwd_info']['subject'] =
$GLOBALS['phpgw']->msg->get_subject($msg_headers,'');
-
- // normalize data to rfc2046 defaults, in the
event data is not provided
- if ($this->mail_out['fwd_info']['type'] ==
$not_set)
+ $dh = dir($upload_dir);
+ while ( ($file = $dh->read()) !== false)
{
- $this->mail_out['fwd_info']['type'] =
'text';
- }
- if ($this->mail_out['fwd_info']['subtype'] ==
$not_set)
- {
- $this->mail_out['fwd_info']['subtype']
= 'plain';
- }
- if ($this->mail_out['fwd_info']['disposition']
== $not_set)
- {
-
$this->mail_out['fwd_info']['disposition'] = 'inline';
- }
-
- $this->mail_out['fwd_info']['boundary'] =
$not_set;
- for ($p = 0; $p <
$part_nice['ex_num_param_pairs']; $p++)
- {
- //echo '<br>params['.$p.']:
'.$part_nice['params'][$p]['attribute'].'='.$part_nice['params'][$p]['value']
.'<br>';
- if
(($part_nice['params'][$p]['attribute'] == 'boundary')
- && ($part_nice['params'][$p]['value']
!= $not_set))
+ if( ($file != '.' )
+ && ( $file != '..' )
+ && ( strpos($file, '.info') )
+ )
{
-
$this->mail_out['fwd_info']['boundary'] = $part_nice['params'][$p]['value'];
- break;
+ $meta_data = explode("\n",
file_get_contents($upload_dir . SEP . $file) );
+ $real_file = substr($file, 0,
strpos($file, '.info'));
+ $this->smtp->AddAttachment(
$upload_dir .SEP. $real_file,
+
trim($meta_data[1]),
+ 'base64',
+
trim($meta_data[0]) );
}
}
- if ($this->mail_out['fwd_info']['boundary'] !=
$not_set)
- {
- // original email ALREADY HAS a
boundary., so use it!
- $this->mail_out['boundary'] =
$this->mail_out['fwd_info']['boundary'];
- }
- //echo '<br>part_nice[boundary] '
.$this->mail_out['fwd_info']['boundary'] .'<br>';
- //echo '<br>part_nice: <br>'
.$GLOBALS['phpgw']->msg->htmlspecialchars_encode(serialize($this->mail_out))
.'<br>';
-
- // prepare the mime part headers
- // original body gets pushed down one part,
i.e. was part 1, now is part 2
- $m_line = 0;
-
$this->mail_out['body'][$body_part_num]['mime_headers'][$m_line] = '--'
.$this->mail_out['boundary'];
- $m_line++;
-
$this->mail_out['body'][$body_part_num]['mime_headers'][$m_line] =
'Content-Type:
'.$this->mail_out['fwd_info']['type'].'/'.$this->mail_out['fwd_info']['subtype'].';';
- $m_line++;
- if ($this->mail_out['fwd_info']['encoding'] !=
'other')
- {
-
$this->mail_out['body'][$body_part_num]['mime_headers'][$m_line] =
'Content-Transfer-Encoding: '.$this->mail_out['fwd_info']['encoding'];
- $m_line++;
- }
- for ($p = 0; $p <
$part_nice['ex_num_param_pairs']; $p++)
- {
- //echo '<br>params['.$p.']:
'.$part_nice['params'][$p]['attribute'].'='.$part_nice['params'][$p]['value']
.'<br>';
- if
($part_nice['params'][$p]['attribute'] != 'boundary')
- {
-
$this->mail_out['body'][$body_part_num]['mime_headers'][$m_line] = '
'.$part_nice['params'][$p]['attribute'].'="'.$part_nice['params'][$p]['value'].'"';
- $m_line++;
- }
- }
-
$this->mail_out['body'][$body_part_num]['mime_headers'][$m_line] =
'Content-Disposition: '.$this->mail_out['fwd_info']['disposition'];
- $m_line++;
-
- // dump the original BODY (with out its
headers) here
- $fwd_this =
$GLOBALS['phpgw']->msg->phpgw_body();
- // Explode Body into Array of strings
-
$this->mail_out['body'][$body_part_num]['mime_body'] =
$GLOBALS['phpgw']->msg->explode_linebreaks(trim($fwd_this));
- $fwd_this = '';
- }
- elseif (($this->mail_out['is_forward'] == True)
- && ($this->mail_out['fwd_proc'] == 'encapsulate'))
- {
- // generate the message/rfc822 part that is the
container for the forwarded mail
- $body_part_num++;
-
$this->mail_out['body'][$body_part_num]['mime_headers'] = Array();
-
$this->mail_out['body'][$body_part_num]['mime_body'] = Array();
-
- // mime headers define this as a message/rfc822
part
- // following RFC2046 recommendations
-
$this->mail_out['body'][$body_part_num]['mime_headers'][0] = '--'
.$this->mail_out['boundary'];
-
$this->mail_out['body'][$body_part_num]['mime_headers'][1] = 'Content-Type:
message/rfc822'.';';
-
$this->mail_out['body'][$body_part_num]['mime_headers'][2] =
'Content-Disposition: inline';
-
+ $dh->close();
+ }
+
+ if ($this->mail_out['is_forward'] == True)
+ {
// DUMP the original message verbatim into this
part's "body" - i.e. encapsulate the original mail
$fwd_this['sub_header'] =
trim($GLOBALS['phpgw']->msg->phpgw_fetchheader());
$fwd_this['sub_header'] =
$GLOBALS['phpgw']->msg->normalize_crlf($fwd_this['sub_header']);
@@ -917,10 +759,6 @@
$fwd_this['boundaries'] =
str_replace('boundary=', '', $fwd_this['boundaries']);
$fwd_this['boundaries'] =
str_replace('"', '', $fwd_this['boundaries']);
$this_boundary =
$fwd_this['boundaries'];
- //$fwd_this['sub_body'] =
preg_replace("/(?<!(\r\n\r\n))[-]{2}$this_boundary/m",
"\r\n\r\n".'DASHDASH'.$this_boundary, $fwd_this['sub_body']);
- //$fwd_this['sub_body'] =
preg_replace("/(?<!(\r\n\r\n))[-]{2}$this_boundary/m",
"\r\n\r\n".'DASHDASH'.$this_boundary, $fwd_this['sub_body']);
- //$fwd_this['sub_body'] =
preg_replace("/(?<!(\r\n\r\n))[-]{2}".$this_boundary."[-]{0,2}/m",
"\r\n\r\n".'DASHDASH'.$this_boundary, $fwd_this['sub_body']);
- //$fwd_this['sub_body'] =
preg_replace("/(?<!(\r\n\r\n))[-]{2}$this_boundary/m",
"\r\n\r\n".'DASHDASH'.$this_boundary, $fwd_this['sub_body']);
$fwd_this['sub_body'] =
preg_replace("/(?<!(\r\n\r\n))[-]{2}".$this_boundary."/m",
"\r\n\r\n".'--'.$this_boundary, $fwd_this['sub_body']);
$dash_dash = '--';
$fwd_this['sub_body'] =
preg_replace("/(?<!(\r\n\r\n))[-]{2}$dash_dash$this_boundary$dash_dash/",
"\r\n\r\n".'--'.$this_boundary.'--', $fwd_this['sub_body']);
@@ -933,22 +771,19 @@
/*
- //echo 'fwd_this[sub_header]:
<br><pre>'.$GLOBALS['phpgw']->msg->htmlspecialchars_encode($fwd_this['sub_header']).'</pre><br>';
- //echo 'fwd_this[matches]:
<br><pre>'.$GLOBALS['phpgw']->msg->htmlspecialchars_encode(serialize($fwd_this['matches'])).'</pre><br>';
- //echo 'fwd_this[boundaries]:
<br><pre>'.$GLOBALS['phpgw']->msg->htmlspecialchars_encode($fwd_this['boundaries']).'</pre><br>';
- //echo '=== var dump fwd_this <br><pre>';
+ //echo 'fwd_this[sub_header]: <br
/><pre>'.$GLOBALS['phpgw']->msg->htmlspecialchars_encode($fwd_this['sub_header']).'</pre><br
/>';
+ //echo 'fwd_this[matches]: <br
/><pre>'.$GLOBALS['phpgw']->msg->htmlspecialchars_encode(serialize($fwd_this['matches'])).'</pre><br
/>';
+ //echo 'fwd_this[boundaries]: <br
/><pre>'.$GLOBALS['phpgw']->msg->htmlspecialchars_encode($fwd_this['boundaries']).'</pre><br
/>';
+ //echo '=== var dump fwd_this <br /><pre>';
//var_dump($fwd_this);
- //echo '</pre><br>';
- echo 'fwd_this[processed]:
<br><pre>'.$GLOBALS['phpgw']->msg->htmlspecialchars_encode($fwd_this['processed']).'</pre><br>';
+ //echo '</pre><br />';
+ echo 'fwd_this[processed]: <br
/><pre>'.$GLOBALS['phpgw']->msg->htmlspecialchars_encode($fwd_this['processed']).'</pre><br
/>';
unset($fwd_this);
exit;
*/
- // Explode Body into Array of strings
- //$fwd_this['processed'] =
$GLOBALS['phpgw']->msg->normalize_crlf($fwd_this['processed']);
-
//$this->mail_out['body'][$body_part_num]['mime_body'] = explode("\r\n",
$fwd_this['processed']);
-
$this->mail_out['body'][$body_part_num]['mime_body'] =
$GLOBALS['phpgw']->msg->explode_linebreaks(trim($fwd_this['processed']));
+
$this->smtp->AddStringAttachment($fwd_this['processed'],
lang('forwarded_message'), '7bit', 'message/rfc822');
// clear this no longer needed var
$fwd_this = '';
unset($fwd_this);
@@ -956,12 +791,12 @@
/*
// ===== DEBUG =====
- echo '<br>';
- echo '<br>=== mail_out ===<br>';
+ echo '<br />';
+ echo '<br />=== mail_out ===<br />';
$dubug_info = serialize($this->mail_out);
$dubug_info =
$GLOBALS['phpgw']->msg->htmlspecialchars_encode($dubug_info);
echo $dubug_info;
- echo '<br>';
+ echo '<br />';
$GLOBALS['phpgw']->common->phpgw_footer();
exit;
@@ -969,256 +804,20 @@
*/
- // --- ATTACHMENTS -- Add each of them as an
additional mime part ---
- if ($this->mail_out['num_attachments'] > 0)
- {
- // DO WE REALLY need to set_time_limit here?
- //@set_time_limit(0);
- // process (encode) attachments and add to the
email body
- $total_files = 0;
- $dh = opendir($upload_dir);
- while ($file = readdir($dh))
- {
- if (($file != '.')
- && ($file != '..'))
- {
- if (! ereg("\.info",$file))
- {
- $total_files++;
- $size =
filesize($upload_dir.SEP.$file);
-
- $info_file =
$upload_dir.SEP.$file.'.info';
- $file_info =
file($info_file);
- if ($this->debug_struct
> 2) { echo 'FILE INFO: '.htmlspecialchars(serialize($file_info)).'<br>'; }
- $content_type =
trim($file_info[0]);
- $content_name =
trim($file_info[1]);
-
- $body_part_num++;
-
$this->mail_out['body'][$body_part_num]['mime_headers'] = Array();
-
$this->mail_out['body'][$body_part_num]['mime_body'] = Array();
-
- $m_line = 0;
-
$this->mail_out['body'][$body_part_num]['mime_headers'][$m_line] = '--'
.$this->mail_out['boundary'];
- $m_line++;
-
$this->mail_out['body'][$body_part_num]['mime_headers'][$m_line] =
'Content-Type: '.$content_type.'; name="'.$content_name.'"';
- $m_line++;
-
$this->mail_out['body'][$body_part_num]['mime_headers'][$m_line] =
'Content-Transfer-Encoding: base64';
- $m_line++;
-
$this->mail_out['body'][$body_part_num]['mime_headers'][$m_line] =
'Content-Disposition: attachment; filename="'.$content_name.'"';
-
- /*
- // BASE64 ENCODE method
1 - entire file loaded into memory
- // get the file and
base 64 encode it
- $fh =
fopen($upload_dir.SEP.$file,'rb');
- // $rawfile =
fread($fh,$size);
- $b64_part =
chunk_split(base64_encode(fread($fh,$size)));
-
$this->mail_out['body'][$body_part_num]['mime_body'] = explode("\r\n",
$b64_part);
- $b64_part = '';
- fclose($fh);
- */
-
- // BASE64 ENCODE method
2 - small chunks of file limit memory usage during encoding
- // base64 encoded data
should be split into lines of 76 chars for the outgoing message (not including
the CRLF)
- // reading 3 bytes from
the file makes 4 bytes of encoded data
- // 76 encoded chars =
(19 x 4 byte groups) per line
- // data must be fed in
[bytes div 3] chunks (i.e. 30 bytes is divisible by 3 so is good) to avoid
string padding
- // reading 19 x 3 bytes
(57 chars) from source file produces the 76 char encoded single line of data
- // 57 is, of course,
divisible by 3, so the resulting encoded line will not be padded with "=" chars
(good)
- // for initial testing,
it may be inefficient but do the file reading in 57 byte chunks
- $fh =
fopen($upload_dir.SEP.$file,'rb');
- $next_pos = 0;
- while ($datachunk =
fread($fh, 57))
- {
- if
($this->debug_struct > 2) { echo '$next_pos ['.$next_pos.'] :: string
['.$datachunk.'] :: b64 version ['.base64_encode($datachunk).']<br>'."\r\n"; }
-
$this->mail_out['body'][$body_part_num]['mime_body'][$next_pos] =
base64_encode($datachunk);
- $next_pos++;
- }
- $b64_part = '';
- fclose($fh);
-
-
- /*
- / / * * * * MOVE THIS
INTO MAIL SEND 2822 PROC * * * * *
- // IF LAST PART - GIVE
THE "FINAL" boundary
- if ($total_files >=
$num_expected)
- {
- // attachments
(parts) have their own boundary preceeding them (see below)
- // this is:
"--"boundary
- // all boundary
strings are have 2 dashes "--" added to their begining
- // and the
FINAL boundary string (after all other parts) ALSO has
- // 2 dashes
"--" tacked on tho the end of it, very important !!
- // the next
available array number
- $m_line =
count($this->mail_out['body'][$body_part_num]['mime_body']);
-
$this->mail_out['body'][$body_part_num]['mime_body'][$m_line] = '--'
.$this->mail_out['boundary'].'--';
- }
- //echo 'tot:
'.$total_files .' expext: '.$num_expected; // for debugging
- */
-
- // delete the temp file
(the attachment)
-
unlink($upload_dir.SEP.$file);
- // delete the other
temp file (the .info file)
-
unlink($upload_dir.SEP.$file.'.info');
- }
- }
- }
- // get rid of the temp dir we used for the above
- rmdir($upload_dir);
- }
-
- // --- MAIN HEADERS -------
- $hdr_line = 0;
- $this->mail_out['main_headers'][$hdr_line] =
'X-Originating-IP: '.$this->mail_out['originating_ip'];
- $hdr_line++;
- $this->mail_out['main_headers'][$hdr_line] =
'From: '.$GLOBALS['phpgw']->msg->addy_array_to_str($this->mail_out['from']);
- $hdr_line++;
- if ($this->mail_out['sender'] != '')
- {
- // rfc2822 - sender is only used if some one
NOT the author (ex. the author's secretary) is sending the authors email
- // $this->mail_out['sender'] is initialized as
an empty array in the begining of this file
- // then, it will be filled if the
->msg->args['sender'] was passed to the script,
- // where it would have been converted to the
appropriate format and put in the $this->mail_out['sender'] array
- $this->mail_out['main_headers'][$hdr_line] =
'Sender: '.$this->mail_out['sender'];
- $hdr_line++;
- }
- //$this->mail_out['main_headers'][$hdr_line] =
'Reply-To: '.$GLOBALS['phpgw']->msg->addy_array_to_str($this->mail_out['from']);
- //$hdr_line++;
- $this->mail_out['main_headers'][$hdr_line] =
'To: '.$GLOBALS['phpgw']->msg->addy_array_to_str($this->mail_out['to']);
- $hdr_line++;
- if (count($this->mail_out['cc']) > 0)
- {
- $this->mail_out['main_headers'][$hdr_line] =
'Cc: '.$GLOBALS['phpgw']->msg->addy_array_to_str($this->mail_out['cc']);
- $hdr_line++;
- }
- $this->mail_out['main_headers'][$hdr_line] =
'Subject: '.$subject;
- $hdr_line++;
- $this->mail_out['main_headers'][$hdr_line] =
'Date: '.$this->mail_out['date'];
- $hdr_line++;
- $this->mail_out['main_headers'][$hdr_line] =
'Message-ID: '.$this->mail_out['message_id'];
- $hdr_line++;
- //Step One Addition
- //There is no other way to put this headers for request
notify, so here we go
- //Qmail servers use Notice-Requested-Upon-Delivery-To:
so thats what we are going to use now
- //its the correct and nice way to support it
- //AFAIK, sendmail servers use Return-Receipt-To: which
suck but are widly supported so....here goes as weelll
- if($notify)
- {
- $this->mail_out['main_headers'][$hdr_line] =
'Notice-Requested-Upon-Delivery-To:
'.$GLOBALS['phpgw']->msg->addy_array_to_str($this->mail_out['to']);
- $hdr_line++;
- $this->mail_out['main_headers'][$hdr_line] =
'Return-Receipt-To: '.$this->mail_out['sender'];
- $hdr_line++;
-
- }
-
- // RFC2045 REQUIRES this header in even if no embedded
mime parts are in the body
- // MTA's, MUA's *should* assume the following as
default (RFC2045) if not included
- $this->mail_out['main_headers'][$hdr_line] =
'MIME-Version: 1.0';
- $hdr_line++;
-
- if (($this->mail_out['is_multipart'] == True)
- || ($this->mail_out['is_forward'] == True))
- {
- // THIS MAIL INCLUDES EMBEDED MIME PARTS
- $this->mail_out['main_headers'][$hdr_line] =
'Content-Type: multipart/mixed;';
- $hdr_line++;
- $this->mail_out['main_headers'][$hdr_line] =
$this->mail_out['whitespace'].'boundary="'.$this->mail_out['boundary'].'"';
- $hdr_line++;
- }
- else
- {
- // NO MIME SUBPARTS - SIMPLE 1 PART MAIL
- // headers = mime part 0 and body = mime part 1
- $this->mail_out['main_headers'][$hdr_line] =
'Content-Type: text/plain;';
- $hdr_line++;
- $this->mail_out['main_headers'][$hdr_line] =
$this->mail_out['whitespace'].'charset="'.$this->mail_out['charset'].'"';
- $hdr_line++;
- // RFC2045 - the next line is *assumed* as
default 7bit if it is not included
- // FUTURE: Content-Transfer-Encoding: Needs To
Match What is In the Body, i.e. may be qprint
- //$this->mail_out['main_headers'][$hdr_line] =
'Content-Transfer-Encoding: 7bit';
- //$hdr_line++;
- /*!
- @concept 7bit vs. 8bit encoding value in top
level headers
- @discussion top level 7bit requires qprinting
the body if the body has 8bit chars in it
- ISSUE 1: "it's unnecessary"
- nowdays, most all MTAs and IMAP/POP servers can
handle 8bit
- by todays usage, 7bit is quite restrictive,
when considering the variety of
- things that may be attached to or carried in a
message (and growing)
- [begin digression]
- However, stuffing RFC822 email thru a X500 (?)
gateway requires 7bit body,
- which we could do here, at the MUA level, and
may possibly require other
- alterations of the message that occur at the
gateway, some of which may actually drop
- portions of the message, indeed it's
complicated, but rare in terms of total mail volume (?)
- [end digression]
- ISSUE 2: "risks violating RFCs and confusing
MTAs"
- setting top level encoding to 7bit when the
body actually has 8bit chars is "TOTALLY BAD"
- MTA's will be totally confused by that
mis-match, and it violates RFCs
- **More Importantly** this is a coding and
functionality issue involved in forwarding:
- in general, when you forward a message you
should not alter that message
- if that forwarded message has 8bit chars, I
don't think that can be altered
- even to quote-print that forwarded part (i.e.
to convert it to 7bit) would be altering it
- I suppose you could base64 encode it, on the
theory that it decodes exactly back into
- it's original form, but the practice of base64
encoding non-attachments (i.e. text parts)
- is EXTREMELY rare in my experience (Angles) and
still problematic in coding for this.
- I suppose this assumes qprint is possible
"lossy" in that the exact original may not be
- exactly the same as said pre-encoded forwarded
part, and, after all, it's still altering the part.
- CONCLUSION: Set Top Level Header
"Content-Transfer-Encoding" to "8bit"
- because it's easier to code for and less likely
to violate RFCs.
- for now send out as 8bit and hope for the best.
- */
- $this->mail_out['main_headers'][$hdr_line] =
'Content-Transfer-Encoding: 8bit';
- $hdr_line++;
-
- $this->mail_out['main_headers'][$hdr_line] =
'Content-Disposition: inline';
- $hdr_line++;
- // Content-Description: this is not really a
"technical" header
- // it can be used to inform the person reading
some summary info
- //$header .= 'Content-description: Mail message
body'."\r\n";
- }
-
- // finish off the main headers
- if ($this->mail_out['msgtype'] != '')
- {
- $this->mail_out['main_headers'][$hdr_line] =
'X-phpGW-Type: '.$this->mail_out['msgtype'];
- $hdr_line++;
- }
- $this->mail_out['main_headers'][$hdr_line] =
'X-Mailer: AngleMail for phpGroupWare (http://www.phpgroupware.org) v
'.$GLOBALS['phpgw_info']['server']['versions']['phpgwapi'];
- $hdr_line++;
-
/*
// ===== DEBUG =====
- echo '<br>';
- echo '<br>=== mail_out ===<br>';
+ echo '<br />';
+ echo '<br />=== mail_out ===<br />';
$dubug_info = serialize($this->mail_out);
$dubug_info =
$GLOBALS['phpgw']->msg->htmlspecialchars_encode($dubug_info);
echo $dubug_info;
- echo '<br>';
+ echo '<br />';
// ===== DEBUG =====
*/
-
- // ---- Send It -----
- $returnccode =
$GLOBALS['phpgw']->mail_send->smail_2822($this->mail_out);
-
- /*
- // ===== DEBUG =====
- echo '<br>';
- echo 'retain_copy:
'.serialize($GLOBALS['phpgw']->mail_send->retain_copy);
- echo '<br>=== POST SEND ===<br>';
- echo
'<pre>'.$GLOBALS['phpgw']->msg->htmlspecialchars_encode($GLOBALS['phpgw']->mail_send->assembled_copy).'</pre>';
- echo '<br>';
- // ===== DEBUG =====
- */
-
-
- // ------- Put in "Sent" Folder, if Applicable
-------
- $skip_this = False;
- //$skip_this = True;
-
- if (($skip_this == False)
- && ($returnccode)
- &&
($GLOBALS['phpgw']->msg->get_isset_pref('use_sent_folder')))
- {
- $success = $this->copy_to_sent_folder();
- }
-
+ }
+
+ function get_return_to()
+ {
// ---- Redirect on Success, else show Error Report
-----
// what folder to go back to (the one we came from)
// Personally, I think people should go back to the
INBOX after sending an email
@@ -1246,7 +845,7 @@
$fldball_candidate['folder'] =
$GLOBALS['phpgw']->msg->prep_folder_out('INBOX');
$fldball_candidate['acctnum'] =
(int)$GLOBALS['phpgw']->msg->get_acctnum();
}
- $return_to_folder_href = $GLOBALS['phpgw']->link(
+ return $GLOBALS['phpgw']->link(
'/index.php',
'menuaction=email.uiindex.index'
.'&fldball[folder]='.$fldball_candidate['folder']
@@ -1254,58 +853,19 @@
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start'));
+ }
+
+
+ function save_draft()
+ {
+ $this->prepare_message();
+ $this->smtp->Mailer = 'draft-dodger'; //a needed hack -
skwashd
+ $this->smtp->Send();
+ $this->save_message($this->smtp->getHeader() . "\n" .
$this->smtp->getBody() . "\r\n",
+ 'INBOX.Drafts', "\\Draft");
- if ($returnccode)
- {
- // Success
- if ($GLOBALS['phpgw']->mail_send->trace_flag >
0)
- {
- // for debugging
- echo '<html><body>'."\r\n";
- echo '<h2>Here is the communication
from the MUA(phpgw) <--> MTA(smtp server) trace data dump</h2>'."\r\n";
- echo '<h3>trace data flag set to
['.(string)$GLOBALS['phpgw']->mail_send->trace_flag.']</h3>'."\r\n";
- echo '<pre>'."\r\n";
-
print_r($GLOBALS['phpgw']->mail_send->trace_data);
- echo '</pre>'."\r\n";
- echo '<p> <br></p>'."\r\n";
- echo '<p>To go back to the msg list,
click <a href="'.$return_to_folder_href.'">here</a></p><br>';
- echo '</body></html>';
- $this->send_message_cleanup();
- }
- else
- {
- // unset some vars (is this necessary?)
- $this->send_message_cleanup();
- // redirect the browser to the index
page for the appropriate folder
- //header('Location:
'.$return_to_folder_href);
-
$GLOBALS['phpgw']->redirect($return_to_folder_href);
- // kill the rest of this script
- if (is_object($GLOBALS['phpgw']->msg))
- {
- // close down ALL mailserver
streams
-
$GLOBALS['phpgw']->msg->end_request();
- // destroy the object
- $GLOBALS['phpgw']->msg = '';
- unset($GLOBALS['phpgw']->msg);
- }
- // shut down this transaction
-
$GLOBALS['phpgw']->common->phpgw_exit(False);
- }
- }
- else
- {
- // ERROR - mail NOT sent
- echo '<html><body>'."\r\n";
- echo '<h2>Your message could <b>not</b> be
sent!</h2>'."\r\n";
- echo '<h3>The mail server
returned:</h3>'."\r\n";
- echo '<pre>';
- print_r($GLOBALS['phpgw']->mail_send->err);
- echo '</pre>'."\r\n";
- echo '<p>To go back to the msg list, click <a
href="'.$return_to_folder_href.'">here</a> </p>'."\r\n";
- echo '</body></html>';
- $this->send_message_cleanup();
- }
+ Header('Location: ' .
$GLOBALS['phpgw']->link('/email/index.php') ); // . $this->get_return_to() );
+ exit;
}
-
}
?>
====================================================
Index: email/inc/class.bojsaddressbook.inc.php
diff -u email/inc/class.bojsaddressbook.inc.php:1.2
email/inc/class.bojsaddressbook.inc.php:1.3
--- email/inc/class.bojsaddressbook.inc.php:1.2 Fri Mar 14 04:00:10 2003
+++ email/inc/class.bojsaddressbook.inc.php Sun Mar 13 23:22:43 2005
@@ -210,7 +210,7 @@
}//end switch
}//end while
-// print "<BR> built query";
+// print "<br /> built query";
// print_r($this->contactquery);
}//end function
@@ -310,7 +310,7 @@
function set_destboxes($aryboxes,$deleted='')
{
//print_r($aryboxes);
-// print "<br> SAVed DESTBOXES <br>";
+// print "<br /> SAVed DESTBOXES <br />";
//We get our own destboxes from the cache
$saveddestboxes=$this->get_destboxes();
// print_r($saveddestboxes);
@@ -318,9 +318,9 @@
//We iterate into each box
while(list($ak,$li)=each($aryboxes))
{
-// print $ak." ".$li."<BR>";
+// print $ak." ".$li."<br />";
// print_r($li);
-// print "<br>";
+// print "<br />";
//We make shure this box has an array in it
if($aryboxes[$ak])
{
@@ -328,7 +328,7 @@
//for its values in the cache
while(list($numary,$ary)=each($aryboxes[$ak]))
{
-// print "<br> Iterating aryboxes
$numary";
+// print "<br /> Iterating
aryboxes $numary";
// print_r($ary);
list($id,$name)=each($ary);
//Look for this record in the
cached destboxes
@@ -342,12 +342,12 @@
//out of the
cached destbox
list($sid,$sname)=each($arysave);
-// print "<br>
Iterating destboxes $id -> $name / $sid $sname";
+// print "<br />
Iterating destboxes $id -> $name / $sid $sname";
//So we can
compare it and set the email field in it
if($id==$sid)
{
-// print
"<br> found $id in $ak";
-// print
"<br> seting mail to $arysave[email]";
+// print
"<br /> found $id in $ak";
+// print
"<br /> seting mail to $arysave[email]";
$ary['email']=$arysave['email'];
$aryboxes[$ak][$numary]=$ary;
@@ -365,12 +365,12 @@
//We iterate into the query
cache
while(list($num,$record)=each($this->result))
{
-// print "<br> Iterating
results $id ---> $name <br>$record[id]---> $record[email]";
+// print "<br /> Iterating
results $id ---> $name <br />$record[id]---> $record[email]";
//Found what we are
looking for
if($id == $record["id"])
{
//Set the mail
record to what it should be
-// print "<br>
seting mail to $record[email] <br>";
+// print "<br />
seting mail to $record[email] <br />";
$ary['email']=($record["email"] ? $record["email"] : $record["home_email"]);
$aryboxes[$ak][$numary]=$ary;
$retboxes[$ak][$id]['email']= $ary['email'];
@@ -385,13 +385,13 @@
}
elseif(!$deleted[$ak])
{
-// print "<br>Saving $ak from destination
data $deleted[$ak]<br>";
+// print "<br />Saving $ak from
destination data $deleted[$ak]<br />";
// print_r($deleted);
//Delete the destboxes that need
deletion
$aryboxes[$ak]=$saveddestboxes[$ak];
}
}
-// print "<br>modified<br>";
+// print "<br />modified<br />";
// print_r($aryboxes);
reset($aryboxes);
//Save the resulting destboxes
@@ -418,7 +418,7 @@
}
if($this->debug)
{
- echo '<br>Saving: ';
+ echo '<br />Saving: ';
_debug_array($data);
}
}
@@ -433,7 +433,7 @@
$data =
$GLOBALS['phpgw']->session->appsession('session_data','jsbook_data'.($location
? '_'.$location :""));
if($this->debug)
{
- echo '<br>Read: ';
+ echo '<br />Read: ';
_debug_array($data);
}
return $data;
====================================================
Index: email/inc/class.boindex.inc.php
diff -u email/inc/class.boindex.inc.php:1.31
email/inc/class.boindex.inc.php:1.32
--- email/inc/class.boindex.inc.php:1.31 Thu Dec 30 23:13:50 2004
+++ email/inc/class.boindex.inc.php Sun Mar 13 23:22:43 2005
@@ -64,21 +64,21 @@
'lang_sort_by' => lang('Sort By'),
'lang_email_date' => lang('Email Date'),
'lang_arrival_date' => lang('Arrival Date'),
- 'lang_from' => lang('From'),
+ 'lang_from' => lang('From'),
'lang_subject' => lang('Subject'),
- 'lang_size' => lang('Size'),
+ 'lang_size' => lang('Size'),
// folder stats Information bar
- 'lang_new' => lang('New'),
- 'lang_new2' => lang('New
Messages'),
+ 'lang_new' => lang('New'),
+ 'lang_new2' => lang('New Messages'),
'lang_total' => lang('Total'),
'lang_total2' => lang('Total
Messages'),
'lang_size2' => lang('Folder Size'),
- //'stats_to_txt' => lang('to'),
+ //'stats_to_txt' => lang('to'),
// ralfbecker: this is not the word in other
lang's as the other lang('to')'s
'stats_to_txt' => '-',
- 'lang_to' => lang('to'),
+ 'lang_to' => lang('to'),
'lang_get_size' => lang('get size'),
- 'lang_date' => lang('date'),
+ 'lang_date' => lang('date'),
'lang_lines' => lang('lines'),
'lang_counld_not_open' => lang('Could not open
this mailbox'),
'lang_empty_folder' => lang('this folder is
empty'),
@@ -89,7 +89,11 @@
'lang_answered' => lang('answered'),
'lang_draft' => lang('draft'),
'lang_deleted' => lang('deleted'),
- 'lang_important' =>
lang('important')
+ 'lang_important' => lang('important'),
+
+ //Empty Trash added by skwashd
+ 'lang_empty_trash' => lang('empty trash'),
+ 'lang_empty_trash_warn' => lang('Are you sure
you want to empty the trash?')
);
// put these into $this->xi[] array
@@ -342,7 +346,7 @@
*/
function index_data()
{
- if ($this->debug_index_data == True) { echo 'ENTERING:
email.boindex.index_data'.'<br>'; }
+ if ($this->debug_index_data == True) { echo 'ENTERING:
email.boindex.index_data'.'<br />'; }
// create class objects
$this->nextmatchs = CreateObject('phpgwapi.nextmatchs');
// this svc_nextmatches handles email only stuff
@@ -385,7 +389,14 @@
$this->xi['hdr_font_size'] = '2';
$this->xi['hdr_font_size_sm'] = '1';
$this->xi['ftr_font'] =
$GLOBALS['phpgw_info']['theme']['font'];
-
+
+ //Empty Trash added by skwashd - move it if you want
+ $this->xi['empty_trash_link'] =
$GLOBALS['phpgw']->link('/index.php',
+ array(
+
'menuaction' => 'email.boaction.empty_trash',
+
'acctnum' => $GLOBALS['phpgw']->msg->get_acctnum()
+ )
+ );
// establish all manner of important data
// can not put acctnum=X here because any single piece
of data may apply to a different account
@@ -399,7 +410,7 @@
$this->xi['show_num_new'] = False;
$this->icon_theme =
$GLOBALS['phpgw']->msg->get_pref_value('icon_theme',$acctnum);
$this->icon_size =
$GLOBALS['phpgw']->msg->get_pref_value('icon_size',$acctnum);
- //echo "icon size is ".$this->icon_size."<br>\r\n";
+ //echo "icon size is ".$this->icon_size."<br />\r\n";
/* MOVED TO FUNCTION ABOVE
// ---- account switchbox ----
@@ -805,7 +816,7 @@
$this->xi['mlist_new_msg'] = '<font
color="'.$this->xi['mlist_newmsg_color'].'">'.$this->xi['mlist_newmsg_char'].'</font>';
//$this->xi['mlist_checkbox_name'] =
'delmov_list_fake_uri[]';
$this->xi['mlist_checkbox_name'] = 'delmov_list[]';
- //$this->xi['attach_img'] =
$this->xi['svr_image_dir'].'/attach.gif';
+ //$this->xi['attach_img'] =
$this->xi['svr_image_dir'].'/attach.png';
$this->xi['attach_img'] =
$GLOBALS['phpgw']->common->image_on('email','attach','_on');
$this->xi['check_image'] =
$GLOBALS['phpgw']->common->image_on('email','check','_on');
//$this->xi['mlist_attach'] = '<div
align="right">'.'<img src="'.$this->xi['attach_img'].'"
alt="'.$this->xi['mlist_attach_txt'].'">'.'</div>';
@@ -914,7 +925,7 @@
}
$this->xi['delmov_image'] =
$GLOBALS['phpgw']->msg->img_maketag($GLOBALS['phpgw']->msg->_image_on('email',$this->icon_theme.'/trash-'.$this->icon_size,'_on'),$this->xi['lang_delete'],'','','0');
//$this->xi['delmov_image'] =
$GLOBALS['phpgw']->msg->img_maketag($GLOBALS['phpgw']->common->image_on('email',$icon_theme.'-trash-'.$icon_size,'_on'),$this->xi['lang_delete'],'','','0');
- //$this->xi['delmov_image'] =
$GLOBALS['phpgw']->msg->img_maketag($this->xi['image_dir'].'/'.$this->icon_theme.'-trash-'.$this->icon_size.'.gif',$this->xi['lang_delete'],'','','0');
+ //$this->xi['delmov_image'] =
$GLOBALS['phpgw']->msg->img_maketag($this->xi['image_dir'].'/'.$this->icon_theme.'-trash-'.$this->icon_size.'.png',$this->xi['lang_delete'],'','','0');
$delmov_onclick = "javascript:do_action('delall')";
switch
($GLOBALS['phpgw']->msg->get_pref_value('button_type',$acctnum)){
case 'text':
@@ -946,18 +957,18 @@
{
// DISPLAY SEARCH RESULTS
- if ($this->debug_index_data == True) { echo 'ENTERING:
email.boindex: mlist_data'.'<br>'; }
+ if ($this->debug_index_data == True) { echo 'ENTERING:
email.boindex: mlist_data'.'<br />'; }
if ($this->debug_index_data == True) { echo
'email.boindex.mlist_data: local var
attempt_reuse=['.serialize($attempt_reuse).'] ; reuse_feed_args[] dump<pre>';
print_r($reuse_feed_args); echo '</pre>'; }
// create class objects
$this->nextmatchs = CreateObject('phpgwapi.nextmatchs');
if (is_object($GLOBALS['phpgw']->msg))
{
- if ($this->debug_index_data) { echo
'email.boindex.mlist_data: is_object test: $GLOBALS[phpgw]->msg is already set,
do not create again<br>'; }
+ if ($this->debug_index_data) { echo
'email.boindex.mlist_data: is_object test: $GLOBALS[phpgw]->msg is already set,
do not create again<br />'; }
}
else
{
- if ($this->debug_index_data) { echo
'email.boindex.mlist_data: is_object: $GLOBALS[phpgw]->msg is NOT set, creating
mail_msg object<br>'; }
+ if ($this->debug_index_data) { echo
'email.boindex.mlist_data: is_object: $GLOBALS[phpgw]->msg is NOT set, creating
mail_msg object<br />'; }
$GLOBALS['phpgw']->msg =
CreateObject("email.mail_msg");
}
@@ -1230,7 +1241,7 @@
$this->xi['mlist_new_msg'] = '<font
color="'.$this->xi['mlist_newmsg_color'].'">'.$this->xi['mlist_newmsg_char'].'</font>';
$this->xi['mlist_attach'] =
'<div align="right">'
- .'<img
src="'.$this->xi['svr_image_dir'].'/attach.gif"
alt="'.$this->xi['mlist_attach_txt'].'">'
+ .'<img
src="'.$this->xi['svr_image_dir'].'/attach.png"
alt="'.$this->xi['mlist_attach_txt'].'">'
.'</div>';
// loop thru the messages and get the data that the UI
will display
if ($this->xi['folder_info']['number_all'] == 0)
@@ -1289,7 +1300,7 @@
}
$this->xi['ftr_backcolor'] =
$GLOBALS['phpgw_info']['theme']['th_bg'];
$this->xi['ftr_backcolor_class'] = 'th';
- if ($this->debug_index_data == True) { echo 'LEAVING:
email.boindex: mlist_data'.'<br>'; }
+ if ($this->debug_index_data == True) { echo 'LEAVING:
email.boindex: mlist_data'.'<br />'; }
}
====================================================
Index: email/inc/class.bofilters.inc.php
diff -u email/inc/class.bofilters.inc.php:1.15
email/inc/class.bofilters.inc.php:1.16
--- email/inc/class.bofilters.inc.php:1.15 Thu Dec 30 23:13:50 2004
+++ email/inc/class.bofilters.inc.php Sun Mar 13 23:22:43 2005
@@ -84,7 +84,7 @@
*/
function bofilters()
{
- if ($this->debug > 0) { echo 'email.bofilters
*constructor*: ENTERING <br>'; }
+ if ($this->debug > 0) { echo 'email.bofilters
*constructor*: ENTERING <br />'; }
define('F_ROW_0_MATCH',1);
define('F_ROW_1_MATCH',2);
@@ -140,22 +140,22 @@
{
$my_menuaction = 'error: none found';
}
- if ($this->debug > 0) { echo 'email.bofilters.
*constructor*('.__LINE__.'): $my_menuaction ['.$my_menuaction.']<br>'; }
+ if ($this->debug > 0) { echo 'email.bofilters.
*constructor*('.__LINE__.'): $my_menuaction ['.$my_menuaction.']<br />'; }
if (stristr($my_menuaction, 'email.uifilter'))
{
- if ($this->debug > 0) { echo 'email.bofilters.
*constructor*('.__LINE__.'): GPC menuaction indicates this is a UI call, NOT
applying filters, so do NOT html decode pref filter data<br>'; }
+ if ($this->debug > 0) { echo 'email.bofilters.
*constructor*('.__LINE__.'): GPC menuaction indicates this is a UI call, NOT
applying filters, so do NOT html decode pref filter data<br />'; }
$also_undo_defang = False;
}
else
{
- if ($this->debug > 0) { echo 'email.bofilters.
*constructor*('.__LINE__.'): GPC menuaction indicates this is NOT simply a UI
call, so DO html decode (defang) pref filter data<br>'; }
+ if ($this->debug > 0) { echo 'email.bofilters.
*constructor*('.__LINE__.'): GPC menuaction indicates this is NOT simply a UI
call, so DO html decode (defang) pref filter data<br />'; }
$also_undo_defang = True;
}
- if ($this->debug > 0) { echo 'email.bofilters.
*constructor*: calling
$this->read_filter_data_from_prefs('.serialize($also_undo_defang).')<br>'; }
+ if ($this->debug > 0) { echo 'email.bofilters.
*constructor*: calling
$this->read_filter_data_from_prefs('.serialize($also_undo_defang).')<br />'; }
$this->read_filter_data_from_prefs($also_undo_defang);
- if ($this->debug > 0) { echo 'email.bofilters.
*constructor*: LEAVING<br>'; }
+ if ($this->debug > 0) { echo 'email.bofilters.
*constructor*: LEAVING<br />'; }
//return;
}
@@ -177,7 +177,7 @@
*/
function read_filter_data_from_prefs($also_undo_defang='')
{
- if ($this->debug > 0) { echo
'bofilters.read_filter_data_from_prefs('.__LINE__.'): ENTERING, param
$also_undo_defang ['.serialize($also_undo_defang).']<br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters.read_filter_data_from_prefs('.__LINE__.'): ENTERING, param
$also_undo_defang ['.serialize($also_undo_defang).']<br />'."\r\n"; }
/*
$this->all_filters = array();
// read sublevel data from prefs
@@ -209,15 +209,15 @@
// UNDO the DATABASE DEFANG if instructions specified
this
if ($also_undo_defang)
{
- if ($this->debug > 1) { echo
'bofilters.read_filter_data_from_prefs('.__LINE__.'): about to call
$this->all_filters_bulk_undo_defang because param $also_undo_defang is
['.serialize($also_undo_defang).']<br>'."\r\n"; }
+ if ($this->debug > 1) { echo
'bofilters.read_filter_data_from_prefs('.__LINE__.'): about to call
$this->all_filters_bulk_undo_defang because param $also_undo_defang is
['.serialize($also_undo_defang).']<br />'."\r\n"; }
$this->all_filters_bulk_undo_defang();
}
else
{
- if ($this->debug > 1) { echo
'bofilters.read_filter_data_from_prefs('.__LINE__.'): leaving html encoded
chars AS-IS because param $also_undo_defang is
['.serialize($also_undo_defang).']<br>'."\r\n"; }
+ if ($this->debug > 1) { echo
'bofilters.read_filter_data_from_prefs('.__LINE__.'): leaving html encoded
chars AS-IS because param $also_undo_defang is
['.serialize($also_undo_defang).']<br />'."\r\n"; }
}
if ($this->debug > 2) { echo
'bofilters.read_filter_data_from_prefs('.__LINE__.'): obtained
$this->all_filters DUMP:<pre>'; print_r($this->all_filters); echo
'</pre>'."\r\n"; }
- if ($this->debug > 0) { echo
'bofilters.read_filter_data_from_prefs('.__LINE__.'): LEAVING <br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters.read_filter_data_from_prefs('.__LINE__.'): LEAVING <br />'."\r\n"; }
return $this->all_filters;
}
@@ -229,7 +229,7 @@
*/
function obtain_filer_num($get_next_avail_if_none=True)
{
- if ($this->debug > 0) { echo
'bofilters.obtain_filer_num: ENTERING ; $get_next_avail_if_none :
[<code>'.serialize($get_next_avail_if_none).'</code>]<br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters.obtain_filer_num: ENTERING ; $get_next_avail_if_none :
[<code>'.serialize($get_next_avail_if_none).'</code>]<br />'."\r\n"; }
if
(isset($GLOBALS['phpgw']->msg->ref_POST['filter_num']))
{
if
($GLOBALS['phpgw']->msg->ref_POST['filter_num'] == $this->add_new_filter_token)
@@ -262,7 +262,7 @@
{
$filter_num = $this->not_set;
}
- if ($this->debug > 0) { echo
'bofilters.obtain_filer_num: LEAVING ; returning $filter_num :
[<code>'.serialize($filter_num).'</code>]<br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters.obtain_filer_num: LEAVING ; returning $filter_num :
[<code>'.serialize($filter_num).'</code>]<br />'."\r\n"; }
return $filter_num;
}
@@ -328,21 +328,21 @@
{
// "False" means return $this->not_set if no filter
number was found anywhere
$found_filter_num = $this->obtain_filer_num(False);
- if ($this->debug > 1) { echo 'bofilters.move_up:
$found_filter_num :
[<code>'.serialize($found_filter_num).'</code>]<br>'."\r\n"; }
+ if ($this->debug > 1) { echo 'bofilters.move_up:
$found_filter_num : [<code>'.serialize($found_filter_num).'</code>]<br
/>'."\r\n"; }
if ($found_filter_num == $this->not_set)
{
- if ($this->debug > 0) { echo
'bofilters.move_up: LEAVING with error, no filter num was found<br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters.move_up: LEAVING with error, no filter num was found<br />'."\r\n"; }
return False;
}
elseif($this->filter_exists($found_filter_num) == False)
{
- if ($this->debug > 0) { echo
'bofilters.move_up: LEAVING with error, filter $found_filter_num
[<code>'.serialize($found_filter_num).'</code>] does not exist<br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters.move_up: LEAVING with error, filter $found_filter_num
[<code>'.serialize($found_filter_num).'</code>] does not exist<br />'."\r\n"; }
return False;
}
elseif((string)$found_filter_num == '0')
{
- if ($this->debug > 0) { echo
'bofilters.move_up: LEAVING with error, filter $found_filter_num
[<code>'.serialize($found_filter_num).'</code>] can not be moved
up<br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters.move_up: LEAVING with error, filter $found_filter_num
[<code>'.serialize($found_filter_num).'</code>] can not be moved up<br
/>'."\r\n"; }
return False;
}
// if we get here we need to move up this filter
@@ -357,7 +357,7 @@
$take_me_to_url = $GLOBALS['phpgw']->link(
'/index.php',
'menuaction=email.uifilters.filters_list');
- if ($this->debug > 0 || $this->debug_set_prefs > 0 ) {
echo 'bofilters.move_up: LEAVING with redirect to:
<br>'.$take_me_to_url.'<br>'; }
+ if ($this->debug > 0 || $this->debug_set_prefs > 0 ) {
echo 'bofilters.move_up: LEAVING with redirect to: <br />'.$take_me_to_url.'<br
/>'; }
Header('Location: ' . $take_me_to_url);
}
@@ -370,21 +370,21 @@
{
// "False" means return $this->not_set if no filter
number was found anywhere
$found_filter_num = $this->obtain_filer_num(False);
- if ($this->debug > 1) { echo 'bofilters.move_down:
$found_filter_num :
[<code>'.serialize($found_filter_num).'</code>]<br>'."\r\n"; }
+ if ($this->debug > 1) { echo 'bofilters.move_down:
$found_filter_num : [<code>'.serialize($found_filter_num).'</code>]<br
/>'."\r\n"; }
if ($found_filter_num == $this->not_set)
{
- if ($this->debug > 0) { echo
'bofilters.move_down: LEAVING with error, no filter num was found<br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters.move_down: LEAVING with error, no filter num was found<br
/>'."\r\n"; }
return False;
}
elseif($this->filter_exists($found_filter_num) == False)
{
- if ($this->debug > 0) { echo
'bofilters.move_down: LEAVING with error, filter $found_filter_num
[<code>'.serialize($found_filter_num).'</code>] does not exist<br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters.move_down: LEAVING with error, filter $found_filter_num
[<code>'.serialize($found_filter_num).'</code>] does not exist<br />'."\r\n"; }
return False;
}
elseif($found_filter_num ==
(count($this->all_filters)-1))
{
- if ($this->debug > 0) { echo
'bofilters.move_down: LEAVING with error, filter $found_filter_num
[<code>'.serialize($found_filter_num).'</code>] can not be moved
down<br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters.move_down: LEAVING with error, filter $found_filter_num
[<code>'.serialize($found_filter_num).'</code>] can not be moved down<br
/>'."\r\n"; }
return False;
}
// if we get here we need to move up this filter
@@ -399,7 +399,7 @@
$take_me_to_url = $GLOBALS['phpgw']->link(
'/index.php',
'menuaction=email.uifilters.filters_list');
- if ($this->debug_set_prefs > 0) { echo
'bofilters.move_down: LEAVING with redirect to: <br>'.$take_me_to_url.'<br>'; }
+ if ($this->debug_set_prefs > 0) { echo
'bofilters.move_down: LEAVING with redirect to: <br />'.$take_me_to_url.'<br
/>'; }
Header('Location: ' . $take_me_to_url);
}
@@ -418,22 +418,22 @@
*/
function all_filters_bulk_undo_defang()
{
- if ($this->debug > 0) { echo
'bofilters.all_filters_bulk_undo_defang('.__LINE__.'): ENTERING<br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters.all_filters_bulk_undo_defang('.__LINE__.'): ENTERING<br />'."\r\n"; }
$did_decode = False;
if (!$this->all_filters)
{
- if ($this->debug > 0) { echo
'bofilters.all_filters_bulk_undo_defang('.__LINE__.'): LEAVING early, nothing
to process, $this->all_filters is empty, returning $did_decode
['.serialize($did_decode).']<br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters.all_filters_bulk_undo_defang('.__LINE__.'): LEAVING early, nothing
to process, $this->all_filters is empty, returning $did_decode
['.serialize($did_decode).']<br />'."\r\n"; }
return $did_decode;
}
// UNDO the DATABASE DEFANG,
- if ($this->debug > 1) { echo
'bofilters.all_filters_bulk_undo_defang('.__LINE__.'): about to UNDO the pref
friendly defanged chars, so the the html encoding of certain offending chars
prefs is UNDONE here<br>'."\r\n"; }
+ if ($this->debug > 1) { echo
'bofilters.all_filters_bulk_undo_defang('.__LINE__.'): about to UNDO the pref
friendly defanged chars, so the the html encoding of certain offending chars
prefs is UNDONE here<br />'."\r\n"; }
$did_decode = False;
for ($filter_idx=0; $filter_idx <
count($this->all_filters); $filter_idx++)
{
// currently only 2 elements get the defang,
undefang treatment
// 1. filtername
$refanged_filtername =
$this->string_undo_defang($this->all_filters[$filter_idx]['filtername']);
- if ($this->debug > 1) { echo
'bofilters.all_filters_bulk_undo_defang('.__LINE__.'): still defanged
$this->all_filters['.$filter_idx.'][filtername] is
['.serialize($this->all_filters[$filter_idx]['filtername']).'], RE-fanged
$refanged_filtername ['.serialize($refanged_filtername).']<br>'."\r\n"; }
+ if ($this->debug > 1) { echo
'bofilters.all_filters_bulk_undo_defang('.__LINE__.'): still defanged
$this->all_filters['.$filter_idx.'][filtername] is
['.serialize($this->all_filters[$filter_idx]['filtername']).'], RE-fanged
$refanged_filtername ['.serialize($refanged_filtername).']<br />'."\r\n"; }
if ($refanged_filtername !=
$this->all_filters[$filter_idx]['filtername'])
{
$did_decode = True;
@@ -443,7 +443,7 @@
for ($matches_idx=0; $matches_idx <
count($this->all_filters[$filter_idx]['matches']); $matches_idx++)
{
$refanged_matchthis =
$this->string_undo_defang($this->all_filters[$filter_idx]['matches'][$matches_idx]['matchthis']);
- if ($this->debug > 1) { echo
'bofilters.all_filters_bulk_undo_defang('.__LINE__.'): still defanged
$this->all_filters['.$filter_idx.'][matches]['.$matches_idx.'][matchthis] is
['.serialize($this->all_filters[$filter_idx]['matches'][$matches_idx]['matchthis']).'],
RE-fanged $refanged_matchthis
['.serialize($refanged_matchthis).']<br>'."\r\n"; }
+ if ($this->debug > 1) { echo
'bofilters.all_filters_bulk_undo_defang('.__LINE__.'): still defanged
$this->all_filters['.$filter_idx.'][matches]['.$matches_idx.'][matchthis] is
['.serialize($this->all_filters[$filter_idx]['matches'][$matches_idx]['matchthis']).'],
RE-fanged $refanged_matchthis ['.serialize($refanged_matchthis).']<br
/>'."\r\n"; }
if ($refanged_matchthis !=
$this->all_filters[$filter_idx]['matches'][$matches_idx]['matchthis'])
{
$did_decode = True;
@@ -452,7 +452,7 @@
}
}
if ($this->debug > 2) { echo
'bofilters.all_filters_bulk_undo_defang('.__LINE__.'): defanged
$this->all_filters DUMP:<pre>'; print_r($this->all_filters); echo
'</pre>'."\r\n"; }
- if ($this->debug > 0) { echo
'bofilters.all_filters_bulk_undo_defang('.__LINE__.'): LEAVING, returning
$did_decode ['.serialize($did_decode).']<br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters.all_filters_bulk_undo_defang('.__LINE__.'): LEAVING, returning
$did_decode ['.serialize($did_decode).']<br />'."\r\n"; }
return $did_decode;
}
@@ -463,7 +463,7 @@
*/
function string_undo_defang($pref_string='')
{
- if ($this->debug_set_prefs > 0) { echo
'bofilters.string_undo_defang('.__LINE__.'): ENTERING, param $pref_string
['.serialize($pref_string).']<br>'."\r\n"; }
+ if ($this->debug_set_prefs > 0) { echo
'bofilters.string_undo_defang('.__LINE__.'): ENTERING, param $pref_string
['.serialize($pref_string).']<br />'."\r\n"; }
if (!$pref_string)
{
return '';
@@ -471,7 +471,7 @@
// undo the _LAME_ way to make the value "database
friendly"
// return slashes and quotes to their actual form as
slashes and quotes
$un_defanged_string =
$GLOBALS['phpgw']->msg->html_quotes_decode($pref_string);
- if ($this->debug_set_prefs > 0) { echo
'bofilters.string_undo_defang('.__LINE__.'): LEAVING returning
$un_defanged_string ['.serialize($un_defanged_string).']<br>'."\r\n"; }
+ if ($this->debug_set_prefs > 0) { echo
'bofilters.string_undo_defang('.__LINE__.'): LEAVING returning
$un_defanged_string ['.serialize($un_defanged_string).']<br />'."\r\n"; }
return $un_defanged_string;
}
@@ -488,7 +488,7 @@
*/
function string_strip_and_defang($user_string='')
{
- if ($this->debug_set_prefs > 0) { echo
'bofilters.string_strip_and_defang: ENTERING, para, $user_string
['.serialize($user_string).']<br>'."\r\n"; }
+ if ($this->debug_set_prefs > 0) { echo
'bofilters.string_strip_and_defang: ENTERING, para, $user_string
['.serialize($user_string).']<br />'."\r\n"; }
if (!$user_string)
{
return '';
@@ -499,7 +499,7 @@
// and this is a _LAME_ way to make the value "database
friendly"
// because slashes and quotes will FRY the whole
preferences repository
$prepared_string =
$GLOBALS['phpgw']->msg->html_quotes_encode($prepared_string);
- if ($this->debug_set_prefs > 0) { echo
'bofilters.string_strip_and_defang: LEAVING returning $prepared_string
['.serialize($prepared_string).']<br>'."\r\n"; }
+ if ($this->debug_set_prefs > 0) { echo
'bofilters.string_strip_and_defang: LEAVING returning $prepared_string
['.serialize($prepared_string).']<br />'."\r\n"; }
return $prepared_string;
}
@@ -515,8 +515,8 @@
*/
function check_duplicate_submit_elements($key='source_accounts')
{
- if ($this->debug_set_prefs > 0) { echo
'bofilters.check_duplicate_submit_elements('.__LINE__.'): ENTERING, param $key
is ['.$key.'] <br>'."\r\n"; }
- if ($this->debug_set_prefs > 1) { echo
'bofilters.check_duplicate_submit_elements('.__LINE__.'): this checks for buggy
apache2 duplicated source account POSTED form numbered array data<br>'."\r\n"; }
+ if ($this->debug_set_prefs > 0) { echo
'bofilters.check_duplicate_submit_elements('.__LINE__.'): ENTERING, param $key
is ['.$key.'] <br />'."\r\n"; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.check_duplicate_submit_elements('.__LINE__.'): this checks for buggy
apache2 duplicated source account POSTED form numbered array data<br
/>'."\r\n"; }
$did_alter = False;
//source_accounts
@@ -528,7 +528,7 @@
if
(in_array($GLOBALS['phpgw']->msg->ref_POST[$key][$i], $seen_list_items) == True)
{
$did_alter = True;
- if ($this->debug_set_prefs > 1) { echo
'bofilters: check_duplicate_submit_elements('.__LINE__.'): <u>unsetting</u> and
*skipping* duplicate (buggy apache2) POST ['.$key.']['.$i.'] array item
['.$GLOBALS['phpgw']->msg->ref_POST[$key][$i].'] <br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters: check_duplicate_submit_elements('.__LINE__.'): <u>unsetting</u> and
*skipping* duplicate (buggy apache2) POST ['.$key.']['.$i.'] array item
['.$GLOBALS['phpgw']->msg->ref_POST[$key][$i].'] <br />'; }
$GLOBALS['phpgw']->msg->ref_POST[$key][$i] = '';
// can I UNSET this and have the next
$i index item actually be the next one
// YES, a) array count calculated
before loop, and b) does not squash array to unset an item
@@ -542,13 +542,13 @@
else
{
// track seen items for duplicate test
- if ($this->debug_set_prefs > 1) { echo
'bofilters: check_duplicate_submit_elements('.__LINE__.'): good (not duplicate,
not buggy apache2) POST ['.$key.']['.$i.'] array item
['.$GLOBALS['phpgw']->msg->ref_POST[$key][$i].'] <br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters: check_duplicate_submit_elements('.__LINE__.'): good (not duplicate,
not buggy apache2) POST ['.$key.']['.$i.'] array item
['.$GLOBALS['phpgw']->msg->ref_POST[$key][$i].'] <br />'; }
$tmp_next_idx = count($seen_list_items);
$seen_list_items[$tmp_next_idx] =
$GLOBALS['phpgw']->msg->ref_POST[$key][$i];
}
}
- if ($this->debug_set_prefs > 0) { echo
'bofilters.check_duplicate_submit_elements('.__LINE__.'): LEAVING, returning
$did_alter ['.serialize($did_alter).']<br>'."\r\n"; }
+ if ($this->debug_set_prefs > 0) { echo
'bofilters.check_duplicate_submit_elements('.__LINE__.'): LEAVING, returning
$did_alter ['.serialize($did_alter).']<br />'."\r\n"; }
}
/*!
@@ -558,11 +558,11 @@
*/
function process_submitted_data()
{
- if ($this->debug_set_prefs > 0) { echo
'bofilters.process_submitted_data('.__LINE__.'): ENTERING<br>'."\r\n"; }
+ if ($this->debug_set_prefs > 0) { echo
'bofilters.process_submitted_data('.__LINE__.'): ENTERING<br />'."\r\n"; }
if ($this->debug_set_prefs > 2) { echo
'bofilters.process_submitted_data('.__LINE__.'): (pre-buggy apache2 check)
ref_POST dump:<pre>'; print_r($GLOBALS['phpgw']->msg->ref_POST); echo
'</pre>'."\r\n"; }
$this->check_duplicate_submit_elements('source_accounts');
- //if ($this->debug_set_prefs > 1) { echo
'bofilters.process_submitted_data: caling
$this->distill_filter_args<br>'."\r\n"; }
+ //if ($this->debug_set_prefs > 1) { echo
'bofilters.process_submitted_data: caling $this->distill_filter_args<br
/>'."\r\n"; }
//$this->distill_filter_args();
// we must have data because the form action made this
code run
$this_filter = array();
@@ -577,7 +577,7 @@
echo
'bofilters.process_submitted_data('.__LINE__.'): LEAVING with ERROR, unable to
obtain POST filter_num';
return;
}
- if ($this->debug_set_prefs > 1) { echo
'bofilters.process_submitted_data('.__LINE__.'): $this_filter[filter_num]:
['.$found_filter_num.']<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.process_submitted_data('.__LINE__.'): $this_filter[filter_num]:
['.$found_filter_num.']<br />'; }
// FILTER NAME
if
((isset($GLOBALS['phpgw']->msg->ref_POST['filtername']))
@@ -592,7 +592,7 @@
//$this_filter['filtername'] = 'Filter
'.$found_filter_num;
$this_filter['filtername'] = 'My Mail Filter';
}
- if ($this->debug_set_prefs > 1) { echo
'bofilters.process_submitted_data('.__LINE__.'): $this_filter[filtername]:
['.$this_filter['filtername'].']<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.process_submitted_data('.__LINE__.'): $this_filter[filtername]:
['.$this_filter['filtername'].']<br />'; }
// ---- The Rest of the data is submitted in Array
Form ----
@@ -632,7 +632,7 @@
|| ($key == 'filtername')
|| ($key == 'source_accounts'))
{
- if ($this->debug_set_prefs > 1) { echo
'bofilters.process_submitted_data('.__LINE__.'): $GLOBALS[HTTP_POST_VARS]
key,value walk thru: $key: ['.$key.'] is data we already processed, skip to
next loop<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.process_submitted_data('.__LINE__.'): $GLOBALS[HTTP_POST_VARS]
key,value walk thru: $key: ['.$key.'] is data we already processed, skip to
next loop<br />'; }
continue;
}
if ($this->debug_set_prefs > 1) { echo
'bofilters.process_submitted_data('.__LINE__.'): $GLOBALS[HTTP_POST_VARS]
key,value walk thru: $key: ['.$key.'] ; $value DUMP:<pre>'; print_r($value);
echo "</pre>\r\n"; }
@@ -641,39 +641,39 @@
{
// now we grab the index value from the
key string
$match_this_idx = (int)$key[6];
- if ($this->debug_set_prefs > 1) { echo
'bofilters.process_submitted_data('.__LINE__.'): match_this_idx grabbed value:
['.$match_this_idx.']<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.process_submitted_data('.__LINE__.'): match_this_idx grabbed value:
['.$match_this_idx.']<br />'; }
$match_data =
$GLOBALS['phpgw']->msg->ref_POST[$key];
// is this row even being used?
if ((isset($match_data['andor']))
&& ($match_data['andor'] ==
'ignore_me'))
{
- if ($this->debug_set_prefs > 1)
{ echo 'bofilters.process_submitted_data('.__LINE__.'): SKIP this row,
$match_data[andor]: ['.$match_data['andor'].']<br>'; }
+ if ($this->debug_set_prefs > 1)
{ echo 'bofilters.process_submitted_data('.__LINE__.'): SKIP this row,
$match_data[andor]: ['.$match_data['andor'].']<br />'; }
}
else
{
- if ($this->debug_set_prefs > 1)
{ echo 'bofilters.process_submitted_data('.__LINE__.'): $match_data[matchthis]
PRE-defang ['.serialize($match_data['matchthis']).']<br>'; }
+ if ($this->debug_set_prefs > 1)
{ echo 'bofilters.process_submitted_data('.__LINE__.'): $match_data[matchthis]
PRE-defang ['.serialize($match_data['matchthis']).']<br />'; }
// DEFANG on
$match_data["matchthis"] (will need to reverse that on read)
$match_data['matchthis'] =
$this->string_strip_and_defang($match_data['matchthis']);
- if ($this->debug_set_prefs > 1)
{ echo 'bofilters.process_submitted_data('.__LINE__.'): $match_data[matchthis]
POST-defang ['.serialize($match_data['matchthis']).']<br>'; }
+ if ($this->debug_set_prefs > 1)
{ echo 'bofilters.process_submitted_data('.__LINE__.'): $match_data[matchthis]
POST-defang ['.serialize($match_data['matchthis']).']<br />'; }
$this_filter['matches'][$match_this_idx] = $match_data;
- if ($this->debug_set_prefs > 1)
{ echo 'bofilters.process_submitted_data('.__LINE__.'):
$this_filter[matches]['.$match_this_idx.'] =
['.serialize($this_filter['matches'][$match_this_idx]).']<br>'; }
+ if ($this->debug_set_prefs > 1)
{ echo 'bofilters.process_submitted_data('.__LINE__.'):
$this_filter[matches]['.$match_this_idx.'] =
['.serialize($this_filter['matches'][$match_this_idx]).']<br />'; }
}
}
elseif (strstr($key, 'action_'))
{
// now we grab the index value from the
key string
$action_this_idx = (int)$key[7];
- if ($this->debug_set_prefs > 1) { echo
'bofilters.process_submitted_data('.__LINE__.'): action_this_idx grabbed value:
['.$action_this_idx.']<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.process_submitted_data('.__LINE__.'): action_this_idx grabbed value:
['.$action_this_idx.']<br />'; }
$action_data =
$GLOBALS['phpgw']->msg->ref_POST[$key];
if ((isset($action_data['judgement']))
&& ($action_data['judgement'] ==
'ignore_me'))
{
- if ($this->debug_set_prefs > 1)
{ echo 'bofilters.process_submitted_data('.__LINE__.'): SKIP this row,
$action_data[judgement]: ['.$match_data['andor'].']<br>'; }
+ if ($this->debug_set_prefs > 1)
{ echo 'bofilters.process_submitted_data('.__LINE__.'): SKIP this row,
$action_data[judgement]: ['.$match_data['andor'].']<br />'; }
}
else
{
$this_filter['actions'][$action_this_idx] = $action_data;
- if ($this->debug_set_prefs > 1)
{ echo 'bofilters.process_submitted_data('.__LINE__.'):
$this_filter[actions][$action_this_idx]:
['.serialize($this_filter['actions'][$action_this_idx]).']<br>'; }
+ if ($this->debug_set_prefs > 1)
{ echo 'bofilters.process_submitted_data('.__LINE__.'):
$this_filter[actions][$action_this_idx]:
['.serialize($this_filter['actions'][$action_this_idx]).']<br />'; }
}
}
}
@@ -724,12 +724,12 @@
// NEW we need to wipe the cached filters
$my_location = '0;cached_prefs';
- if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository('.__LINE__.'): NEW: EXPIRE CACHED
PREFERENCES, calling ->msg->so->so_appsession_passthru('.$my_location.', "
")<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository('.__LINE__.'): NEW: EXPIRE CACHED
PREFERENCES, calling ->msg->so->so_appsession_passthru('.$my_location.', "
")<br />'; }
$GLOBALS['phpgw']->msg->so->so_appsession_passthru($my_location, ' ');
// first we delete any existing data at the desired
prefs location
$pref_struct_str = '["filters"]';
- if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->delete_struct("email", $pref_struct_str) which will eval
$pref_struct_str='.$pref_struct_str.'<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->delete_struct("email", $pref_struct_str) which will eval
$pref_struct_str='.$pref_struct_str.'<br />'; }
$GLOBALS['phpgw']->preferences->delete_struct('email',$pref_struct_str);
for ($filter_idx=0; $filter_idx <
count($this->all_filters); $filter_idx++)
@@ -742,7 +742,7 @@
// $this_filter['filtername'] string (will
require htmlslecialchars_encode and decode
$pref_struct_str =
'["filters"]['.$filter_idx.']["filtername"]';
- if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['filtername'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['filtername'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br />'; }
$GLOBALS['phpgw']->preferences->add_struct('email', $pref_struct_str,
$this_filter['filtername']);
// $this_filter['source_accounts'] array
@@ -753,11 +753,11 @@
{
// folder
$pref_struct_str =
'["filters"]['.$filter_idx.']["source_accounts"]['.$i.']["folder"]';
- if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['source_accounts'][$i]['folder'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['source_accounts'][$i]['folder'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br />'; }
$GLOBALS['phpgw']->preferences->add_struct('email', $pref_struct_str,
$this_filter['source_accounts'][$i]['folder']);
// acctnum
$pref_struct_str =
'["filters"]['.$filter_idx.']["source_accounts"]['.$i.']["acctnum"]';
- if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['source_accounts'][$i]['acctnum'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['source_accounts'][$i]['acctnum'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br />'; }
$GLOBALS['phpgw']->preferences->add_struct('email', $pref_struct_str,
$this_filter['source_accounts'][$i]['acctnum']);
}
@@ -773,16 +773,16 @@
if
(isset($this_filter['matches'][$i]['andor']))
{
$pref_struct_str =
'["filters"]['.$filter_idx.']["matches"]['.$i.']["andor"]';
- if ($this->debug_set_prefs > 1)
{ echo 'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['matches'][$i]['andor'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br>'; }
+ if ($this->debug_set_prefs > 1)
{ echo 'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['matches'][$i]['andor'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br />'; }
$GLOBALS['phpgw']->preferences->add_struct('email', $pref_struct_str,
$this_filter['matches'][$i]['andor']);
}
// examine
$pref_struct_str =
'["filters"]['.$filter_idx.']["matches"]['.$i.']["examine"]';
- if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['matches'][$i]['examine'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['matches'][$i]['examine'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br />'; }
$GLOBALS['phpgw']->preferences->add_struct('email', $pref_struct_str,
$this_filter['matches'][$i]['examine']);
// comparator
$pref_struct_str =
'["filters"]['.$filter_idx.']["matches"]['.$i.']["comparator"]';
- if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['matches'][$i]['comparator'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['matches'][$i]['comparator'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br />'; }
$GLOBALS['phpgw']->preferences->add_struct('email', $pref_struct_str,
$this_filter['matches'][$i]['comparator']);
// matchthis
// user_string, may need
htmlslecialchars_encode decode and/or the user may forget to tnter data here
@@ -792,7 +792,7 @@
$this_filter['matches'][$i]['matchthis'] = 'user_string_not_filled_by_user';
}
$pref_struct_str =
'["filters"]['.$filter_idx.']["matches"]['.$i.']["matchthis"]';
- if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['matches'][$i]['matchthis'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['matches'][$i]['matchthis'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br />'; }
$GLOBALS['phpgw']->preferences->add_struct('email', $pref_struct_str,
$this_filter['matches'][$i]['matchthis']);
}
@@ -806,21 +806,21 @@
{
// judgement
$pref_struct_str =
'["filters"]['.$filter_idx.']["actions"]['.$i.']["judgement"]';
- if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['actions'][$i]['judgement'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['actions'][$i]['judgement'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br />'; }
$GLOBALS['phpgw']->preferences->add_struct('email', $pref_struct_str,
$this_filter['actions'][$i]['judgement']);
// folder
$pref_struct_str =
'["filters"]['.$filter_idx.']["actions"]['.$i.']["folder"]';
- if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['actions'][$i]['folder'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['actions'][$i]['folder'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br />'; }
$GLOBALS['phpgw']->preferences->add_struct('email', $pref_struct_str,
$this_filter['actions'][$i]['folder']);
// actiontext
$pref_struct_str =
'["filters"]['.$filter_idx.']["actions"]['.$i.']["actiontext"]';
- if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['actions'][$i]['actiontext'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['actions'][$i]['actiontext'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br />'; }
$GLOBALS['phpgw']->preferences->add_struct('email', $pref_struct_str,
$this_filter['actions'][$i]['actiontext']);
// stop_filtering
if
(isset($this_filter['actions'][$i]['stop_filtering']))
{
$pref_struct_str =
'["filters"]['.$filter_idx.']["actions"]['.$i.']["stop_filtering"]';
- if ($this->debug_set_prefs > 1)
{ echo 'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['actions'][$i]['stop_filtering'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br>'; }
+ if ($this->debug_set_prefs > 1)
{ echo 'bofilters.save_all_filters_to_repository: using
preferences->add_struct("email", $pref_struct_str,
'.$this_filter['actions'][$i]['stop_filtering'].') which will eval
$pref_struct_str='.$pref_struct_str.'<br />'; }
$GLOBALS['phpgw']->preferences->add_struct('email', $pref_struct_str,
$this_filter['actions'][$i]['stop_filtering']);
}
}
@@ -829,12 +829,12 @@
// DONE processing prefs, SAVE to the Repository
if ($this->debug_set_prefs > 3)
{
- echo 'bofilters.save_all_filters_to_repository:
*debug* at ['.$this->debug_set_prefs.'] so skipping save_repository<br>';
+ echo 'bofilters.save_all_filters_to_repository:
*debug* at ['.$this->debug_set_prefs.'] so skipping save_repository<br />';
}
else
{
if ($this->debug_set_prefs > 2) { echo
'bofilters.save_all_filters_to_repository: direct pre-save
$GLOBALS[phpgw]->preferences->data[email][filters] DUMP:<pre>';
print_r($GLOBALS['phpgw']->preferences->data['email']['filters']); echo
'</pre>'; }
- if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: SAVING REPOSITORY<br>'; }
+ if ($this->debug_set_prefs > 1) { echo
'bofilters.save_all_filters_to_repository: SAVING REPOSITORY<br />'; }
$GLOBALS['phpgw']->preferences->save_repository();
// re-grab data from prefs
@@ -847,14 +847,14 @@
'/index.php',
'menuaction=email.uifilters.filters_list');
- if ($this->debug_set_prefs > 0) { echo
'bofilters.save_all_filters_to_repository: almost LEAVING, about to issue a
redirect to:<br>'.$take_me_to_url.'<br>'; }
+ if ($this->debug_set_prefs > 0) { echo
'bofilters.save_all_filters_to_repository: almost LEAVING, about to issue a
redirect to:<br />'.$take_me_to_url.'<br />'; }
if ($this->debug_set_prefs > 1)
{
- echo 'bofilters.save_all_filters_to_repository:
LEAVING, *debug* at ['.$this->debug_set_prefs.'] so skipping Header redirection
to: ['.$take_me_to_url.']<br>';
+ echo 'bofilters.save_all_filters_to_repository:
LEAVING, *debug* at ['.$this->debug_set_prefs.'] so skipping Header redirection
to: ['.$take_me_to_url.']<br />';
}
else
{
- if ($this->debug_set_prefs > 0) { echo
'bofilters.save_all_filters_to_repository: LEAVING with redirect to:
<br>'.$take_me_to_url.'<br>'; }
+ if ($this->debug_set_prefs > 0) { echo
'bofilters.save_all_filters_to_repository: LEAVING with redirect to: <br
/>'.$take_me_to_url.'<br />'; }
Header('Location: ' . $take_me_to_url);
}
}
@@ -866,7 +866,7 @@
*/
function delete_filter()
{
- if ($this->debug_set_prefs > 0) { echo
'bofilters.delete_filter: ENTERING<br>'; }
+ if ($this->debug_set_prefs > 0) { echo
'bofilters.delete_filter: ENTERING<br />'; }
// FILTER NUMBER
$filter_num = $this->obtain_filer_num();
@@ -880,7 +880,7 @@
$this->all_filters[$filter_num] = array();
unset($this->all_filters[$filter_num]);
$this->save_all_filters_to_repository();
- if ($this->debug_set_prefs > 0) { echo
'bofilters.delete_filter: LEAVING<br>'; }
+ if ($this->debug_set_prefs > 0) { echo
'bofilters.delete_filter: LEAVING<br />'; }
}
@@ -891,24 +891,24 @@
*/
function do_filter()
{
- if ($this->debug > 0) { echo
'bofilters.do_filter('.__LINE__.'): ENTERING<br>'; }
+ if ($this->debug > 0) { echo
'bofilters.do_filter('.__LINE__.'): ENTERING<br />'; }
if (count($this->all_filters) == 0)
{
- if ($this->debug > 0) { echo
'bofilters.do_filter('.__LINE__.'): LEAVING with ERROR, no filters exist<br>'; }
+ if ($this->debug > 0) { echo
'bofilters.do_filter('.__LINE__.'): LEAVING with ERROR, no filters exist<br
/>'; }
return False;
}
- //if ($this->debug > 0) { echo 'bofilters.do_filter:
LINE '.__LINE__.' call "->msg->event_begin_big_move" to notice event of
impending big batch moves or deletes<br>'; }
+ //if ($this->debug > 0) { echo 'bofilters.do_filter:
LINE '.__LINE__.' call "->msg->event_begin_big_move" to notice event of
impending big batch moves or deletes<br />'; }
// CORRECTION: the move function now buffers the
commands and the count of those buffered commands is kept there, where big move
or not is now determined
//$GLOBALS['phpgw']->msg->event_begin_big_move(array(),
'bofilters.do_filter: LINE '.__LINE__);
// filtering thousands of messages can require more time
- if ($this->debug > 0) { echo
'bofilters.do_filter('.__LINE__.'): calling set_time_limit giving value of 120
ie 2 minutes? <br>'; }
+ if ($this->debug > 0) { echo
'bofilters.do_filter('.__LINE__.'): calling set_time_limit giving value of 120
ie 2 minutes? <br />'; }
set_time_limit(120);
// "False" means return $this->not_set if no filter
number was found anywhere
$found_filter_num = $this->obtain_filer_num(False);
- if ($this->debug > 1) { echo
'bofilters.do_filter('.__LINE__.'): $found_filter_num :
[<code>'.serialize($found_filter_num).'</code>]<br>'."\r\n"; }
+ if ($this->debug > 1) { echo
'bofilters.do_filter('.__LINE__.'): $found_filter_num :
[<code>'.serialize($found_filter_num).'</code>]<br />'."\r\n"; }
if ($found_filter_num == $this->not_set)
{
@@ -916,7 +916,7 @@
$this->do_filter_apply_all = True;
for ($filter_idx=0; $filter_idx <
count($this->all_filters); $filter_idx++)
{
- if ($this->debug > 1) { echo
'bofilters.do_filter('.__LINE__.'): run_all_finters_mode: calling
$this->run_single_filter['.$filter_idx.']<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.do_filter('.__LINE__.'): run_all_finters_mode: calling
$this->run_single_filter['.$filter_idx.']<br />'; }
$this->run_single_filter((int)$filter_idx);
if ($this->just_testing())
{
@@ -929,7 +929,7 @@
{
// we were given a filter_num, that means run
THAT FILTER ONLY
$this->do_filter_apply_all = False;
- if ($this->debug > 1) { echo
'bofilters.do_filter('.__LINE__.'): run_single_filter mode: calling
$this->run_single_filter['.$found_filter_num.']<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.do_filter('.__LINE__.'): run_single_filter mode: calling
$this->run_single_filter['.$found_filter_num.']<br />'; }
$this->run_single_filter((int)$found_filter_num);
if ($this->just_testing())
{
@@ -939,10 +939,10 @@
}
// ok, filters have run, EXPUNGE now
- if ($this->debug > 1) { echo 'bofilters.do_filter
('.__LINE__.'): done filtering, now call
$GLOBALS[phpgw]->msg->expunge_expungable_folders<br>'; }
+ if ($this->debug > 1) { echo 'bofilters.do_filter
('.__LINE__.'): done filtering, now call
$GLOBALS[phpgw]->msg->expunge_expungable_folders<br />'; }
$did_expunge = False;
$did_expunge =
$GLOBALS['phpgw']->msg->expunge_expungable_folders('bofilters.do_filter LINE
'.__LINE__);
- if ($this->debug > 1) { echo 'bofilters.do_filter
('.__LINE__.'): $GLOBALS[phpgw]->msg->expunge_expungable_folders() returns
['.serialize($did_expunge).']<br>'; }
+ if ($this->debug > 1) { echo 'bofilters.do_filter
('.__LINE__.'): $GLOBALS[phpgw]->msg->expunge_expungable_folders() returns
['.serialize($did_expunge).']<br />'; }
// ok, filters have run, do we have a report to show?
if ($this->just_testing())
@@ -972,27 +972,27 @@
$num_matches =
count($this->each_filter_mball_list[$filter_idx]);
parse_str($this_filter['actions'][0]['folder'], $target_folder);
echo '<p>'."\r\n"
- .'<strong>'.lang('Filter number').'
'.(string)$filter_idx.':</strong>'.'<br>'."\r\n"
- .' '.lang('filter
name:').' ['.$this_filter['filtername'].']<br>'."\r\n"
- .' '.lang('number of
matches:').' ['.(string)$num_matches.']'.'<br>'."\r\n"
+ .'<strong>'.lang('Filter number').'
'.(string)$filter_idx.':</strong>'.'<br />'."\r\n"
+ .' '.lang('filter
name:').' ['.$this_filter['filtername'].']<br />'."\r\n"
+ .' '.lang('number of
matches:').' ['.(string)$num_matches.']'.'<br />'."\r\n"
- .' '.lang('requested
filter action:').' ['.$this_filter['actions'][0]['judgement'].'] ; Acctnum
['.(string)$target_folder['acctnum'].'] ; '.lang('Folder').':
['.htmlspecialchars($target_folder['folder']).']<br>'."\r\n"
+ .' '.lang('requested
filter action:').' ['.$this_filter['actions'][0]['judgement'].'] ; Acctnum
['.(string)$target_folder['acctnum'].'] ; '.lang('Folder').':
['.htmlspecialchars($target_folder['folder']).']<br />'."\r\n"
.'</p>'."\r\n"
.'<p> </p>'."\r\n";
}
}
- if ($this->debug > 1) { echo
'bofilters.do_filter('.__LINE__.'): calling end_request<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.do_filter('.__LINE__.'): calling end_request<br />'; }
$GLOBALS['phpgw']->msg->end_request();
- if ($this->debug > 0) { echo
'bofilters.do_filter('.__LINE__.'): LEAVING<br>'; }
+ if ($this->debug > 0) { echo
'bofilters.do_filter('.__LINE__.'): LEAVING<br />'; }
$take_me_to_url = $GLOBALS['phpgw']->link(
'/index.php',
//'menuaction=email.uifilters.filters_list');
'menuaction=email.uiindex.index');
$take_me_to_href = '<a href="'.$take_me_to_url.'">
'.lang('Go Back').' </a>';
//Header('Location: ' . $take_me_to_url);
- echo
'<br><p>'.' '.$take_me_to_href.'</p><BR>';
+ echo '<br
/><p>'.' '.$take_me_to_href.'</p><br />';
- if ($this->debug > 0) { echo
'bofilters.do_filter('.__LINE__.'): LEAVING<br>'; }
+ if ($this->debug > 0) { echo
'bofilters.do_filter('.__LINE__.'): LEAVING<br />'; }
}
// PRIVATE
@@ -1004,15 +1004,15 @@
*/
function run_single_filter($filter_num='')
{
- if ($this->debug > 0) { echo
'bofilters.run_single_filter('.__LINE__.'): ENTERING, feed $filter_num :
[<code>'.serialize($filter_num).'</code>]<br>'; }
+ if ($this->debug > 0) { echo
'bofilters.run_single_filter('.__LINE__.'): ENTERING, feed $filter_num :
[<code>'.serialize($filter_num).'</code>]<br />'; }
if (count($this->all_filters) == 0)
{
- if ($this->debug > 0) { echo
'bofilters.run_single_filter('.__LINE__.'): LEAVING with ERROR, no filters
exist<br>'; }
+ if ($this->debug > 0) { echo
'bofilters.run_single_filter('.__LINE__.'): LEAVING with ERROR, no filters
exist<br />'; }
}
$filter_exists = $this->filter_exists($filter_num);
if (!$filter_exists)
{
- if ($this->debug > 0) { echo
'bofilters.run_single_filter('.__LINE__.'): LEAVING with ERROR, filter data for
$filter_num ['.$filter_num.'] does not exist, return False<br>'; }
+ if ($this->debug > 0) { echo
'bofilters.run_single_filter('.__LINE__.'): LEAVING with ERROR, filter data for
$filter_num ['.$filter_num.'] does not exist, return False<br />'; }
return False;
}
$this_filter = $this->all_filters[$filter_num];
@@ -1021,7 +1021,7 @@
// WE NEED TO DO THIS FOR EVERY SOURCE ACCOUNT
specified in this filter
for ($src_acct_loop_num=0; $src_acct_loop_num <
count($this_filter['source_accounts']); $src_acct_loop_num++)
{
- if ($this->debug > 1) { echo
'bofilters.run_single_filter('.__LINE__.'): source_accounts loop
['.$src_acct_loop_num.']<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.run_single_filter('.__LINE__.'): source_accounts loop
['.$src_acct_loop_num.']<br />'; }
// ACCOUNT TO SEARCH (always filter source is
INBOX)
$fake_fldball = array();
@@ -1033,12 +1033,12 @@
if
((isset($this->inbox_full_msgball_list[$src_acct_loop_num]))
||
(count($this->inbox_full_msgball_list[$src_acct_loop_num]) > 0))
{
- if ($this->debug > 1) { echo
'bofilters.run_single_filter('.__LINE__.'): already obtained
inbox_full_msgball_list, during a previous filter, for $src_acct_loop_num
['.$src_acct_loop_num.']<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.run_single_filter('.__LINE__.'): already obtained
inbox_full_msgball_list, during a previous filter, for $src_acct_loop_num
['.$src_acct_loop_num.']<br />'; }
}
else
{
// get FULL msgball list for this INBOX
(we always filter INBOXs only)
- if ($this->debug > 1) { echo
'bofilters.run_single_filter('.__LINE__.'): get_msgball_list for later XOR ing
for <code>['.serialize($fake_fldball).']</code><br>'; }
+ if ($this->debug > 1) { echo
'bofilters.run_single_filter('.__LINE__.'): get_msgball_list for later XOR ing
for <code>['.serialize($fake_fldball).']</code><br />'; }
//$this->inbox_full_msgball_list[$src_acct_loop_num] =
$GLOBALS['phpgw']->msg->get_msgball_list($fake_fldball['acctnum'],
$fake_fldball['folder']);
// FIXME: FOR BACKWARDS COMPAT WE GET
AN OLD STYLE MSGBALL LIST
$this->inbox_full_msgball_list[$src_acct_loop_num] =
$GLOBALS['phpgw']->msg->get_msgball_list_oldschool($fake_fldball['acctnum'],
$fake_fldball['folder']);
@@ -1047,7 +1047,7 @@
// FOR EACH MSG, GET IT'S RAW HEADERS
// only if we have not got them yet
- if ($this->debug > 1) { echo
'bofilters.run_single_filter('.__LINE__.'): get headers for each msg in
$src_acct_loop_num ['.$src_acct_loop_num.']<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.run_single_filter('.__LINE__.'): get headers for each msg in
$src_acct_loop_num ['.$src_acct_loop_num.']<br />'; }
for ($msg_iteration=0; $msg_iteration <
count($this->inbox_full_msgball_list[$src_acct_loop_num]); $msg_iteration++)
{
if
((isset($this->inbox_full_msgball_list[$src_acct_loop_num][$msg_iteration]['headers_text']))
@@ -1055,7 +1055,7 @@
{
// we ALREADY hav the headers
// continue to the next message
- if ($this->debug > 1) { echo
'bofilters.run_single_filter('.__LINE__.'): already obtained headers, during a
previous filter, for $src_acct_loop_num ['.$src_acct_loop_num.']<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.run_single_filter('.__LINE__.'): already obtained headers, during a
previous filter, for $src_acct_loop_num ['.$src_acct_loop_num.']<br />'; }
continue;
}
// we need to get the headers
@@ -1130,7 +1130,7 @@
if
($this->inbox_full_msgball_list[$src_acct_loop_num][$msg_iteration]['msgnum']
== $this->not_set)
{
// this message had already
been filtered AND MOVED OR DELETED, continue to next loop
- if ($this->debug > 1) { echo
'<br>bofilters.run_single_filter('.__LINE__.'): skipping... this message has
already been moved, deleted by a previous filter, $src_acct_loop_num
['.$src_acct_loop_num.'] $msg_iteration ['.$msg_iteration.']<br><br>'; }
+ if ($this->debug > 1) { echo
'<br />bofilters.run_single_filter('.__LINE__.'): skipping... this message has
already been moved, deleted by a previous filter, $src_acct_loop_num
['.$src_acct_loop_num.'] $msg_iteration ['.$msg_iteration.']<br /><br />'; }
continue;
}
// we have a message to be filtered...
@@ -1143,7 +1143,7 @@
// WE NEED TO DO THIS FOR EVERY MATCH
ROW
for ($matches_row=0; $matches_row <
count($this_filter['matches']); $matches_row++)
{
- if ($this->debug > 1) { echo
'bofilters.run_single_filter('.__LINE__.'): source_accounts loop
['.$src_acct_loop_num.'] ; $msg_iteration ['.$msg_iteration.'] ; $matches_row
['.$matches_row.']<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.run_single_filter('.__LINE__.'): source_accounts loop
['.$src_acct_loop_num.'] ; $msg_iteration ['.$msg_iteration.'] ; $matches_row
['.$matches_row.']<br />'; }
// Note on "RECIPIENT" :
to,cc, bcc "tri-fecta" all three headers must be considered
// this is why we made a faux
header line that contains all three of those in one line
// NOTE: recipient Contains vs.
NotContains
@@ -1165,7 +1165,7 @@
// if this is really the 1st
word of the header string, it will be preceeded by CRLF
$inspect_me =
stristr($headers_text, "\r\n".$search_key_imap);
// inspect_me will be
everything to the right of the "neede" INCLUDING the "needle" itself and the
REST of the headers
- if ($this->debug > 1) { echo
'bofilters.run_single_filter('.__LINE__.'): $search_key_imap
['.$search_key_imap.'] ; $comparator ['.$comparator.'] ; $search_for
['.$search_for.']<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.run_single_filter('.__LINE__.'): $search_key_imap
['.$search_key_imap.'] ; $comparator ['.$comparator.'] ; $search_for
['.$search_for.']<br />'; }
if ($inspect_me)
{
// get rid of that
"needle" search_key_imap (it's included from the stristr above)
@@ -1176,7 +1176,7 @@
$cut_here =
strpos($inspect_me, "\r\n");
// get everything FROM
beginning of string TO pos $cut_here (the end of the line);
$inspect_me =
substr($inspect_me, 0, $cut_here);
- if ($this->debug > 1) {
echo 'bofilters.run_single_filter('.__LINE__.'): GOT HEADER TO LOOK IN:
$inspect_me ['.htmlspecialchars($inspect_me).']<br>'; }
+ if ($this->debug > 1) {
echo 'bofilters.run_single_filter('.__LINE__.'): GOT HEADER TO LOOK IN:
$inspect_me ['.htmlspecialchars($inspect_me).']<br />'; }
// look for EXISTS or
NOT EXISTS our search string
if
(
@@ -1186,7 +1186,7 @@
&&
(stristr($inspect_me, $search_for) == False))
)
{
- if
($this->debug > 1) { echo 'bofilters.run_single_filter('.__LINE__.'): ** GOT
ROW CRITERIA MATCH ** $matches_row '.$matches_row.'<br>'; }
+ if
($this->debug > 1) { echo 'bofilters.run_single_filter('.__LINE__.'): ** GOT
ROW CRITERIA MATCH ** $matches_row '.$matches_row.'<br />'; }
// MATCH: this
row matches the search criteria
// i.e. this
header line does -or- does not have the seach for text, as requested
if
($matches_row == 0)
@@ -1207,7 +1207,7 @@
}
else
{
- echo
'match keeper error<br>';
+ echo
'match keeper error<br />';
$this->inbox_full_msgball_list[$src_acct_loop_num][$msg_iteration]['match_keeper']
= 'ERROR1';
}
@@ -1221,7 +1221,7 @@
{
// header we are
looking for does not exist in this messages headers
// probably lookinf for
an "X-" header, like "X-Mailer:"
- if ($this->debug > 1) {
echo 'bofilters.run_single_filter('.__LINE__.'): requested header
$search_key_imap ['.$search_key_imap.'] not in this messages headers<br>'; }
+ if ($this->debug > 1) {
echo 'bofilters.run_single_filter('.__LINE__.'): requested header
$search_key_imap ['.$search_key_imap.'] not in this messages headers<br />'; }
}
// this is the last code that
gets run BEFORE we move on to the next row of match criteria
// this code is INSIDE the
match criteria rows
@@ -1291,25 +1291,25 @@
*/
function filter_action_sequence($filter_num='',
$src_acct_loop_num='', $msg_iteration='', $this_filter='')
{
- if ($this->debug > 0) { echo
'bofilters.filter_action_sequence: ENTERING <br>'; }
+ if ($this->debug > 0) { echo
'bofilters.filter_action_sequence: ENTERING <br />'; }
if (((string)$filter_num == '')
|| ((string)$src_acct_loop_num == '')
|| ((string)$msg_iteration == '')
|| ($this_filter == ''))
{
- echo 'bofilters.filter_action_sequence:
LEAVING, insufficient data in params <br>';
+ echo 'bofilters.filter_action_sequence:
LEAVING, insufficient data in params <br />';
return False;
}
$match_keeper =
$this->inbox_full_msgball_list[$src_acct_loop_num][$msg_iteration]['match_keeper'];
- if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: FINAL match results for this message
[<code>'.serialize($match_keeper).'</code>] <br>'; }
+ if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: FINAL match results for this message
[<code>'.serialize($match_keeper).'</code>] <br />'; }
// test match keeper accuracy
if ($this->debug > 1)
{
- if ($match_keeper & F_ROW_0_MATCH) { echo
'<b>MATCH</b> row 0 criteria<br>'; }
- if ($match_keeper & F_ROW_1_MATCH) { echo
'<b>MATCH</b> row 1 criteria<br>'; }
- if ($match_keeper & F_ROW_2_MATCH) { echo
'<b>MATCH</b> row 2 criteria<br>'; }
- if ($match_keeper & F_ROW_3_MATCH) { echo
'<b>MATCH</b> row 3 criteria<br>'; }
+ if ($match_keeper & F_ROW_0_MATCH) { echo
'<b>MATCH</b> row 0 criteria<br />'; }
+ if ($match_keeper & F_ROW_1_MATCH) { echo
'<b>MATCH</b> row 1 criteria<br />'; }
+ if ($match_keeper & F_ROW_2_MATCH) { echo
'<b>MATCH</b> row 2 criteria<br />'; }
+ if ($match_keeper & F_ROW_3_MATCH) { echo
'<b>MATCH</b> row 3 criteria<br />'; }
}
$do_apply_action = False;
@@ -1319,12 +1319,12 @@
{
if ($match_keeper & F_ROW_0_MATCH)
{
- if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: single row criteria is a match and DOES
trigger action<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: single row criteria is a match and DOES
trigger action<br />'; }
$do_apply_action = True;
}
else
{
- if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: single row criteria Fails<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: single row criteria Fails<br />'; }
}
}
// 2 rows handler
@@ -1336,7 +1336,7 @@
&& ($match_keeper & F_ROW_0_MATCH)
&& ($match_keeper & F_ROW_1_MATCH))
{
- if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: 2 rows of criteria: "AND" logic chain is
satisified, DO APPLY ACTION<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: 2 rows of criteria: "AND" logic chain is
satisified, DO APPLY ACTION<br />'; }
$do_apply_action = True;
}
elseif (($this_filter['matches'][1]['andor'] ==
'or')
@@ -1345,12 +1345,12 @@
)
)
{
- if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: 2 rows of criteria: "OR" logic chain is
satisified, DO APPLY ACTION<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: 2 rows of criteria: "OR" logic chain is
satisified, DO APPLY ACTION<br />'; }
$do_apply_action = True;
}
else
{
- if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: 2 rows of criteria: logic chain Fails<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: 2 rows of criteria: logic chain Fails<br
/>'; }
}
}
// 3 rows handler
@@ -1363,12 +1363,12 @@
|| ($match_keeper &
$this->match_keeper_row_values[1])
|| ($match_keeper &
$this->match_keeper_row_values[2]))
{
- if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: 3 rows of criteria: both "andor"s are "OR"s,
logic chain is satisified, DO APPLY ACTION<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: 3 rows of criteria: both "andor"s are "OR"s,
logic chain is satisified, DO APPLY ACTION<br />'; }
$do_apply_action = True;
}
else
{
- if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: 3 rows of criteria: both "andor"s are "OR"s,
logic chain Fails<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: 3 rows of criteria: both "andor"s are "OR"s,
logic chain Fails<br />'; }
}
}
// after 2 rows of match criteria, we need to
handle more complex AND / OR logic
@@ -1400,22 +1400,22 @@
.' '.$andor_code[2].' '
.'$match_keeper &
$this->match_keeper_row_values[2]'
.');';
- if ($this->debug > 1) { echo ' * $code:
'.$code.'<br>'; }
+ if ($this->debug > 1) { echo ' * $code:
'.$code.'<br />'; }
eval($code);
- if ($this->debug > 1) { echo ' *
$evaled: '.serialize($evaled).'<br>'; }
+ if ($this->debug > 1) { echo ' *
$evaled: '.serialize($evaled).'<br />'; }
$do_apply_action = $evaled;
}
}
else
{
- echo 'bofilters.filter_action_sequence: ERROR:
too many rows<br>';
+ echo 'bofilters.filter_action_sequence: ERROR:
too many rows<br />';
return False;
}
// = = = ACTION(S) = = =
if ($do_apply_action == True)
{
- if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: <strong>### Filter MATCH ###</strong>, now
apply the action... <br>'; }
+ if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: <strong>### Filter MATCH ###</strong>, now
apply the action... <br />'; }
// compile report
if
(!isset($this->each_filter_mball_list[$filter_num]))
{
@@ -1430,7 +1430,7 @@
if ($this->just_testing() == False)
{
// NOT A TEST - APPLY THE ACTION(S)
- if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: NOT a Test, *Apply* the Action(s) ;
$this_filter[actions][0][judgement] :
['.$this_filter['actions'][0]['judgement'].']<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: NOT a Test, *Apply* the Action(s) ;
$this_filter[actions][0][judgement] :
['.$this_filter['actions'][0]['judgement'].']<br />'; }
// ACTION: FILEINTO
if
($this_filter['actions'][0]['judgement'] == 'fileinto')
{
@@ -1456,21 +1456,21 @@
$to_fldball['folder'] =
$target_folder['folder'];
$to_fldball['acctnum'] =
(int)$target_folder['acctnum'];
if ($this->debug > 2) { echo
'bofilters.filter_action_sequence: $to_fldball DUMP:<pre>';
print_r($to_fldball); echo "</pre>\r\n"; }
- if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: pre-move info: $mov_msgball
[<code>'.serialize($mov_msgball).'</code>]<br>'; }
- //echo 'EXIT NOT READY TO APPLY
THE FILTER YET<br>';
+ if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: pre-move info: $mov_msgball
[<code>'.serialize($mov_msgball).'</code>]<br />'; }
+ //echo 'EXIT NOT READY TO APPLY
THE FILTER YET<br />';
$good_to_go =
$GLOBALS['phpgw']->msg->industrial_interacct_mail_move($mov_msgball,
$to_fldball);
if (!$good_to_go)
{
// ERROR
- if ($this->debug > 1) {
echo 'bofilters.filter_action_sequence: ERROR: industrial_interacct_mail_move
returns FALSE<br>'; }
+ if ($this->debug > 1) {
echo 'bofilters.filter_action_sequence: ERROR: industrial_interacct_mail_move
returns FALSE<br />'; }
return False;
}
}
else
{
// not yet coded action
- if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: actions not yet coded:
$this_filter[actions][0][judgement] :
['.$this_filter['actions'][0]['judgement'].']<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: actions not yet coded:
$this_filter[actions][0][judgement] :
['.$this_filter['actions'][0]['judgement'].']<br />'; }
}
}
@@ -1478,13 +1478,13 @@
// REMOVE THIS MSGBALL from the
"inbox_full_msgball_list" IF we move, delete, etc... the message
// it must remain in sync with the actual mail
box folder
- if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: action completed, REMOVE msgball from L1
cache class var inbox_full_msgball_list, change msgball["msgnum"] from
'.serialize($this->inbox_full_msgball_list[$src_acct_loop_num][$msg_iteration]['msgnum']).'
to not_set "-1"<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.filter_action_sequence: action completed, REMOVE msgball from L1
cache class var inbox_full_msgball_list, change msgball["msgnum"] from
'.serialize($this->inbox_full_msgball_list[$src_acct_loop_num][$msg_iteration]['msgnum']).'
to not_set "-1"<br />'; }
$this->inbox_full_msgball_list[$src_acct_loop_num][$msg_iteration]['msgnum'] =
$this->not_set;
}
- if ($this->debug > 0) { echo
'bofilters.filter_action_sequence: LEAVING, returning True <br>'; }
- if ($this->debug > 1) { echo '<br>'; }
+ if ($this->debug > 0) { echo
'bofilters.filter_action_sequence: LEAVING, returning True <br />'; }
+ if ($this->debug > 1) { echo '<br />'; }
// if we get to here, no error kicked us out of this
function, so I guess we should retuen True
return True;
}
@@ -1500,8 +1500,8 @@
if (($this->just_testing())
&& (count($this->each_filter_mball_list[$filter_num]) >
0))
{
- if ($this->debug > 1) { echo
'bofilters.make_filter_match_report: Filter Report Maker<br>'; }
- if ($this->debug > 1) { echo
'bofilters.make_filter_match_report: number of matches
$this->each_filter_mball_list['.$filter_num.'] = '
.count($this->each_filter_mball_list[$filter_num]).'<br>'."\r\n"; }
+ if ($this->debug > 1) { echo
'bofilters.make_filter_match_report: Filter Report Maker<br />'; }
+ if ($this->debug > 1) { echo
'bofilters.make_filter_match_report: number of matches
$this->each_filter_mball_list['.$filter_num.'] = '
.count($this->each_filter_mball_list[$filter_num]).'<br />'."\r\n"; }
// make a "fake" folder_info array to make
things simple for get_msg_list_display
$fake_folder_info['is_imap'] = True;
$fake_folder_info['folder_checked'] = 'INBOX';
@@ -1640,10 +1640,10 @@
$this_filter_matching_msgballs = array();
for ($src_acct_loop_num=0; $src_acct_loop_num <
count($this_filter['source_accounts']); $src_acct_loop_num++)
{
- if ($this->debug > 1) { echo
'bofilters.run_single_filter: source_accounts ACTION loop
['.$src_acct_loop_num.']<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.run_single_filter: source_accounts ACTION loop
['.$src_acct_loop_num.']<br />'; }
for ($msg_iteration=0; $msg_iteration <
count($this->inbox_full_msgball_list[$src_acct_loop_num]); $msg_iteration++)
{
- if ($this->debug > 1) { echo
'bofilters.run_single_filter: source_accounts ['.$src_acct_loop_num.']
$msg_iteration iteration ['.$msg_iteration.'] ACTION loop<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.run_single_filter: source_accounts ['.$src_acct_loop_num.']
$msg_iteration iteration ['.$msg_iteration.'] ACTION loop<br />'; }
// do we need to do something with this
message?
$match_keeper =
$this->inbox_full_msgball_list[$src_acct_loop_num][$msg_iteration]['match_keeper'];
if ($match_keeper == F_ROW_MATCHES)
@@ -1659,7 +1659,7 @@
else
{
// NOT A TEST - APPLY
THE ACTION(S)
- if ($this->debug > 1) {
echo 'bofilters.run_single_filter: NOT a Test, *Apply* the Action(s) ;
$this_filter[actions][0][judgement] :
['.$this_filter['actions'][0]['judgement'].']<br>'; }
+ if ($this->debug > 1) {
echo 'bofilters.run_single_filter: NOT a Test, *Apply* the Action(s) ;
$this_filter[actions][0][judgement] :
['.$this_filter['actions'][0]['judgement'].']<br />'; }
// ACTION: FILEINTO
if
($this_filter['actions'][0]['judgement'] == 'fileinto')
{
@@ -1670,14 +1670,14 @@
$to_fldball['folder'] = $target_folder['folder'];
$to_fldball['acctnum'] = (int)$target_folder['acctnum'];
if
($this->debug > 2) { echo 'bofilters.run_single_filter: $to_fldball
DUMP:<pre>'; print_r($to_fldball); echo "</pre>\r\n"; }
- if
($this->debug > 1) { echo 'bofilters.run_single_filter: pre-move info:
$mov_msgball [<code>'.serialize($mov_msgball).'</code>]<br>'; }
- //echo 'EXIT
NOT READY TO APPLY THE FILTER YET<br>';
+ if
($this->debug > 1) { echo 'bofilters.run_single_filter: pre-move info:
$mov_msgball [<code>'.serialize($mov_msgball).'</code>]<br />'; }
+ //echo 'EXIT
NOT READY TO APPLY THE FILTER YET<br />';
$good_to_go =
$GLOBALS['phpgw']->msg->industrial_interacct_mail_move($positive_msgball,
$to_fldball);
if
(!$good_to_go)
{
// ERROR
- if
($this->debug > 1) { echo 'bofilters.run_single_filter: ERROR:
industrial_interacct_mail_move returns FALSE<br>'; }
+ if
($this->debug > 1) { echo 'bofilters.run_single_filter: ERROR:
industrial_interacct_mail_move returns FALSE<br />'; }
return
False;
}
// since we
acted on this message, since we MOVED this message
@@ -1692,7 +1692,7 @@
else
{
// not yet
coded action
- if
($this->debug > 1) { echo 'bofilters.run_single_filter: actions not yet coded:
$this_filter[actions][0][judgement] :
['.$this_filter['actions'][0]['judgement'].']<br>'; }
+ if
($this->debug > 1) { echo 'bofilters.run_single_filter: actions not yet coded:
$this_filter[actions][0][judgement] :
['.$this_filter['actions'][0]['judgement'].']<br />'; }
}
// POST ACTION STUFF
// n/a
@@ -1723,8 +1723,8 @@
if (($this->just_testing())
&& (count($this_filter_matching_msgballs) > 0))
{
- if ($this->debug > 1) { echo
'bofilters.run_single_filter: Filter Test Run<br>'; }
- if ($this->debug > 1) { echo
'bofilters.run_single_filter: number of matches $this_filter_matching_msgballs
= ' .count($this_filter_matching_msgballs).'<br>'."\r\n"; }
+ if ($this->debug > 1) { echo
'bofilters.run_single_filter: Filter Test Run<br />'; }
+ if ($this->debug > 1) { echo
'bofilters.run_single_filter: number of matches $this_filter_matching_msgballs
= ' .count($this_filter_matching_msgballs).'<br />'."\r\n"; }
// make a "fake" folder_info array to make
things simple for get_msg_list_display
$fake_folder_info['is_imap'] = True;
$fake_folder_info['folder_checked'] = 'INBOX';
@@ -1744,7 +1744,7 @@
// cleanup
$this_filter_matching_msgballs = array();
- if ($this->debug > 0) { echo
'bofilters.run_single_filter: LEAVING, return True because we made it to the
end of the function<br><br><br>'; }
+ if ($this->debug > 0) { echo
'bofilters.run_single_filter: LEAVING, return True because we made it to the
end of the function<br /><br /><br />'; }
return True;
}
@@ -1805,7 +1805,7 @@
*/
function make_imap_search_str($feed_filter)
{
- if ($this->debug > 0) { echo
'bofilters.make_imap_search_str: ENTERING<br>'; }
+ if ($this->debug > 0) { echo
'bofilters.make_imap_search_str: ENTERING<br />'; }
if ($this->debug > 2) { echo
'bofilters.make_imap_search_str: $feed_filter DUMP:<pre>';
print_r($feed_filter); echo "</pre>\r\n"; }
/*
RFC2060:
@@ -1863,7 +1863,7 @@
// do we have one search or two, or more
$num_search_criteria = count($feed_filter['matches']);
- if ($this->debug > 1) { echo
'bofilters.make_imap_search_str: $num_search_criteria:
['.$num_search_criteria.']<br>'; }
+ if ($this->debug > 1) { echo
'bofilters.make_imap_search_str: $num_search_criteria:
['.$num_search_criteria.']<br />'; }
// 1st search criteria
// convert form submitted data into usable IMAP search
keys
$search_key_sieve =
$feed_filter['matches'][0]['examine'];
@@ -1914,19 +1914,19 @@
|| ($look_here_imap == ''))
{
$conv_error = 'invalid or no examine data';
- if ($this->debug > 1) { echo '<b> ***
error</b>: bofilters.make_imap_search_str: error: '.$conv_error."<br> \r\n"; }
+ if ($this->debug > 1) { echo '<b> ***
error</b>: bofilters.make_imap_search_str: error: '.$conv_error."<br /> \r\n"; }
return '';
}
elseif ((!isset($for_this))
|| (trim($for_this) == ''))
{
$conv_error = 'invalid or no search string
data';
- if ($this->debug > 1) { echo '<b> ***
error</b>: bofilters.make_imap_search_str: error: '.$conv_error."<br> \r\n"; }
+ if ($this->debug > 1) { echo '<b> ***
error</b>: bofilters.make_imap_search_str: error: '.$conv_error."<br /> \r\n"; }
return '';
}
$imap_str = $look_here_imap.' "'.$for_this.'"';
*/
- if ($this->debug > 0) { echo
'bofilters.make_imap_search_str: LEAVING, $one_line_only:
['.serialize($one_line_only).'] returning search string:
<code>'.$final_search_str.'</code><br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters.make_imap_search_str: LEAVING, $one_line_only:
['.serialize($one_line_only).'] returning search string:
<code>'.$final_search_str.'</code><br />'."\r\n"; }
return $final_search_str;
}
@@ -2024,7 +2024,7 @@
$imap_search_str = $this->make_imap_search_str();
if (!$imap_search_str)
{
- if ($this->debug > 0) { echo '<b> ***
error</b>: bofilters: do_imap_search: make_imap_search_str returned
empty<br>'."\r\n"; }
+ if ($this->debug > 0) { echo '<b> ***
error</b>: bofilters: do_imap_search: make_imap_search_str returned empty<br
/>'."\r\n"; }
return array();
}
@@ -2039,7 +2039,7 @@
&& ($attempt_reuse == True))
{
// no not create, we will reuse existing
- echo 'bofilters: do_imap_search: reusing
existing mail_msg object'.'<br>';
+ echo 'bofilters: do_imap_search: reusing
existing mail_msg object'.'<br />';
// we need to feed the existing object some
params begin_request uses to re-fill the msg->args[] data
$reuse_feed_args =
$GLOBALS['phpgw']->msg->get_all_args();
$args_array = Array();
@@ -2047,7 +2047,7 @@
if ((isset($this->filters[0]['source_account']))
&& ($this->filters[0]['source_account'] != ''))
{
- if ($this->debug > 0) { echo
'bofilters: do_imap_search: this->filters[0][source_account] = '
.$this->filters[0]['source_account'].'<br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters: do_imap_search: this->filters[0][source_account] = '
.$this->filters[0]['source_account'].'<br />'."\r\n"; }
$args_array['folder'] =
$this->filters[0]['source_account'];
}
else
@@ -2059,14 +2059,14 @@
}
else
{
- if ($this->debug_index_data == True) { echo
'bofilters: do_imap_search: creating new login email.mail_msg, cannot or not
trying to reusing existing'.'<br>'; }
+ if ($this->debug_index_data == True) { echo
'bofilters: do_imap_search: creating new login email.mail_msg, cannot or not
trying to reusing existing'.'<br />'; }
// new login
// (1) folder (if specified) - can be left
empty or unset, mail_msg will then assume INBOX
$args_array = Array();
if ((isset($this->filters[0]['source_account']))
&& ($this->filters[0]['source_account'] != ''))
{
- if ($this->debug > 0) { echo
'bofilters: do_imap_search: this->filters[0][source_account] = '
.$this->filters[0]['source_account'].'<br>'."\r\n"; }
+ if ($this->debug > 0) { echo
'bofilters: do_imap_search: this->filters[0][source_account] = '
.$this->filters[0]['source_account'].'<br />'."\r\n"; }
$args_array['folder'] =
$this->filters[0]['source_account'];
}
else
@@ -2081,7 +2081,7 @@
//if ((isset($this->filters[0]['source_account']))
//&& ($this->filters[0]['source_account'] != ''))
//{
- // if ($this->debug > 0) { echo 'bofilters:
do_imap_search: this->filters[0][source_account] = '
.$this->filters[0]['source_account'].'<br>'."\r\n"; }
+ // if ($this->debug > 0) { echo 'bofilters:
do_imap_search: this->filters[0][source_account] = '
.$this->filters[0]['source_account'].'<br />'."\r\n"; }
// $args_array['folder'] =
$this->filters[0]['source_account'];
//}
//else
@@ -2098,14 +2098,14 @@
if (($initial_result_set == False)
|| (count($initial_result_set) == 0))
{
- echo 'bofilters: do_imap_search: no hits or
possible search error<br>'."\r\n";
+ echo 'bofilters: do_imap_search: no hits or
possible search error<br />'."\r\n";
echo 'bofilters: do_imap_search:
server_last_error (if any) was:
"'.$GLOBALS['phpgw']->msg->phpgw_server_last_error().'"'."\r\n";
// we leave this->result_set_mlist an an empty
array, as it was initialized on class creation
}
else
{
$this->result_set = $initial_result_set;
- if ($this->debug > 0) { echo 'bofilters:
do_imap_search: number of matches = ' .count($this->result_set).'<br>'."\r\n"; }
+ if ($this->debug > 0) { echo 'bofilters:
do_imap_search: number of matches = ' .count($this->result_set).'<br
/>'."\r\n"; }
// make a "fake" folder_info array to make
things simple for get_msg_list_display
$this->fake_folder_info['is_imap'] = True;
$this->fake_folder_info['folder_checked'] =
$GLOBALS['phpgw']->msg->get_arg_value('folder');
@@ -2116,7 +2116,7 @@
$this->result_set_mlist =
$GLOBALS['phpgw']->msg->get_msg_list_display($this->fake_folder_info,$this->result_set);
}
$GLOBALS['phpgw']->msg->end_request();
- //echo 'bofilters: do_imap_search: returned:<br>';
var_dump($this->result_set); echo "<br>\r\n";
+ //echo 'bofilters: do_imap_search: returned:<br />';
var_dump($this->result_set); echo "<br />\r\n";
}
*/
====================================================
Index: email/inc/class.bofolder.inc.php
diff -u email/inc/class.bofolder.inc.php:1.9
email/inc/class.bofolder.inc.php:1.10
--- email/inc/class.bofolder.inc.php:1.9 Thu Dec 30 23:13:50 2004
+++ email/inc/class.bofolder.inc.php Sun Mar 13 23:22:43 2005
@@ -39,7 +39,7 @@
function folder()
{
- if ($this->debug > 0) { echo 'ENTERING:
email.bofolder.folder('.__LINE__.')'.'<br>'; }
+ if ($this->debug > 0) { echo 'ENTERING:
email.bofolder.folder('.__LINE__.')'.'<br />'; }
// create class objects
$this->nextmatchs = CreateObject('phpgwapi.nextmatchs');
@@ -49,25 +49,25 @@
// ---- Create or Delete or Rename a Folder ? ----
// "folder_action()" handles checking if any action
should be taken
- if ($this->debug > 1) { echo
'email.bofolder.folder('.__LINE__.') calling $this->folder_action()'.'<br>'; }
+ if ($this->debug > 1) { echo
'email.bofolder.folder('.__LINE__.') calling $this->folder_action()'.'<br />'; }
$this->folder_action();
// ---- Get a List Of All Folders AND Display them
----
- if ($this->debug > 1) { echo
'email.bofolder.folder('.__LINE__.') calling $this->folder_data()'.'<br>'; }
+ if ($this->debug > 1) { echo
'email.bofolder.folder('.__LINE__.') calling $this->folder_data()'.'<br />'; }
$this->folder_data();
// end the email transaction
//$GLOBALS['phpgw']->msg->end_request();
// NO we may not be really done yet
- if ($this->debug > 0) { echo 'LEAVING:
email.bofolder.folder('.__LINE__.')'.'<br>'; }
+ if ($this->debug > 0) { echo 'LEAVING:
email.bofolder.folder('.__LINE__.')'.'<br />'; }
}
function folder_action()
{
- if ($this->debug > 0) { echo 'ENTERING:
email.bofolder.folder_action('.__LINE__.')'.'<br>'; }
+ if ($this->debug > 0) { echo 'ENTERING:
email.bofolder.folder_action('.__LINE__.')'.'<br />'; }
// ---- Create or Delete or Rename a Folder ? ----
if (($GLOBALS['phpgw']->msg->get_arg_value('action') ==
'create')
|| ($GLOBALS['phpgw']->msg->get_arg_value('action') ==
'delete')
@@ -97,7 +97,7 @@
{
$source_fldball =
$GLOBALS['phpgw']->msg->get_arg_value('source_fldball');
$target_fldball =
$GLOBALS['phpgw']->msg->get_arg_value('target_fldball');
- if ($this->debug > 1) { echo
'email.bofolder.folder_action('.__LINE__.'): we will delete, rename, or create
a folder; ->msg->get_arg_value("action") is
['.$GLOBALS['phpgw']->msg->get_arg_value('action').']'.'<br>'; }
+ if ($this->debug > 1) { echo
'email.bofolder.folder_action('.__LINE__.'): we will delete, rename, or create
a folder; ->msg->get_arg_value("action") is
['.$GLOBALS['phpgw']->msg->get_arg_value('action').']'.'<br />'; }
if ($this->debug > 2) { echo
'email.bofolder.folder_action('.__LINE__.'): $source_fldball DUMP<pre>';
print_r($source_fldball); echo '<pre>'; }
if ($this->debug > 2) { echo
'email.bofolder.folder_action('.__LINE__.'): $target_fldball DUMP<pre>';
print_r($target_fldball); echo '<pre>'; }
@@ -232,22 +232,22 @@
{
$action_report =
'<em>'.$GLOBALS['phpgw']->msg->get_arg_value('action') .'
'.lang('folder').'</em>'
- .'<br>'
+ .'<br />'
.htmlspecialchars($source_folder_decoded)
- .'<br>'
+ .'<br />'
.'<em>'.lang('to').'</em>'
- .'<br>'
+ .'<br />'
.htmlspecialchars($target_folder_decoded)
- .'<br>'
+ .'<br />'
.lang('result').' : ';
}
else
{
$action_report =
'<em>'.$GLOBALS['phpgw']->msg->get_arg_value('action').'
'.lang('folder').'</em>'
- .'<br>'
+ .'<br />'
.htmlspecialchars($target_folder_decoded)
- .'<br>'
+ .'<br />'
.lang('result').' : ';
}
// did it work or not
@@ -282,14 +282,14 @@
// we may have been called externally, return this
action report
//return $action_report;
// we may have been called externally, return if we
succeeded or not
- if ($this->debug > 0) { echo 'LEAVING:
email.bofolder.folder_action('.__LINE__.'), returning $success
['.serialize($success).'], only matters if folder action was attempted'.'<br>';
}
+ if ($this->debug > 0) { echo 'LEAVING:
email.bofolder.folder_action('.__LINE__.'), returning $success
['.serialize($success).'], only matters if folder action was attempted'.'<br
/>'; }
return $success;
}
function folder_data()
{
- if ($this->debug > 0) { echo 'ENTERING:
email.bofolder.folder_data('.__LINE__.')'.'<br>'; }
+ if ($this->debug > 0) { echo 'ENTERING:
email.bofolder.folder_data('.__LINE__.')'.'<br />'; }
// ---- Establish Email Server Connectivity
Conventions ----
$server_str =
$GLOBALS['phpgw']->msg->get_arg_value('mailsvr_callstr');
$name_space =
$GLOBALS['phpgw']->msg->get_arg_value('mailsvr_namespace');
@@ -301,7 +301,7 @@
//$folder_list =&
$GLOBALS['phpgw']->msg->get_arg_value_ref('folder_list');
if ($this->debug > 2) { echo
'email.bofolder.folder_data('.__LINE__.'): $folder_list[] dump:<pre>';
print_r($folder_list); echo '</pre>'; }
- if ($this->debug > 1) { echo
'email.bofolder.folder_data('.__LINE__.') USE CACHABLE?
$this->use_cachable_status is
['.serialize($this->use_cachable_status).']'.'<br>'; }
+ if ($this->debug > 1) { echo
'email.bofolder.folder_data('.__LINE__.') USE CACHABLE?
$this->use_cachable_status is ['.serialize($this->use_cachable_status).']'.'<br
/>'; }
$this->xi['folder_list_display'] = array();
for ($i=0; $i<count($folder_list);$i++)
@@ -328,7 +328,7 @@
//$real_long_name =
$GLOBALS['phpgw']->msg->folder_lookup('',$folder_list[$i]['folder_short']);
//if ($real_long_name != '')
//{
- // echo 'folder exists, official long
name: '.$real_long_name.'<br>';
+ // echo 'folder exists, official long
name: '.$real_long_name.'<br />';
//}
// ROW BACK COLOR
@@ -451,7 +451,7 @@
$this->xi['the_font'] =
$GLOBALS['phpgw_info']['theme']['font'];
$this->xi['th_backcolor'] =
$GLOBALS['phpgw_info']['theme']['th_bg'];
- if ($this->debug > 0) { echo 'LEAVING:
email.bofolder.folder_data('.__LINE__.')'.'<br>'; }
+ if ($this->debug > 0) { echo 'LEAVING:
email.bofolder.folder_data('.__LINE__.')'.'<br />'; }
}
}
====================================================
Index: email/inc/class.html_widgets.inc.php
diff -u email/inc/class.html_widgets.inc.php:1.4
email/inc/class.html_widgets.inc.php:1.5
--- email/inc/class.html_widgets.inc.php:1.4 Thu Dec 30 23:13:50 2004
+++ email/inc/class.html_widgets.inc.php Sun Mar 13 23:22:44 2005
@@ -137,7 +137,7 @@
\**************************************************************************/
function html_widgets()
{
- if ($this->debug_init > 0) { echo 'ENTER:
email.html_widgets.CONSTRUCTOR'.'<br>'."\r\n"; }
+ if ($this->debug_init > 0) { echo 'ENTER:
email.html_widgets.CONSTRUCTOR'.'<br />'."\r\n"; }
/*!
@class requires including spell_struct header file
@discussion class html_widgets needs the special
C-Style Include .h like file,
@@ -153,7 +153,7 @@
//require_once(PHPGW_INCLUDE_ROOT.'/'.$GLOBALS['phpgw_info']['flags']['currentapp'].'/inc/class.'.$required_class.'.inc.php');
require_once(PHPGW_INCLUDE_ROOT.'/'.$this->my_currentapp.'/inc/class.'.$required_class.'.inc.php');
- if ($this->debug_init > 0) { echo 'EXIT:
email.html_widgets.CONSTRUCTOR'.'<br>'."\r\n"; }
+ if ($this->debug_init > 0) { echo 'EXIT:
email.html_widgets.CONSTRUCTOR'.'<br />'."\r\n"; }
return;
}
@@ -998,7 +998,7 @@
//Check for folder support and create
Folder Button
if ($has_folders == True)
{
-
//$this->set_href_clickme($this->img_maketag($image_dir.'/'.$icon_theme.'-folder-'.$icon_size.'.gif',lang('Folders'),'','','0'));
+
//$this->set_href_clickme($this->img_maketag($image_dir.'/'.$icon_theme.'-folder-'.$icon_size.'.png',lang('Folders'),'','','0'));
//$this->tpl->set_var('folders_img_link', $this->get_href());
//Create Folder Text Link
$this->set_href_link($folders_link);
@@ -1020,7 +1020,7 @@
$this->tpl->set_var('compose_txt_link',
' ');
//Create Search Button
$this->set_href_link($search_link);
-
//$this->set_href_clickme($this->img_maketag($image_dir.'/'.$icon_theme.'-search-16.gif',lang('Search'),'','','0'));
+
//$this->set_href_clickme($this->img_maketag($image_dir.'/'.$icon_theme.'-search-16.png',lang('Search'),'','','0'));
// will fix this later when new images
are made
$this->set_href_clickme($this->img_maketag($GLOBALS['phpgw']->msg->_image_on('email',$icon_theme.'/search-'.$icon_size,'_on'),lang('Search'),'','','0'));
$this->tpl->set_var('search_img_link',
$this->get_href());
@@ -1066,7 +1066,7 @@
$this->tpl->set_var('compose_txt_link',
$this->get_href());
//Create Search Button
$this->set_href_link($search_link);
-
//$this->set_href_clickme($this->img_maketag($image_dir.'/'.$icon_theme.'-search-16.gif',lang('Search'),'','','0'));
+
//$this->set_href_clickme($this->img_maketag($image_dir.'/'.$icon_theme.'-search-16.png',lang('Search'),'','','0'));
// will fix this later when new images
are made
$this->set_href_clickme($this->img_maketag($GLOBALS['phpgw']->msg->_image_on('email',$icon_theme.'/search-'.$icon_size,'_on'),lang('Search'),'','','0'));
$this->tpl->set_var('search_img_link',
$this->get_href());
@@ -1426,7 +1426,7 @@
$debug_mega_listbox = 0;
//$debug_mega_listbox = 3;
- if ($debug_mega_listbox > 0) { echo
'folders_mega_listbox('.__LINE__.'): ENTERING<br>'; }
+ if ($debug_mega_listbox > 0) { echo
'folders_mega_listbox('.__LINE__.'): ENTERING<br />'; }
$this->new_combobox();
$this->set_cbox_name($this->F_megalist_widget_name);
@@ -1452,12 +1452,12 @@
if ($this_status != 'enabled')
{
// Do Nothing, This account is not in
use
- if ($debug_mega_listbox > 1) { echo
'folders_mega_listbox('.__LINE__.'): $this_acctnum ['.$this_acctnum.'] is not
in use, so skip folderlist<br>'; }
+ if ($debug_mega_listbox > 1) { echo
'folders_mega_listbox('.__LINE__.'): $this_acctnum ['.$this_acctnum.'] is not
in use, so skip folderlist<br />'; }
}
else
{
$folder_list =
$GLOBALS['phpgw']->msg->get_arg_value('folder_list', $this_acctnum);
- if ($debug_mega_listbox > 1) { echo
'folders_mega_listbox('.__LINE__.'): $this_acctnum ['.$this_acctnum.'] IS
enabled, got folder list<br>'; }
+ if ($debug_mega_listbox > 1) { echo
'folders_mega_listbox('.__LINE__.'): $this_acctnum ['.$this_acctnum.'] IS
enabled, got folder list<br />'; }
if ($debug_mega_listbox > 2) { echo
'folders_mega_listbox('.__LINE__.'): $folder_list for $this_acctnum
['.$this_acctnum.'] DUMP<pre>'; print_r($folder_list); echo '</pre>'; }
// iterate thru the folder list for
this acctnum
@@ -1475,7 +1475,7 @@
&& ($folder_acctnum ==
$this->F_megalist_skip_fldball['acctnum']))
{
// Do Nothing, this
folder should not be included
- if ($debug_mega_listbox
> 1) { echo 'folders_mega_listbox('.__LINE__.'): skipping
$this->F_megalist_skip_fldball
['.htmlspecialchars(serialize($this->F_megalist_skip_fldball)).'] has been
matched<br>'; }
+ if ($debug_mega_listbox
> 1) { echo 'folders_mega_listbox('.__LINE__.'): skipping
$this->F_megalist_skip_fldball
['.htmlspecialchars(serialize($this->F_megalist_skip_fldball)).'] has been
matched<br />'; }
}
else
{
@@ -1519,7 +1519,7 @@
}
}
}
- if ($debug_mega_listbox > 0) { echo
'folders_mega_listbox('.__LINE__.'): LEAVING<br>'; }
+ if ($debug_mega_listbox > 0) { echo
'folders_mega_listbox('.__LINE__.'): LEAVING<br />'; }
return $this->get_combobox();
}
@@ -1893,7 +1893,7 @@
}
$geek_bar =
- '<br>
+ '<br />
<table border="0" cellpadding="4" cellspacing="0"
width="100%" align="center">
<tr bgcolor="'.$row_on.'" class="row_on">
<td width="100%" align="left">'."\r\n"
====================================================
Index: email/inc/class.mail_dcom.inc.php
diff -u email/inc/class.mail_dcom.inc.php:1.11
email/inc/class.mail_dcom.inc.php:1.12
--- email/inc/class.mail_dcom.inc.php:1.11 Thu Dec 30 23:13:50 2004
+++ email/inc/class.mail_dcom.inc.php Sun Mar 13 23:22:44 2005
@@ -46,13 +46,13 @@
)
{
$mail_server_type = $p1;
- if ($debug_dcom) { echo 'DCOM DEBUG: found class feed arg $p1
['.serialize($p1).']<br>'; }
- //{ echo 'DCOM DEBUG: found class feed arg $p1
['.serialize($p1).']<br>'; }
+ if ($debug_dcom) { echo 'DCOM DEBUG: found class feed arg $p1
['.serialize($p1).']<br />'; }
+ //{ echo 'DCOM DEBUG: found class feed arg $p1
['.serialize($p1).']<br />'; }
}
else
{
- if ($debug_dcom) { echo 'DCOM DEBUG: did NOT find class feed
arg $p1 ['.serialize($p1).']<br>'; }
- //{ echo 'DCOM DEBUG: did NOT find class feed arg $p1
['.serialize($p1).']<br>'; }
+ if ($debug_dcom) { echo 'DCOM DEBUG: did NOT find class feed
arg $p1 ['.serialize($p1).']<br />'; }
+ //{ echo 'DCOM DEBUG: did NOT find class feed arg $p1
['.serialize($p1).']<br />'; }
$mail_server_type =
$GLOBALS['phpgw_info']['user']['preferences']['email']['mail_server_type'];
}
@@ -68,60 +68,60 @@
{
$imap_builtin = False;
$sock_fname = '_sock';
- if ($debug_dcom) { echo 'DCOM DEBUG: force socket class for
$mail_server_type ['.$mail_server_type.']<br>'; }
+ if ($debug_dcom) { echo 'DCOM DEBUG: force socket class for
$mail_server_type ['.$mail_server_type.']<br />'; }
}
elseif (extension_loaded('imap') && function_exists('imap_open'))
{
$imap_builtin = True;
$sock_fname = '';
- if ($debug_dcom) { echo 'imap builtin extension is
available<br>'; }
+ if ($debug_dcom) { echo 'imap builtin extension is available<br
/>'; }
}
else
{
$imap_builtin = False;
$sock_fname = '_sock';
- if ($debug_dcom) { echo 'imap builtin extension NOT available,
using socket class<br>'; }
+ if ($debug_dcom) { echo 'imap builtin extension NOT available,
using socket class<br />'; }
}
/* ----- include SOCKET or PHP-BUILTIN classes as necessary */
if ($imap_builtin == False)
{
CreateObject('phpgwapi.network');
- if ($debug_dcom) { echo 'created phpgwapi network class used
with sockets<br>'; }
+ if ($debug_dcom) { echo 'created phpgwapi network class used
with sockets<br />'; }
}
//CreateObject('email.mail_dcom_base'.$sock_fname);
include(PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_base'.$sock_fname.'.inc.php');
- if ($debug_dcom) { echo 'including
:'.PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_base'.$sock_fname.'.inc.php<br>';
}
+ if ($debug_dcom) { echo 'including
:'.PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_base'.$sock_fname.'.inc.php<br
/>'; }
if (($mail_server_type == 'imap')
|| ($mail_server_type == 'imaps'))
{
include(PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_imap'.$sock_fname.'.inc.php');
- if ($debug_dcom) { echo 'including
:'.PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_imap'.$sock_fname.'.inc.php<br>';
}
+ if ($debug_dcom) { echo 'including
:'.PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_imap'.$sock_fname.'.inc.php<br
/>'; }
}
elseif (($mail_server_type == 'pop3')
|| ($mail_server_type == 'pop3s'))
{
include(PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_pop3'.$sock_fname.'.inc.php');
- if ($debug_dcom) { echo 'including
:'.PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_pop3'.$sock_fname.'.inc.php<br>';
}
+ if ($debug_dcom) { echo 'including
:'.PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_pop3'.$sock_fname.'.inc.php<br
/>'; }
}
elseif ($mail_server_type == 'nntp')
{
include(PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_nntp'.$sock_fname.'.inc.php');
- if ($debug_dcom) { echo 'including
:'.PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_nntp'.$sock_fname.'.inc.php<br>';
}
+ if ($debug_dcom) { echo 'including
:'.PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_nntp'.$sock_fname.'.inc.php<br
/>'; }
}
elseif ((isset($mail_server_type))
&& ($mail_server_type != ''))
{
/* educated guess based on info being available: */
include(PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_'.$GLOBALS['phpgw_info']['user']['preferences']['email']['mail_server_type'].$sock_fname.'.inc.php');
- if ($debug_dcom) { echo 'Educated Guess: including
:'.PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_'.$GLOBALS['phpgw_info']['user']['preferences']['email']['mail_server_type'].$sock_fname.'.inc.php<br>';
}
+ if ($debug_dcom) { echo 'Educated Guess: including
:'.PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_'.$GLOBALS['phpgw_info']['user']['preferences']['email']['mail_server_type'].$sock_fname.'.inc.php<br
/>'; }
}
else
{
/* DEFAULT FALL BACK: */
include(PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_imap.inc.php');
- if ($debug_dcom) { echo 'NO INFO DEFAULT: including
:'.PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_imap.inc.php<br>'; }
+ if ($debug_dcom) { echo 'NO INFO DEFAULT: including
:'.PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_dcom_imap.inc.php<br />'; }
}
?>
====================================================
Index: email/inc/class.mail_dcom_nntp.inc.php
diff -u email/inc/class.mail_dcom_nntp.inc.php:1.5
email/inc/class.mail_dcom_nntp.inc.php:1.6
--- email/inc/class.mail_dcom_nntp.inc.php:1.5 Thu Dec 30 23:13:50 2004
+++ email/inc/class.mail_dcom_nntp.inc.php Sun Mar 13 23:22:44 2005
@@ -159,7 +159,7 @@
$debug_logins = False;
if($debug_logins)
{
- echo 'CALL TO LOGIN IN CLASS MSG
POP3'.'<br>'.'userid='.$GLOBALS['phpgw_info']['user']['preferences']['email']['userid'];
+ echo 'CALL TO LOGIN IN CLASS MSG POP3'.'<br
/>'.'userid='.$GLOBALS['phpgw_info']['user']['preferences']['email']['userid'];
}
error_reporting(error_reporting() - 2);
====================================================
Index: email/inc/class.mail_dcom_nntp_sock.inc.php
diff -u email/inc/class.mail_dcom_nntp_sock.inc.php:1.5
email/inc/class.mail_dcom_nntp_sock.inc.php:1.6
--- email/inc/class.mail_dcom_nntp_sock.inc.php:1.5 Fri Mar 14 04:00:55 2003
+++ email/inc/class.mail_dcom_nntp_sock.inc.php Sun Mar 13 23:22:44 2005
@@ -83,7 +83,7 @@
$this->num_msgs = $this->num_msg($this->mailbox);
$this->start_msg = $this->first_message($this->mailbox);
$this->end_msg = $this->last_message($this->mailbox);
- echo 'Successful connection to '.$this->mailbox."<br>\n";
+ echo 'Successful connection to '.$this->mailbox."<br />\n";
}
function fix_folder($folder='')
@@ -315,7 +315,7 @@
while(list($key,$value) = each($field_list))
{
$return_array[] = $key;
- echo '('.$i++.') Field: <b>'.$value."</b>\t\tMsg Num:
<b>".$key."</b><br>\n";
+ echo '('.$i++.') Field: <b>'.$value."</b>\t\tMsg Num:
<b>".$key."</b><br />\n";
}
@reset($return_array);
return $return_array;
====================================================
Index: email/inc/class.mail_dcom_imap_sock.inc.php
diff -u email/inc/class.mail_dcom_imap_sock.inc.php:1.16
email/inc/class.mail_dcom_imap_sock.inc.php:1.17
--- email/inc/class.mail_dcom_imap_sock.inc.php:1.16 Thu Dec 30 23:13:50 2004
+++ email/inc/class.mail_dcom_imap_sock.inc.php Sun Mar 13 23:22:44 2005
@@ -45,7 +45,7 @@
*/
function mail_dcom()
{
- echo "<br>\n" . lang('php-imap support not installed -
exiting') . "<br>\n";
+ echo "<br />\n" . lang('php-imap support not installed
- exiting') . "<br />\n";
echo lang('contact your system administrator');
exit;
}
@@ -249,15 +249,15 @@
*/
function report_svr_data($data_array, $calling_func_name='',
$show_ok_msg=True)
{
- echo 'imap: '.$calling_func_name.': response_array line
by line:<br>';
+ echo 'imap: '.$calling_func_name.': response_array line
by line:<br />';
for ($i=0; $i<count($data_array); $i++)
{
- echo ' -- ArrayPos['.$i.'] data: '
.htmlspecialchars($data_array[$i]) .'<br>';
+ echo ' -- ArrayPos['.$i.'] data: '
.htmlspecialchars($data_array[$i]) .'<br />';
}
- echo 'imap: '.$calling_func_name.': =ENDS=
response_array line by line:<br>';
+ echo 'imap: '.$calling_func_name.': =ENDS=
response_array line by line:<br />';
if ($show_ok_msg == True)
{
- echo 'imap: '.$calling_func_name.': last server
completion line: "'.htmlspecialchars($this->server_last_ok_response).'"<br>';
+ echo 'imap: '.$calling_func_name.': last server
completion line: "'.htmlspecialchars($this->server_last_ok_response).'"<br />';
}
}
@@ -271,7 +271,7 @@
*/
function server_last_error()
{
- if ($this->debug_dcom >= 1) { echo 'imap: call to
server_last_error<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: call to
server_last_error<br />'; }
return $this->server_last_error_str;
}
@@ -286,7 +286,7 @@
function createmailbox($stream,$mailbox)
{
// not yet implemented
- if ($this->debug_dcom >= 1) { echo 'imap: call to
unimplemented socket function: createmailbox<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: call to
unimplemented socket function: createmailbox<br />'; }
// eventually this will use this function to call for
expiration of stale cached data, if any
//$this->folder_list_did_change();
return true;
@@ -298,7 +298,7 @@
function deletemailbox($stream,$mailbox)
{
// not yet implemented
- if ($this->debug_dcom >= 1) { echo 'imap: call to
unimplemented socket function: deletemailbox<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: call to
unimplemented socket function: deletemailbox<br />'; }
// eventually this will use this function to call for
expiration of stale cached data, if any
//$this->folder_list_did_change();
return true;
@@ -310,7 +310,7 @@
function renamemailbox($stream,$mailbox_old,$mailbox_new)
{
// not yet implemented
- if ($this->debug_dcom >= 1) { echo 'imap: call to
unimplemented socket function: renamemailbox<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: call to
unimplemented socket function: renamemailbox<br />'; }
// eventually this will use this function to call for
expiration of stale cached data, if any
//$this->folder_list_did_change();
return true;
@@ -323,7 +323,7 @@
function expunge($stream)
{
// not yet implemented
- if ($this->debug_dcom >= 1) { echo 'imap: call to
unimplemented socket function: expunge<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: call to
unimplemented socket function: expunge<br />'; }
return true;
}
/*!
@@ -333,7 +333,7 @@
function mailcopy($stream,$msg_list,$mailbox,$flags)
{
// not yet implemented
- if ($this->debug_dcom >= 1) { echo 'imap: call to
unimplemented socket function: mailcopy<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: call to
unimplemented socket function: mailcopy<br />'; }
return False;
}
/*!
@@ -343,7 +343,7 @@
function mail_move($stream,$msg_list,$mailbox)
{
// not yet implemented
- if ($this->debug_dcom >= 1) { echo 'imap: call to
unimplemented socket function: mail_move<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: call to
unimplemented socket function: mail_move<br />'; }
return False;
}
/*!
@@ -353,7 +353,7 @@
function noop_ping_test($stream)
{
// not yet implemented
- if ($this->debug_dcom >= 1) { echo 'imap: call to
unimplemented socket function: noop_ping_test<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: call to
unimplemented socket function: noop_ping_test<br />'; }
return False;
}
/*!
@@ -363,7 +363,7 @@
function append($stream, $folder = "Sent", $header, $body,
$flags = "")
{
// not yet implemented
- if ($this->debug_dcom >= 1) { echo 'imap: append NOT
YET IMPLEMENTED imap sockets function<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: append NOT
YET IMPLEMENTED imap sockets function<br />'; }
return False;
}
/*!
@@ -373,7 +373,7 @@
function fetch_overview($stream_notused,$criteria,$flags)
{
// not yet implemented
- if ($this->debug_dcom >= 1) { echo 'imap:
fetch_overview NOT YET IMPLEMENTED imap sockets function<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap:
fetch_overview NOT YET IMPLEMENTED imap sockets function<br />'; }
return False;
}
/*
@@ -417,7 +417,7 @@
{
$empty_return=array();
// not yet implemented
- if ($this->debug_dcom >= 1) { echo 'imap: search NOT
YET IMPLEMENTED imap sockets function<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: search NOT
YET IMPLEMENTED imap sockets function<br />'; }
return $empty_return;
}
@@ -447,7 +447,7 @@
*/
function open ($fq_folder, $user, $pass, $flags='')
{
- if ($this->debug_dcom >= 1) { echo 'imap: ENTERING
open<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: ENTERING
open<br />'; }
// fq_folder is a "fully qualified folder", seperate
the parts:
$svr_data = array();
@@ -455,34 +455,34 @@
$folder = $svr_data['folder'];
$server = $svr_data['server'];
$port = $svr_data['port'];
- if ($this->debug_dcom >= 1) { echo 'imap: open:
svr_data:<br>'.serialize($svr_data).'<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: open:
svr_data:<br />'.serialize($svr_data).'<br />'; }
if (!$this->open_port($server,$port,15))
{
- echo '<p><center><b>' .lang('There was an error
trying to connect to your IMAP server.<br>Please contact your admin to check
the servername, username or password.') .'</b></center>';
+ echo '<p><center><b>' .lang('There was an error
trying to connect to your IMAP server.<br />Please contact your admin to check
the servername, username or password.') .'</b></center>';
echo('<CENTER><A
HREF="'.$GLOBALS['phpgw']->link('/home.php').'">'.lang('Click here to
continue').'...</A></CENTER>'); //cbsman
$GLOBALS['phpgw']->common->phpgw_exit();
}
else
{
$junk = $this->read_port();
- if ($this->debug_dcom >= 2) { echo 'imap: open:
open port server hello: "' .htmlspecialchars($this->show_crlf($junk)) .'"<br>';
}
+ if ($this->debug_dcom >= 2) { echo 'imap: open:
open port server hello: "' .htmlspecialchars($this->show_crlf($junk)) .'"<br
/>'; }
}
- if ($this->debug_dcom >= 2) { echo 'imap: open: user
and pass NO quotemeta: user ['. htmlspecialchars($user).'] pass
['.htmlspecialchars($pass).']<br>'; }
- if ($this->debug_dcom >= 2) { echo 'imap: open: user
and pass WITH quotemeta: user ['. htmlspecialchars(quotemeta($user)).'] pass
['.htmlspecialchars(quotemeta($pass)).']<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: open: user
and pass NO quotemeta: user ['. htmlspecialchars($user).'] pass
['.htmlspecialchars($pass).']<br />'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: open: user
and pass WITH quotemeta: user ['. htmlspecialchars(quotemeta($user)).'] pass
['.htmlspecialchars(quotemeta($pass)).']<br />'; }
$cmd_tag = 'L001';
$full_command = $cmd_tag.' LOGIN "'.$user.'"
"'.$pass.'"';
$expecting = $cmd_tag; // may be followed by OK, NO, or
BAD
- if ($this->debug_dcom >= 2) { echo 'imap: open:
write_port: '. htmlspecialchars($full_command) .'<br>'; }
- if ($this->debug_dcom >= 2) { echo 'imap: open:
expecting: "'. htmlspecialchars($expecting) .'" followed by OK, NO, or
BAD<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: open:
write_port: '. htmlspecialchars($full_command) .'<br />'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: open:
expecting: "'. htmlspecialchars($expecting) .'" followed by OK, NO, or BAD<br
/>'; }
if(!$this->write_port($full_command))
{
- if ($this->debug_dcom >= 1) { echo 'imap: open:
LEAVING with error: could not write_port<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: open:
LEAVING with error: could not write_port<br />'; }
$this->error();
// does $this->error() ever continue onto next
line?
return False;
@@ -496,27 +496,27 @@
{
if ($this->debug_dcom >= 2)
{
- echo 'imap: open: error in Open<br>';
- echo 'imap: open: last recorded
error:<br>';
- echo $this->server_last_error().'<br>';
+ echo 'imap: open: error in Open<br />';
+ echo 'imap: open: last recorded
error:<br />';
+ echo $this->server_last_error().'<br
/>';
}
- if ($this->debug_dcom >= 1) { echo 'imap:
LEAVING Open with error<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap:
LEAVING Open with error<br />'; }
return False;
}
else
{
if ($this->debug_dcom >= 2) {
$this->report_svr_data($response_array, 'open', True); }
- if ($this->debug_dcom >= 1) { echo 'imap: open:
Successful IMAP Login<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: open:
Successful IMAP Login<br />'; }
}
// now that we have logged in, php's IMAP_OPEN would
now select the desired folder
- if ($this->debug_dcom >= 2) { echo 'imap: open: php
IMAP_OPEN would now select desired folder: "'. htmlspecialchars($folder)
.'"<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: open: php
IMAP_OPEN would now select desired folder: "'. htmlspecialchars($folder) .'"<br
/>'; }
// php's IMAP_OPEN also selects the desired folder
(mailbox) after the connection is established
if($folder != '')
{
$this->reopen('',$fq_folder);
}
- if ($this->debug_dcom >= 1) { echo 'imap: LEAVING
open<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: LEAVING
open<br />'; }
return $this->socket;
}
@@ -527,18 +527,18 @@
*/
function close($flags="")
{
- if ($this->debug_dcom >= 1) { echo 'imap: ENTERING
Close<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: ENTERING
Close<br />'; }
$cmd_tag = 'c001';
$full_command = $cmd_tag.' LOGOUT';
$expecting = $cmd_tag; // may be followed by OK, NO, or
BAD
- if ($this->debug_dcom >= 2) { echo 'imap: close:
write_port: "'. htmlspecialchars($full_command) .'"<br>'; }
- if ($this->debug_dcom >= 2) { echo 'imap: close:
expecting: "'. htmlspecialchars($expecting) .'" followed by OK, NO, or
BAD<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: close:
write_port: "'. htmlspecialchars($full_command) .'"<br />'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: close:
expecting: "'. htmlspecialchars($expecting) .'" followed by OK, NO, or BAD<br
/>'; }
if(!$this->write_port($full_command))
{
- if ($this->debug_dcom >= 1) { echo 'imap:
close: LEAVING with error: could not write_port<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap:
close: LEAVING with error: could not write_port<br />'; }
$this->error();
}
@@ -551,17 +551,17 @@
{
if ($this->debug_dcom >= 2)
{
- echo 'imap: close: error in Close<br>';
- echo 'imap: close: last recorded
error:<br>';
- echo $this->server_last_error().'<br>';
+ echo 'imap: close: error in Close<br
/>';
+ echo 'imap: close: last recorded
error:<br />';
+ echo $this->server_last_error().'<br
/>';
}
- if ($this->debug_dcom >= 1) { echo 'imap:
Leaving Close with error<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap:
Leaving Close with error<br />'; }
return False;
}
else
{
if ($this->debug_dcom >= 2) {
$this->report_svr_data($response_array, 'close', True); }
- if ($this->debug_dcom >= 1) { echo 'imap:
LEAVING Close<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap:
LEAVING Close<br />'; }
return True;
}
}
@@ -579,24 +579,24 @@
*/
function reopen($stream_notused, $fq_folder, $flags='')
{
- if ($this->debug_dcom >= 1) { echo 'imap: ENTERING
reopen<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: ENTERING
reopen<br />'; }
// fq_folder is a "fully qualified folder", seperate
the parts:
$svr_data = array();
$svr_data = $this->distill_fq_folder($fq_folder);
$folder = $svr_data['folder'];
- if ($this->debug_dcom >= 1) { echo 'imap: reopen:
folder value is: ['.$folder.']<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: reopen:
folder value is: ['.$folder.']<br />'; }
$cmd_tag = 'r001';
$full_command = $cmd_tag.' SELECT "'.$folder.'"';
$expecting = $cmd_tag; // may be followed by OK, NO, or
BAD
- if ($this->debug_dcom >= 2) { echo 'imap: reopen:
write_port: "'. htmlspecialchars($full_command) .'"<br>'; }
- if ($this->debug_dcom >= 2) { echo 'imap: reopen:
expecting: "'. htmlspecialchars($expecting) .'" followed by OK, NO, or
BAD<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: reopen:
write_port: "'. htmlspecialchars($full_command) .'"<br />'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: reopen:
expecting: "'. htmlspecialchars($expecting) .'" followed by OK, NO, or BAD<br
/>'; }
if(!$this->write_port($full_command))
{
- if ($this->debug_dcom >= 1) { echo 'imap:
reopen: could not write_port<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap:
reopen: could not write_port<br />'; }
$this->error();
}
@@ -608,17 +608,17 @@
{
if ($this->debug_dcom >= 2)
{
- echo 'imap: reopen: error in
reopen<br>';
- echo 'imap: reopen: last recorded
error:<br>';
- echo $this->server_last_error().'<br>';
+ echo 'imap: reopen: error in reopen<br
/>';
+ echo 'imap: reopen: last recorded
error:<br />';
+ echo $this->server_last_error().'<br
/>';
}
- if ($this->debug_dcom >= 1) { echo 'imap:
LEAVING reopen with error<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap:
LEAVING reopen with error<br />'; }
return False;
}
else
{
if ($this->debug_dcom >= 2) {
$this->report_svr_data($response_array, 'reopen', True); }
- if ($this->debug_dcom >= 1) { echo 'imap:
LEAVING reopen<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap:
LEAVING reopen<br />'; }
return True;
}
}
@@ -655,7 +655,7 @@
*/
function listmailbox($stream_notused,$server_str,$pattern)
{
- if ($this->debug_dcom >= 1) { echo 'imap: ENTERING
listmailbox<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: ENTERING
listmailbox<br />'; }
$mailboxes_array = Array();
// prepare params, seperate wildcards "*" or "%" from
param $pattern
@@ -694,12 +694,12 @@
$full_command = $cmd_tag.' LIST '.$list_params;
$expecting = $cmd_tag; // may be followed by OK, NO, or
BAD
- if ($this->debug_dcom >= 2) { echo 'imap: listmailbox:
write_port: ['. htmlspecialchars($full_command) .']<br>'; }
- if ($this->debug_dcom >= 2) { echo 'imap: listmailbox:
expecting: "'. htmlspecialchars($expecting) .'" followed by OK, NO, or
BAD<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: listmailbox:
write_port: ['. htmlspecialchars($full_command) .']<br />'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: listmailbox:
expecting: "'. htmlspecialchars($expecting) .'" followed by OK, NO, or BAD<br
/>'; }
if(!$this->write_port($full_command))
{
- if ($this->debug_dcom >= 1) { echo 'imap:
listmailbox: could not write_port<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap:
listmailbox: could not write_port<br />'; }
$this->error();
}
@@ -711,11 +711,11 @@
{
if ($this->debug_dcom >= 2)
{
- echo 'imap: listmailbox: error in
listmailbox<br>';
- echo 'imap: listmailbox: last recorded
error:<br>';
- echo $this->server_last_error().'<br>';
+ echo 'imap: listmailbox: error in
listmailbox<br />';
+ echo 'imap: listmailbox: last recorded
error:<br />';
+ echo $this->server_last_error().'<br
/>';
}
- if ($this->debug_dcom >= 1) { echo 'imap:
Leaving listmailbox with error<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap:
Leaving listmailbox with error<br />'; }
return False;
}
else
@@ -755,7 +755,7 @@
}
if ($this->debug_dcom >= 2) {
$this->report_svr_data($mailboxes_array, 'listmailbox
INTERNAL_mailboxes_array', False); }
- if ($this->debug_dcom >= 1) { echo 'imap: LEAVING
listmailbox<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: LEAVING
listmailbox<br />'; }
//return '';
return $mailboxes_array;
}
@@ -771,7 +771,7 @@
*/
function mailboxmsginfo($stream_notused='')
{
- if ($this->debug_dcom >= 1) { echo 'imap:
mailboxmsginfo NOT YET IMPLEMENTED imap sockets function<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap:
mailboxmsginfo NOT YET IMPLEMENTED imap sockets function<br />'; }
return False;
}
@@ -841,7 +841,7 @@
*/
function status($stream_notused='',
$fq_folder='',$options=SA_ALL)
{
- if ($this->debug_dcom >= 1) { echo 'imap: ENTERING
status<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: ENTERING
status<br />'; }
// fq_folder is a "fully qualified folder", seperate
the parts:
$svr_data = array();
@@ -871,12 +871,12 @@
$full_command = $cmd_tag.' STATUS
"'.$svr_data['folder'].'" ('.$query_str.')';
$expecting = $cmd_tag; // may be followed by OK, NO, or
BAD
- if ($this->debug_dcom >= 2) { echo 'imap: status:
write_port: "'. htmlspecialchars($full_command) .'"<br>'; }
- if ($this->debug_dcom >= 2) { echo 'imap: status:
expecting: "'. htmlspecialchars($expecting) .'" followed by OK, NO, or
BAD<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: status:
write_port: "'. htmlspecialchars($full_command) .'"<br />'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: status:
expecting: "'. htmlspecialchars($expecting) .'" followed by OK, NO, or BAD<br
/>'; }
if(!$this->write_port($full_command))
{
- if ($this->debug_dcom >= 1) { echo 'imap:
status: LEAVING with error: could not write_port<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap:
status: LEAVING with error: could not write_port<br />'; }
$this->error();
return False;
}
@@ -890,11 +890,11 @@
{
if ($this->debug_dcom >= 2)
{
- echo 'imap: status: error in
status<br>';
- echo 'imap: status: last recorded
error:<br>';
- echo $this->server_last_error().'<br>';
+ echo 'imap: status: error in status<br
/>';
+ echo 'imap: status: last recorded
error:<br />';
+ echo $this->server_last_error().'<br
/>';
}
- if ($this->debug_dcom >= 1) { echo 'imap:
LEAVING status with error<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap:
LEAVING status with error<br />'; }
return False;
}
@@ -905,11 +905,11 @@
//{
// if ($this->debug_dcom >= 2)
// {
- // echo 'imap: status: error in status,
more than (one) TWO lines (for buggy uwash servers) line server response, not
normal<br>';
- // echo 'imap: status: last recorded
error:<br>';
- // echo $this->server_last_error().'<br>';
+ // echo 'imap: status: error in status,
more than (one) TWO lines (for buggy uwash servers) line server response, not
normal<br />';
+ // echo 'imap: status: last recorded
error:<br />';
+ // echo $this->server_last_error().'<br
/>';
// }
- // if ($this->debug_dcom >= 1) { echo 'imap:
Leaving status with error<br>'; }
+ // if ($this->debug_dcom >= 1) { echo 'imap:
Leaving status with error<br />'; }
// return False;
//}
@@ -936,11 +936,11 @@
{
if ($this->debug_dcom >= 2)
{
- echo 'imap: status: error in status,
$response_line_of_data does not have "* STATUS" so it is not valid data<br>';
- echo 'imap: status: last recorded
error:<br>';
- echo $this->server_last_error().'<br>';
+ echo 'imap: status: error in status,
$response_line_of_data does not have "* STATUS" so it is not valid data<br />';
+ echo 'imap: status: last recorded
error:<br />';
+ echo $this->server_last_error().'<br
/>';
}
- if ($this->debug_dcom >= 1) { echo 'imap:
LEAVING status with error at '.__LINE__.'<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap:
LEAVING status with error at '.__LINE__.'<br />'; }
return False;
}
@@ -1006,7 +1006,7 @@
// so L1 class var cache it so "sort" does not have to
call this function if it has ALREADY been run
$this->mailbox_status = $info;
if ($this->debug_dcom >= 2) { echo 'imap: status: L1
class var caching: $this->mailbox_status DUMP:<pre>';
print_r($this->mailbox_status); echo '</pre>'; }
- if ($this->debug_dcom >= 1) { echo 'imap: LEAVING
status<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: LEAVING
status<br />'; }
return $info;
}
@@ -1057,7 +1057,7 @@
// snarf the data
$data_mini_str = trim(substr($data_mini_str, 0,
$data_end));
$return_data = (int)$data_mini_str;
- if ($this->debug_dcom >= 2) { echo 'imap:
snarf_status_data: '.$snarf_this.' = '.$return_data.'<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'imap:
snarf_status_data: '.$snarf_this.' = '.$return_data.'<br />'; }
}
return $return_data;
}
@@ -1104,33 +1104,33 @@
//SE_NOPREFETCH Don't prefetch searched messages.
function
sort($stream_notused='',$criteria=SORTARRIVAL,$reverse=False,$options='')
{
- //if ($this->debug_dcom >= 1) { echo 'imap: sort NOT
YET IMPLEMENTED imap sockets function<br>'; }
+ //if ($this->debug_dcom >= 1) { echo 'imap: sort NOT
YET IMPLEMENTED imap sockets function<br />'; }
//return False;
//}
//function
sort($folder='',$criteria=SORTDATE,$reverse=False,$options='')
//{
- if ($this->debug_dcom >= 1) { echo 'imap: ENTERING
sort<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: ENTERING
sort<br />'; }
// we need total num message in this folder, is it
cached?
if ($this->mailbox_status != '')
{
$num_msgs = $this->mailbox_status->messages;
- if ($this->debug_dcom >= 2) { echo 'imap: sort:
using L1 class var cached $this->mailbox_status->messages
['.$this->mailbox_status->messages.']<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: sort:
using L1 class var cached $this->mailbox_status->messages
['.$this->mailbox_status->messages.']<br />'; }
}
else
{
// we need an "fq_folder" to call this function
$fq_folder =
$GLOBALS['phpgw']->msg->get_arg_value('mailsvr_callstr')
.$GLOBALS['phpgw']->msg->get_arg_value('folder');
- if ($this->debug_dcom >= 2) { echo 'imap: sort:
NO L1 class var cached num msgs data, calling this->status with $fq_folder
['.htmlspecialchars($fq_folder).']<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: sort:
NO L1 class var cached num msgs data, calling this->status with $fq_folder
['.htmlspecialchars($fq_folder).']<br />'; }
$status_data = $this->status($stream_notused,
$fq_folder,SA_ALL);
$num_msgs = $status_data->messages;
}
// DEBUG
- //if ($this->debug_dcom >= 1) { echo 'imap: debug QUICK
EXIT sort<br>'; }
+ //if ($this->debug_dcom >= 1) { echo 'imap: debug QUICK
EXIT sort<br />'; }
//return False;
@@ -1184,10 +1184,10 @@
while(list($key,$value) = each($field_list))
{
$return_array[] = $key;
- if ($this->debug_dcom >= 2) { echo 'imap: sort:
('.$i++.') Field: <b>'.$value."</b>\t\tMsg Num: <b>".$key."</b><br>\r\n"; }
+ if ($this->debug_dcom >= 2) { echo 'imap: sort:
('.$i++.') Field: <b>'.$value."</b>\t\tMsg Num: <b>".$key."</b><br />\r\n"; }
}
@reset($return_array);
- if ($this->debug_dcom >= 1) { echo 'imap: LEAVING
sort<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: LEAVING
sort<br />'; }
return $return_array;
}
@@ -1198,7 +1198,7 @@
*/
function fetch_header($start,$stop,$element)
{
- if ($this->debug_dcom >= 1) { echo 'imap: ENTERING
fetch_header<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: ENTERING
fetch_header<br />'; }
if(!$this->write_port('a001 FETCH '.$start.':'.$stop.'
RFC822.HEADER'))
{
@@ -1212,7 +1212,7 @@
//while(!ereg('FETCH completed',$response))
while(chop($response)!='')
{
- if ($this->debug_dcom >= 2) { echo
'imap: fetch_header: Response = '.$response."<br>\r\n"; }
+ if ($this->debug_dcom >= 2) { echo
'imap: fetch_header: Response = '.$response."<br />\r\n"; }
if(ereg('^\*',$response))
{
$field = explode(' ',$response);
@@ -1221,20 +1221,20 @@
if(ereg('^'.$element,$response))
{
$field_element[$msg_num] =
$this->phpGW_quoted_printable_decode2(substr($response,strlen($element)+1));
- if ($this->debug_dcom >= 2) {
echo 'imap: fetch_header: <b>Field:</b> '.$field_element[$msg_num]."\t = <b>Msg
Num</b> ".$msg_num."<br>\r\n"; }
+ if ($this->debug_dcom >= 2) {
echo 'imap: fetch_header: <b>Field:</b> '.$field_element[$msg_num]."\t = <b>Msg
Num</b> ".$msg_num."<br />\r\n"; }
}
elseif(ereg('^'.strtoupper($element),$response))
{
$field_element[$msg_num] =
$this->phpGW_quoted_printable_decode2(substr($response,strlen(strtoupper($element))+1));
- if ($this->debug_dcom >= 2) {
echo 'imap: fetch_header: <b>Field:</b> '.$field_element[$msg_num]."\t = <b>Msg
Num</b> ".$msg_num."<br>\r\n"; }
+ if ($this->debug_dcom >= 2) {
echo 'imap: fetch_header: <b>Field:</b> '.$field_element[$msg_num]."\t = <b>Msg
Num</b> ".$msg_num."<br />\r\n"; }
}
$response = $this->read_port();
}
$response = $this->read_port();
}
$response = $this->read_port();
- if ($this->debug_dcom >= 2) { echo 'imap: fetch_header:
returning $field_element ['.$field_element.'] <br>'; }
- if ($this->debug_dcom >= 1) { echo 'imap: LEAVING
fetch_header<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'imap: fetch_header:
returning $field_element ['.$field_element.'] <br />'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: LEAVING
fetch_header<br />'; }
return $field_element;
}
@@ -1252,11 +1252,11 @@
$response = $this->read_port();
while(!ereg('FETCH completed',$response))
{
- //echo 'Response = '.$response."<br>\n";
+ //echo 'Response = '.$response."<br />\n";
$field = explode(' ',$response);
$msg_num = intval($field[1]);
$field_element[$msg_num] =
substr($field[4],0,strpos($field[4],')'));
- //echo '<b>Field:</b>
'.substr($field[4],0,strpos($field[4],')'))."\t = <b>Msg Num</b>
".$field_element[substr($field[4],0,strpos($field[4],')'))]."<br>\n";
+ //echo '<b>Field:</b>
'.substr($field[4],0,strpos($field[4],')'))."\t = <b>Msg Num</b>
".$field_element[substr($field[4],0,strpos($field[4],')'))]."<br />\n";
$response = $this->read_port();
}
return $field_element;
@@ -1276,7 +1276,7 @@
function fetchstructure($stream_notused,$msg_num,$flags="")
{
// outer control structure for the multi-pass functions
- if ($this->debug_dcom >= 1) { echo 'imap:
fetchstructure NOT YET IMPLEMENTED imap sockets function<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap:
fetchstructure NOT YET IMPLEMENTED imap sockets function<br />'; }
return False;
}
@@ -1295,12 +1295,12 @@
{
if(!ereg('^\* '.$msgnum.' FETCH
\(BODY\[HEADER',$response) && chop($response) != '' && chop($response) != ')')
{
- echo 'Response = '.$response."<br>\n";
+ echo 'Response = '.$response."<br />\n";
$this->create_header($response,&$this->header,"True");
}
$response = $this->read_port();
}
- echo '<b>'.$msgnum.'</b> Completed!'."<br>\n";
+ echo '<b>'.$msgnum.'</b> Completed!'."<br />\n";
if(!$this->write_port('a001 FETCH '.$msgnum.'
BODY[TEXT]'))
{
$this->error();
@@ -1308,7 +1308,7 @@
$response = $this->read_port();
while(!ereg('^a001 OK FETCH completed',$response))
{
- echo 'Response = '.$response."<br>\n";
+ echo 'Response = '.$response."<br />\n";
$response = $this->read_port();
}
return $this->header;
@@ -1325,7 +1325,7 @@
*/
function
header($stream_notused,$msg_num,$fromlength="",$tolength="",$defaulthost="")
{
- if ($this->debug_dcom >= 1) { echo 'imap: header NOT
YET IMPLEMENTED imap sockets function<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: header NOT
YET IMPLEMENTED imap sockets function<br />'; }
return False;
}
@@ -1343,7 +1343,7 @@
*/
function delete($stream_notused,$msg_num,$flags="")
{
- if ($this->debug_dcom >= 1) { echo 'imap: delete NOT
YET IMPLEMENTED imap sockets function<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: delete NOT
YET IMPLEMENTED imap sockets function<br />'; }
return False;
}
@@ -1358,7 +1358,7 @@
function fetchheader($stream_notused,$msg_num,$flags='')
{
// NEEDED: code for flags: FT_UID; FT_INTERNAL;
FT_PREFETCHTEXT
- if ($this->debug_dcom >= 1) { echo 'imap: fetchheader
NOT YET IMPLEMENTED imap sockets function<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: fetchheader
NOT YET IMPLEMENTED imap sockets function<br />'; }
return False;
}
@@ -1372,7 +1372,7 @@
*/
function
fetchbody($stream_notused,$msg_num,$part_num="",$flags="")
{
- if ($this->debug_dcom >= 1) { echo 'imap: fetchbody
NOT YET IMPLEMENTED imap sockets function<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: fetchbody
NOT YET IMPLEMENTED imap sockets function<br />'; }
return False;
}
@@ -1383,7 +1383,7 @@
function
get_body($stream_notused,$msg_num,$flags='',$phpgw_include_header=True)
{
// NEEDED: code for flags: FT_UID; maybe FT_INTERNAL;
FT_NOT; flag FT_PEEK has no effect on POP3
- if ($this->debug_dcom >= 1) { echo 'imap: get_body NOT
YET IMPLEMENTED imap sockets function<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'imap: get_body NOT
YET IMPLEMENTED imap sockets function<br />'; }
return False;
}
====================================================
Index: email/inc/class.mail_dcom_imap.inc.php
diff -u email/inc/class.mail_dcom_imap.inc.php:1.22
email/inc/class.mail_dcom_imap.inc.php:1.23
--- email/inc/class.mail_dcom_imap.inc.php:1.22 Thu Dec 30 23:13:50 2004
+++ email/inc/class.mail_dcom_imap.inc.php Sun Mar 13 23:22:44 2005
@@ -28,7 +28,7 @@
function append($stream, $folder, $message, $flags=0)
{
$folder = $this->utf7_encode($folder);
- return imap_append($stream, $folder, $message, $flags);
+ $return = imap_append($stream, $folder, $message,
$flags);
}
function base64($text)
@@ -79,6 +79,13 @@
return imap_expunge($stream);
}
+ function empty_trash($stream)
+ {
+ $val = imap_delete($stream, '1:*');
+ imap_expunge($stream);
+ return $val;
+ }
+
function fetchbody($stream,$msgnr,$partnr,$flags=0)
{
// do we force use of msg UID's
@@ -252,7 +259,7 @@
{
$flags |= SE_UID;
}
- //echo 'class dcom: sort: $this->force_msg_uids=
'.serialize($this->force_msg_uids).'; $flags: ['.serialize($flags).']<br>';
+ //echo 'class dcom: sort: $this->force_msg_uids=
'.serialize($this->force_msg_uids).'; $flags: ['.serialize($flags).']<br />';
return imap_sort($stream,$criteria,$reverse,$flags);
}
@@ -278,6 +285,16 @@
return
$GLOBALS['phpgw']->msg->get_folder_short($folder);
}
+ function set_flag($stream, $msgnum, $flag)
+ {
+ $uids = 0;
+ if($this->force_msg_uids == True)
+ {
+ $uids |= ST_UID;
+ }
+ return imap_setflag_full($stream, $msgnum, $flag,
$uids);
+ }
+
/* rfc_get_flag() is more "rfc safe", as RFC822 allows
the content of the header to be on several lines.
====================================================
Index: email/inc/class.mail_dcom_base.inc.php
diff -u email/inc/class.mail_dcom_base.inc.php:1.10
email/inc/class.mail_dcom_base.inc.php:1.11
--- email/inc/class.mail_dcom_base.inc.php:1.10 Thu Dec 30 23:13:50 2004
+++ email/inc/class.mail_dcom_base.inc.php Sun Mar 13 23:22:44 2005
@@ -81,14 +81,14 @@
*/
function utf7_encode($data, $called_by='not_provided')
{
- if ($this->debug_utf7 > 0) { echo 'mail_dcom_base:
utf7_encode ('.__LINE__.'): ENTERING, $called_by ['.$called_by.']<br>'; }
- if ($this->debug_utf7 > 1) { echo 'mail_dcom_base:
utf7_encode ('.__LINE__.'): $data ['.serialize($data).']<br>'; }
+ if ($this->debug_utf7 > 0) { echo 'mail_dcom_base:
utf7_encode ('.__LINE__.'): ENTERING, $called_by ['.$called_by.']<br />'; }
+ if ($this->debug_utf7 > 1) { echo 'mail_dcom_base:
utf7_encode ('.__LINE__.'): $data ['.serialize($data).']<br />'; }
// handle utf7 encoding of folder names, if necessary
if (($this->enable_utf7 == False)
|| (function_exists('imap_utf7_encode') == False)
|| (!isset($data)))
{
- if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_encode ('.__LINE__.'): LEAVING on error, returning param
unmodified. Check if .. then to see why we exited here, $called_by
['.$called_by.']<br>'; }
+ if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_encode ('.__LINE__.'): LEAVING on error, returning param
unmodified. Check if .. then to see why we exited here, $called_by
['.$called_by.']<br />'; }
return $data;
}
@@ -101,20 +101,20 @@
{
$return_array[$i] =
$this->utf7_encode_string($data[$i]);
}
- if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_encode ('.__LINE__.'): LEAVING, returning $return_array
['.serialize($return_array).'], $called_by ['.$called_by.']<br>'; }
+ if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_encode ('.__LINE__.'): LEAVING, returning $return_array
['.serialize($return_array).'], $called_by ['.$called_by.']<br />'; }
return $return_array;
}
elseif (gettype($data) == 'string')
{
// string data
$return_string =
$this->utf7_encode_string($data);
- if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_encode ('.__LINE__.'): LEAVING, returning $return_string
['.serialize($return_string).'], $called_by ['.$called_by.']<br>'; }
+ if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_encode ('.__LINE__.'): LEAVING, returning $return_string
['.serialize($return_string).'], $called_by ['.$called_by.']<br />'; }
return $return_string;
}
else
{
// ERROR
- if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_encode ('.__LINE__.'): LEAVING with ERROR, returning
param unmodified. Data was not string nor array, $called_by
['.$called_by.']<br>'; }
+ if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_encode ('.__LINE__.'): LEAVING with ERROR, returning
param unmodified. Data was not string nor array, $called_by ['.$called_by.']<br
/>'; }
return $data;
}
}
@@ -162,7 +162,7 @@
$name['folder_after'] =
imap_utf7_encode($name['folder_before']);
$name['translated'] = $name['folder_after'];
}
- if ($this->debug_utf7 > 1) { echo ' _ mail_dcom_base:
utf7_encode_string ('.__LINE__.'): $name DUMP:
['.htmlspecialchars(serialize($name)).']<br>'; }
+ if ($this->debug_utf7 > 1) { echo ' _ mail_dcom_base:
utf7_encode_string ('.__LINE__.'): $name DUMP:
['.htmlspecialchars(serialize($name)).']<br />'; }
return $name['translated'];
}
@@ -174,14 +174,14 @@
*/
function utf7_decode($data)
{
- if ($this->debug_utf7 > 0) { echo 'mail_dcom_base:
utf7_decode ('.__LINE__.'): ENTERING<br>'; }
- if ($this->debug_utf7 > 1) { echo 'mail_dcom_base:
utf7_decode ('.__LINE__.'): $data ['.serialize($data).']<br>'; }
+ if ($this->debug_utf7 > 0) { echo 'mail_dcom_base:
utf7_decode ('.__LINE__.'): ENTERING<br />'; }
+ if ($this->debug_utf7 > 1) { echo 'mail_dcom_base:
utf7_decode ('.__LINE__.'): $data ['.serialize($data).']<br />'; }
// handle utf7 decoding of folder names, if necessary
if (($this->enable_utf7 == False)
|| (function_exists('imap_utf7_decode') == False)
|| (!isset($data)))
{
- if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_decode ('.__LINE__.'): LEAVING on error, returning param
unmodified. Check if .. then to see why we exited here<br>'; }
+ if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_decode ('.__LINE__.'): LEAVING on error, returning param
unmodified. Check if .. then to see why we exited here<br />'; }
return $data;
}
@@ -194,20 +194,20 @@
{
$return_array[$i] =
$this->utf7_decode_string($data[$i]);
}
- if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_decode ('.__LINE__.'): LEAVING, returning $return_array
['.serialize($return_array).']<br>'; }
+ if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_decode ('.__LINE__.'): LEAVING, returning $return_array
['.serialize($return_array).']<br />'; }
return $return_array;
}
elseif (gettype($data) == 'string')
{
// string data
$return_string =
$this->utf7_decode_string($data);
- if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_decode ('.__LINE__.'): LEAVING, returning $return_string
['.serialize($return_string).']<br>'; }
+ if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_decode ('.__LINE__.'): LEAVING, returning $return_string
['.serialize($return_string).']<br />'; }
return $return_string;
}
else
{
// ERROR
- if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_decode ('.__LINE__.'): LEAVING with ERROR, returning
param unmodified. Data was not string nor array.<br>'; }
+ if ($this->debug_utf7 > 0) { echo
'mail_dcom_base: utf7_decode ('.__LINE__.'): LEAVING with ERROR, returning
param unmodified. Data was not string nor array.<br />'; }
return $data;
}
}
@@ -277,14 +277,14 @@
|| ($name['folder_before'] ==
$name['folder_after']) )
{
// no translation occured
- if ($this->debug_utf7 > 0) { echo ' _
mail_dcom_base: utf7_decode_string ('.__LINE__.'): returning unmodified name,
NO decoding needed, returning feed $data_str:
['.htmlspecialchars(serialize($data_str)).']<br>'; }
+ if ($this->debug_utf7 > 0) { echo ' _
mail_dcom_base: utf7_decode_string ('.__LINE__.'): returning unmodified name,
NO decoding needed, returning feed $data_str:
['.htmlspecialchars(serialize($data_str)).']<br />'; }
return $data_str;
}
else
{
// replace old folder name with new
folder name
$name['translated'] =
str_replace($name['folder_before'], $name['folder_after'], $data_str);
- if ($this->debug_utf7 > 0) { echo ' _
mail_dcom_base: utf7_decode_string ('.__LINE__.'): returning decoded name,
$name[] DUMP: ['.htmlspecialchars(serialize($name)).']<br>'; }
+ if ($this->debug_utf7 > 0) { echo ' _
mail_dcom_base: utf7_decode_string ('.__LINE__.'): returning decoded name,
$name[] DUMP: ['.htmlspecialchars(serialize($name)).']<br />'; }
return $name['translated'];
}
}
@@ -300,12 +300,12 @@
|| ($name['folder_before'] == $data_str) )
{
// no translation occured
- if ($this->debug_utf7 > 0) { echo ' _
mail_dcom_base: utf7_decode_string ('.__LINE__.'): returning unmodified name,
NO decoding needed, returning feed $data_str:
['.htmlspecialchars(serialize($data_str)).']<br>'; }
+ if ($this->debug_utf7 > 0) { echo ' _
mail_dcom_base: utf7_decode_string ('.__LINE__.'): returning unmodified name,
NO decoding needed, returning feed $data_str:
['.htmlspecialchars(serialize($data_str)).']<br />'; }
return $data_str;
}
else
{
- if ($this->debug_utf7 > 0) { echo ' _
mail_dcom_base: utf7_decode_string ('.__LINE__.'): returning decoded name,
$name[] DUMP: ['.htmlspecialchars(serialize($name)).']<br>'; }
+ if ($this->debug_utf7 > 0) { echo ' _
mail_dcom_base: utf7_decode_string ('.__LINE__.'): returning decoded name,
$name[] DUMP: ['.htmlspecialchars(serialize($name)).']<br />'; }
return $name['translated'];
}
}
====================================================
Index: email/inc/class.mail_dcom_base_sock.inc.php
diff -u email/inc/class.mail_dcom_base_sock.inc.php:1.25
email/inc/class.mail_dcom_base_sock.inc.php:1.26
--- email/inc/class.mail_dcom_base_sock.inc.php:1.25 Thu Dec 30 23:13:50 2004
+++ email/inc/class.mail_dcom_base_sock.inc.php Sun Mar 13 23:22:44 2005
@@ -384,7 +384,7 @@
*/
function error()
{
- echo 'Error: '.$this->error['code'].' :
'.$this->error['msg'].' - '.$this->error['desc']."<br>\r\n";
+ echo 'Error: '.$this->error['code'].' :
'.$this->error['msg'].' - '.$this->error['desc']."<br />\r\n";
$this->close();
echo('<A
HREF="'.$GLOBALS['phpgw']->link('/home.php').'">'.lang('Click here to
continue').'...</A>'); //cbsman
$GLOBALS['phpgw']->common->phpgw_exit();
@@ -522,7 +522,7 @@
$glob_response = '';
while ($line = $this->read_port())
{
- //echo $line."<br>\r\n";
+ //echo $line."<br />\r\n";
if (chop($line) == $end)
{
break;
@@ -658,12 +658,12 @@
if ($line2 == 'True')
{
$line2 = $this->read_port();
- echo 'Response =
'.$line2.'<br>'."\n";
+ echo 'Response = '.$line2.'<br
/>'."\n";
}
}
$header[$key] .= chop($line2);
}
- //echo 'Header[$key] = '.$header[$key].'<br>'."\n";
+ //echo 'Header[$key] = '.$header[$key].'<br />'."\n";
}
/*!
@@ -703,7 +703,7 @@
{
//$new_list[$key] = $this->convert_date($value);
$new_list[$key] = $this->make_udate($value);
- if ($this->debug_dcom >= 2) { echo 'base_sock:
convert_date_array: field_list: "'.$new_list[$key].'" was "'.$value.'"<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'base_sock:
convert_date_array: field_list: "'.$new_list[$key].'" was "'.$value.'"<br />'; }
}
return $new_list;
@@ -725,7 +725,7 @@
{
$msg_date = substr($msg_date,$comma + 2);
}
- //echo 'Msg Date : '.$msg_date."<br>\n";
+ //echo 'Msg Date : '.$msg_date."<br />\n";
$dta = explode(' ',$msg_date);
$ta = explode(':',$dta[3]);
@@ -748,7 +748,7 @@
}
$new_time =
mktime($ta[0],$ta[1],$ta[2],$GLOBALS['month_array'][strtolower($dta[1])],$dta[0],$dta[2])
- ((60 * 60) *
intval($GLOBALS['phpgw_info']['user']['preferences']['common']['tzoffset']));
- //echo 'New Time : '.$new_time."<br>\n";
+ //echo 'New Time : '.$new_time."<br />\n";
return $new_time;
}
@@ -965,7 +965,7 @@
$this->header = Array();
while ($line = $this->read_port())
{
- //echo $line."<br>\n";
+ //echo $line."<br />\n";
if (chop($line) == $end) break;
$this->create_header($line,&$this->header,"True");
}
====================================================
Index: email/inc/class.bocompose.inc.php
diff -u email/inc/class.bocompose.inc.php:1.9
email/inc/class.bocompose.inc.php:1.10
--- email/inc/class.bocompose.inc.php:1.9 Thu Dec 30 23:13:50 2004
+++ email/inc/class.bocompose.inc.php Sun Mar 13 23:22:43 2005
@@ -56,55 +56,6 @@
}
/*!
- @function recall_desired_action
- @abstract used to preserve if this originated as a reply,
replyall, forward, or new mail
- @author Angles
- @discussion Line lengths will differ for new mail and forwarded
orig body, vs. reply mail that has longer
- lines. So this preserves this info for later use. Particularly
we like to preserve this thru the spelling pass also.
- We look for GPC args "action" or "orig_action", as keys, and
their
- values are limited to "reply", "replyall", "forward", and
"new", with "new" being deduced on the
- initial compose page call and put into "orig_action" for later
use, while the others possible "action"
- values simply get stored in "orig_action" no deduction is
required, it is specified.
- If new future actions are added, adjust this function
accordingly.
- @access public
- // MOVED TO MAIL_MSG_BASE BECAUSE WE ALSO NEED THIS IN CLASS
BOSEND
- function recall_desired_action()
- {
- // what action are we dealing with here, reply(all),
forward, or newmail
- // we care because new and forward get different line
length then reply mail that has ">"
- $orig_action = 'unknown';
- if (($GLOBALS['phpgw']->msg->get_isset_arg('action'))
- && (
-
($GLOBALS['phpgw']->msg->get_arg_value('action') == 'forward')
- ||
($GLOBALS['phpgw']->msg->get_arg_value('action') == 'reply')
- ||
($GLOBALS['phpgw']->msg->get_arg_value('action') == 'replyall')
- )
- )
- {
- $orig_action =
$GLOBALS['phpgw']->msg->get_arg_value('action');
- }
- elseif
(($GLOBALS['phpgw']->msg->get_isset_arg('orig_action'))
- && (
-
($GLOBALS['phpgw']->msg->get_arg_value('orig_action') == 'forward')
- ||
($GLOBALS['phpgw']->msg->get_arg_value('orig_action') == 'reply')
- ||
($GLOBALS['phpgw']->msg->get_arg_value('orig_action') == 'replyall')
- ||
($GLOBALS['phpgw']->msg->get_arg_value('orig_action') == 'new')
- )
- )
- {
- $orig_action =
$GLOBALS['phpgw']->msg->get_arg_value('orig_action');
- }
- else
- {
- // if not reply, replyall, nor forward
"action", then we have NEW message
- // if this is set now then the above
"orig_action" should preserve it
- $orig_action = 'new';
- }
- return $orig_action;
- }
- */
-
- /*!
@function get_compose_form_action_url
@abstract makes the html action target for the send button on
the compose page
@param $menuaction_target (string)
@@ -209,7 +160,7 @@
so i though "hey, its time for a function" ... there... I know
this is probably not the way to do it
@access private
*/
- function quote_inline_message($body,$msgball)
+ function quote_inline_message($body, $msgball, $quote_char='')
{
// ---- Quoted Bodystring of Re:,Fwd:
Message is the "First Presentable" part -----
@@ -298,7 +249,7 @@
// NOTE: do NOT trim the LEFT
part of the string, use RTRIM instead
//$this_line = '>' .
rtrim($body_array[$bodyidx]) ."\r\n";
//$this_line =
$this->reply_prefix . rtrim($body_array[$bodyidx]) ."\r\n";
- $this_line =
$GLOBALS['phpgw']->msg->reply_prefix . rtrim($body_array[$bodyidx]) ."\r\n";
+ $this_line = $quote_char .
rtrim($body_array[$bodyidx]) ."\r\n";
$body .= $this_line;
}
// cleanup
@@ -308,7 +259,7 @@
// it's up to the endusers MUA to
handle any htmlspecialchars
// as for 7-bit vs. 8-bit, we prefer to
leave body chars as-is and send out as 8-bit mail
// Later Note: see RFCs 2045-2049 for
what MTA's (note "T") can and can not handle
- return
$GLOBALS['phpgw']->msg->htmlspecialchars_decode($body);
+ return
$GLOBALS['phpgw']->msg->htmlspecialchars_decode(trim($body));
}
/*!
@@ -320,7 +271,7 @@
*/
function compose($special_instructions='')
{
- if ($this->debug) { echo 'ENTERING:
email.bocompose.compose :: $special_instructions:
'.$special_instructions.'<br>'; }
+ if ($this->debug) { echo 'ENTERING:
email.bocompose.compose :: $special_instructions: '.$special_instructions.'<br
/>'; }
// this function is in class.msg_bootstrap.inc.php, we
created in the constructor for this class.
$this->msg_bootstrap->ensure_mail_msg_exists('email.bocompose.compose',
$this->debug);
@@ -351,8 +302,8 @@
}
elseif
($GLOBALS['phpgw']->msg->get_isset_arg('["msgball"]["msgnum"]'))
{
- if ($this->debug > 1) { echo
'email.bocompose.compose: get_isset_arg ["msgball"]["msgnum"] is TRUE <br>'; }
- if ($this->debug > 1) { echo
'email.bocompose.compose: $GLOBALS[phpgw]->msg->get_arg_value(action) :
['.$GLOBALS['phpgw']->msg->get_arg_value('action').'] <br>'; }
+ if ($this->debug > 1) { echo
'email.bocompose.compose: get_isset_arg ["msgball"]["msgnum"] is TRUE <br />'; }
+ if ($this->debug > 1) { echo
'email.bocompose.compose: $GLOBALS[phpgw]->msg->get_arg_value(action) :
['.$GLOBALS['phpgw']->msg->get_arg_value('action').'] <br />'; }
$msgball =
$GLOBALS['phpgw']->msg->get_arg_value('msgball');
$msg_headers =
$GLOBALS['phpgw']->msg->phpgw_header($msgball);
$msg_struct =
$GLOBALS['phpgw']->msg->phpgw_fetchstructure($msgball);
@@ -452,130 +403,14 @@
// ---- Begin The Message Body (of
the body we are replying to) -----
$who_wrote =
$GLOBALS['phpgw']->msg->get_who_wrote($msg_headers);
$lang_wrote = lang('wrote');
- // 2 blank lines (humm, why 3 crlf
then)
- $body = "\r\n"
- ."\r\n"
- ."\r\n"
- // the who wrote line
- .$who_wrote .' '.$lang_wrote.':
'."\r\n"
- // then one blank quoted line
b4 the quoted body
-
.$GLOBALS['phpgw']->msg->reply_prefix."\r\n";
-
- // ---- Quoted Bodystring of Re:
Message is the "First Presentable" part -----
- // as determimed in class.bomessage and
passed in the uri as "msgball[part_no]=X.X"
- // most emails have many MIME parts,
some may actually be blank, we do not want to
- // reply to a blank part, that would
look dumb and is not correct behavior. Instead, we want
- // to quote the first body port that
has some text, which could be anywhere.
- // NOTE: we should ALWAYS get a "First
Presentable" value from class.bomessage
- // if not (a rare and screwed up
situation) then assume msgball[part_no]=1
- // Also, if the first presentable part
is encoded as qprint or base64, or is subtype html
- // class.bomessage should pass that
info along as well
- if ((!isset($msgball['part_no']))
- || ($msgball['part_no'] == ''))
- {
- // this *should* never happen,
we should always get a good "First Presentable"
- // value in $msgball['part_no']
, but we can assume the first part if not specified
- $msgball['part_no'] = '1';
- }
-
- $bodystring = '';
- $bodystring =
$GLOBALS['phpgw']->msg->phpgw_fetchbody($msgball);
- // see if we have to un-do qprint (or
other) encoding of the part we are about to quote
- if
(($GLOBALS['phpgw']->msg->get_isset_arg('encoding'))
- ||
($GLOBALS['phpgw']->msg->get_isset_arg('subtype')))
- {
- // see if we have to un-do
qprint encoding (fairly common)
- if
($GLOBALS['phpgw']->msg->get_arg_value('encoding') == 'qprint')
- {
- $bodystring =
$GLOBALS['phpgw']->msg->qprint($bodystring);
- }
- // *rare, maybe never seen* see
if we have to un-do base64 encoding
- elseif
($GLOBALS['phpgw']->msg->get_arg_value('encoding') == 'base64')
- {
- // a human readable
body part (non-attachment) should NOT be base64 encoded
- // but you can never
account for idiots
- $bodystring =
$GLOBALS['phpgw']->msg->de_base64($bodystring);
- }
- // after that idiot check, we
need another now as well...
- // *TOTALLY IDIOTIC*
hotmail.com may send HTML ONLY mail
- // without the rfc REQUIRED
text only part, so we have to strip html
- if
($GLOBALS['phpgw']->msg->get_arg_value('subtype') == 'html')
- {
- // class validator has
the required function
- $this->my_validator =
CreateObject("phpgwapi.validator");
- // you can never
account for idiots, there should be a plain version of this IN THE MAIL
- $bodystring =
$this->my_validator->strip_html($bodystring);
- }
- }
- // "normalize" all line breaks into
CRLF pairs
- $bodystring =
$GLOBALS['phpgw']->msg->normalize_crlf($bodystring);
-
- // ----- Remove Email "Personal
Signature" from Quoted Body -----
- // RFC's unofficially suggest you
remove the "personal signature" before quoting the body
- // a standard sig begins with "--
CRFL", that's [dash][dash][space][CRLF]
- // and *should* be no more than 4 lines
in length, followed by a CFLF
- //$bodystring =
preg_replace("/--\s{0,1}\r\n.{1,}\r\n\r\n/smx", "BLAA", $bodystring);
- //$bodystring =
preg_replace("/--\s{0,1}\r\n(.{1,}\r\n){1,5}/smx", "", $bodystring);
- // sig = "dash dash space CRLF
(anything and CRLF) repeated 1 to 5 times"
- //$bodystring =
preg_replace("/--\s{0,1}\r\n.(?!>)(.{1,}\r\n){1,5}/smx", "", $bodystring);
- // THIS ONE DOES IT - USE THIS ONE
- $bodystring =
preg_replace("/\r\n[-]{2}\s{0,1}\r\n\w.{0,}\r\n(.{1,}\r\n){0,4}/", "\r\n",
$bodystring);
- // sig = "CRLF dash dash space(0or1)
CRLF anyWordChar anything CRLF (anything and CRLF) repeated 0 to 4 times"
-
- //now is a good time to trim the
retireved bodystring
- trim($bodystring);
-
- // ----- Quote The Body You Are
Replying To With ">" ------
- $body_array = array();
- // NOTE compose page html has a
textarea with "cols" set to 84
- // this means on submit the text
automatically is hardwrapped to 84 chars
- // NEW - NOT ANY MORE, no more
wrap=hard in the html-textbox tags
- // I did this so replies to messages
already having "> " added will not wrap to early
- // because the message lines are
lengthened by 1 or 2 chars already due to the
- // already existing "> " and there may
be many of them already.
- // HOWEVER a new message should go out
with standard 78 char line length (see below)
-
- // we need *some* line breaks in the
body so we know where to add the ">" quoting char(s)
- // some relatively short emails may not
have any CRLF pairs, but may have a few real long lines
- //so, add linebreaks to the body if
none are already existing
- if (!ereg("\r\n", $bodystring))
- {
- // aim for a 74-80 char line
length
- //$bodystring =
$GLOBALS['phpgw']->msg->body_hard_wrap($bodystring, 74);
- $bodystring =
$GLOBALS['phpgw']->msg->body_hard_wrap($bodystring, 78);
- }
- else
- {
- // NEW CHANGE: compose page no
longer wraps hard
- // this bodystring is the text
we are about to add reply quotes to
- // it may already have CRLF but
the line lengths could be too darn long
- // AND so we need to have
somewhat sane line lengths fed to the textbox
- // AND we need to have sane
line lengths before we add the quote char
- // since textbox will happily
submit any length line to the send code and look stupid maybe
- $bodystring =
$GLOBALS['phpgw']->msg->body_hard_wrap($bodystring, 88);
- }
- $body_array = explode("\r\n",
$bodystring);
- // cleanup, we do not need $bodystring
var anymore
- $bodystring = '';
- // add the ">" quoting char to the
beginning of each line
- // note, this *will* loop at least once
assuming the body has one line at least
- // therefor the var "body" *will* get
filled
- $body_array_count = count($body_array);
- for ($bodyidx = 0; $bodyidx <
$body_array_count; ++$bodyidx)
- {
- // add the ">" so called
"quoting" char to the original body text
- // NOTE: do NOT trim the LEFT
part of the string, use RTRIM instead
- $this_line =
$GLOBALS['phpgw']->msg->reply_prefix . rtrim($body_array[$bodyidx]) ."\r\n";
- $body .= $this_line;
- }
- // cleanup
- $body_array = array();
-
- // email needs to be sent with NO
ENCODED HTML ENTITIES
- // it's up to the endusers MUA to
handle any htmlspecialchars
- // as for 7-bit vs. 8-bit, we prefer to
leave body chars as-is and send out as 8-bit mail
- // Later Note: see RFCs 2045-2049 for
what MTA's (note "T") can and can not handle
- $body =
$GLOBALS['phpgw']->msg->htmlspecialchars_decode($body);
+
+ $body = "\r\n"
+ . "\r\n"
+ . "\r\n"
+ . $who_wrote .'
'.$lang_wrote.': '."\r\n" // the who wrote line
+ .
$GLOBALS['phpgw']->msg->reply_prefix."\r\n" // then one blank quoted line b4
the quoted body
+ .
$this->quote_inline_message('', $msgball, $GLOBALS['phpgw']->msg->reply_prefix)
+ . "\r\n";
}
elseif
($GLOBALS['phpgw']->msg->get_arg_value('action') == 'forward')
{
@@ -595,51 +430,115 @@
//Check to see if they want us to quote
the forwarded message's body and inlude it
//in the mail we are going to compose
$fwd_as_inline_pref=$GLOBALS['phpgw']->msg->get_pref_value('fwd_inline_text');
- //print "<br>$fwd_as_inline_pref<br>";
+ //print "<br />$fwd_as_inline_pref<br
/>";
if($fwd_as_inline_pref)
{
-
$body=$this->quote_inline_message($body."\r\n",$msgball);
+ $body =
$this->quote_inline_message($body."\r\n",$msgball,
$GLOBALS['phpgw']->msg->reply_prefix);
}
- /*
- $part_nice =
pgw_msg_struct($msg_struct, $not_set, '1', 1, 1, 1,
$GLOBALS['phpgw']->msg->get_arg_value('folder'),
$GLOBALS['phpgw']->msg->get_arg_value('msgnum'));
- // see if one of the params if the
boundry
- $part_nice['boundary'] = $not_set; //
initialize
- for ($p = 0; $p <
$part_nice['ex_num_param_pairs']; $p++)
+
+
+ //echo '<br />orig_headers <br /><pre>'
.$GLOBALS['phpgw']->msg->htmlspecialchars_encode($orig_headers) .'</pre><br />';
+ //echo '<br />reg_matches '
.serialize($reg_matches) .'<br />';
+ //echo '<br />orig_boundary '
.$orig_boundary .'<br />';
+ //echo '<br />struct: <br />'
.$GLOBALS['phpgw']->msg->htmlspecialchars_encode(serialize($msg_struct)) .'<br
/>';
+ }
+ elseif
($GLOBALS['phpgw']->msg->get_arg_value('action') == 'edit')
+ {
+
+ //FIXME: Doesn't handle attachments atm
- will fix that soon :)
+ $to = $cc = $bcc = '';
+ if($msg_headers->to)
{
- //echo '<br>params['.$p.']:
'.$part_nice['params'][$p]['attribute'].'='.$part_nice['params'][$p]['value']
.'<br>';
- if
(($part_nice['params'][$p]['attribute'] == 'boundary')
- &&
($part_nice['params'][$p]['value'] != $not_set))
+ $tolist = array();
+ foreach($msg_headers->to as
$recip)
{
- $part_nice['boundary']
= $part_nice['params'][$p]['value'];
- break;
+ $tolist[] =
$GLOBALS['phpgw']->msg->make_rfc2822_address($recip);
}
+ $to = implode(',', $tolist);
}
- echo '<br>part_nice[boundary] '
.$part_nice['boundary'] .'<br>';
- //echo '<br>part_nice: <br>'
.$GLOBALS['phpgw']->msg->htmlspecialchars_encode(serialize($part_nice)) .'<br>';
- */
-
- /*
- $orig_boundary = '';
- // we are going to re-use the original
message's mime boundry from the main headers
- //$orig_headers =
$GLOBALS['phpgw']->dcom->fetchheader($mailbox,
$GLOBALS['phpgw']->msg->get_arg_value('msgnum'));
- $orig_headers =
$GLOBALS['phpgw']->dcom->fetchheader($GLOBALS['phpgw']->msg->get_arg_value('mailsvr_stream'),
$GLOBALS['phpgw']->msg->get_arg_value('msgnum'));
- $did_match =
preg_match('/(boundary=["]?)(.*)(["]?.*(\r|\n))/ix', $orig_headers,
$reg_matches);
- if (($did_match) &&
(isset($reg_matches[1])) && (isset($reg_matches[2]))
- && (stristr($reg_matches[1],
'boundary')) && ($reg_matches[2] != ''))
+
+ if($msg_headers->cc)
{
- $orig_boundary =
trim($reg_matches[2]);
- if
($orig_boundary[strlen($orig_boundary)-1] == '"')
+ $tolist = array();
+ foreach($msg_headers->cc as
$recip)
{
- $grab_to =
strlen($orig_boundary) - 1;
- $orig_boundary =
substr($orig_boundary, 0, $grab_to);
+ $cclist[] =
$GLOBALS['phpgw']->msg->make_rfc2822_address($recip);
}
+ $cc = implode(',', $cclist);
}
- //echo '<br>orig_headers <br><pre>'
.$GLOBALS['phpgw']->msg->htmlspecialchars_encode($orig_headers) .'</pre><br>';
- //echo '<br>reg_matches '
.serialize($reg_matches) .'<br>';
- //echo '<br>orig_boundary '
.$orig_boundary .'<br>';
- //echo '<br>struct: <br>'
.$GLOBALS['phpgw']->msg->htmlspecialchars_encode(serialize($msg_struct))
.'<br>';
- */
+ $subject =
$GLOBALS['phpgw']->msg->get_subject($msg_headers, '');
+ $body =
$this->quote_inline_message($body, $msgball);
+
+ if($msg_struct->parts &&
count($msg_struct->parts) > 1)
+ {
+ $mimemajors = array(
+ 'text',
+
'multipart',
+
'message',
+
'application',
+ 'audio',
+ 'image',
+ 'video',
+ 'other'
+ );
+ if(
!is_dir($GLOBALS['phpgw']->msg->att_files_dir) )
+ {
+
mkdir($GLOBALS['phpgw']->msg->att_files_dir, 0700);
+ }
+
+ $parts = $msg_struct->parts;
+ unset($parts[0]);//the ignore
main body
+ foreach($parts as $id => $part)
+ {
+ $partball = $msgball;
+ $partball['part_no'] =
$id + 1;
+ //echo '<pre>';
print_r($part); echo '</pre>';
+
+ $filename = '';
+ if($part->ifdparameters)
+ {
+
foreach($part->dparameters as $param)
+ {
+
if(strtolower($param->attribute) == 'filename')
+ {
+
$filename = $param->value;
+
break;
+ }
+ }
+ }
+ if($filename == '' &&
$part->ifdescription)
+ {
+ $filename =
$part->description;
+ }
+
+ if($filename == '')
+ {
+ $filename =
lang('attachment') . $id;
+ }
+
+
+ $random_number =
mt_rand(1000,999999999);
+ $newfilename =
md5($filename.',
'.$GLOBALS['phpgw_info']['user']['sessionid'].time().$_SERVER['REMOTE_ADDR'].$random_number);
+ $part_string =
$GLOBALS['phpgw']->msg->phpgw_fetchbody($partball);
+ if($part->encoding ==
3)//base64
+ {
+ $part_string =
base64_decode($part_string);
+ }
+
+ $fpart =
fopen($GLOBALS['phpgw']->msg->att_files_dir . SEP . $newfilename,'wb');
+ fputs($fpart,
$part_string);
+ fclose($fpart);
+ unset($fpart);
+ unset($part_string);
+
+ $finfo =
fopen($GLOBALS['phpgw']->msg->att_files_dir . SEP . $newfilename .
'.info','wb');
+ fputs($finfo,
strtolower($mimemajors[$part->type] . '/' . $part->subtype) ."\n"
+ . $filename .
"\n");
+ fclose($finfo);
+ unset($finfo);
+ }
+ }
}
// so what goes in the to and cc box
@@ -705,7 +604,7 @@
"bogusarg" => "0"
)
);
- //echo '$addylink_orig: '.$addylink_orig .'<br>';
+ //echo '$addylink_orig: '.$addylink_orig .'<br />';
// (2) the new addressbook "lex"
$addylink_lex = $GLOBALS['phpgw']->link(
@@ -717,7 +616,7 @@
"update_opener" => "1"
)
);
- //echo '$addylink_lex: '.$addylink_lex.'<br>';
+ //echo '$addylink_lex: '.$addylink_lex.'<br />';
// grab your value from the prefs
// $this->addybook_choice (string) [ "orig" | "lex" ]
@@ -854,7 +753,12 @@
//$this->xi['checkbox_req_notify_desc']= lang('Request
delivery notification');
$this->xi['checkbox_req_notify_name']= 'req_notify';
$this->xi['checkbox_req_notify_value']= 'true';
-
+
+ $save_text = lang('save');
+ $save_image =
$GLOBALS['phpgw']->msg->img_maketag($GLOBALS['phpgw']->msg->_image_on('email','save','_on'),$save_text,'','','0');
+ $save_onclick = 'save()';
+ // Set Variables for Save button
+ $this->xi['save_button'] = '<a
href="javascript:'.$save_onclick.'">'.$save_image.' '.$save_text.'</a>';
//$this->xi['attachfile_js_link'] =
$GLOBALS['phpgw']->link(
//
'/'.$GLOBALS['phpgw_info']['flags']['currentapp'].'/attach_file.php');
====================================================
Index: email/inc/class.boattach_file.inc.php
diff -u email/inc/class.boattach_file.inc.php:1.5
email/inc/class.boattach_file.inc.php:1.6
--- email/inc/class.boattach_file.inc.php:1.5 Thu Dec 30 23:13:50 2004
+++ email/inc/class.boattach_file.inc.php Sun Mar 13 23:22:43 2005
@@ -25,7 +25,6 @@
{
var $public_functions = array(
'attach' => True
- //'show_ui' => True
);
var $debug = 0;
//var $debug = 3;
@@ -95,7 +94,7 @@
function set_ref_var_holder(&$ref_template)
{
// NOT IMPLEMENTED YET
- if ($this->debug > 1) { echo
'emai1.boattach_file.set_ref_var_holder ('.__LINE__.'): param (a reference) is
gettype '.serialize(gettype($ref_template)).' and param\'s class name is
['.get_class($ref_template).'] <br>'; }
+ if ($this->debug > 1) { echo
'emai1.boattach_file.set_ref_var_holder ('.__LINE__.'): param (a reference) is
gettype '.serialize(gettype($ref_template)).' and param\'s class name is
['.get_class($ref_template).'] <br />'; }
if ($this->debug > 2) { echo
'emai1.boattach_file.set_ref_var_holder ('.__LINE__.'): param (a reference)
DUMP<pre>'; print_r($ref_template); echo '</pre>'; }
if ( (isset($ref_template))
&& ($this->var_holder != '##NOTHING') )
@@ -137,102 +136,43 @@
return substr($input, $lastpos + 1, strlen($input));
}
- /*!
- @function fill_control_data_gpc
- @abstract grab gpc POST vars used in this script for
"this->action" and "this->delete" values.
- @authors Angles
- @param none
- @return none, this is a class OOP call.
- @abstract there are 2 vars this script needs to do somethig,
"this->action" and "this->delete", so
- we use this function to fill those vars from GPC values here,
but in the future they could be filled
- via some external method. In the days before superglobals,
these were simple vars "$action" and
- also "$delete", but such simple days are over.
+ /**
+ * Grab gpc POST vars used in this script for "this->action" and
"this->delete" values.
+ *
+ * @author Angles
*/
function fill_control_data_gpc()
{
if ($this->debug > 2) { echo 'emai.boattach_file.attach
('.__LINE__.'): $GLOBALS[phpgw]->msg->ref_POST data DUMP<pre>';
print_r($GLOBALS['phpgw']->msg->ref_POST); echo '</pre>'; }
- $this->control_data['action'] =
htmlentities($GLOBALS['phpgw']->msg->ref_POST['action']);
- $this->control_data['delete'] =
$GLOBALS['phpgw']->msg->ref_POST['delete'];
+ $this->control_data['action'] =
htmlentities(get_var('action', array('POST') ) );
+ $this->control_data['delete'] = get_var('delete',
array('POST') );
if ($this->debug > 2) { echo 'emai.boattach_file.attach
('.__LINE__.'): $this->control_data DUMP<pre>'; print_r($this->control_data);
echo '</pre>'; }
}
-
- /*!
- @function fill_file_data_gpc
- @abstract fill this->file_data array from gpc sources, php
FILES POST data
- @authors Angles, Chris Wiess, Dave Hall, Lex
- @discussion UNDER DEVELOPMENT Some server side attachment
upload handling code is borrowed from
- Squirrelmail <Luke Ehresman> http://www.squirrelmail.org,
particularly the
- moving, temporary naming, and the ".info" file code.
+ /**
+ * Fill this->file_data array from gpc sources, php FILES POST
data
+ *
+ * @internal This has been gutted - skwashd
+ * @internal Some server side attachment upload handling code is
borrowed from Squirrelmail Luke Ehresman, particularly the moving, temporary
naming, and the ".info" file code.
+ * @author Angles
+ * @author Chris Wiess
+ * @author skwashd
+ * @author Lex
*/
function fill_file_data_gpc()
{
- if ($this->debug > 0) { echo 'ENTERING
emai.boattach_file.fill_file_data_gpc ('.__LINE__.') <br>'; }
- /*
- //PHP VARIABLES NOTES:
- // $uploadedfile was the name of the file box in the
submitted form, and php3 gives it additional properties:
- // $uploadedfile_name $uploadedfile_size
$uploadedfile_type
- // php4 also does this, but the preffered way is to use
the new (for php4) $HTTP_POST_FILES global array
- // $HTTP_POST_FILES['uploadedfile']['name'] ..
.['type'] ... ['size'] ... ['tmp_name']
- // note that $uploadedfile_type and
$HTTP_POST_FILES['uploadedfile']['type'] *may* not be correct filled
- // UPDATE: php > 4.2 prefers "superglobal" $_FILES,
actually 4.1+ can use that $_FILES
- //
- // FILE SIZE NOTES:
- // file size limits may depend on: (a) <input
type="hidden" name="MAX_FILE_SIZE" value="whatever">
- // (b) these values in php.ini: "post_max_size"
"upload_max_filesize" "memory_limit" "max_execution_time"
- // also see http://www.php.net/bugs.php?id=8377 for
the status of an upload bug not fixed as of 4.0.4
- // also note that uploading file to *memory* is wasteful
- */
+ if ($this->debug > 0) { echo 'ENTERING
emai.boattach_file.fill_file_data_gpc ('.__LINE__.') <br />'; }
- // probably UNNECESSARY debug code, delete it after
this is all stable
- if (($GLOBALS['phpgw']->msg->minimum_version("4.1.0"))
- && (!isset($GLOBALS['phpgw']->msg->ref_FILES)))
- {
- echo 'emai1.boattach_file.fill_file_data_gpc
('.__LINE__.'): ERROR: $GLOBALS[phpgw]->msg->ref_FILES should be set here, but
it IS NOT set<br>';
- }
-
- // the following code only applies to php < 4.1.0 where
that superglobal was not available
- // thanks Dave Hall for this code suggestion
- if (
- (! (isset($HTTP_POST_FILES) ||
isset($GLOBALS['HTTP_POST_FILES'])) )
- && ($GLOBALS['phpgw']->msg->minimum_version("4.1.0")
== False)
- )
- {
- $_FILES = $GLOBALS['HTTP_POST_FILES'];
- global $_FILES;
- // REDEFINE THE REFERENCE TO THE FILES DATA
- $GLOBALS['phpgw']->msg->ref_FILES = &$_FILES;
- }
- // yes I am aware that the above code and the below
code kind of deal with the same thing
- // if the above code still does not give a good
reference to FILES data, below there is "oldschool" fallback code
- // also I do not want to force global something every
script run when it is only needed here
-
-
- // clean / prepare PHP provided file info
- // note that "uploadedfile" is the POST submit form
identification for the file
- if ( ($GLOBALS['phpgw']->msg->minimum_version("4.1.0"))
- // or we may have otherwise obtained a good reference
above
- ||
(isset($GLOBALS['phpgw']->msg->ref_FILES['uploadedfile'])) )
- {
- if ($this->debug > 1) { echo
'emai.boattach_file.fill_file_data_gpc ('.__LINE__.'): using msg->ref_FILES to
fill $this->file_data[] <br>'; }
- if ($this->debug > 2) { echo
'emai.boattach_file.fill_file_data_gpc ('.__LINE__.'): msg->ref_FILE dump:
'.htmlspecialchars(serialize($GLOBALS['phpgw']->msg->ref_FILES)).'<br>'; }
- $this->file_data['file_tmp_name'] =
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($GLOBALS['phpgw']->msg->ref_FILES['uploadedfile']['tmp_name']));
- $this->file_data['file_name'] =
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($GLOBALS['phpgw']->msg->ref_FILES['uploadedfile']['name']));
- $this->file_data['file_size'] =
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($GLOBALS['phpgw']->msg->ref_FILES['uploadedfile']['size']));
- $this->file_data['file_type'] =
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($GLOBALS['phpgw']->msg->ref_FILES['uploadedfile']['type']));
- }
- else
+ if( isset($_FILES['uploadedfile']) )
{
- // real OLD STYLE way to get this info
- if ($this->debug > 1) { echo
'emai.boattach_file.fill_file_data_gpc ('.__LINE__.'): no valid msg->ref_FILES
available, using ANCIENT old, bad (we have to global 4 vars) to fill
this->file_data[] <br>'; }
- global $uploadedfile, $uploadedfile_name,
$uploadedfile_size, $uploadedfile_type;
- // php less then 4.1 uses these
pre-superglobals enviornment vars
- $this->file_data['file_tmp_name'] =
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($uploadedfile));
- $this->file_data['file_name'] =
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($uploadedfile_name));
- $this->file_data['file_size'] =
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($uploadedfile_size));
- $this->file_data['file_type'] =
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($uploadedfile_type));
+ if ($this->debug > 1) { echo
'emai.boattach_file.fill_file_data_gpc ('.__LINE__.'): using msg->ref_FILES to
fill $this->file_data[] <br />'; }
+ if ($this->debug > 2) { echo
'emai.boattach_file.fill_file_data_gpc ('.__LINE__.'): msg->ref_FILE dump:
'.htmlspecialchars(serialize($_FILES)).'<br />'; }
+ $this->file_data['file_tmp_name'] =
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($_FILES['uploadedfile']['tmp_name']));
+ $this->file_data['file_name'] =
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($_FILES['uploadedfile']['name']));
+ $this->file_data['file_size'] =
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($_FILES['uploadedfile']['size']));
+ $this->file_data['file_type'] =
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($_FILES['uploadedfile']['type']));
}
// sometimes PHP is very clue-less about MIME types,
and gives NO file_type
@@ -245,12 +185,12 @@
}
// Netscape 6 passes file_name with a full path, we
need to extract just the filename
- if ($this->debug > 1) { echo
'emai.boattach_file.fill_file_data_gpc ('.__LINE__.'): file_name
(pre-wbasename): ' .$this->file_data['file_name'] .'<br>'; }
+ if ($this->debug > 1) { echo
'emai.boattach_file.fill_file_data_gpc ('.__LINE__.'): file_name
(pre-wbasename): ' .$this->file_data['file_name'] .'<br />'; }
$this->file_data['file_name'] =
$this->wbasename($this->file_data['file_name']);
- if ($this->debug > 1) { echo
'emai.boattach_file.fill_file_data_gpc ('.__LINE__.'): file_name
(post-wbasename): ' .$this->file_data['file_name'] .'<br>'; }
+ if ($this->debug > 1) { echo
'emai.boattach_file.fill_file_data_gpc ('.__LINE__.'): file_name
(post-wbasename): ' .$this->file_data['file_name'] .'<br />'; }
if ($this->debug > 2) { echo
'emai.boattach_file.fill_file_data_gpc ('.__LINE__.'): filled $this->file_data
DUMP<pre>'; print_r($this->file_data); echo '</pre>'; }
- if ($this->debug > 0) { echo 'LEAVING
emai.boattach_file.fill_file_data_gpc ('.__LINE__.')<br>'; }
+ if ($this->debug > 0) { echo 'LEAVING
emai.boattach_file.fill_file_data_gpc ('.__LINE__.')<br />'; }
}
@@ -264,7 +204,7 @@
*/
function attach()
{
- if ($this->debug > 0) { echo 'ENTERING
emai.boattach_file.attach'.'<br>'; }
+ if ($this->debug > 0) { echo 'ENTERING
emai.boattach_file.attach'.'<br />'; }
if ($this->debug > 2) { echo
'emai.boattach_file.attach: initial $GLOBALS[phpgw_info][flags] DUMP<pre>';
print_r($GLOBALS['phpgw_info']['flags']); echo '</pre>'; }
// TRICK1: use the GLOBAL template established in the
UI file (called first)
@@ -276,7 +216,7 @@
// probably should remove this line later on
if (isset($this->var_holder) == False)
{
- echo 'emai.boattach_file.attach ('.__LINE__.'):
ERROR: initial $this->var_holder needs to be set by this point in the code
<br>';
+ echo 'emai.boattach_file.attach ('.__LINE__.'):
ERROR: initial $this->var_holder needs to be set by this point in the code <br
/>';
}
// initialize some variables
@@ -285,7 +225,6 @@
// ensure existance of PHPGROUPWARE temp dir
// note: this is different from apache temp dir, and
different from any other temp file location set in php.ini
- //if
(!file_exists($GLOBALS['phpgw_info']['server']['temp_dir']))
if
(!is_dir($GLOBALS['phpgw_info']['server']['temp_dir']))
{
mkdir($GLOBALS['phpgw_info']['server']['temp_dir'],0700);
@@ -295,20 +234,13 @@
//if
(!file_exists($GLOBALS['phpgw_info']['server']['temp_dir']))
if
(!is_dir($GLOBALS['phpgw_info']['server']['temp_dir']))
{
- $alert_msg .= 'Error:'.'<br>'
- . 'Server is unable to access phpgw tmp
directory'.'<br>'
- .
$GLOBALS['phpgw_info']['server']['temp_dir'].'<br>'
- . 'Please check your
configuration'.'<br>'
- . '<br>';
+ $alert_msg .= 'Error:'.'<br />'
+ . 'Server is unable to access phpgw tmp
directory'.'<br />'
+ .
$GLOBALS['phpgw_info']['server']['temp_dir'].'<br />'
+ . 'Please check your
configuration'.'<br />'
+ . '<br />';
}
- //if
(!file_exists($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP .
$GLOBALS['phpgw_info']['user']['sessionid']))
- //if
(!is_dir($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP .
$GLOBALS['phpgw_info']['user']['sessionid']))
- //{
- //
mkdir($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP .
$GLOBALS['phpgw_info']['user']['sessionid'],0700);
- //}
-
- //$this->uploaddir =
$GLOBALS['phpgw_info']['server']['temp_dir'] . SEP .
$GLOBALS['phpgw_info']['user']['sessionid'] . SEP;
$this->uploaddir =
$GLOBALS['phpgw']->msg->att_files_dir;
if (!is_dir($this->uploaddir))
{
@@ -319,11 +251,11 @@
//if (!file_exists($this->uploaddir))
if (!is_dir($this->uploaddir))
{
- $alert_msg .= 'Error:'.'<br>'
- . 'Server is unable to access phpgw
email tmp directory'.'<br>'
- . $this->uploaddir.'<br>'
- . 'Please check your
configuration'.'<br>'
- . '<br>';
+ $alert_msg .= 'Error:'.'<br />'
+ . 'Server is unable to access phpgw
email tmp directory'.'<br />'
+ . $this->uploaddir.'<br />'
+ . 'Please check your
configuration'.'<br />'
+ . '<br />';
}
// grab externally provided information
@@ -337,7 +269,7 @@
if ($this->control_data['action'] == lang('Delete')
|| $this->control_data['action'] ==
htmlentities(lang('Delete')))
{
- if ($this->debug > 1) { echo
'boattach_file.attach ('.__LINE__.'): <b>REQUEST TO DELETE</b> detected
$this->control_data[action] ('.$this->control_data['action'].') == lang(Delete)
('.lang('Delete').'): <br>'; }
+ if ($this->debug > 1) { echo
'boattach_file.attach ('.__LINE__.'): <b>REQUEST TO DELETE</b> detected
$this->control_data[action] ('.$this->control_data['action'].') == lang(Delete)
('.lang('Delete').'): <br />'; }
// sometimes $this->control_data[delete][]
seems to have multiple entries for the same filename
for ($i=0;
$i<count($this->control_data['delete']); $i++)
{
@@ -345,22 +277,22 @@
$full_fname_metafile =
$this->uploaddir.SEP.$this->control_data['delete'][$i] . '.info';
if (file_exists($full_fname_attachment))
{
- if ($this->debug > 1) { echo
'boattach_file.attach ('.__LINE__.'): loop['.$i.'] deleting file:
['.$full_fname_attachment.']: <br>'; }
+ if ($this->debug > 1) { echo
'boattach_file.attach ('.__LINE__.'): loop['.$i.'] deleting file:
['.$full_fname_attachment.']: <br />'; }
unlink($full_fname_attachment);
}
else
{
- if ($this->debug > 1) { echo
'boattach_file.attach ('.__LINE__.'): loop['.$i.'] request to deleting
NON-EXISTING file: ['.$full_fname_attachment.']: <br>'; }
+ if ($this->debug > 1) { echo
'boattach_file.attach ('.__LINE__.'): loop['.$i.'] request to deleting
NON-EXISTING file: ['.$full_fname_attachment.']: <br />'; }
}
// and the associated ".info" metafile
if (file_exists($full_fname_metafile))
{
- if ($this->debug > 1) { echo
'boattach_file.attach ('.__LINE__.'): loop['.$i.'] deleting related meta file:
['.$full_fname_metafile.']: <br>'; }
+ if ($this->debug > 1) { echo
'boattach_file.attach ('.__LINE__.'): loop['.$i.'] deleting related meta file:
['.$full_fname_metafile.']: <br />'; }
unlink($full_fname_metafile);
}
else
{
- if ($this->debug > 1) { echo
'boattach_file.attach ('.__LINE__.'): loop['.$i.'] request to deleting
NON-EXISTING file: ['.$full_fname_metafile.']: <br>'; }
+ if ($this->debug > 1) { echo
'boattach_file.attach ('.__LINE__.'): loop['.$i.'] request to deleting
NON-EXISTING file: ['.$full_fname_metafile.']: <br />'; }
}
}
}
@@ -393,10 +325,10 @@
(($this->file_data['file_tmp_name'] == '') ||
($this->file_data['file_tmp_name'] == 'none')))
{
$langed_attach_file = lang("Attach File");
- $alert_msg = lang('Input Error:').'<br>'
- . lang('Please submit a filename to
attach').'<br>'
- . lang('You must click %1 for the file
to actually upload','"'.lang('Attach File').'"').'.<br>'
- . '<br>';
+ $alert_msg = lang('Input Error:').'<br />'
+ . lang('Please submit a filename to
attach').'<br />'
+ . lang('You must click %1 for the file
to actually upload','"'.lang('Attach File').'"').'.<br />'
+ . '<br />';
}
$dh = opendir($this->uploaddir);
@@ -458,25 +390,25 @@
}
// begin DEBUG INFO (this is old, needs updating)
- $debuginfo .= '--uploadedfile info: <br>'
- . '$GLOBALS[phpgw_info][server][temp_dir]:
'.$GLOBALS['phpgw_info']['server']['temp_dir'].'<br>'
- . '$GLOBALS[phpgw_info][user][sessionid]:
'.$GLOBALS['phpgw_info']['user']['sessionid'].'<br>'
- . '$this->uploaddir: '.$this->uploaddir.'<br>'
- . 'file_tmp_name: '
.$this->file_data['file_tmp_name'] .'<br>'
- . 'file_name: ' .$this->file_data['file_name']
.'<br>'
- . 'file_size: ' .$this->file_data['file_size']
.'<br>'
- . 'file_type: ' .$this->file_data['file_type']
.'<br>'
- . '<br>'
- . 'totalfiles: ' .$totalfiles .'<br>'
- . 'file_info_count: '.count($file_info) .'<br>'
- . '<br>';
+ $debuginfo .= '--uploadedfile info: <br />'
+ . '$GLOBALS[phpgw_info][server][temp_dir]:
'.$GLOBALS['phpgw_info']['server']['temp_dir'].'<br />'
+ . '$GLOBALS[phpgw_info][user][sessionid]:
'.$GLOBALS['phpgw_info']['user']['sessionid'].'<br />'
+ . '$this->uploaddir: '.$this->uploaddir.'<br />'
+ . 'file_tmp_name: '
.$this->file_data['file_tmp_name'] .'<br />'
+ . 'file_name: ' .$this->file_data['file_name']
.'<br />'
+ . 'file_size: ' .$this->file_data['file_size']
.'<br />'
+ . 'file_type: ' .$this->file_data['file_type']
.'<br />'
+ . '<br />'
+ . 'totalfiles: ' .$totalfiles .'<br />'
+ . 'file_info_count: '.count($file_info) .'<br
/>'
+ . '<br />';
if (count($file_info) > 0)
{
- $debuginfo .= '<br>
file_info[0]='.$file_info[0] .'<br> file_info[1]='.$file_info[1];
+ $debuginfo .= '<br />
file_info[0]='.$file_info[0] .'<br /> file_info[1]='.$file_info[1];
}
- $debuginfo .= '<br>';
+ $debuginfo .= '<br />';
//print_debug('$debuginfo', $debuginfo);
- if ($this->debug > 1) { echo '$debuginfo:
'.$debuginfo.'<br>'; }
+ if ($this->debug > 1) { echo '$debuginfo:
'.$debuginfo.'<br />'; }
// end DEBUG INFO
// where to submit the form to
@@ -532,7 +464,7 @@
$GLOBALS['phpgw']->common->phpgw_exit(False);
*/
- if ($this->debug > 0) { echo 'LEAVING
emai.boattach_file.attach'.'<br>'; }
+ if ($this->debug > 0) { echo 'LEAVING
emai.boattach_file.attach'.'<br />'; }
}
====================================================
Index: email/inc/class.boaction.inc.php
diff -u email/inc/class.boaction.inc.php:1.18
email/inc/class.boaction.inc.php:1.19
--- email/inc/class.boaction.inc.php:1.18 Thu Dec 30 23:13:50 2004
+++ email/inc/class.boaction.inc.php Sun Mar 13 23:22:43 2005
@@ -22,6 +22,7 @@
{
var $public_functions = array(
'delmov' => True,
+ 'empty_trash' => True,
'get_attach' => True,
'view_html' => True
);
@@ -78,7 +79,7 @@
*/
function delmov()
{
- //if ($this->debug > 0) { echo 'ENTERING
email.boaction.delmov'.'<br>'; }
+ //if ($this->debug > 0) { echo 'ENTERING
email.boaction.delmov'.'<br />'; }
if( $GLOBALS['phpgw']->session->is_repost() ) //stop
double deletion
{
@@ -89,7 +90,7 @@
// make sure we have msg object and a server stream
$this->msg_bootstrap =
CreateObject("email.msg_bootstrap");
$this->msg_bootstrap->ensure_mail_msg_exists('email.boaction.delmov',
$this->debug);
- if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('ENTERING email.boaction.delmov'.'<br>'); }
+ if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('ENTERING email.boaction.delmov'.'<br />'); }
// initialize this to an "ignore me" value, we change
it later only if it should have a meaning
// MOVED TO MSG CLASS
@@ -150,7 +151,7 @@
"nextmatches" view, then the code _SHOULD_ page
back to where there are messages to show,
BUT this is not done yet.
*/
- if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: get_arg_value(what)
== "move") <br>'); }
+ if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: get_arg_value(what)
== "move") <br />'); }
/*
$fromacctnum =
(int)$GLOBALS['phpgw']->msg->get_arg_value('acctnum');
@@ -187,7 +188,7 @@
// MOVED TO MSG CLASS
//if (count($delmov_list) >
$this->big_move_threshold)
//{
- // if ($this->debug > 0) { echo
'email.boaction.delmov: LINE '.__LINE__.' $this->big_move_threshold
['.$this->big_move_threshold.'] exceeded, call "->msg->event_begin_big_move" to
notice event of impending big batch moves or deletes<br>'; }
+ // if ($this->debug > 0) { echo
'email.boaction.delmov: LINE '.__LINE__.' $this->big_move_threshold
['.$this->big_move_threshold.'] exceeded, call "->msg->event_begin_big_move" to
notice event of impending big batch moves or deletes<br />'; }
// $initial_session_cache_extreme =
$GLOBALS['phpgw']->msg->event_begin_big_move(array(), 'email.boaction.delmov:
LINE '.__LINE__);
//}
//else
@@ -198,48 +199,48 @@
for ($i = 0; $i < count($delmov_list); $i++)
{
- if ($this->debug > 2) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: in mail move loop
['.(string)($i+1).'] of ['.$tm.']<br>'); }
+ if ($this->debug > 2) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: in mail move loop
['.(string)($i+1).'] of ['.$tm.']<br />'); }
$mov_msgball = $delmov_list[$i];
// WHY URLDECODE SO SOON?
//$mov_msgball['folder'] =
$GLOBALS['phpgw']->msg->prep_folder_in($mov_msgball['folder']);
$mov_msgball['acctnum'] =
(int)$mov_msgball['acctnum'];
$did_move = False;
- //if ($this->debug > 2) { echo
'email.boaction.delmov: calling
$GLOBALS[phpgw]->msg->interacct_mail_move('.serialize($mov_msgball).',
'.serialize($to_fldball).'<br>'; }
+ //if ($this->debug > 2) { echo
'email.boaction.delmov: calling
$GLOBALS[phpgw]->msg->interacct_mail_move('.serialize($mov_msgball).',
'.serialize($to_fldball).'<br />'; }
//$did_move =
$GLOBALS['phpgw']->msg->interacct_mail_move($mov_msgball, $to_fldball);
- if ($this->debug > 2) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: calling
$GLOBALS[phpgw]->msg->industrial_interacct_mail_move('.serialize($mov_msgball).',
'.serialize($to_fldball).'<br>'); }
+ if ($this->debug > 2) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: calling
$GLOBALS[phpgw]->msg->industrial_interacct_mail_move('.serialize($mov_msgball).',
'.serialize($to_fldball).'<br />'); }
// single move, NO NEED to use the move
grouping stuff, NOTE $tm was filled above as count($delmov_list)
// MOVED TO FLUSH MOVES LOGIG
//if ($tm == 1)
//{
- // if ($this->debug > 1) { echo
'email.boaction.delmov: (single move $tm: ['.$tm.']) calling
$GLOBALS[phpgw]->msg->single_interacct_mail_move('.serialize($mov_msgball).',
'.serialize($to_fldball).'<br>'; }
+ // if ($this->debug > 1) { echo
'email.boaction.delmov: (single move $tm: ['.$tm.']) calling
$GLOBALS[phpgw]->msg->single_interacct_mail_move('.serialize($mov_msgball).',
'.serialize($to_fldball).'<br />'; }
// $did_move =
$GLOBALS['phpgw']->msg->single_interacct_mail_move($mov_msgball, $to_fldball);
//}
//else
//{
- if ($this->debug > 2) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: calling
$GLOBALS[phpgw]->msg->industrial_interacct_mail_move('.serialize($mov_msgball).',
'.serialize($to_fldball).'<br>'); }
+ if ($this->debug > 2) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: calling
$GLOBALS[phpgw]->msg->industrial_interacct_mail_move('.serialize($mov_msgball).',
'.serialize($to_fldball).'<br />'); }
$did_move =
$GLOBALS['phpgw']->msg->industrial_interacct_mail_move($mov_msgball,
$to_fldball);
//}
if ($did_move == False)
{
// error
- if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
***ERROR**** $GLOBALS[phpgw]->msg->industrial_interacct_mail_move() returns
FALSE, ERROR, break out of loop<br>'
- .' * * Server
reports error: '.$GLOBALS['phpgw']->msg->phpgw_server_last_error().'<br>'); }
+ if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
***ERROR**** $GLOBALS[phpgw]->msg->industrial_interacct_mail_move() returns
FALSE, ERROR, break out of loop<br />'
+ .' * * Server
reports error: '.$GLOBALS['phpgw']->msg->phpgw_server_last_error().'<br />'); }
break;
}
else
{
- if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
$GLOBALS[phpgw]->msg->industrial_interacct_mail_move() returns True<br>'); }
+ if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
$GLOBALS[phpgw]->msg->industrial_interacct_mail_move() returns True<br />'); }
//$did_expunge = False;
//$did_expunge =
$GLOBALS['phpgw']->msg->phpgw_expunge($mov_msgball['acctnum'], $mov_msgball);
- //if ($this->debug > 2) { echo
'email.boaction.delmov: $GLOBALS[phpgw]->msg->phpgw_expunge() returns
'.serialize($did_expunge).'<br>'; }
+ //if ($this->debug > 2) { echo
'email.boaction.delmov: $GLOBALS[phpgw]->msg->phpgw_expunge() returns
'.serialize($did_expunge).'<br />'; }
}
}
// ok, done moving, now expunge,
"industrial_interacct_mail_move" uses ""
- if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'): done
moving, now call $GLOBALS[phpgw]->msg->expunge_expungable_folders<br>'); }
+ if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'): done
moving, now call $GLOBALS[phpgw]->msg->expunge_expungable_folders<br />'); }
$did_expunge = False;
$did_expunge =
$GLOBALS['phpgw']->msg->expunge_expungable_folders('email.boaction.delmov LINE
'.__LINE__);
- if ($this->debug > 2) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
$GLOBALS[phpgw]->msg->expunge_expungable_folders() returns
['.serialize($did_expunge).']<br>'); }
+ if ($this->debug > 2) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
$GLOBALS[phpgw]->msg->expunge_expungable_folders() returns
['.serialize($did_expunge).']<br />'); }
if (! $did_move)
{
@@ -251,7 +252,7 @@
//$tf =
$GLOBALS['phpgw']->msg->prep_folder_out($to_fldball['folder']);
// folder in this array was never changed from
its "prepped out" state, it is still urlencoded from when we first picked it up
$tf = $to_fldball['folder'];
- //echo 'boaction: $tf ['.$tf.'] <br>';
+ //echo 'boaction: $tf ['.$tf.'] <br />';
// folder or message we should go back to
if
(($GLOBALS['phpgw']->msg->get_isset_arg('move_postmove_goto'))
@@ -260,18 +261,18 @@
// THIS MEANS WE WERE CALLED BY
UIMESSAGE
// treat the post-move navigation like
a "delete_single_msg", as per data passed to us from that page
$move_postmove_goto =
$GLOBALS['phpgw']->msg->get_arg_value('move_postmove_goto');
- if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'): move
single *called by uimessage*: $move_postmove_goto: :
'.$move_postmove_goto.'<br>'); }
+ if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'): move
single *called by uimessage*: $move_postmove_goto: : '.$move_postmove_goto.'<br
/>'); }
// ---- "Go To Previous Message"
Handling -----
// these insrustions passed from
uimessage when prev_next_navigation is obtained anyway
$this->redirect_to =
$move_postmove_goto;
- if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: ('.__LINE__.') move
single *called by uimessage*: determination of $this->redirect_to :
['.$this->redirect_to.']<br>'); }
+ if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: ('.__LINE__.') move
single *called by uimessage*: determination of $this->redirect_to :
['.$this->redirect_to.']<br />'); }
}
else
{
//$return_to_fldball['folder'] =
$GLOBALS['phpgw']->msg->prep_folder_out($delmov_list[0]['folder']);
// folder in this array was never
changed from its "prepped out" state, it is still urlencoded from when we first
picked it up
$return_to_fldball['folder'] =
$delmov_list[0]['folder'];
- //echo 'boaction:
$return_to_fldball[folder] ['.$return_to_fldball['folder'].'] <br>';
+ //echo 'boaction:
$return_to_fldball[folder] ['.$return_to_fldball['folder'].'] <br />';
$return_to_fldball['acctnum'] =
$delmov_list[0]['acctnum'];
$this->redirect_to =
$GLOBALS['phpgw']->link(
@@ -285,7 +286,7 @@
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start'));
- if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'): NOT
called by uimessage, determination of $this->redirect_to :
['.$this->redirect_to.']<br>'); }
+ if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'): NOT
called by uimessage, determination of $this->redirect_to :
['.$this->redirect_to.']<br />'); }
}
}
// ---- DELETE (MULTIPLE) MESSAGES ----
@@ -300,7 +301,7 @@
using its "folder" and "acctnum" values.
*/
- if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: get_arg_value(what)
== "delall") <br>'); }
+ if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: get_arg_value(what)
== "delall") <br />'); }
// this is called from the index pge after you
check some boxes and click "delete" button
$delmov_list =
$GLOBALS['phpgw']->msg->get_arg_value('delmov_list');
@@ -308,7 +309,7 @@
// MOVED TOP MSG CLASS
//if (count($delmov_list) >
$this->big_move_threshold)
//{
- // if ($this->debug > 0) { echo
'email.boaction.delmov: LINE '.__LINE__.' $this->big_move_threshold
['.$this->big_move_threshold.'] exceeded, call "->msg->event_begin_big_move" to
notice event of impending big batch moves or deletes<br>'; }
+ // if ($this->debug > 0) { echo
'email.boaction.delmov: LINE '.__LINE__.' $this->big_move_threshold
['.$this->big_move_threshold.'] exceeded, call "->msg->event_begin_big_move" to
notice event of impending big batch moves or deletes<br />'; }
// $initial_session_cache_extreme =
$GLOBALS['phpgw']->msg->event_begin_big_move(array(), 'email.boaction.delmov:
LINE '.__LINE__);
//}
//else
@@ -320,7 +321,7 @@
$loops = count($delmov_list);
for ($i = 0; $i < $loops; $i++)
{
- if ($this->debug > 2) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: (delete) in mail
delete loop ['.(string)($i+1).'] of ['.$loops.']<br>'); }
+ if ($this->debug > 2) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: (delete) in mail
delete loop ['.(string)($i+1).'] of ['.$loops.']<br />'); }
$this_msgnum =
$delmov_list[$i]['msgnum'];
// was_in_folder is used in Trash
handling in the ->phpgw_delete function
// if a message "was_in_folder" Trash,
it gets deleted for real, no option to move to Trash in that case
@@ -330,26 +331,26 @@
if ($did_delete == False)
{
// error
- if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: (delete) ***ERROR****
$GLOBALS[phpgw]->msg->phpgw_delete() returns FALSE, ERROR, break out of
loop<br>'
- .' * * Server
reports error: '.$GLOBALS['phpgw']->msg->phpgw_server_last_error().'<br>'); }
+ if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: (delete) ***ERROR****
$GLOBALS[phpgw]->msg->phpgw_delete() returns FALSE, ERROR, break out of loop<br
/>'
+ .' * * Server
reports error: '.$GLOBALS['phpgw']->msg->phpgw_server_last_error().'<br />'); }
break;
}
else
{
- if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: (delete)
$GLOBALS[phpgw]->msg->phpgw_delete() returns True (so it buffered the command,
really does not mean anything not that we buffer commands)<br>'); }
+ if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: (delete)
$GLOBALS[phpgw]->msg->phpgw_delete() returns True (so it buffered the command,
really does not mean anything not that we buffer commands)<br />'); }
- //if ($this->debug > 0) { echo
'email.boaction.delmov: (delete) calling
$GLOBALS[phpgw]->msg->phpgw_expunge('.$delmov_list[$i]['acctnum'].',
$delmov_list[$i])<br>'; }
+ //if ($this->debug > 0) { echo
'email.boaction.delmov: (delete) calling
$GLOBALS[phpgw]->msg->phpgw_expunge('.$delmov_list[$i]['acctnum'].',
$delmov_list[$i])<br />'; }
//$did_expunge = False;
//$did_expunge =
$GLOBALS['phpgw']->msg->phpgw_expunge((int)$delmov_list[$i]['acctnum'],
$delmov_list[$i]);
- //if ($this->debug > 2) { echo
'email.boaction.delmov: (delete)
$GLOBALS[phpgw]->msg->phpgw_expunge('.$delmov_list[$i]['acctnum'].') returns
'.serialize($did_expunge).'<br>'; }
+ //if ($this->debug > 2) { echo
'email.boaction.delmov: (delete)
$GLOBALS[phpgw]->msg->phpgw_expunge('.$delmov_list[$i]['acctnum'].') returns
'.serialize($did_expunge).'<br />'; }
}
}
// ok, done deleting, now expunge
- if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'): done
deleting, now call $GLOBALS[phpgw]->msg->expunge_expungable_folders<br>'); }
+ if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'): done
deleting, now call $GLOBALS[phpgw]->msg->expunge_expungable_folders<br />'); }
$did_expunge = False;
$did_expunge =
$GLOBALS['phpgw']->msg->expunge_expungable_folders('email.boaction.delmov LINE
'.__LINE__);
- if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
$GLOBALS[phpgw]->msg->expunge_expungable_folders() returns
['.serialize($did_expunge).']<br>'); }
+ if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
$GLOBALS[phpgw]->msg->expunge_expungable_folders() returns
['.serialize($did_expunge).']<br />'); }
$totaldeleted = $i;
//$GLOBALS['phpgw']->msg->phpgw_expunge();
@@ -435,7 +436,7 @@
{
$this->no_fmt = '&no_fmt=1';
}
- if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
get_arg_value(what) == "delete_single_msg") <br>'); }
+ if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
get_arg_value(what) == "delete_single_msg") <br />'); }
// called by clicking the "X" dutton while
reading an individual message
$msgball =
$GLOBALS['phpgw']->msg->get_arg_value('msgball');
if ($this->debug > 2) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
delete_single_msg: pre-delete $msgball[] DUMP:', $msgball); }
@@ -471,12 +472,12 @@
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start'));
}
- if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
delete_single_msg: pre-delete determination of $this->redirect_to :
['.$this->redirect_to.']<br>'); }
+ if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
delete_single_msg: pre-delete determination of $this->redirect_to :
['.$this->redirect_to.']<br />'); }
if ($this->debug > 3)
{
-
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: delete_single_msg
('.__LINE__.'): debug flag = 4 or higher, _SKIP_ the delete and expunge
action<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: delete_single_msg
('.__LINE__.'): debug flag = 4 or higher, _SKIP_ the delete and expunge
action<br />');
}
else
{
@@ -492,23 +493,23 @@
//$GLOBALS['phpgw']->msg->phpgw_expunge((int)$msgball['acctnum'], $msgball);
// ok, done deleting, now expunge
- if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: delete_single_msg:
('.__LINE__.'): done deleting, now call
$GLOBALS[phpgw]->msg->expunge_expungable_folders<br>'); }
+ if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: delete_single_msg:
('.__LINE__.'): done deleting, now call
$GLOBALS[phpgw]->msg->expunge_expungable_folders<br />'); }
$did_expunge = False;
$did_expunge =
$GLOBALS['phpgw']->msg->expunge_expungable_folders('email.boaction.delmov
(delete_single_msg) LINE '.__LINE__);
- if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: delete_single_msg:
('.__LINE__.'): $GLOBALS[phpgw]->msg->expunge_expungable_folders() returns
['.serialize($did_expunge).']<br>'); }
+ if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov: delete_single_msg:
('.__LINE__.'): $GLOBALS[phpgw]->msg->expunge_expungable_folders() returns
['.serialize($did_expunge).']<br />'); }
}
}
else
{
- if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
get_arg_value(what) == unknown_value<br>'); }
- $error_str = '<p><center><b>'.lang('UNKNOWN
ACTION')."<br> \r\n"
- .'called from
'.$GLOBALS['PHP_SELF'].', delmov()'."<br> \r\n"
- .'</b></center></p>'."<br>
\r\n";
+ if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
get_arg_value(what) == unknown_value<br />'); }
+ $error_str = '<p><center><b>'.lang('UNKNOWN
ACTION')."<br /> \r\n"
+ .'called from
'.$GLOBALS['PHP_SELF'].', delmov()'."<br /> \r\n"
+ .'</b></center></p>'."<br />
\r\n";
$this->redirect_to = $this->redirect_if_error;
}
// GOTO NECT PAGEVIEW VIA REDIRECT OR OBJECT CALL
- if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'): about
to enter logic to display page defined in this URI: $this->redirect_to
['.$this->redirect_to.']<br>'); }
+ if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'): about
to enter logic to display page defined in this URI: $this->redirect_to
['.$this->redirect_to.']<br />'); }
/*!
@capability use_old_redirect_method
@@ -519,7 +520,7 @@
*/
if ($this->use_old_redirect_method == True)
{
- if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
EXITING with OLD REDIRECT CODE : $this->use_old_redirect_method:
['.serialize($this->use_old_redirect_method).']<br>'); }
+ if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
EXITING with OLD REDIRECT CODE : $this->use_old_redirect_method:
['.serialize($this->use_old_redirect_method).']<br />'); }
$GLOBALS['phpgw']->redirect($this->redirect_to);
// kill this script, we re outa here...
if (is_object($GLOBALS['phpgw']->msg))
@@ -552,29 +553,29 @@
if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
calling $this->set_expected_args($expected_args) ; $expected_args DUMP:',
$expected_args); }
$this->set_expected_args($expected_args);
// the URI of the redirect string contains data needed
for the next page view
- if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
calling $this->set_new_args_uri($this->redirect_to) ; $this->redirect_to
['.$this->redirect_to.']<br>'); }
+ if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
calling $this->set_new_args_uri($this->redirect_to) ; $this->redirect_to
['.$this->redirect_to.']<br />'); }
$this->set_new_args_uri($this->redirect_to);
// clear existing args, apply the new arg enviornment,
// we get back the menuaction the redirect would have
asked for
- if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
calling $this->apply_new_args_env()<br>'); }
+ if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
calling $this->apply_new_args_env()<br />'); }
$my_menuaction = $this->apply_new_args_env();
- if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
$my_menuaction is ['.$my_menuaction.'] which was returned from
$this->apply_new_args_env()<br>'); }
+ if ($this->debug > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
$my_menuaction is ['.$my_menuaction.'] which was returned from
$this->apply_new_args_env()<br />'); }
// (c) IF A "BIG MOVE", THEN TURN BACK ON THE SMART
CACHE
// MOVED TO MSG CLASS
//if ((isset($initial_session_cache_extreme))
//&& ($initial_session_cache_extreme != '-1'))
//{
- // if ($this->debug > 1) { echo
'email.boaction.delmov ('.__LINE__.'): $initial_session_cache_extreme is set
and is NOT "-1", meaning we issued a "big move" cache event,
$initial_session_cache_extreme is
['.serialize($initial_session_cache_extreme).'] <br>'; }
- // if ($this->debug > 1) { echo
'email.boaction.delmov ('.__LINE__.'): "big move" will turn off
session_cache_extreme if it was TRUE, so we undo that for the next page view
with: $GLOBALS[phpgw]->msg->session_cache_extreme =
$initial_session_cache_extreme<br>'; }
+ // if ($this->debug > 1) { echo
'email.boaction.delmov ('.__LINE__.'): $initial_session_cache_extreme is set
and is NOT "-1", meaning we issued a "big move" cache event,
$initial_session_cache_extreme is
['.serialize($initial_session_cache_extreme).'] <br />'; }
+ // if ($this->debug > 1) { echo
'email.boaction.delmov ('.__LINE__.'): "big move" will turn off
session_cache_extreme if it was TRUE, so we undo that for the next page view
with: $GLOBALS[phpgw]->msg->session_cache_extreme =
$initial_session_cache_extreme<br />'; }
// $GLOBALS['phpgw']->msg->session_cache_extreme =
$initial_session_cache_extreme;
//}
//else
//{
- // if ($this->debug > 1) { echo
'email.boaction.delmov ('.__LINE__.'): $initial_session_cache_extreme is either
NOT set or is "-1", meaning we did NOT issued a "big move" cache event
earlier<br>'; }
+ // if ($this->debug > 1) { echo
'email.boaction.delmov ('.__LINE__.'): $initial_session_cache_extreme is either
NOT set or is "-1", meaning we did NOT issued a "big move" cache event
earlier<br />'; }
//}
// imitate the next menuaction command with direct
object calls
- if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
LEAVING by creating "next_obj" and calling its menuaction verb ...<br>'); }
+ if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
LEAVING by creating "next_obj" and calling its menuaction verb ...<br />'); }
if (stristr($my_menuaction, 'uimessage'))
{
//// NEW: mail so object group fill may need to
be reset
@@ -608,7 +609,7 @@
// (e) cleanup
if (is_object($GLOBALS['phpgw']->msg))
{
- if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'): oops,
not LEFT yet, cleanup and unset ->msg object<br>'); }
+ if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'): oops,
not LEFT yet, cleanup and unset ->msg object<br />'); }
// close down ALL mailserver streams
$GLOBALS['phpgw']->msg->end_request();
// destroy the object
@@ -616,163 +617,37 @@
unset($GLOBALS['phpgw']->msg);
}
// shut down this transaction
- if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
LEAVING for <b>real</b> with $GLOBALS[phpgw]->common->phpgw_exit(False)<br>'); }
+ if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'):
LEAVING for <b>real</b> with $GLOBALS[phpgw]->common->phpgw_exit(False)<br
/>'); }
$GLOBALS['phpgw']->common->phpgw_exit(False);
}
-
- /*
- // placeholder for previous test code
- function just_a_placeholder()
- {
- // NOW GOTO THE NEXT PAGE SPECIFIED IN THIS->REDIRECT_TO
- // VIA REDIRECT OR DIRECT OBJECT CALL
- if ($this->redirect_to != '')
- {
- if ($this->debug > 0) { echo
'email.boaction.delmov ('.__LINE__.'): next pageview redirect data to use is:
['.$this->redirect_to.']<br>'; }
-
- // Experimental:
- // NO REDIRECT - DIRECTLY MANUFACTURE THE NEXT
PAGE VIEW RIGHT NOW
- // RECOVED ENV DATA FROM THE REDIRECT URI STRING
- $recovered_data = array();
- parse_str($this->redirect_to, $recovered_data);
-
- if ($this->debug > 1) { echo
'email.boaction.delmov ('.__LINE__.'): redirect_to parsed_str $recovered_data
DUMP:<pre>'; print_r($recovered_data); echo '</pre>'; }
- // ALL POSSIBLE VARS WE MIGHT FIND IN THE
REDIRECT URI:
- $new_args_env = array(
- '/mail/index_php?menuaction' => '-1',
- 'fldball' => '-1',
- 'msgball' => '-1',
- 'td' => '-1',
- 'tm' => '-1',
- 'tf' => '-1',
- 'sort' => '-1',
- 'order' => '-1',
- 'start' => '-1'
- );
- if ($this->debug > 1) { echo
'email.boaction.delmov ('.__LINE__.'): known possible recovered_data elements
init $new_args_env DUMP:<pre>'; print_r($new_args_env); echo '</pre>'; }
- // loop thru KNOWN POSSIBLE new_args_env
elements, GATHER the ones that are filled for later use
- reset($new_args_env);
- while(list($key,$value) = each($new_args_env))
- {
- $known_arg = $key;
- if ((isset($recovered_data[$known_arg]))
- && ((string)$recovered_data[$known_arg]
!= ''))
- {
- // we have a arg to use for the
next page view
- $new_args_env[$key] =
$recovered_data[$known_arg];
- }
- }
- reset($new_args_env);
-
- // GET GOOD ACCTNUM FOR THE UNSET COMMANDS BELOW
- // (and also get other useful info while we are
at it
- if ($new_args_env['fldball'] != '-1')
- {
- $new_acctnum =
(int)$new_args_env['fldball']['acctnum'];
- $new_folder =
$new_args_env['fldball']['folder'];
- }
- elseif ($new_args_env['msgball'] != '-1')
- {
- $new_acctnum =
(int)$new_args_env['msgball']['acctnum'];
- $new_folder =
$new_args_env['msgball']['folder'];
- // IMITATION: during grab_args_gpc, the
code add an element [uri] to the existing msgball
- // NOTE that for this uri element, the
"folder" string shoulf be urlencoded
- $new_uri_element =
'msgball[msgnum]='.$new_args_env['msgball']['msgnum']
-
.'&msgball[folder]='.urlencode($new_args_env['msgball']['folder'])
-
.'&msgball[acctnum]='.$new_args_env['msgball']['acctnum'];
- $new_args_env['msgball']['uri'] =
$new_uri_element;
- }
- else
- {
- echo 'email.boaction.delmov: LINE
'.__LINE__.': ERROR getting valid acctnum for goto pageview, NO fldball NO
msgball found <br>';
- }
- if ($this->debug > 1) { echo
'email.boaction.delmov ('.__LINE__.'): known possible recovered_data elements
<b>Post-Gather</b> $new_args_env DUMP:<pre>'; print_r($new_args_env); echo
'</pre>'; }
- if ($this->debug > 1) { echo
'email.boaction.delmov ('.__LINE__.'): will use $new_acctnum
['.$new_acctnum.']; and $new_folder ['.$new_folder.'], BUT FIRST unset
selected existing class args <br>'; }
-
- // UNSET ARGS WE USED IN THIS PAGE BUT ARE NO
LONGER NEEDED
-
$GLOBALS['phpgw']->msg->unset_arg('delmov_list', $new_acctnum);
-
$GLOBALS['phpgw']->msg->unset_arg('to_fldball_fake_uri', $new_acctnum);
- $GLOBALS['phpgw']->msg->unset_arg('to_fldball',
$new_acctnum);
-
$GLOBALS['phpgw']->msg->unset_arg('move_postmove_goto', $new_acctnum);
- $GLOBALS['phpgw']->msg->unset_arg('sort',
$new_acctnum);
- $GLOBALS['phpgw']->msg->unset_arg('order',
$new_acctnum);
- $GLOBALS['phpgw']->msg->unset_arg('start',
$new_acctnum);
- $GLOBALS['phpgw']->msg->unset_arg('what',
$new_acctnum);
- $GLOBALS['phpgw']->msg->unset_arg('folder',
$new_acctnum);
- $GLOBALS['phpgw']->msg->unset_arg('acctnum',
$new_acctnum);
-
- // REFILL ARGS WITH NEW PAGE VIEW VALUES
- // (a) set the very important acctnum arg we
collected earlier, and also the folder arg, because these values are _derived_
values
- // they are not plainly in the $new_args_env as
simple key and value elements, they were derived from some of them, though
-
$GLOBALS['phpgw']->msg->set_acctnum($new_acctnum);
- $GLOBALS['phpgw']->msg->set_arg_value('folder',
$new_folder, $new_acctnum);
-
- // (b) LOOP thru Gathered Args, setting the
class args to those values
- reset($new_args_env);
- while(list($key,$value) = each($new_args_env))
- {
- $arg_name = $key;
- $arg_value = $new_args_env[$key];
- // we do not set mail_msg class arg for
'index_php?menuaction'
- if (($arg_name !=
'index_php?menuaction')
- && ($arg_value != '-1'))
- {
-
$GLOBALS['phpgw']->msg->set_arg_value($arg_name, $arg_value, $new_acctnum);
- }
- }
- // (c) IF A "BIG MOVE", THEN TURN BACK ON THE
SMART CACHE
- // MOVED TO MSG CLASS
- //if ((isset($initial_session_cache_extreme))
- //&& ($initial_session_cache_extreme != '-1'))
- //{
- //
$GLOBALS['phpgw']->msg->session_cache_extreme = $initial_session_cache_extreme;
- //}
- // (d) make object and issue command
- $new_menuaction =
$new_args_env['index_php?menuaction'];
- if ($this->debug > 1 || $this->debug_new_env >
1) { echo 'email.boaction.delmov ('.__LINE__.'): $new_menuaction
['.$new_menuaction.'] <br>'; }
- if (stristr($new_menuaction, 'uimessage'))
- {
- // MAKE THE UIMESSAGE PAGE OBJECT
- $this->next_obj =
CreateObject('email.uimessage');
- // CALL THE FUNCTION THAT DISPLAYS THE
PAGE VIEW
- $this->next_obj->message();
- }
- // else just ASSUME uiindex, it is the most
forgiving about missing values, it has fallback defaults to use if needed
- else
- {
- // MAKE THE INDEX PAGE OBJECT
- $this->next_obj =
CreateObject('email.uiindex');
- // CALL THE FUNCTION THAT DISPLAYS THE
PAGE VIEW
- $this->next_obj->index();
- }
- // (e) cleanup
- if (is_object($GLOBALS['phpgw']->msg))
- {
- // close down ALL mailserver streams
- $GLOBALS['phpgw']->msg->end_request();
- // destroy the object
- $GLOBALS['phpgw']->msg = '';
- unset($GLOBALS['phpgw']->msg);
- }
- // shut down this transaction
- $GLOBALS['phpgw']->common->phpgw_exit(False);
- }
- else
- {
- if ($this->debug > 0) { echo
'email.boaction.delmov ('.__LINE__.'): LEAVING, with ERROR, unhandled "where to
go from here" condition<br>'; }
- echo 'error: no redirect specified in
'.$GLOBALS['PHP_SELF'].', delmov()'."<br> \r\n"
- .'error_str: '.$error_str."<br> \r\n";
- // close down ALL mailserver streams
- $GLOBALS['phpgw']->msg->end_request();
- // destroy the object
- $GLOBALS['phpgw']->msg = '';
- unset($GLOBALS['phpgw']->msg);
- // shut down this transaction
- $GLOBALS['phpgw']->common->phpgw_exit(False);
- }
- }
+
+ /**
+ * Empty "trash" folder
+ *
+ * @internal This is sh!t design - but I didn't do the class
model :P
+ * @author skwashd
*/
-
+ function empty_trash()
+ {
+ $this->msg_bootstrap =
CreateObject('email.msg_bootstrap');
+
$this->msg_bootstrap->ensure_mail_msg_exists('email.boaction.empty_trash',
$this->debug);
+
+ $acctnum = $GLOBALS['phpgw']->msg->get_acctnum();
+ $folder =
$GLOBALS['phpgw']->msg->get_folder_long($GLOBALS['phpgw']->msg->get_pref_value('trash_folder_name',
$acctnum));
+
$GLOBALS['phpgw']->msg->event_begin_big_move(array('folder' => $folder,
'acctnum' => $acctnum), 'bo_action::empty_trash');
+ $GLOBALS['phpgw']->msg->empty_trash( $acctnum );
+
$GLOBALS['phpgw']->msg->event_begin_big_end('bo_action::empty_trash');
+
+ $folder = 'INBOX.' .
$GLOBALS['phpgw']->msg->get_pref_value('trash_folder_name', $acctnum);
+ $GLOBALS['phpgw']->redirect_link('/index.php',
+ array(
+ 'menuaction'
=> 'email.uiindex.index',
+
'fldball[folder]' => $folder,
+
'fldball[acctnum]' => $acctnum
+ )
+ );
+ }
+
/*!
@function set_expected_args
@abstract Tells "new_args_env" what args may be present in the
"set_new_args_uri" data. WHY
@@ -791,8 +666,8 @@
*/
function set_expected_args($comma_set_str='-1')
{
- if ($this->debug_new_env > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.set_expected_args
('.__LINE__.'): ENTERING<br>'); }
- if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.set_expected_args
('.__LINE__.'): param $comma_set_str: ['.$comma_set_str.'] <br>'); }
+ if ($this->debug_new_env > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.set_expected_args
('.__LINE__.'): ENTERING<br />'); }
+ if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.set_expected_args
('.__LINE__.'): param $comma_set_str: ['.$comma_set_str.'] <br />'); }
$exploded_expected_args = array();
$exploded_expected_args = explode(',',$comma_set_str);
if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.set_expected_args
('.__LINE__.'): $exploded_expected_args DUMP:', $exploded_expected_args); }
@@ -806,7 +681,7 @@
$this->expected_args[$arg_name] = '-1';
}
if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.set_expected_args
('.__LINE__.'): $this->expected_args DUMP:', $this->expected_args); }
- if ($this->debug_new_env > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.set_expected_args
('.__LINE__.'): LEAVING<br>'); }
+ if ($this->debug_new_env > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.set_expected_args
('.__LINE__.'): LEAVING<br />'); }
}
/*!
@@ -821,9 +696,9 @@
*/
function set_new_args_uri($new_args_uri='-1')
{
- if ($this->debug_new_env > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.set_new_args_uri
('.__LINE__.'): ENTERING, $new_args_uri ['.$new_args_uri.']<br>'); }
+ if ($this->debug_new_env > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.set_new_args_uri
('.__LINE__.'): ENTERING, $new_args_uri ['.$new_args_uri.']<br />'); }
$this->new_args_uri = $new_args_uri;
- if ($this->debug_new_env > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): LEAVING<br>'); }
+ if ($this->debug_new_env > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): LEAVING<br />'); }
}
/*!
@@ -852,7 +727,7 @@
*/
function apply_new_args_env()
{
- if ($this->debug_new_env > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): ENTERING<br>'); }
+ if ($this->debug_new_env > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): ENTERING<br />'); }
$recovered_data = array();
if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): source data is $this->new_args_uri DUMP:',
$this->new_args_uri); }
parse_str($this->new_args_uri, $recovered_data);
@@ -860,7 +735,7 @@
// NOTE PARSE_STR ***WILL ADD SLASHES*** TO ESCAPE
QUOTES
// NO MATTER WHAT YOUR MAGIC SLASHES SETTING IS
- if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): NOTE PARSE_STR ***WILL ADD SLASHES*** TO ESCAPE QUOTES NO
MATTER WHAT YOUR MAGIC SLASHES SETTING IS **stripping slashes NOW*** from any
folder names'.'<br>'); }
+ if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): NOTE PARSE_STR ***WILL ADD SLASHES*** TO ESCAPE QUOTES NO
MATTER WHAT YOUR MAGIC SLASHES SETTING IS **stripping slashes NOW*** from any
folder names'.'<br />'); }
if (isset($recovered_data['fldball']['folder']))
{
$recovered_data['fldball']['folder'] =
stripslashes($recovered_data['fldball']['folder']);
@@ -887,7 +762,7 @@
reset($new_args_env);
while(list($key,$value) = each($new_args_env))
{
- if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out(' * ('.__LINE__.') $key: ['.$key.'] $value:
['.$value.']<br>'); }
+ if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out(' * ('.__LINE__.') $key: ['.$key.'] $value:
['.$value.']<br />'); }
$known_arg = $key;
//handle the special URI not match case
if ($key == 'index_php?menuaction')
@@ -896,7 +771,7 @@
reset($recovered_data);
while(list($recovered_key,$recovered_value) = each($recovered_data))
{
- if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out(' * * ('.__LINE__.') $recovered_key:
['.$recovered_key.'] $recovered_value: ['.$recovered_value.']<br>'); }
+ if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out(' * * ('.__LINE__.') $recovered_key:
['.$recovered_key.'] $recovered_value: ['.$recovered_value.']<br />'); }
if (stristr($recovered_key,
'menuaction'))
{
$new_args_env[$key] =
$recovered_data[$recovered_key];
@@ -904,7 +779,7 @@
break;
}
}
- if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out(' ** found menuaction ** ('.__LINE__.')
['.$recovered_data[$recovered_key].']<br>'); }
+ if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out(' ** found menuaction ** ('.__LINE__.')
['.$recovered_data[$recovered_key].']<br />'); }
}
elseif ((isset($recovered_data[$known_arg]))
&& ((string)$recovered_data[$known_arg] != ''))
@@ -917,7 +792,7 @@
if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): FIRST PASS filled available known possible recovered_data
elements <b>Post-Gather</b> $new_args_env DUMP:', $new_args_env); }
// we are NOT DONE yet, extract some more args that we
derive from what we gathered so far
- if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): ADDITIONALLY extract embedded "*ball" items "acctnum" and
"folder" AND if a "msgball", add a "uri" element to it<br>'); }
+ if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): ADDITIONALLY extract embedded "*ball" items "acctnum" and
"folder" AND if a "msgball", add a "uri" element to it<br />'); }
// GET GOOD ACCTNUM FOR THE UNSET COMMANDS BELOW
// and also get other useful info while we are at it
(folder), and if we find a "msgball", make and add to it a "uri" element
if ($new_args_env['fldball'] != '-1')
@@ -940,39 +815,39 @@
}
else
{
- echo 'email.boaction.apply_new_args_env: LINE
'.__LINE__.': ERROR getting valid acctnum for goto pageview, NO fldball NO
msgball found <br>';
-
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env: LINE
'.__LINE__.': ERROR getting valid acctnum for goto pageview, NO fldball NO
msgball found <br>');
+ echo 'email.boaction.apply_new_args_env: LINE
'.__LINE__.': ERROR getting valid acctnum for goto pageview, NO fldball NO
msgball found <br />';
+
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env: LINE
'.__LINE__.': ERROR getting valid acctnum for goto pageview, NO fldball NO
msgball found <br />');
}
- if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): extracted additional data: will use $new_acctnum
['.$new_acctnum.']; and $new_folder ['.$new_folder.'] <br>'); }
+ if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): extracted additional data: will use $new_acctnum
['.$new_acctnum.']; and $new_folder ['.$new_folder.'] <br />'); }
if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): FINAL filled available known possible recovered_data elements
<b>Post-Gather</b> $new_args_env DUMP:', $new_args_env); }
// UNSET ARGS WE USED IN THIS PAGE BUT ARE NO LONGER
NEEDED
// HELL, JUST UNSET ALL EXTERNAL ARGS
- if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): unset ALL known external class args as defined in array
$GLOBALS[phpgw]->msg->known_external_args<br>'); }
+ if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): unset ALL known external class args as defined in array
$GLOBALS[phpgw]->msg->known_external_args<br />'); }
$loops =
count($GLOBALS['phpgw']->msg->known_external_args);
for ($i = 0; $i < $loops; $i++)
{
$arg_name =
$GLOBALS['phpgw']->msg->known_external_args[$i];
if
($GLOBALS['phpgw']->msg->get_isset_arg($arg_name, $new_acctnum) == True)
{
- if ($this->debug_new_env > 2) {
$GLOBALS['phpgw']->msg->dbug->out(' * email.boaction.apply_new_args_env
('.__LINE__.'):UNSETTING with $GLOBALS[phpgw]->msg->unset_arg('.$arg_name.',
'.$new_acctnum.') <br>'); }
+ if ($this->debug_new_env > 2) {
$GLOBALS['phpgw']->msg->dbug->out(' * email.boaction.apply_new_args_env
('.__LINE__.'):UNSETTING with $GLOBALS[phpgw]->msg->unset_arg('.$arg_name.',
'.$new_acctnum.') <br />'); }
$GLOBALS['phpgw']->msg->unset_arg($arg_name, $new_acctnum);
}
else
{
- if ($this->debug_new_env > 2) {
$GLOBALS['phpgw']->msg->dbug->out(' * email.boaction.apply_new_args_env
('.__LINE__.'): <i>was not set $arg_name ['.$arg_name.']; and $new_acctnum
['.$new_acctnum.']</i><br>'); }
+ if ($this->debug_new_env > 2) {
$GLOBALS['phpgw']->msg->dbug->out(' * email.boaction.apply_new_args_env
('.__LINE__.'): <i>was not set $arg_name ['.$arg_name.']; and $new_acctnum
['.$new_acctnum.']</i><br />'); }
}
}
// REFILL ARGS WITH NEW PAGE VIEW VALUES
// (a) set the very important acctnum arg we collected
earlier, and also the folder arg, because these values are _derived_ values
// they are not plainly in the $new_args_env as simple
key and value elements, they were derived from some of them, though
- if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): BEGIN setting new arg env by setting the "new_acctnum" and
"new_folder"<br>'); }
+ if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): BEGIN setting new arg env by setting the "new_acctnum" and
"new_folder"<br />'); }
$GLOBALS['phpgw']->msg->set_acctnum($new_acctnum);
$GLOBALS['phpgw']->msg->set_arg_value('folder',
$new_folder, $new_acctnum);
// (b) LOOP thru Gathered Args, setting the class args
to those values
- if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): continue by LOOPING thru Final Gathered Args, setting the class
args to those values that are not still "-1" (that data was found for)<br>'); }
+ if ($this->debug_new_env > 1) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): continue by LOOPING thru Final Gathered Args, setting the class
args to those values that are not still "-1" (that data was found for)<br />');
}
reset($new_args_env);
while(list($key,$value) = each($new_args_env))
{
@@ -982,12 +857,12 @@
if ((!stristr($arg_name,
'index_php?menuaction'))
&& ($arg_value != '-1'))
{
- if ($this->debug_new_env > 2) {
$GLOBALS['phpgw']->msg->dbug->out(' * email.boaction.apply_new_args_env
('.__LINE__.'): calling $GLOBALS[phpgw]->msg->set_arg_value('.$arg_name.',
'.$arg_value.', '.$new_acctnum.') <br>'); }
+ if ($this->debug_new_env > 2) {
$GLOBALS['phpgw']->msg->dbug->out(' * email.boaction.apply_new_args_env
('.__LINE__.'): calling $GLOBALS[phpgw]->msg->set_arg_value('.$arg_name.',
'.$arg_value.', '.$new_acctnum.') <br />'); }
$GLOBALS['phpgw']->msg->set_arg_value($arg_name, $arg_value, $new_acctnum);
}
}
//$my_menuaction =
$new_args_env['/mail/index_php?menuaction'];
- if ($this->debug_new_env > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): LEAVING, returning next menuaction command $my_menuaction
['.$my_menuaction.'] <br>'); }
+ if ($this->debug_new_env > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.apply_new_args_env
('.__LINE__.'): LEAVING, returning next menuaction command $my_menuaction
['.$my_menuaction.'] <br />'); }
return $my_menuaction;
}
@@ -1013,7 +888,7 @@
$this->msg_bootstrap =
CreateObject('email.msg_bootstrap');
$this->msg_bootstrap->ensure_mail_msg_exists('email.boaction.get_attach',
$this->debug);
- if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.get_attach: creating
$this->browser <br>'); }
+ if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.get_attach: creating
$this->browser <br />'); }
$this->browser = CreateObject('phpgwapi.browser');
$msgball =
$GLOBALS['phpgw']->msg->get_arg_value('msgball');
@@ -1040,8 +915,8 @@
//$this->browser->content_header($GLOBALS['phpgw']->msg->get_arg_value('name'),
$mime);
////echo 'get all args dump<pre>';
print_r($GLOBALS['phpgw']->msg->get_all_args()); echo '</pre>';
- ////echo '$mime: ['.$mime.']<br>';
- ////echo
'$GLOBALS[phpgw]->msg->get_arg_value(encoding):
['.$GLOBALS['phpgw']->msg->get_arg_value('encoding').']<br>';
+ ////echo '$mime: ['.$mime.']<br />';
+ ////echo
'$GLOBALS[phpgw]->msg->get_arg_value(encoding):
['.$GLOBALS['phpgw']->msg->get_arg_value('encoding').']<br />';
// ---- 'irregular' "view raw message" functionality
----
if ($msgball['part_no'] == 'raw_message')
@@ -1129,7 +1004,7 @@
$this->msg_bootstrap =
CreateObject('email.msg_bootstrap');
$this->msg_bootstrap->ensure_mail_msg_exists('email.boaction.get_attach',
$this->debug);
- if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.view_html: creating
$this->browser <br>'); }
+ if ($this->debug > 0) {
$GLOBALS['phpgw']->msg->dbug->out('email.boaction.view_html: creating
$this->browser <br />'); }
$this->browser = CreateObject('phpgwapi.browser');
//$this->browser->content_header($name,$mime);
====================================================
====================================================
Index: email/inc/class.mail_dcom_pop3_sock.inc.php
diff -u email/inc/class.mail_dcom_pop3_sock.inc.php:1.20
email/inc/class.mail_dcom_pop3_sock.inc.php:1.21
--- email/inc/class.mail_dcom_pop3_sock.inc.php:1.20 Fri Mar 14 04:00:55 2003
+++ email/inc/class.mail_dcom_pop3_sock.inc.php Sun Mar 13 23:22:44 2005
@@ -45,7 +45,7 @@
function createmailbox($stream,$mailbox)
{
// N/A for pop3
- if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: createmailbox<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: createmailbox<br />'; }
return true;
}
/*!
@@ -55,7 +55,7 @@
function deletemailbox($stream,$mailbox)
{
// N/A for pop3
- if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: deletemailbox<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: deletemailbox<br />'; }
return true;
}
/*!
@@ -65,7 +65,7 @@
function expunge($stream)
{
// N/A for pop3
- if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: expunge<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: expunge<br />'; }
return true;
}
/*!
@@ -75,7 +75,7 @@
function listmailbox($stream,$ref,$pattern)
{
// N/A for pop3
- if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: listmailbox (probable namespace discovery
attempt)<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: listmailbox (probable namespace discovery attempt)<br
/>'; }
return False;
}
/*!
@@ -85,7 +85,7 @@
function mailcopy($stream,$msg_list,$mailbox,$flags)
{
// N/A for pop3
- if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: mailcopy<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: mailcopy<br />'; }
return False;
}
/*!
@@ -95,7 +95,7 @@
function mail_move($stream,$msg_list,$mailbox)
{
// N/A for pop3
- if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: mail_move<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: mail_move<br />'; }
return False;
}
/*!
@@ -105,7 +105,7 @@
function reopen($stream,$mailbox,$flags = "")
{
// N/A for pop3
- if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: reopen<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: reopen<br />'; }
return False;
}
/*!
@@ -115,7 +115,7 @@
function append($stream, $folder = "Sent", $header, $body,
$flags = "")
{
// N/A for pop3
- if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: append<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: call to
unused function in POP3: append<br />'; }
return False;
}
/**************************************************************************\
@@ -128,7 +128,7 @@
function fetch_overview($stream,$sequence,$flags)
{
// not yet implemented
- if ($this->debug_dcom >= 1) { echo 'pop3: call to
not-yet-implemented function in POP3: fetch_overview<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: call to
not-yet-implemented function in POP3: fetch_overview<br />'; }
return False;
}
/*!
@@ -138,7 +138,7 @@
function noop_ping_test($stream)
{
// not yet implemented
- if ($this->debug_dcom >= 1) { echo 'pop3: call to
unimplemented socket function: noop_ping_test<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: call to
unimplemented socket function: noop_ping_test<br />'; }
return False;
}
/*!
@@ -148,7 +148,7 @@
function server_last_error()
{
// not yet implemented
- if ($this->debug_dcom >= 1) { echo 'pop3: call to
not-yet-implemented socket function: server_last_error<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: call to
not-yet-implemented socket function: server_last_error<br />'; }
return '';
}
@@ -169,7 +169,7 @@
*/
function open ($fq_folder, $user, $pass, $flags='')
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
open<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
open<br />'; }
// fq_folder is a "fully qualified folder", seperate
the parts:
$svr_data = array();
@@ -177,12 +177,12 @@
$folder = $svr_data['folder'];
$server = $svr_data['server'];
$port = $svr_data['port'];
- if ($this->debug_dcom >= 1) { echo 'pop3: open:
svr_data:<br>'.serialize($svr_data).'<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: open:
svr_data:<br />'.serialize($svr_data).'<br />'; }
//$port = 110;
if (!$this->open_port($server,$port,15))
{
- echo '<p><center><b>' . lang('There was an
error trying to connect to your POP3 server.<br>Please contact your admin to
check the servername, username or password.').'</b></center>';
+ echo '<p><center><b>' . lang('There was an
error trying to connect to your POP3 server.<br />Please contact your admin to
check the servername, username or password.').'</b></center>';
echo('<CENTER><A
HREF="'.$GLOBALS['phpgw']->link('/home.php').'">'.lang('Click here to
continue').'...</A></CENTER>'); //cbsman
$GLOBALS['phpgw']->common->phpgw_exit();
}
@@ -190,14 +190,14 @@
if(!$this->msg2socket('USER '.$user,"^\+ok",&$response)
|| !$this->msg2socket('PASS '.$pass,"^\+ok",&$response))
{
$this->error();
- if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving open with Error<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving open with Error<br />'; }
return False;
}
else
{
- //echo "Successful POP3 Login.<br>\n";
- if ($this->debug_dcom >= 1) { echo 'pop3: open:
Successful POP3 Login<br>'; }
- if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving open<br>'; }
+ //echo "Successful POP3 Login.<br />\n";
+ if ($this->debug_dcom >= 1) { echo 'pop3: open:
Successful POP3 Login<br />'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving open<br />'; }
return $this->socket;
}
}
@@ -217,12 +217,12 @@
if (!$this->msg2socket('QUIT',"^\+ok",&$response))
{
$this->error();
- if ($this->debug_dcom >= 1) { echo 'pop3:
close: Error<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
close: Error<br />'; }
return False;
}
else
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
close: Successful POP3 Logout<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
close: Successful POP3 Logout<br />'; }
return True;
}
}
@@ -241,12 +241,12 @@
*/
function mailboxmsginfo($stream_notused='')
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
mailboxmsginfo<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
mailboxmsginfo<br />'; }
// caching this with POP3 is OK but will cause HAVOC
with IMAP or NNTP
// do we have a cached header_array ?
//if ($this->mailbox_msg_info != '')
//{
- // if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving mailboxmsginfo returning cached data<br>'; }
+ // if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving mailboxmsginfo returning cached data<br />'; }
// return $this->mailbox_msg_info;
//}
// NO cached data, so go get it
@@ -276,18 +276,18 @@
{
if ($this->debug_dcom >= 2)
{
- echo 'pop3: mailboxmsginfo:
info->Nmsgs: '.$info->Nmsgs.'<br>';
- echo 'pop3: mailboxmsginfo: info->Size:
'.$info->Size.'<br>';
+ echo 'pop3: mailboxmsginfo:
info->Nmsgs: '.$info->Nmsgs.'<br />';
+ echo 'pop3: mailboxmsginfo: info->Size:
'.$info->Size.'<br />';
}
- if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving mailboxmsginfo<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving mailboxmsginfo<br />'; }
// save this data for future use
//$this->mailbox_msg_info = $info;
return $info;
}
else
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
mailboxmsginfo: returining False<br>'; }
- if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving mailboxmsginfo<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
mailboxmsginfo: returining False<br />'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving mailboxmsginfo<br />'; }
return False;
}
}
@@ -304,7 +304,7 @@
*/
function status($stream_notused='',
$fq_folder='',$options=SA_ALL)
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
status<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
status<br />'; }
// POP3 has only INBOX so ignore $fq_folder
// assume option is SA_ALL for POP3 because POP3
returns so little info anyway
// initialize structure
@@ -325,8 +325,8 @@
$mailbox_msg_info =
$this->mailboxmsginfo($stream_notused);
// all POP3 can return from imap_status is messages
$info->messages = $mailbox_msg_info->Nmsgs;
- if ($this->debug_dcom >= 1) { echo 'pop3: status:
info->messages: '.$info->messages.'<br>'; }
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
status<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: status:
info->messages: '.$info->messages.'<br />'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
status<br />'; }
return $info;
}
@@ -340,13 +340,13 @@
*/
function num_msg($stream_notused='')
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
num_msg<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
num_msg<br />'; }
// Most Efficient Method:
// call mailboxmsginfo and fill THIS size data
from that
$mailbox_msg_info =
$this->mailboxmsginfo($stream_notused);
$return_num_msg = $mailbox_msg_info->Nmsgs;
- if ($this->debug_dcom >= 1) { echo 'pop3: num_msg:
'.$return_num_msg.'<br>'; }
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
num_msg<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: num_msg:
'.$return_num_msg.'<br />'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
num_msg<br />'; }
return $return_num_msg;
}
@@ -378,7 +378,7 @@
*/
function
sort($stream_notused='',$criteria=SORTARRIVAL,$reverse=False,$options='')
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
sort<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
sort<br />'; }
// nr_of_msgs on pop server
$msg_num = $this->num_msg($stream_notused);
@@ -386,20 +386,20 @@
// no msgs - no sort.
if (!$msg_num)
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving sort with Error<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving sort with Error<br />'; }
return false;
}
- if ($this->debug_dcom >= 1) { echo 'pop3: sort: Number
of Msgs:'.$msg_num.'<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: sort: Number
of Msgs:'.$msg_num.'<br />'; }
switch($criteria)
{
case SORTDATE:
- if ($this->debug_dcom >= 1) { echo
'pop3: sort: case SORTDATE<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: sort: case SORTDATE<br />'; }
$old_list =
$this->fetch_header_element(1,$msg_num,'Date');
$field_list =
$this->convert_date_array($old_list);
- if ($this->debug_dcom >= 2) { echo
'pop3: sort: field_list: '.serialize($field_list).'<br><br>'; }
+ if ($this->debug_dcom >= 2) { echo
'pop3: sort: field_list: '.serialize($field_list).'<br /><br />'; }
break;
case SORTARRIVAL:
- if ($this->debug_dcom >= 1) { echo
'pop3: sort: case SORTARRIVAL<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: sort: case SORTARRIVAL<br />'; }
// TEST
if
(!$this->msg2socket('LIST',"^\+ok",&$response))
{
@@ -408,26 +408,26 @@
$response = $this->read_port_glob('.');
// expected array should NOT start at
element 0, instead start it at element 1
$field_list =
$this->glob_to_array($response, False, ' ',True,1);
- if ($this->debug_dcom >= 2) { echo
'pop3: sort: field_list: '.serialize($field_list).'<br><br><br>'; }
+ if ($this->debug_dcom >= 2) { echo
'pop3: sort: field_list: '.serialize($field_list).'<br /><br /><br />'; }
break;
case SORTFROM:
- if ($this->debug_dcom >= 1) { echo
'pop3: sort: case SORTFROM<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: sort: case SORTFROM<br />'; }
$field_list =
$this->fetch_header_element(1,$msg_num,'From');
break;
case SORTSUBJECT:
- if ($this->debug_dcom >= 1) { echo
'pop3: sort: case SORTSUBJECT<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: sort: case SORTSUBJECT<br />'; }
$field_list =
$this->fetch_header_element(1,$msg_num,'Subject');
break;
case SORTTO:
- if ($this->debug_dcom >= 1) { echo
'pop3: sort: case SORTTO<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: sort: case SORTTO<br />'; }
$field_list =
$this->fetch_header_element(1,$msg_num,'To');
break;
case SORTCC:
- if ($this->debug_dcom >= 1) { echo
'pop3: sort: case SORTCC<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: sort: case SORTCC<br />'; }
$field_list =
$this->fetch_header_element(1,$msg_num,'cc');
break;
case SORTSIZE:
- if ($this->debug_dcom >= 1) { echo
'pop3: sort: case SORTSIZE<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: sort: case SORTSIZE<br />'; }
$field_list =
$this->fetch_header_element(1,$msg_num,'Size');
break;
}
@@ -457,12 +457,12 @@
while(list($key,$value) = each($field_list))
{
$return_array[] = $key;
- //echo '('.$i.') Field:
<b>'.$value."</b>\t\tMsg Num: <b>".$key."</b><br>\n";
+ //echo '('.$i.') Field:
<b>'.$value."</b>\t\tMsg Num: <b>".$key."</b><br />\n";
$i++;
}
@reset($return_array);
- if ($this->debug_dcom >= 2) { echo 'pop3: sort:
return_array: '.serialize($return_array).'<br><br>'; }
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
sort<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'pop3: sort:
return_array: '.serialize($return_array).'<br /><br />'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
sort<br />'; }
return $return_array;
}
@@ -472,10 +472,10 @@
*/
function fetch_header_element($start,$stop,$element)
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
fetch_header_element<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
fetch_header_element<br />'; }
for($i=$start;$i<=$stop;$i++)
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
fetch_header_element: issue "TOP '.$i.' 0"<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
fetch_header_element: issue "TOP '.$i.' 0"<br />'; }
if(!$this->write_port('TOP '.$i.' 0'))
{
$this->error();
@@ -484,19 +484,19 @@
if($this->header[$element])
{
$field_element[$i] =
$this->phpGW_quoted_printable_decode2($this->header[$element]);
- //echo $field_element[$i].' =
'.$this->phpGW_quoted_printable_decode2($this->header[$element])."<br>\n";
- if ($this->debug_dcom >= 1) { echo
'pop3: fetch_header_element: field_element['.$i.']:
'.$field_element[$i].'<br>'; }
+ //echo $field_element[$i].' =
'.$this->phpGW_quoted_printable_decode2($this->header[$element])."<br />\n";
+ if ($this->debug_dcom >= 1) { echo
'pop3: fetch_header_element: field_element['.$i.']: '.$field_element[$i].'<br
/>'; }
}
else
{
$field_element[$i] =
$this->phpGW_quoted_printable_decode2($this->header[strtoupper($element)]);
- //echo $field_element[$i].' =
'.$this->phpGW_quoted_printable_decode2($this->header[strtoupper($element)])."<br>\n";
- if ($this->debug_dcom >= 1) { echo
'pop3: fetch_header_element: field_element['.$i.']:
'.$field_element[$i].'<br>'; }
+ //echo $field_element[$i].' =
'.$this->phpGW_quoted_printable_decode2($this->header[strtoupper($element)])."<br
/>\n";
+ if ($this->debug_dcom >= 1) { echo
'pop3: fetch_header_element: field_element['.$i.']: '.$field_element[$i].'<br
/>'; }
}
}
- if ($this->debug_dcom >= 1) { echo 'pop3:
fetch_header_element: field_element:
'.serialize($field_element).'<br><br><br>'; }
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
fetch_header_element<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
fetch_header_element: field_element: '.serialize($field_element).'<br /><br
/><br />'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
fetch_header_element<br />'; }
return $field_element;
}
@@ -519,21 +519,21 @@
function fetchstructure($stream_notused,$msg_num,$flags="")
{
// outer control structure for the multi-pass functions
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
fetchstructure<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
fetchstructure<br />'; }
// do we have a cached fetchstructure ?
if (($this->msg_structure != '')
&& ((int)$this->msg_structure_msgnum ==
(int)($msg_num)))
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
fetchstructure: using cached msg_structure data<br>'; }
- if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving fetchstructure<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
fetchstructure: using cached msg_structure data<br />'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving fetchstructure<br />'; }
return $this->msg_structure;
}
// NO cached fetchstructure data - so make it
// this will fill $this->msg_structure *TopLevel* only
if
($this->fill_toplevel_fetchstructure($stream_notused,$msg_num,$flags) == False)
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving fetchstructure with Error from Toplevel<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving fetchstructure with Error from Toplevel<br />'; }
return False;
}
// by now we have these created and stored (cached)
@@ -555,14 +555,14 @@
if (count($this->msg_structure->parts[$i]) > 0)
{
// grap 3rd level embedded data (if any)
- if ($this->debug_dcom >= 2) { echo
'pop3: fetchstructure: attempting ['.$i.'] 3rd level parts embedded
discovery<br>'; }
+ if ($this->debug_dcom >= 2) { echo
'pop3: fetchstructure: attempting ['.$i.'] 3rd level parts embedded
discovery<br />'; }
// --- Create 3rd Level Sub-Parts
FetchStructure Data (if necessary) ---
// NOTE: param to
create_embeded_fetchstructure is a REFERENCE
$this->create_embeded_fetchstructure(&$this->msg_structure->parts[$i]);
}
else
{
- if ($this->debug_dcom >= 2) { echo
'pop3: fetchstructure: this ['.$i.'] 3rd level part is empty<br>'; }
+ if ($this->debug_dcom >= 2) { echo
'pop3: fetchstructure: this ['.$i.'] 3rd level part is empty<br />'; }
}
}
*/
@@ -582,7 +582,7 @@
for ($lev_1=0; $lev_1 <
count($this->msg_structure->parts) ;$lev_1++)
{
// grap 1st level embedded data (if any)
- if ($this->debug_dcom >= 2) { echo
'<br>***<br>* * * * * * * * *<br>pop3: fetchstructure: attempting
this->msg_structure->parts['.$lev_1.'] of
['.(string)(count($this->msg_structure->parts)-1).'] embedded parts discovery *
* * * *<br>'; }
+ if ($this->debug_dcom >= 2) { echo '<br
/>***<br />* * * * * * * * *<br />pop3: fetchstructure: attempting
this->msg_structure->parts['.$lev_1.'] of
['.(string)(count($this->msg_structure->parts)-1).'] embedded parts discovery *
* * * *<br />'; }
// Create Sub-Parts FetchStructure Data
(if necessary) ---
// NOTE: param to
create_embeded_fetchstructure is a REFERENCE
$this->create_embeded_fetchstructure(&$this->msg_structure->parts[$lev_1]);
@@ -594,7 +594,7 @@
for ($lev_2=0; $lev_2 <
count($tmp_lev_1->parts) ;$lev_2++)
{
// grap 2nd level
embedded data (if any)
- if ($this->debug_dcom
>= 2) { echo '<br>***<br>* * * * * * * * *<br>pop3: fetchstructure: attempting
this->msg_structure->parts['.$lev_1.']->parts['.$lev_2.'] of
['.(string)(count($tmp_lev_1->parts)-1).'] embedded parts discovery * * * *
*<br>'; }
+ if ($this->debug_dcom
>= 2) { echo '<br />***<br />* * * * * * * * *<br />pop3: fetchstructure:
attempting this->msg_structure->parts['.$lev_1.']->parts['.$lev_2.'] of
['.(string)(count($tmp_lev_1->parts)-1).'] embedded parts discovery * * * *
*<br />'; }
// Create Sub-Parts
FetchStructure Data (if necessary) ---
// NOTE: param to
create_embeded_fetchstructure is a REFERENCE
$this->create_embeded_fetchstructure(&$tmp_lev_1->parts[$lev_2]);
@@ -606,7 +606,7 @@
for ($lev_3=0;
$lev_3 < count($tmp_lev_2->parts) ;$lev_3++)
{
// grap
3rd level embedded data (if any)
- if
($this->debug_dcom >= 2) { echo '<br>***<br>* * * * * * * * *<br>pop3:
fetchstructure: attempting
this->msg_structure->parts['.$lev_1.']->parts['.$lev_2.']->parts['.$lev_3.'] of
['.(string)(count($tmp_lev_2->parts)-1).'] embedded parts discovery * * * *
*<br>'; }
+ if
($this->debug_dcom >= 2) { echo '<br />***<br />* * * * * * * * *<br />pop3:
fetchstructure: attempting
this->msg_structure->parts['.$lev_1.']->parts['.$lev_2.']->parts['.$lev_3.'] of
['.(string)(count($tmp_lev_2->parts)-1).'] embedded parts discovery * * * *
*<br />'; }
//
Create 3rd Level Sub-Parts FetchStructure Data (if necessary) ---
//
NOTE: param to create_embeded_fetchstructure is a REFERENCE
$this->create_embeded_fetchstructure(&$tmp_lev_2->parts[$lev_3]);
@@ -618,7 +618,7 @@
for ($lev_4=0; $lev_4 < count($tmp_lev_3->parts) ;$lev_4++)
{
// grap 3rd level embedded data (if any)
-
if ($this->debug_dcom >= 2) { echo '<br>***<br>* * * * * * * *
*<br>pop3: fetchstructure: attempting
this->msg_structure->parts['.$lev_1.']->parts['.$lev_2.']->parts['.$lev_3.']->parts['.$lev_4.']
of ['.(string)(count($tmp_lev_3->parts)-1).'] embedded parts discovery * * * *
*<br>'; }
+
if ($this->debug_dcom >= 2) { echo '<br />***<br />* * * * * * * * *<br
/>pop3: fetchstructure: attempting
this->msg_structure->parts['.$lev_1.']->parts['.$lev_2.']->parts['.$lev_3.']->parts['.$lev_4.']
of ['.(string)(count($tmp_lev_3->parts)-1).'] embedded parts discovery * * * *
*<br />'; }
// Create Sub-Parts FetchStructure Data (if necessary) ---
// NOTE: param to create_embeded_fetchstructure is a REFERENCE
$this->create_embeded_fetchstructure(&$tmp_lev_3->parts[$lev_4]);
@@ -626,37 +626,37 @@
}
else
{
-
if ($this->debug_dcom >= 2) { echo '<br>***<br>pop3: fetchstructure: Traversal
SKIP FOUTRH PASS level parts NOT SET<br>'; }
+
if ($this->debug_dcom >= 2) { echo '<br />***<br />pop3: fetchstructure:
Traversal SKIP FOUTRH PASS level parts NOT SET<br />'; }
}
}
}
else
{
- if
($this->debug_dcom >= 2) { echo '<br>***<br>pop3: fetchstructure: Traversal
SKIP THIRD PASS level parts NOT SET<br>'; }
+ if
($this->debug_dcom >= 2) { echo '<br />***<br />pop3: fetchstructure: Traversal
SKIP THIRD PASS level parts NOT SET<br />'; }
}
}
}
else
{
- if ($this->debug_dcom >= 2) {
echo '<br>***<br>pop3: fetchstructure: Traversal SKIP SECOND PASS level parts
NOT SET<br>'; }
+ if ($this->debug_dcom >= 2) {
echo '<br />***<br />pop3: fetchstructure: Traversal SKIP SECOND PASS level
parts NOT SET<br />'; }
}
}
}
else
{
- if ($this->debug_dcom >= 2) { echo 'pop3:
fetchstructure: Traversal SKIP FIRST PARTS level parts NOT SET<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'pop3:
fetchstructure: Traversal SKIP FIRST PARTS level parts NOT SET<br />'; }
}
- if ($this->debug_dcom >= 2) { echo '<br>***<br>pop3:
fetchstructure: * * * * * * Traversal OVER * * * * * * * * * * <br>'; }
+ if ($this->debug_dcom >= 2) { echo '<br />***<br
/>pop3: fetchstructure: * * * * * * Traversal OVER * * * * * * * * * * <br />';
}
if ($this->debug_dcom >= 2)
{
- echo '<br>dumping fetchstructure FINAL data:
<br>';
+ echo '<br />dumping fetchstructure FINAL data:
<br />';
var_dump($this->msg_structure);
- echo '<br><br><br>';
+ echo '<br /><br /><br />';
}
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
fetchstructure<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
fetchstructure<br />'; }
return $this->msg_structure;
}
@@ -673,7 +673,7 @@
*/
function
fill_toplevel_fetchstructure($stream_notused,$msg_num,$flags="")
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
fill_toplevel_fetchstructure<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
fill_toplevel_fetchstructure<br />'; }
// --- Header Array ---
$header_array =
$this->get_header_array($stream_notused,$msg_num,$flags);
@@ -682,7 +682,7 @@
if ((count($this->body_array) > 0)
&& ((int)$this->body_array_msgnum == (int)($msg_num)))
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
fill_toplevel_fetchstructure: using cached body_array data<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
fill_toplevel_fetchstructure: using cached body_array data<br />'; }
$body_array = $this->body_array;
}
else
@@ -699,20 +699,20 @@
{
echo '+['.$i.']
'.htmlspecialchars($this->body_array[$i])."\r\n";
}
- echo '</pre><br><br>';
+ echo '</pre><br /><br />';
}
}
if ($this->debug_dcom >= 2)
{
- echo 'pop3: fill_toplevel_fetchstructure
header_array iteration:<br>';
+ echo 'pop3: fill_toplevel_fetchstructure
header_array iteration:<br />';
for($i=0;$i < count($header_array);$i++)
{
- echo
'+'.htmlspecialchars($header_array[$i]).'<br>';
+ echo
'+'.htmlspecialchars($header_array[$i]).'<br />';
}
}
if (!$header_array)
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving fill_toplevel_fetchstructure with error<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving fill_toplevel_fetchstructure with error<br />'; }
return False;
}
@@ -732,7 +732,7 @@
if (!$this->msg2socket('LIST
'.$msg_num,"^\+ok",&$response))
{
$this->error();
- if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving fill_toplevel_fetchstructure with error<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving fill_toplevel_fetchstructure with error<br />'; }
return False;
}
$list_response = explode(' ',$response);
@@ -771,11 +771,11 @@
$this->unset_unfilled_fetchstructure(&$this->msg_structure);
if ($this->debug_dcom >= 2)
{
- echo '<br>dumping fill_toplevel_fetchstructure
TOP-LEVEL data: <br>';
+ echo '<br />dumping
fill_toplevel_fetchstructure TOP-LEVEL data: <br />';
var_dump($this->msg_structure);
- echo '<br><br><br>';
+ echo '<br /><br /><br />';
}
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
fill_toplevel_fetchstructure<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
fill_toplevel_fetchstructure<br />'; }
return True;
}
@@ -790,7 +790,7 @@
*/
function create_embeded_fetchstructure($info)
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
create_embeded_fetchstructure<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
create_embeded_fetchstructure<br />'; }
// --- Do We Have SubParts To Discover ---
// Test 1: Detect Boundary Paramaters
@@ -815,14 +815,14 @@
&& (count($info->parts) == 0))
{
// Boundry Based Multi-Part MIME In Need Of
Discovered
- if ($this->debug_dcom >= 1) { echo 'pop3:
create_embeded_fetchstructure: Discovery Needed for boundary param:
'.$info->custom['my_cookie'].'<br>'; }
- if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: begin "mime loop", iterate thru body_array<br>';
}
+ if ($this->debug_dcom >= 1) { echo 'pop3:
create_embeded_fetchstructure: Discovery Needed for boundary param:
'.$info->custom['my_cookie'].'<br />'; }
+ if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: begin "mime loop", iterate thru body_array<br
/>'; }
// look for any parts using this boundary/cookie
for ($x=0; $x < count($this->body_array) ;$x++)
{
// search line by line thru the body
$body_line = $this->body_array[$x];
- if ($this->debug_dcom >= 2) { echo
'pop3: create_embeded_fetchstructure: mime loop ['.$x.']:
'.htmlspecialchars($body_line).'<br>'; }
+ if ($this->debug_dcom >= 2) { echo
'pop3: create_embeded_fetchstructure: mime loop ['.$x.']:
'.htmlspecialchars($body_line).'<br />'; }
if
((strstr($body_line,'--'.$info->custom['my_cookie']))
&&
(strpos($body_line,'--'.$info->custom['my_cookie']) == 0)
// but NOT the final boundary
@@ -849,7 +849,7 @@
$tmp_cur_part_idx->custom['part_end'] = $x-1;
// --Lines-- we know
beginning line and ending line, so calculate # lines for this part
$tmp_cur_part_idx->lines = (int)$tmp_cur_part_idx->custom['part_end'] -
(int)$tmp_cur_part_idx->custom['part_start'];
- if ($this->debug_dcom
>= 2) { echo 'pop3: create_embeded_fetchstructure: mime loop: current part end
at ['.(string)($x-1).'] byte cumula: ['.$tmp_cur_part_idx->bytes.'] lines:
['.$tmp_cur_part_idx->lines.']<br>'; }
+ if ($this->debug_dcom
>= 2) { echo 'pop3: create_embeded_fetchstructure: mime loop: current part end
at ['.(string)($x-1).'] byte cumula: ['.$tmp_cur_part_idx->bytes.'] lines:
['.$tmp_cur_part_idx->lines.']<br />'; }
// this individual part
has completed discovery, it os now "OUT"
$tmp_cur_part_idx->custom['detect_state'] = 'out';
// we are DONE with
this part for now
@@ -860,7 +860,7 @@
unset($tmp_cur_part_idx);
}
// so now deal with this NEW
part we just discovered
- if ($this->debug_dcom >= 2) {
echo 'pop3: create_embeded_fetchstructure: mime loop: begin part
discovery<br>'; }
+ if ($this->debug_dcom >= 2) {
echo 'pop3: create_embeded_fetchstructure: mime loop: begin part discovery<br
/>'; }
// Create New Sub Part Object
$new_part_idx =
count($info->parts);
$info->parts[$new_part_idx] =
new msg_structure;
@@ -882,7 +882,7 @@
{
// grap this
part header line
$part_header_blob .= $this->body_array[$y]."\r\n";
- if
($this->debug_dcom >= 2) { echo 'pop3: create_embeded_fetchstructure: mime
loop: part part_header_blob line['.$y.']: '.$this->body_array[$y].'<br>'; }
+ if
($this->debug_dcom >= 2) { echo 'pop3: create_embeded_fetchstructure: mime
loop: part part_header_blob line['.$y.']: '.$this->body_array[$y].'<br />'; }
}
else
{
@@ -903,7 +903,7 @@
// make the header blob into an
array of strings, one array element per header line, throw away blank lines
$part_header_array = Array();
$part_header_array =
$this->glob_to_array($part_header_blob, False, '', True);
- if ($this->debug_dcom >= 2) {
echo 'pop3: create_embeded_fetchstructure: mime loop:
part_header_array:'.serialize($part_header_array).'<br>'; }
+ if ($this->debug_dcom >= 2) {
echo 'pop3: create_embeded_fetchstructure: mime loop:
part_header_array:'.serialize($part_header_array).'<br />'; }
// since we just passed the
headers, and this is NOT a final boundary
// this MUST be a start point
for the next part
$tmp_new_part_idx->custom['part_start'] = (int)($y+1);
@@ -914,7 +914,7 @@
unset($tmp_new_part_idx);
// ADVANCE INDEX $x TO AFTER
WHAT WE'VE ALREADY LOOKED AT
- if ($this->debug_dcom >= 2) {
echo 'pop3: create_embeded_fetchstructure: mime loop: advance x from ['.$x.']
to ['.$y.']<br>'; }
+ if ($this->debug_dcom >= 2) {
echo 'pop3: create_embeded_fetchstructure: mime loop: advance x from ['.$x.']
to ['.$y.']<br />'; }
$x = $y;
}
elseif
((strstr($body_line,'--'.$info->custom['my_cookie'].'--'))
@@ -931,7 +931,7 @@
$tmp_cur_part_idx->lines =
$tmp_cur_part_idx->custom['part_end'] - $tmp_cur_part_idx->custom['part_start'];
$tmp_cur_part_idx->custom['detect_state'] = 'out';
// we are DONE with this part
for now
- if ($this->debug_dcom >= 2) {
echo 'pop3: create_embeded_fetchstructure: mime loop: final boundary at
['.(string)($x-1).'] byte cumula: ['.$tmp_cur_part_idx->bytes.'] lines:
['.$tmp_cur_part_idx->lines.']<br>'; }
+ if ($this->debug_dcom >= 2) {
echo 'pop3: create_embeded_fetchstructure: mime loop: final boundary at
['.(string)($x-1).'] byte cumula: ['.$tmp_cur_part_idx->bytes.'] lines:
['.$tmp_cur_part_idx->lines.']<br />'; }
// unset any unfilled elements
// NOTE: param to
unset_unfilled_fetchstructure is a REFERENCE
$this->unset_unfilled_fetchstructure(&$tmp_cur_part_idx);
@@ -968,7 +968,7 @@
&& (count($info->parts) == 0))
{
// Encapsulated "message/rfc822" MIME Part In
Need Of Discovered
- if ($this->debug_dcom >= 1) { echo 'pop3:
create_embeded_fetchstructure: Discovery Needed for Encapsulated
"message/rfc822" MIME Part<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
create_embeded_fetchstructure: Discovery Needed for Encapsulated
"message/rfc822" MIME Part<br />'; }
$range_start = $info->custom['part_start'];
$range_end = $info->custom['part_end'];
// is this range data valid
@@ -976,12 +976,12 @@
|| (!isset($info->custom['part_end']))
|| ($info->custom['part_end'] <=
$info->custom['part_start']))
{
- if ($this->debug_dcom >= 1) { echo
'pop3: Leaving create_embeded_fetchstructure with Error in "message/rfc2822"
range<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: Leaving create_embeded_fetchstructure with Error in "message/rfc2822"
range<br />'; }
return False;
}
// note that below we will iterate thru this
range
- if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: "mime loop", will iterate thru parents
body_array range ['.$range_start.'] to ['.$range_end.']<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: "mime loop", will iterate thru parents
body_array range ['.$range_start.'] to ['.$range_end.']<br />'; }
// encapsulated is not that tricky, we must so
this
// 1) Create New Sub Part Object
@@ -1006,7 +1006,7 @@
{
// grap this part header line
$part_header_blob .=
$this->body_array[$y]."\r\n";
- if ($this->debug_dcom >= 2) {
echo 'pop3: enc mime loop: part part_header_blob line['.$y.']:
'.htmlspecialchars($this->body_array[$y]).'<br>'; }
+ if ($this->debug_dcom >= 2) {
echo 'pop3: enc mime loop: part part_header_blob line['.$y.']:
'.htmlspecialchars($this->body_array[$y]).'<br />'; }
}
else
{
@@ -1027,7 +1027,7 @@
// make the header blob into an array of
strings, one array element per header line, throw away blank lines
$part_header_array = Array();
$part_header_array =
$this->glob_to_array($part_header_blob, False, '', True);
- if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: enc mime loop:
part_header_array:'.serialize($part_header_array).'<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: enc mime loop:
part_header_array:'.serialize($part_header_array).'<br />'; }
// 2) Feed these Headers thru
"sub_get_structure"
// fill the conventional info on this
fetchstructure sub-part
@@ -1044,7 +1044,7 @@
if ((!isset($tmp_enc_part_idx->subtype))
|| ((string)$tmp_enc_part_idx->subtype == ''))
{
- if ($this->debug_dcom >= 2) { echo
'pop3: create_embeded_fetchstructure: enc mime loop: CONTROVERSIAL uwash
imitation: adding subtype "plain" to immediate RFC822 child part, none was
specified<br>'; }
+ if ($this->debug_dcom >= 2) { echo
'pop3: create_embeded_fetchstructure: enc mime loop: CONTROVERSIAL uwash
imitation: adding subtype "plain" to immediate RFC822 child part, none was
specified<br />'; }
$tmp_enc_part_idx->ifsubtype = True;
$tmp_enc_part_idx->subtype = 'plain';
}
@@ -1066,7 +1066,7 @@
// do that crappy adding of charset param if
necessary
if ($found_charset == False)
{
- if ($this->debug_dcom >= 2) { echo
'pop3: create_embeded_fetchstructure: enc mime loop: CONTROVERSIAL uwash
imitation: adding param "charset=US-ASCII" to immediate RFC822 child part, none
was specified<br>'; }
+ if ($this->debug_dcom >= 2) { echo
'pop3: create_embeded_fetchstructure: enc mime loop: CONTROVERSIAL uwash
imitation: adding param "charset=US-ASCII" to immediate RFC822 child part, none
was specified<br />'; }
$new_idx =
count($tmp_enc_part_idx->parameters);
$tmp_enc_part_idx->parameters[$new_idx]
= new msg_params('charset','US-ASCII');
$tmp_enc_part_idx->ifparameters = true;
@@ -1082,12 +1082,12 @@
// 4) calculate byte size and # of lines of the
content within this parts start and end
$my_start =
$tmp_enc_part_idx->custom['part_start'];
$my_end = $tmp_enc_part_idx->custom['part_end'];
- if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: enc mime loop: this body range ['.$my_start.']
to ['.$my_end.']<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: enc mime loop: this body range ['.$my_start.']
to ['.$my_end.']<br />'; }
for ($x=$my_start; $x < $my_end+1 ;$x++)
{
// running byte size of this part
$body_line = $this->body_array[$x];
- if ($this->debug_dcom >= 2) { echo
'pop3: encap mime size loop ['.$x.']: '.htmlspecialchars($body_line).'<br>'; }
+ if ($this->debug_dcom >= 2) { echo
'pop3: encap mime size loop ['.$x.']: '.htmlspecialchars($body_line).'<br />'; }
// prevoius count
$prev_bytes = $tmp_enc_part_idx->bytes;
// add new count, +2 for the \r\n that
will end the line when we feed it to the client
@@ -1100,7 +1100,7 @@
$tmp_enc_part_idx->lines = $my_end - $my_start;
// we're done with the loop so the bytes have
been calculated in that loop
- if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: this part range byte size
['.$tmp_enc_part_idx->bytes.'] lines: ['.$tmp_enc_part_idx->lines.']<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: this part range byte size
['.$tmp_enc_part_idx->bytes.'] lines: ['.$tmp_enc_part_idx->lines.']<br />'; }
$info->parts[$enc_part_idx] = $tmp_enc_part_idx;
unset($tmp_enc_part_idx);
}
@@ -1112,18 +1112,18 @@
&& (count($info->parts) == 0))
{
// do NOTHING - this level has ALREADY been
filled
- if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: feed info encapsulated "message/rfc822" ALREADY
filled<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: feed info encapsulated "message/rfc822" ALREADY
filled<br />'; }
return False;
}
elseif ($info->custom['my_cookie'] == '')
{
// do NOTHING - this is NOT multipart
- if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: feed info not multipart<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: feed info not multipart<br />'; }
if ($this->debug_dcom >= 2)
{
- echo 'pop3:
create_embeded_fetchstructure: feed info not multipart DUMP EXAMINE:<br>';
+ echo 'pop3:
create_embeded_fetchstructure: feed info not multipart DUMP EXAMINE:<br />';
var_dump($info);
- echo '<br><br>';
+ echo '<br /><br />';
}
return False;
}
@@ -1131,20 +1131,20 @@
&& (count($info->parts) > 0))
{
// do NOTHING - this level has ALREADY been
filled
- if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: feed info multipart ALREADY filled<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'pop3:
create_embeded_fetchstructure: feed info multipart ALREADY filled<br />'; }
return False;
}
else
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
create_embeded_fetchstructure: * * no mans land * *<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
create_embeded_fetchstructure: * * no mans land * *<br />'; }
}
//if ($this->debug_dcom >= 2)
//{
- // echo '<br>dumping create_embeded_fetchstructure
return info: <br>';
+ // echo '<br />dumping
create_embeded_fetchstructure return info: <br />';
// var_dump($info);
- // echo '<br><br>';
+ // echo '<br /><br />';
//}
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
create_embeded_fetchstructure<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
create_embeded_fetchstructure<br />'; }
return True;
}
@@ -1170,7 +1170,7 @@
$debug_mime = False;
}
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
sub_get_structure<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
sub_get_structure<br />'; }
/*
// initialize the structure
$info->custom['top_level'] = $extra_args['top_level'];
@@ -1187,7 +1187,7 @@
for ($i=0; $i < count($header_array) ;$i++)
{
$pos = strpos($header_array[$i],' ');
- //if ($debug_mime) { echo
'header_array['.$i.']: '.$header_array[$i].'<br>'; }
+ //if ($debug_mime) { echo
'header_array['.$i.']: '.$header_array[$i].'<br />'; }
if (is_int($pos) && ($pos==0))
{
continue;
@@ -1196,9 +1196,9 @@
$content =
trim(substr($header_array[$i],$pos+1));
if ($debug_mime)
{
- //echo 'pos: '.$pos.'<br>';
+ //echo 'pos: '.$pos.'<br />';
echo 'pop3: sub_get_structure: keyword:
['.htmlspecialchars($keyword).']'
- .' content:
['.htmlspecialchars($content).']<br>';
+ .' content:
['.htmlspecialchars($content).']<br />';
}
switch ($keyword)
{
@@ -1210,10 +1210,10 @@
$pos_param = strpos($content,';');
if ($pos_param > 0)
{
- if ($this->debug_dcom >= 2) {
echo 'pop3: sub_get_structure: apparent params exist in content
['.$content.']<br>'; }
+ if ($this->debug_dcom >= 2) {
echo 'pop3: sub_get_structure: apparent params exist in content
['.$content.']<br />'; }
// feed the whole param line
into this function
$content =
substr($content,$pos_param+1);
- if ($this->debug_dcom >= 2) {
echo 'pop3: sub_get_structure: calling parse_msg_params, feeding content
['.$content.']<br>'; }
+ if ($this->debug_dcom >= 2) {
echo 'pop3: sub_get_structure: calling parse_msg_params, feeding content
['.$content.']<br />'; }
// False = this is NOT a
disposition param, this is the more common regular param
// NOTE: first param to
parse_msg_params is a REFERENCE
$this->parse_msg_params(&$info,$content,False);
@@ -1282,9 +1282,9 @@
if ($this->debug_dcom >= 2)
{
- echo 'pop3: sub_get_structure: info->encoding
['.(string)$info->encoding.'] (if empty here it will get a default value
later)<br>';
+ echo 'pop3: sub_get_structure: info->encoding
['.(string)$info->encoding.'] (if empty here it will get a default value
later)<br />';
}
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
sub_get_structure<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
sub_get_structure<br />'; }
return $info;
}
@@ -1301,7 +1301,7 @@
*/
function unset_unfilled_fetchstructure($info)
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
unset_unfilled_fetchstructure<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
unset_unfilled_fetchstructure<br />'; }
// unset any unfilled elements, ALWAYS leave parts and
custom
if ((string)$info->type == '')
{
@@ -1361,7 +1361,7 @@
}
//$info->custom = array();
//$info->parts = array();
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
unset_unfilled_fetchstructure<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
unset_unfilled_fetchstructure<br />'; }
}
/*!
@@ -1377,7 +1377,7 @@
*/
function parse_type_subtype($info,$content)
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
parse_type_subtype<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
parse_type_subtype<br />'; }
// used by pop_fetchstructure only
// get rid of any other params that might be here
$pos = strpos($content,';');
@@ -1397,7 +1397,7 @@
{
$prim_type = strtolower($content);
}
- if ($this->debug_dcom >= 2) { echo 'pop3:
parse_type_subtype: prim_type: '.$prim_type.'<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'pop3:
parse_type_subtype: prim_type: '.$prim_type.'<br />'; }
$info->type = $this->type_str_to_int($prim_type);
if ($info->ifsubtype == False)
{
@@ -1407,11 +1407,11 @@
}
if ($this->debug_dcom >= 2)
{
- echo 'pop3: parse_type_subtype: info->type
['.$info->type.'] aka "'.$this->type_int_to_str($info->type).'"<br>';
- echo 'pop3: parse_type_subtype: info->ifsubtype
['.$info->ifsubtype.']<br>';
- echo 'pop3: parse_type_subtype: info->subtype
"'.$info->subtype.'"<br>';
+ echo 'pop3: parse_type_subtype: info->type
['.$info->type.'] aka "'.$this->type_int_to_str($info->type).'"<br />';
+ echo 'pop3: parse_type_subtype: info->ifsubtype
['.$info->ifsubtype.']<br />';
+ echo 'pop3: parse_type_subtype: info->subtype
"'.$info->subtype.'"<br />';
}
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
parse_type_subtype<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
parse_type_subtype<br />'; }
}
/*!
@@ -1431,9 +1431,9 @@
function
parse_msg_params($info,$content,$is_disposition_param=False)
{
if ($this->debug_dcom >= 2) {
- //echo 'pop3: *in parse_msg_params<br>';
- echo 'pop3: *in parse_msg_params: content
['.$content.']<br>';
- echo 'pop3: *in parse_msg_params:
is_disposition_param ['.(string)$is_disposition_param.']<br>';
+ //echo 'pop3: *in parse_msg_params<br />';
+ echo 'pop3: *in parse_msg_params: content
['.$content.']<br />';
+ echo 'pop3: *in parse_msg_params:
is_disposition_param ['.(string)$is_disposition_param.']<br />';
}
// bogus data detection
if (trim($content) == '')
@@ -1601,7 +1601,7 @@
*/
function size_msg($stream_notused,$msg_num)
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
size_msg<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
size_msg<br />'; }
if (!$this->msg2socket('LIST
'.$msg_num,"^\+ok",&$response))
{
$this->error();
@@ -1610,8 +1610,8 @@
$list_response = explode(' ',$response);
$return_size = trim($list_response[2]);
$return_size = (int)$return_size * 1;
- if ($this->debug_dcom >= 1) { echo 'pop3: size_msg:
'.$return_size.'<br>'; }
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
size_msg<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: size_msg:
'.$return_size.'<br />'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
size_msg<br />'; }
return $return_size;
}
@@ -1633,14 +1633,14 @@
*/
function
header($stream_notused,$msg_num,$fromlength='',$tolength='',$defaulthost='')
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
header<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
header<br />'; }
$info = new hdr_info_envelope;
$info->Size = $this->size_msg($stream_notused,$msg_num);
$info->size = $info->Size;
$header_array =
$this->get_header_array($stream_notused,$msg_num);
if (!$header_array)
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving header with error<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving header with error<br />'; }
return False;
}
for ($i=0; $i < count($header_array); $i++)
@@ -1730,7 +1730,7 @@
}
if ($this->debug_dcom >= 1)
{
- echo 'pop3: Leaving header<br>';
+ echo 'pop3: Leaving header<br />';
}
return $info;
}
@@ -1748,7 +1748,7 @@
*/
function get_addr_details($people,$address,$header,$count)
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
get_addr_details<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
get_addr_details<br />'; }
if (!trim($address))
{
return False;
@@ -1873,7 +1873,7 @@
*/
function delete($stream_notused,$msg_num,$flags="")
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
delete<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
delete<br />'; }
// in PHP 4 msg_num can be
// a) an integer referencing a single message
// b1) a comma seperated list of message numbers "1,2,6"
@@ -1886,7 +1886,7 @@
for($i=0;$i < count($tmp_array);$i++)
{
$this_element = (string)$tmp_array[$i];
- if ($this->debug_dcom >= 2) { echo 'pop3:
delete prep: this_element: '.$this_element.'<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'pop3:
delete prep: this_element: '.$this_element.'<br />'; }
$this_element = trim($this_element);
// do nothing if this is an empty array element
if ($this_element != '')
@@ -1912,7 +1912,7 @@
// add to the
msg_num_array
$new_idx =
count($msg_num_array);
$msg_num_array[$new_idx] = (int)$z;
- if ($this->debug_dcom
>= 2) { echo 'pop3: delete prep: range: msg_num_array['.$new_idx.'] =
'.$z.'<br>'; }
+ if ($this->debug_dcom
>= 2) { echo 'pop3: delete prep: range: msg_num_array['.$new_idx.'] = '.$z.'<br
/>'; }
}
}
else
@@ -1921,7 +1921,7 @@
// add to the msg_num_array
$new_idx =
count($msg_num_array);
$msg_num_array[$new_idx] =
(int)$this_element;
- if ($this->debug_dcom >= 2) {
echo 'pop3: delete prep: msg_num_array['.$new_idx.'] = '.$this_element.'<br>'; }
+ if ($this->debug_dcom >= 2) {
echo 'pop3: delete prep: msg_num_array['.$new_idx.'] = '.$this_element.'<br
/>'; }
}
}
}
@@ -1929,18 +1929,18 @@
for($i=0;$i < count($msg_num_array);$i++)
{
$this_msg_num = $msg_num_array[$i];
- if ($this->debug_dcom >= 2) { echo 'pop3:
delete: deleting this_msg_num '.$this_msg_num.'<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'pop3:
delete: deleting this_msg_num '.$this_msg_num.'<br />'; }
if (!$this->msg2socket('DELE
'.$this_msg_num,"^\+ok",&$response))
{
$this->error();
- if ($this->debug_dcom >= 1) { echo
'pop3: Leaving delete with error deleting msgnum '.$this_msg_num.'<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: Leaving delete with error deleting msgnum '.$this_msg_num.'<br />'; }
return False;
}
}
// these messages are now marked for deletion by the
POP3 server
// they will be expunged when user sucessfully
explicitly logs out
// if we make it here I have to assume no errors
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
delete<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
delete<br />'; }
return True;
}
@@ -1962,7 +1962,7 @@
function fetchheader($stream_notused,$msg_num,$flags='')
{
// NEEDED: code for flags: FT_UID; FT_INTERNAL;
FT_PREFETCHTEXT
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
fetchheader<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
fetchheader<br />'; }
$header_glob =
$this->get_header_raw($stream_notused,$msg_num,$flags);
@@ -1975,7 +1975,7 @@
.$this->get_body($stream_notused,$msg_num,$flags);
}
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
fetchheader<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
fetchheader<br />'; }
return $header_glob;
}
@@ -1993,12 +1993,12 @@
*/
function get_header_array($stream_notused,$msg_num,$flags='')
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
get_header_array<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
get_header_array<br />'; }
// do we have a cached header_array ?
if ((count($this->header_array) > 0)
&& ((int)$this->header_array_msgnum == (int)($msg_num)))
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving get_header_array returning cached data<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving get_header_array returning cached data<br />'; }
return $this->header_array;
}
// NO cached data, get it
@@ -2014,7 +2014,7 @@
// cache this data for future use
$this->header_array = $header_array;
$this->header_array_msgnum = (int)($msg_num);
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
get_header_array<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
get_header_array<br />'; }
return $header_array;
}
@@ -2032,33 +2032,33 @@
*/
function get_header_raw($stream_notused,$msg_num,$flags='')
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
get_header_raw<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
get_header_raw<br />'; }
if ((!isset($msg_num))
|| (trim((string)$msg_num) == ''))
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving get_header_raw with error: Invalid msg_num<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving get_header_raw with error: Invalid msg_num<br />'; }
return False;
}
// do we have a cached header_glob ?
if (($this->header_glob != '')
&& ((int)$this->header_glob_msgnum == (int)($msg_num)))
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving get_header_raw returning cached data<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving get_header_raw returning cached data<br />'; }
return $this->header_glob;
}
// NO cached data, get it
- if ($this->debug_dcom >= 1) { echo 'pop3:
get_header_raw: issuing: TOP '.$msg_num.' 0 <br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
get_header_raw: issuing: TOP '.$msg_num.' 0 <br />'; }
if (!$this->msg2socket('TOP '.$msg_num.'
0',"^\+ok",&$response))
{
$this->error();
- if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving get_header_raw with error<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
Leaving get_header_raw with error<br />'; }
return False;
}
$glob = $this->read_port_glob('.');
// save this info for future ues
$this->header_glob = $glob;
$this->header_glob_msgnum = (int)$msg_num;
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
get_header_raw<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
get_header_raw<br />'; }
return $glob;
}
@@ -2091,19 +2091,19 @@
*/
function
fetchbody($stream_notused,$msg_num,$part_num='',$flags='')
{
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
fetchbody<br>'; }
- if ($this->debug_dcom >= 1) { echo 'pop3: fetchbody:
attempt to return part '.$part_num.'<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
fetchbody<br />'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: fetchbody:
attempt to return part '.$part_num.'<br />'; }
// totally under construction
// FORCE a pass thru fetchstructure to ENSURE all
necessary data is present and cached
- if ($this->debug_dcom >= 2) { echo 'pop3: fetchbody:
force a pass thru fetchstructure to ensure necessary data is present and
cached<br>'; }
+ if ($this->debug_dcom >= 2) { echo 'pop3: fetchbody:
force a pass thru fetchstructure to ensure necessary data is present and
cached<br />'; }
$bogus_data =
$this->fetchstructure($stream_notused,$msg_num,$flags);
// EXTREMELY BASIC part handling
// handle request for top level message headers
if ((int)$part_num == 0)
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
fetchbody: returning top-level headers, part '.$part_num.', internally
['.$the_part.']<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
fetchbody: returning top-level headers, part '.$part_num.', internally
['.$the_part.']<br />'; }
// grab the headers, as a glob, i.e. a string
NOT an array
$header_glob =
$this->get_header_raw($stream_notused,$msg_num,'');
// put this data in the var we will return below
@@ -2116,16 +2116,16 @@
$the_part = (int)$part_num;
$the_part = $the_part - 1;
// return part one
- if ($this->debug_dcom >= 1) { echo 'pop3:
fetchbody: returning part '.$part_num.', internally ['.$the_part.']<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
fetchbody: returning part '.$part_num.', internally ['.$the_part.']<br />'; }
$tmp_msg_structure_parts =
$this->msg_structure->parts[$the_part];
if
((address@hidden($tmp_msg_structure_parts->custom['part_start']))
||
(!isset($tmp_msg_structure_parts->custom['part_start'])))
{
- if ($this->debug_dcom >= 1) { echo
'pop3: fetchbody: ERROR: required part data not present for '.$part_num.',
internally ['.$the_part.']<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: fetchbody: ERROR: required part data not present for '.$part_num.',
internally ['.$the_part.']<br />'; }
// screw it, just return the whole thing
- if ($this->debug_dcom >= 1) { echo
'pop3: fetchbody - using fallback pass thru<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: fetchbody - using fallback pass thru<br />'; }
$body_blob =
$this->get_body($stream_notused,$msg_num,$flags,False);
}
else
@@ -2133,7 +2133,7 @@
// attempt to make the part
$part_start =
(int)$tmp_msg_structure_parts->custom['part_start'];
$part_end =
(int)$tmp_msg_structure_parts->custom['part_end'];
- if ($this->debug_dcom >= 1) { echo
'pop3: fetchbody: returning part '.$part_num.' starts ['.$part_start.'] ends
['.$part_end.']<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: fetchbody: returning part '.$part_num.' starts ['.$part_start.'] ends
['.$part_end.']<br />'; }
// assemble the body [art part
$body_blob = '';
for($i=$part_start;$i <
$part_end+1;$i++)
@@ -2165,13 +2165,13 @@
$temp_part = $target_part;
}
// verify part data exists
- if ($this->debug_dcom >= 1) { echo 'pop3:
fetchbody: returning part '.$part_num.', internally
['.serialize($the_part_array).']<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
fetchbody: returning part '.$part_num.', internally
['.serialize($the_part_array).']<br />'; }
if ((!isset($target_part->custom['part_start']))
|| (!isset($target_part->custom['part_start'])))
{
- if ($this->debug_dcom >= 1) { echo
'pop3: fetchbody: ERROR: required part data not present for '.$part_num.',
internally ['.serialize($the_part).']<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: fetchbody: ERROR: required part data not present for '.$part_num.',
internally ['.serialize($the_part).']<br />'; }
// screw it, just return the whole thing
- if ($this->debug_dcom >= 1) { echo
'pop3: fetchbody - using fallback pass thru<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: fetchbody - using fallback pass thru<br />'; }
$body_blob =
$this->get_body($stream_notused,$msg_num,$flags,False);
}
else
@@ -2179,7 +2179,7 @@
// attempt to make the part
$part_start =
(int)$target_part->custom['part_start'];
$part_end =
(int)$target_part->custom['part_end'];
- if ($this->debug_dcom >= 1) { echo
'pop3: fetchbody: returning part '.$part_num.' starts ['.$part_start.'] ends
['.$part_end.']<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: fetchbody: returning part '.$part_num.' starts ['.$part_start.'] ends
['.$part_end.']<br />'; }
// assemble the body [art part
$body_blob = '';
for($i=$part_start;$i <
$part_end+1;$i++)
@@ -2191,12 +2191,12 @@
else
{
// screw it, just return the whole thing
- if ($this->debug_dcom >= 1) { echo 'pop3:
fetchbody - something is unsupported, using fallback pass thru<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
fetchbody - something is unsupported, using fallback pass thru<br />'; }
// the false arg here is a temporary, custom
option, says to NOT include the headers in the return
$body_blob =
$this->get_body($stream_notused,$msg_num,$flags,False);
}
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
fetchbody<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
fetchbody<br />'; }
return $body_blob;
}
@@ -2217,7 +2217,7 @@
function
get_body($stream_notused,$msg_num,$flags='',$phpgw_include_header=True)
{
// NEEDED: code for flags: FT_UID; maybe FT_INTERNAL;
FT_NOT; flag FT_PEEK has no effect on POP3
- if ($this->debug_dcom >= 1) { echo 'pop3: Entering
get_body<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Entering
get_body<br />'; }
// do we have a cached body_array ?
if ((count($this->body_array) > 0)
@@ -2226,7 +2226,7 @@
&& (count($this->header_array) > 0)
&& ((int)$this->header_array_msgnum == (int)($msg_num)))
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
get_body: using cached body_array and header_array data imploded into a
glob<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
get_body: using cached body_array and header_array data imploded into a glob<br
/>'; }
// implode the header_array into a glob
$header_glob =
implode("\r\n",$this->header_array);
// implode the body_array into a glob
@@ -2234,13 +2234,13 @@
}
else
{
- if ($this->debug_dcom >= 1) { echo 'pop3:
get_body: NO Cached Data<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3:
get_body: NO Cached Data<br />'; }
// NO cached data we can use
// issue command to retrieve body
if (!$this->msg2socket('RETR
'.$msg_num,"^\+ok",&$response))
{
$this->error();
- if ($this->debug_dcom >= 1) { echo
'pop3: Leaving get_body with error<br>'; }
+ if ($this->debug_dcom >= 1) { echo
'pop3: Leaving get_body with error<br />'; }
return False;
}
// --- Get Header ---
@@ -2274,13 +2274,13 @@
/*
if ($this->debug_dcom >= 2)
{
- echo 'pop3: get_body DUMP<br>= = = First DUMP:
header_glob<br>';
- echo
'<pre>'.htmlspecialchars($header_glob).'</pre><br><br>';
- echo 'pop3: get_body DUMP<br>= = = Second DUMP:
body_glob<br>';
- echo
'<pre>'.htmlspecialchars($body_glob).'</pre><br><br>';
+ echo 'pop3: get_body DUMP<br />= = = First
DUMP: header_glob<br />';
+ echo
'<pre>'.htmlspecialchars($header_glob).'</pre><br /><br />';
+ echo 'pop3: get_body DUMP<br />= = = Second
DUMP: body_glob<br />';
+ echo
'<pre>'.htmlspecialchars($body_glob).'</pre><br /><br />';
}
*/
- if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
get_body<br>'; }
+ if ($this->debug_dcom >= 1) { echo 'pop3: Leaving
get_body<br />'; }
return $body_glob;
}
}
====================================================
Index: email/inc/class.uijsaddressbook.inc.php
diff -u email/inc/class.uijsaddressbook.inc.php:1.4
email/inc/class.uijsaddressbook.inc.php:1.5
--- email/inc/class.uijsaddressbook.inc.php:1.4 Thu Dec 30 23:13:50 2004
+++ email/inc/class.uijsaddressbook.inc.php Sun Mar 13 23:22:44 2005
@@ -468,7 +468,7 @@
}
//Get our category id
$this->cat_id = $GLOBALS['HTTP_POST_VARS']['cat_id'] ?
$GLOBALS['HTTP_POST_VARS']['cat_id'] : $GLOBALS['HTTP_GET_VARS']['cat_id'];
- //print "<br> ".$this->cat_id;
+ //print "<br /> ".$this->cat_id;
//Check if we have to check in the cache
if($this->cat_id == -1)
{
@@ -620,7 +620,7 @@
'sort' =>
$this->sort,
'directory_uid' =>
$this->globaladduid
);
- // print "<BR>";
+ // print "<br />";
// print_r($contactquery);
====================================================
Index: email/inc/class.uimessage.inc.php
diff -u email/inc/class.uimessage.inc.php:1.12
email/inc/class.uimessage.inc.php:1.13
--- email/inc/class.uimessage.inc.php:1.12 Thu Dec 30 23:13:50 2004
+++ email/inc/class.uimessage.inc.php Sun Mar 13 23:22:44 2005
@@ -35,13 +35,13 @@
/*!
@function message
- @abstract display the message indicated by the msgball data.
+ @abstract display the message indicated by the msgball data.
*/
function message()
{
$this->bo = CreateObject("email.bomessage");
$this->bo->message_data();
-
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
// we point to the global template for this
version of phpgw templatings
@@ -53,7 +53,7 @@
// we use a PRIVATE template object for 0.9.14
conpat and during xslt porting
$this->tpl =
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
}
-
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
// NOW we can out the header, because
"index_data()" filled this global
@@ -72,7 +72,7 @@
{
$GLOBALS['phpgw']->xslttpl->add_file(array('app_data'));
}
-
+
// ---- BEGIN UIMESSAGE
$this->tpl->set_file(array(
'T_message_main' => 'message_main.tpl',
@@ -85,13 +85,13 @@
$this->tpl->set_block('T_message_main','B_display_part','V_display_part');
$this->tpl->set_block('T_message_echo_dump','B_setup_echo_dump','V_setup_echo_dump');
$this->tpl->set_block('T_message_echo_dump','B_done_echo_dump','V_done_echo_dump');
-
- //= = = = TOOLBAR WIDGET = = =
+
+ //= = = = TOOLBAR WIDGET = = =
$this->widgets = CreateObject('email.html_widgets');
$this->tpl->set_var('widget_toolbar',$this->widgets->get_toolbar());
// geek_bar
$this->tpl->set_var('geek_bar',$this->widgets->get_geek_bar());
-
+
if (!empty($this->xi['msgtype']))
{
$this->tpl->set_var('application',$this->bo->xi['application']);
@@ -101,18 +101,18 @@
{
$this->tpl->set_var('V_x-phpgw-type','');
}
-
+
// ---- TOOL BAR / MENU BAR ----
$tpl_vars = Array(
//'accounts_label' =>
$this->bo->xi['accounts_label'],
//'ctrl_bar_font' =>
$this->bo->xi['ctrl_bar_font'],
//'ctrl_bar_font_size' =>
$this->bo->xi['ctrl_bar_font_size'],
//'ctrl_bar_back1' =>
$this->bo->xi['ctrl_bar_back1'],
-
+
'bar_back1' => '',
//'bar_back1' =>
$GLOBALS['phpgw_info']['theme']['table_bg'],
//'bar_back1' =>
$GLOBALS['phpgw_info']['theme']['bg08'],
-
+
// ---- account switchbox ----
//'acctbox_listbox' =>
$this->bo->xi['acctbox_listbox'],
//'ilnk_accounts' =>
$this->bo->xi['ilnk_accounts'],
@@ -123,24 +123,24 @@
'move_current_order' =>
$this->bo->xi['move_current_order'],
'move_current_start' =>
$this->bo->xi['move_current_start'],
'mlist_checkbox_name' =>
$this->bo->xi['mlist_checkbox_name'],
-
+
'mlist_embedded_uri' =>
$this->bo->xi['mlist_embedded_uri'],
'frm_delmov_action' =>
$this->bo->xi['frm_delmov_action'],
'frm_delmov_name' =>
$this->bo->xi['frm_delmov_name'],
'delmov_listbox' =>
$this->bo->xi['delmov_listbox'],
'move_postmove_goto_name' =>
$this->bo->xi['move_postmove_goto_name'],
'move_postmove_goto_value' =>
$this->bo->xi['move_postmove_goto_value'],
-
+
// moved to case block for text, image, or text
and image pref
//'ilnk_prev_msg' =>
$this->bo->xi['ilnk_prev_msg'],
//'ilnk_next_msg' =>
$this->bo->xi['ilnk_next_msg'],
-
+
// ---- Labels and Colors for From, To, CC,
Files, and Subject -----
'tofrom_labels_bkcolor' =>
$this->bo->xi['tofrom_labels_bkcolor'],
'tofrom_labels_class' =>
$this->bo->xi['tofrom_labels_class'],
'tofrom_data_bkcolor' =>
$this->bo->xi['tofrom_data_bkcolor'],
'tofrom_data_class' =>
$this->bo->xi['tofrom_data_class'],
-
+
'lang_inbox_folder' =>
$this->bo->xi['lang_inbox'],
'lang_from' =>
$this->bo->xi['lang_from'],
'lang_to' =>
$this->bo->xi['lang_to'],
@@ -148,14 +148,14 @@
'lang_date' =>
$this->bo->xi['lang_date'],
'lang_files' => $this->bo->xi['lang_files'],
'lang_subject' =>
$this->bo->xi['lang_subject'],
-
+
// ---- From: Message Data -----
'from_data_final' =>
$this->bo->xi['from_data_final'],
// ---- To: Message Data -----
'to_data_final' =>
$this->bo->xi['to_data_final']
);
$this->tpl->set_var($tpl_vars);
-
+
// ---- Cc: Message Data -----
//if (isset($msg_headers->cc) &&
count($msg_headers->cc) > 0)
// $this->bo->xi['
@@ -169,12 +169,12 @@
{
$this->tpl->set_var('V_cc_data','');
}
-
+
// ---- Message Date (set above) -----
$this->tpl->set_var('message_date',$this->bo->xi['message_date']);
// ---- Message Subject (set above) -----
$this->tpl->set_var('message_subject',$this->bo->xi['message_subject']);
-
+
// ---- Attachments List -----
if ($this->bo->xi['list_of_files'] != '')
{
@@ -185,8 +185,8 @@
{
$this->tpl->set_var('V_attach_list','');
}
-
-
+
+
$tpl_vars = Array(
// ---- Images and Hrefs For Reply, ReplyAll,
Forward, and Delete -----
'theme_font' =>
$this->bo->xi['theme_font'],
@@ -194,7 +194,7 @@
'theme_row_on' =>
$this->bo->xi['theme_row_on'],
'reply_btns_bkcolor' =>
$this->bo->xi['reply_btns_bkcolor'],
'reply_btns_text' =>
$this->bo->xi['reply_btns_text'],
-
+
'go_back_to' =>
$this->bo->xi['lang_go_back_to'],
'lnk_goback_folder' =>
$this->bo->xi['lnk_goback_folder'],
// moved to case block for text, image, or text
and image pref
@@ -204,8 +204,8 @@
//'ilnk_delete' =>
$this->bo->xi['ilnk_delete']
);
$this->tpl->set_var($tpl_vars);
-
-
+
+
// ---- DEBUG: Show Information About Each Part -----
// the debug output needs updating
if ($this->bo->debug > 0)
@@ -217,12 +217,12 @@
{
$this->tpl->set_var('V_debug_parts','');
}
-
+
// ----- Message_Display Template Handles it from here
-------
$this->tpl->set_var('theme_font',$this->bo->xi['theme_font']);
$this->tpl->set_var('theme_th_bg',$this->bo->xi['theme_th_bg']);
$this->tpl->set_var('theme_row_on',$this->bo->xi['theme_row_on']);
-
+
// ---- so called "TOOLBAR" between the msg header
data and the message siaplay
switch
($GLOBALS['phpgw']->msg->get_pref_value('button_type'))
{
@@ -240,10 +240,12 @@
$this->tpl->set_var('href_replyall',$this->bo->xi['href_replyall']);
$this->tpl->set_var('href_forward',$this->bo->xi['href_forward']);
$this->tpl->set_var('href_delete',$this->bo->xi['href_delete']);
+
$this->tpl->set_var('href_edit',$this->bo->xi['href_edit']);
$this->tpl->set_var('ilnk_reply','');
$this->tpl->set_var('ilnk_replyall','');
$this->tpl->set_var('ilnk_forward','');
$this->tpl->set_var('ilnk_delete','');
+ $this->tpl->set_var('ilnk_edit', '');
$this->tpl->set_var('href_prev_msg',$this->bo->xi['href_prev_msg']);
$this->tpl->set_var('href_next_msg',$this->bo->xi['href_next_msg']);
//$this->tpl->set_var('text_nbsp',' ');
@@ -264,10 +266,12 @@
$this->tpl->set_var('href_replyall','');
$this->tpl->set_var('href_forward','');
$this->tpl->set_var('href_delete','');
+ $this->tpl->set_var('href_edit','');
$this->tpl->set_var('ilnk_reply',$this->bo->xi['ilnk_reply']);
$this->tpl->set_var('ilnk_replyall',$this->bo->xi['ilnk_replyall']);
$this->tpl->set_var('ilnk_forward',$this->bo->xi['ilnk_forward']);
$this->tpl->set_var('ilnk_delete',$this->bo->xi['ilnk_delete']);
+ $this->tpl->sey_var('ilnk_edit',
$this->bo->xi['ilnk_edit']);
$this->tpl->set_var('href_prev_msg','');
$this->tpl->set_var('href_next_msg','');
//$this->tpl->set_var('text_nbsp','');
@@ -289,10 +293,12 @@
$this->tpl->set_var('href_replyall',$this->bo->xi['href_replyall']);
$this->tpl->set_var('href_forward',$this->bo->xi['href_forward']);
$this->tpl->set_var('href_delete',$this->bo->xi['href_delete']);
+
$this->tpl->set_var('href_edit',$this->bo->xi['href_edit']);
$this->tpl->set_var('ilnk_reply',$this->bo->xi['ilnk_reply']);
$this->tpl->set_var('ilnk_replyall',$this->bo->xi['ilnk_replyall']);
$this->tpl->set_var('ilnk_forward',$this->bo->xi['ilnk_forward']);
$this->tpl->set_var('ilnk_delete',$this->bo->xi['ilnk_delete']);
+ $this->tpl->set_var('ilnk_edit',
$this->bo->xi['ilnk_edit']);
$this->tpl->set_var('href_prev_msg','');
$this->tpl->set_var('href_next_msg','');
//$this->tpl->set_var('href_prev_msg',$this->bo->xi['href_prev_msg']);
@@ -303,16 +309,29 @@
break;
}
-
+ if( !$this->bo->flags['Draft']
+ && ( (
$GLOBALS['phpgw']->msg->get_pref_value('mail_server_type') != 'imap' //if not
imap/s skip
+ &&
$GLOBALS['phpgw']->msg->get_pref_value('mail_server_type') == 'imaps' )
+ || (
!$GLOBALS['phpgw']->msg->get_pref_value('use_sent_folder')
+ ||
$GLOBALS['phpgw']->msg->get_folder_short($GLOBALS['phpgw']->msg->get_arg_value('folder'))
+ !=
$GLOBALS['phpgw']->msg->get_folder_short($GLOBALS['phpgw']->msg->get_pref_value('sent_folder_name'))
)
+ )
+ )
+ {
+ $this->tpl->set_block('T_message_main',
'edit_message', 'edit_msg');
+ $this->tpl->set_var('edit_msg', '');
+ }
+
+
// ----- SHOW MESSAGE -------
//@set_time_limit(120);
-
+
//if ($GLOBALS['phpgw']->msg->phpgw_before_xslt ==
False)
//{
// fix a b0rk in template showing last item 2
times under XSLT
$final_V_display_part = '';
//}
-
+
$count_part_nice = count($this->bo->part_nice);
for ($i = 0; $i < $count_part_nice; $i++)
{
@@ -338,18 +357,18 @@
$this->tpl->set_var('V_display_part','');
// ----- Finished With Message_Mail
Template, Output It
$this->tpl->pfp('out','T_message_main');
-
+
// ----- Prepare a Table for this Echo
Dump
$this->tpl->set_var('title_text',$this->bo->part_nice[$i]['title_text']);
$this->tpl->set_var('display_str',$this->bo->part_nice[$i]['display_str']);
$this->tpl->parse('V_setup_echo_dump','B_setup_echo_dump');
$this->tpl->set_var('V_done_echo_dump','');
$this->tpl->pfp('out','T_message_echo_dump');
-
+
// ----- Prepare $msgball data for
phpgw_fetchbody()
$msgball =
$GLOBALS['phpgw']->msg->get_arg_value('msgball');
$msgball['part_no'] =
$this->bo->part_nice[$i]['m_part_num_mime'];
-
+
// ----- Echo This Data Directly to
the Client
// since the php version of this of
b0rked for large msgs, perhaps use sockets code?
echo '<pre>';
@@ -359,14 +378,14 @@
$this->tpl->set_var('V_setup_echo_dump','');
$this->tpl->parse('V_done_echo_dump','B_done_echo_dump');
$this->tpl->pfp('out','T_message_echo_dump');
-
+
// = = = = = ======= CLEANUP AND
EXIT PAGE ======= = = = = = =
$did_echo_dump = True;
break;
}
}
//@set_time_limit(0);
-
+
//if ($GLOBALS['phpgw']->msg->phpgw_before_xslt ==
False)
//{
// // fix a b0rk in template showing last item 2
times under XSLT
@@ -374,10 +393,10 @@
$final_V_display_part = '';
unset($final_V_display_part);
//}
-
+
// new way to handle debug data, if there is debug
data, this will put it in the template source data vars
$this->tpl->set_var('debugdata',
$GLOBALS['phpgw']->msg->dbug->notice_pagedone());
-
+
if ((isset($did_echo_dump))
&& ($did_echo_dump == True))
{
@@ -407,7 +426,7 @@
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('generic_out' => $data));
$GLOBALS['phpgw']->xslttpl->pp();
}
-
+
// ralfbecker patch dated 021124
if (isset($this->bo->xi['application']))
{
@@ -433,18 +452,18 @@
$GLOBALS['phpgw']->msg = '';
unset($GLOBALS['phpgw']->msg);
}
-
+
/*!
@function printable
- @abstract display the message indicated by the msgball data in
Printer Friendly style.
- @author Angles
+ @abstract display the message indicated by the msgball data in
Printer Friendly style.
+ @author Angles
*/
function printable()
{
// get the data we need to fill the template
$this->bo = CreateObject("email.bomessage");
$this->bo->message_data();
-
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
// we point to the global template for this
version of phpgw templatings
@@ -457,7 +476,7 @@
// we use a PRIVATE template object for 0.9.14
conpat and during xslt porting
$this->tpl =
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
}
-
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
$GLOBALS['phpgw_info']['flags']['noheader'] =
True;
@@ -469,19 +488,19 @@
{
$GLOBALS['phpgw_info']['flags']['printview'] =
True;
$GLOBALS['phpgw_info']['flags']['headonly'] =
True;
-
+
//$GLOBALS['phpgw_info']['navbar'] = '';
-
+
//$GLOBALS['phpgw']->xslttpl->add_file(array('app_data'));
-
+
// FIXME how to get rid of other template stuff
here for XSLT?
$GLOBALS['phpgw_info']['flags']['noheader'] =
True;
$GLOBALS['phpgw_info']['flags']['nonavbar'] =
True;
$GLOBALS['phpgw_info']['flags']['noappheader']
= True;
$GLOBALS['phpgw_info']['flags']['noappfooter']
= True;
}
-
-
+
+
$this->tpl->set_file(array(
'T_message_printable' =>
'message_printable.tpl',
'T_message_echo_dump' => 'message_echo_dump.tpl'
@@ -491,14 +510,14 @@
$this->tpl->set_block('T_message_printable','B_display_part','V_display_part');
$this->tpl->set_block('T_message_echo_dump','B_setup_echo_dump','V_setup_echo_dump');
$this->tpl->set_block('T_message_echo_dump','B_done_echo_dump','V_done_echo_dump');
-
+
$tpl_vars = Array(
'user_fullname' =>
$GLOBALS['phpgw_info']['user']['fullname'],
'font_family' => $this->bo->xi['theme_font'],
'theme_font' => $this->bo->xi['theme_font'],
// in the echo out template, this is a TD
background color
'theme_row_on' => '#ffffff',
-
+
'lang_from' =>
$this->bo->xi['lang_from'],
'lang_to' =>
$this->bo->xi['lang_to'],
'lang_cc' =>
$this->bo->xi['lang_cc'],
@@ -518,7 +537,7 @@
'page_title' =>
$this->bo->xi['message_subject'],
);
$this->tpl->set_var($tpl_vars);
-
+
// ---- Cc: Message Data -----
//if (isset($msg_headers->cc) &&
count($msg_headers->cc) > 0)
// $this->bo->xi['
@@ -532,7 +551,7 @@
{
$this->tpl->set_var('V_cc_data','');
}
-
+
// ---- Attachments List -----
if ($this->bo->xi['list_of_files'] != '')
{
@@ -543,7 +562,7 @@
{
$this->tpl->set_var('V_attach_list','');
}
-
+
// ----- SHOW MESSAGE -------
//@set_time_limit(120);
$count_part_nice = count($this->bo->part_nice);
@@ -562,18 +581,18 @@
$this->tpl->set_var('V_display_part','');
// ----- Finished With Message_Mail
Template, Output It
$this->tpl->pfp('out','T_message_printable');
-
+
// ----- Prepare a Table for this Echo
Dump
$this->tpl->set_var('title_text',$this->bo->part_nice[$i]['title_text']);
$this->tpl->set_var('display_str',$this->bo->part_nice[$i]['display_str']);
$this->tpl->parse('V_setup_echo_dump','B_setup_echo_dump');
$this->tpl->set_var('V_done_echo_dump','');
$this->tpl->pfp('out','T_message_echo_dump');
-
+
// ----- Prepare $msgball data for
phpgw_fetchbody()
$msgball =
$GLOBALS['phpgw']->msg->get_arg_value('msgball');
$msgball['part_no'] =
$this->bo->part_nice[$i]['m_part_num_mime'];
-
+
// ----- Echo This Data Directly to
the Client
// since the php version of this of
b0rked for large msgs, perhaps use sockets code?
echo '<pre>';
@@ -583,14 +602,14 @@
$this->tpl->set_var('V_setup_echo_dump','');
$this->tpl->parse('V_done_echo_dump','B_done_echo_dump');
$this->tpl->pfp('out','T_message_echo_dump');
-
+
// = = = = = ======= CLEANUP AND
EXIT PAGE ======= = = = = = =
$did_echo_dump = True;
break;
}
}
//@set_time_limit(0);
-
+
if ((isset($did_echo_dump))
&& ($did_echo_dump == True))
{
@@ -613,14 +632,14 @@
echo "</body> \r\n";
echo "</html> \r\n";
////$this->tpl->set_unknowns('remove');
-
+
$data = array();
//$data['appname'] = lang('E-Mail');
//$data['function_msg'] = lang('show message');
//$data['email_page'] =
$this->tpl->parse('out','T_message_printable');
//$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('generic_out' => $data));
}
-
+
if (is_object($GLOBALS['phpgw']->msg))
{
// close down ALL mailserver streams
@@ -632,6 +651,6 @@
// shut down this transaction
$GLOBALS['phpgw']->common->phpgw_exit(False);
}
-
+
}
?>
====================================================
Index: email/inc/class.uiindex.inc.php
diff -u email/inc/class.uiindex.inc.php:1.23
email/inc/class.uiindex.inc.php:1.24
--- email/inc/class.uiindex.inc.php:1.23 Thu Dec 30 23:13:50 2004
+++ email/inc/class.uiindex.inc.php Sun Mar 13 23:22:44 2005
@@ -14,7 +14,7 @@
class uiindex
{
- var $bo;
+ var $bo;
var $debug = False;
var $widgets;
var $tpl;
@@ -28,22 +28,22 @@
{
//return;
}
-
+
/*!
@function index
@abstract assembles data used for the index page, the list of
messages in a folder
@author Angles
- @description Uses the BO to do the work, then this hands off
the disply handling
- to either the old phplib template handling or the new xslt
handler index_ function.
+ @description Uses the BO to do the work, then this hands off
the disply handling
+ to either the old phplib template handling or the new xslt
handler index_ function.
*/
function index()
{
- $GLOBALS['phpgw_info']['flags']['currentapp'] = 'email';
+ $GLOBALS['phpgw_info']['flags']['currentapp'] = 'email';
print_debug('relevant phpgw_info data',
$GLOBALS['phpgw_info']['user']['preferences']['email']);
-
+
$this->bo = CreateObject('email.boindex');
$this->bo->index_data();
-
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
$this->index_old_tpl();
@@ -53,7 +53,7 @@
$this->index_xslt_tpl();
}
}
-
+
/*!
@function index_old_tpl
@abstract assembles data used for the index page, the list of
messages in a folder
@@ -61,10 +61,10 @@
@description ?
*/
function index_old_tpl()
- {
+ {
// we point to the global template for this version of
phpgw templatings
$this->tpl =& $GLOBALS['phpgw']->template;
-
+
// NOW we can out the header, because "index_data()"
filled this global
//
$GLOBALS['phpgw_info']['flags']['email_refresh_uri']
// which is needed to preserve folder and sort settings
during the auto-refresh-ing
@@ -77,11 +77,11 @@
// HOWEVER still this class must NOT invoke
$GLOBALS['phpgw']->common->phpgw_header()
// even though we had to output the header (go
figure... :)
// later: What does that mean ?
-
+
$this->bo->xi['my_layout'] =
$GLOBALS['phpgw']->msg->get_pref_value('layout');
$this->bo->xi['my_browser'] =
$GLOBALS['phpgw']->msg->browser;
-
- $this->tpl->set_file(array(
+
+ $this->tpl->set_file(array(
//'T_form_delmov_init' =>
'index_form_delmov_init.tpl',
'T_index_blocks' => 'index_blocks.tpl',
'T_index_main' =>
'index_main_b'.$this->bo->xi['my_browser'].'_l'.$this->bo->xi['my_layout'].
'.tpl'
@@ -90,17 +90,18 @@
//$this->tpl->set_block('T_index_main','B_show_size','V_show_size');
//$this->tpl->set_block('T_index_main','B_get_size','V_get_size');
//$this->tpl->set_block('T_index_blocks','B_stats_layout2','V_stats_layout2');
+
$this->tpl->set_block('T_index_main','B_empty_trash','V_empty_trash');
$this->tpl->set_block('T_index_main','B_no_messages','V_no_messages');
$this->tpl->set_block('T_index_main','B_msg_list','V_msg_list');
$this->tpl->set_block('T_index_blocks','B_mlist_form_init','V_mlist_form_init');
$this->tpl->set_block('T_index_blocks','B_arrows_form_table','V_arrows_form_table');
-
+
$this->tpl->set_var('frm_delmov_action',$this->bo->xi['frm_delmov_action']);
$this->tpl->set_var('frm_delmov_name',$this->bo->xi['frm_delmov_name']);
$this->tpl->parse('V_mlist_form_init','B_mlist_form_init');
- $this->bo->xi['V_mlist_form_init'] =
$this->tpl->get_var('V_mlist_form_init');
-
-
+ $this->bo->xi['V_mlist_form_init'] =
$this->tpl->get_var('V_mlist_form_init');
+
+
$tpl_vars = Array(
// fonts and font sizes
// 'ctrl_bar_font' =>
$this->bo->xi['ctrl_bar_font'],
@@ -115,7 +116,7 @@
'hdr_font_size' =>
$this->bo->xi['hdr_font_size'],
'hdr_font_size_sm' =>
$this->bo->xi['hdr_font_size_sm'],
'ftr_font' =>
$this->bo->xi['ftr_font'],
- // other message list stuff, we parse the mlist
block before the rest of the tpl vars are needed
+ // other message list stuff, we parse the mlist
block before the rest of the tpl vars are needed
'mlist_newmsg_char' =>
$this->bo->xi['mlist_newmsg_char'],
'mlist_newmsg_color' =>
$this->bo->xi['mlist_newmsg_color'],
'mlist_newmsg_txt' =>
$this->bo->xi['mlist_newmsg_txt'],
@@ -127,13 +128,34 @@
'compose_text' =>
$this->bo->xi['compose_text'],
'compose_link' =>
$this->bo->xi['compose_link'],
'compose_img' =>
$this->bo->xi['compose_img'],
- 'compose_clickme' =>
$this->bo->xi['compose_clickme'],
+ 'compose_clickme' =>
$this->bo->xi['compose_clickme'],
'auto_refresh_widget' =>
$this->bo->xi['auto_refresh_widget']
-
+
);
$this->tpl->set_var($tpl_vars);
- //= = = = TESTING NEW TOOLBAR WIDGET = = =
+ if(
($GLOBALS['phpgw']->msg->get_pref_value('mail_server_type') == 'imap' //if not
imap/s skip
+ ||
$GLOBALS['phpgw']->msg->get_pref_value('mail_server_type') == 'imaps' )
+ &&
$GLOBALS['phpgw']->msg->get_pref_value('use_trash_folder') //no trash then
pointless
+ &&
$GLOBALS['phpgw']->msg->get_folder_short($GLOBALS['phpgw']->msg->get_arg_value('folder'))
+ ==
$GLOBALS['phpgw']->msg->get_folder_short($GLOBALS['phpgw']->msg->get_pref_value('trash_folder_name')))//not
trash folder then don't show
+ {
+ $this->tpl->set_var(
+ array(
+ 'lang_empty_trash'
=> $this->bo->xi['lang_empty_trash'],
+ 'empty_trash_link'
=> $this->bo->xi['empty_trash_link'],
+ 'lang_empty_trash_warn'
=> $this->bo->xi['lang_empty_trash_warn']
+ )
+ );
+ $this->tpl->parse('V_empty_trash',
'B_empty_trash');
+ }
+ else
+ {
+ $this->tpl->set_var('V_empty_trash', '');
+ }
+
+
+ //= = = = TESTING NEW TOOLBAR WIDGET = = =
$this->widgets = CreateObject('email.html_widgets');
// this will have a msg to the user if messages were
moved or deleted
$this->widgets->set_toolbar_msg($GLOBALS['phpgw']->msg->report_moved_or_deleted());
@@ -141,7 +163,7 @@
$this->tpl->set_var('geek_bar',$this->widgets->get_geek_bar());
// stats row, generated in a single function call
$this->tpl->set_var('stats_data_display',
$this->bo->get_index_stats_block((string)$GLOBALS['phpgw']->msg->get_pref_value('layout')));
-
+
if ($this->bo->xi['folder_info']['number_all'] == 0)
{
$tpl_vars = Array(
@@ -157,9 +179,9 @@
else
{
$this->tpl->set_var('V_no_messages','');
-
+
$this->tpl->set_var('stats_last',$this->bo->xi['totaltodisplay']);
-
+
for ($i=0; $i <
count($this->bo->xi['msg_list_dsp']); $i++)
{
if
($this->bo->xi['msg_list_dsp'][$i]['first_item'])
@@ -170,7 +192,7 @@
{
$this->tpl->set_var('V_mlist_form_init', '');
}
- // new, unseen
+ // new, unseen
if
($this->bo->xi['msg_list_dsp'][$i]['is_unseen'])
{
$this->tpl->set_var('mlist_new_msg',$this->bo->xi['mlist_new_msg']);
@@ -223,7 +245,7 @@
$all_flags_images .=
$this->bo->xi['deleted_img'];
}
$this->tpl->set_var('all_flags_images',$all_flags_images);
-
+
// are we IN THE SENT folder or not
if (
$GLOBALS['phpgw']->msg->get_folder_short($GLOBALS['phpgw']->msg->get_arg_value('folder'))
!=
$GLOBALS['phpgw']->msg->get_folder_short($GLOBALS['phpgw']->msg->get_pref_value('sent_folder_name')))
@@ -385,10 +407,10 @@
$this->tpl->set_var('V_show_size','');
}
*/
-
+
// new way to handle debug data, if this array has
anything, put it in the template source data vars
$this->tpl->set_var('debugdata',$GLOBALS['phpgw']->msg->dbug->notice_pagedone());
-
+
// COMMENT NEXT LINE OUT for producvtion use, (unknowns
should be "remove"d in production use)
$this->tpl->set_unknowns('comment');
// production use, use this:
$this->tpl->set_unknowns("remove");
@@ -396,7 +418,7 @@
$this->tpl->pfp('out','T_index_main');
// note, for some reason, eventhough it seems we
*should* call common->phpgw_footer(),
// if we do that, the client browser will get TWO page
footers, so we do not call it here
-
+
// close down ALL mailserver streams
$GLOBALS['phpgw']->msg->end_request();
// destroy the object
@@ -413,19 +435,19 @@
function index_xslt_tpl()
{
$GLOBALS['phpgw']->xslttpl->add_file(array('app_data'));
-
+
$this->bo->xi['my_layout'] =
$GLOBALS['phpgw']->msg->get_pref_value('layout');
$this->bo->xi['my_browser'] =
$GLOBALS['phpgw']->msg->browser;
-
+
//$this->bo->xi['compose_text'] = lang('Compose');
-
- //= = = = TOOLBAR WIDGET = = =
+
+ //= = = = TOOLBAR WIDGET = = =
$this->widgets = CreateObject('email.html_widgets');
// this will have a msg to the user if messages were
moved or deleted
$this->widgets->set_toolbar_msg($GLOBALS['phpgw']->msg->report_moved_or_deleted());
$widget_toolbar = $this->widgets->get_toolbar();
$geek_bar = $this->widgets->get_geek_bar();
-
+
$data = array(
//'appname' => lang('E-Mail'),
//'function_msg' => lang('list messages'),
@@ -467,12 +489,12 @@
);
// new way to handle debug data, if this array has
anything, put it in the template source data vars
$data['debugdata'] =
$GLOBALS['phpgw']->msg->dbug->notice_pagedone();
-
+
$GLOBALS['phpgw_info']['flags']['email']['app_header']
= lang('E-Mail') . ': ' . lang('list messages');
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('E-Mail') . ': ' . lang('list messages');
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('index' => $data));
$GLOBALS['phpgw']->xslttpl->pp();
-
+
// close down ALL mailserver streams
$GLOBALS['phpgw']->msg->end_request();
// destroy the object
@@ -482,13 +504,13 @@
/*!
@function index_xslt_javascript
- @abstract xsl file does not seem to like this stuff in it, so
put it here.
+ @abstract xsl file does not seem to like this stuff in it, so
put it here.
@author Angles
@description ?
*/
function index_xslt_javascript()
{
- // I think indenting screws this up
+ // I think indenting screws this up
$index_js = <<<EOD
<script type="text/javascript">
@@ -520,15 +542,15 @@
} else {
document.delmov.elements[i].checked = true;
}
- }
+ }
}
}
</script>
EOD;
return $index_js;
}
-
-
+
+
// DISPLAY A PRE-DEFINED MESSAGE SET ARRAY
/*!
@function mlist DEPRECIATED
@@ -539,11 +561,11 @@
function mlist()
{
//raw HTTP_POST_VARS dump
- //echo 'HTTP_POST_VARS print_r dump:<b><pre>'."\r\n";
print_r($GLOBALS['HTTP_POST_VARS']); echo '</pre><br><br>'."\r\n";
-
+ //echo 'HTTP_POST_VARS print_r dump:<b><pre>'."\r\n";
print_r($GLOBALS['HTTP_POST_VARS']); echo '</pre><br /><br />'."\r\n";
+
$this->bo = CreateObject("email.boindex");
$this->bo->mlist_data();
-
+
// we are the BO and the UI, we take care of outputting
the HTML to the client browser
// NOW we can out the header, because "index_data()"
filled this global
//
$GLOBALS['phpgw_info']['flags']['email_refresh_uri']
@@ -558,12 +580,12 @@
// HOWEVER still this class must NOT invoke
$GLOBALS['phpgw']->common->phpgw_header()
// even though we had to output the header and navbar,
(go figure... :)
- // MUCH of this data may not be necessary nor used for
mlists
+ // MUCH of this data may not be necessary nor used for
mlists
$this->bo->xi['my_layout'] =
$GLOBALS['phpgw']->msg->prefs['layout'];
$this->bo->xi['my_browser'] =
$GLOBALS['phpgw']->msg->browser;
-
+
//$GLOBALS['phpgw']->template =
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
- $GLOBALS['phpgw']->template->set_file(array(
+ $GLOBALS['phpgw']->template->set_file(array(
//'T_form_delmov_init' =>
'index_form_delmov_init.tpl',
'T_index_blocks' => 'index_blocks.tpl',
'T_mlist_main' => 'index_mlist.tpl'
@@ -575,17 +597,17 @@
$GLOBALS['phpgw']->template->set_block('T_mlist_main','B_msg_list','V_msg_list');
$GLOBALS['phpgw']->template->set_block('T_index_blocks','B_mlist_form_init','V_mlist_form_init');
$GLOBALS['phpgw']->template->set_block('T_index_blocks','B_arrows_form_table','V_arrows_form_table');
-
+
$GLOBALS['phpgw']->template->set_var('frm_delmov_action',$this->bo->xi['frm_delmov_action']);
$GLOBALS['phpgw']->template->set_var('frm_delmov_name',$this->bo->xi['frm_delmov_name']);
$GLOBALS['phpgw']->template->parse('V_mlist_form_init','B_mlist_form_init');
$this->bo->xi['V_mlist_form_init'] =
$GLOBALS['phpgw']->template->get_var('V_mlist_form_init');
-
+
// font size options (this feature currently BROKEN)
$this->bo->xi['font_size_offset'] = 0;
//$this->bo->xi['font_size_offset'] = 2;
// FIXME: font_size_offset needs to be put into the
prefs db, bo, and ui
-
+
$font_size = Array (
0 => ((-5) + $this->bo->xi['font_size_offset']),
1 => ((-4) + $this->bo->xi['font_size_offset']),
@@ -627,14 +649,14 @@
'hdr_font_size' =>
$this->bo->xi['hdr_font_size'],
'hdr_font_size_sm' =>
$this->bo->xi['hdr_font_size_sm'],
'ftr_font' =>
$this->bo->xi['ftr_font'],
- // other message list stuff, we parse the mlist
block before the rest of the tpl vars are needed
+ // other message list stuff, we parse the mlist
block before the rest of the tpl vars are needed
'mlist_newmsg_char' =>
$this->bo->xi['mlist_newmsg_char'],
'mlist_newmsg_color' =>
$this->bo->xi['mlist_newmsg_color'],
'mlist_newmsg_txt' =>
$this->bo->xi['mlist_newmsg_txt'],
'images_dir' =>
$this->bo->xi['svr_image_dir']
);
$GLOBALS['phpgw']->template->set_var($tpl_vars);
-
+
if ($this->bo->xi['folder_info']['number_all'] == 0)
{
$tpl_vars = Array(
@@ -650,9 +672,9 @@
else
{
$GLOBALS['phpgw']->template->set_var('V_no_messages','');
-
+
$GLOBALS['phpgw']->template->set_var('stats_last',$this->bo->xi['totaltodisplay']);
-
+
for ($i=0; $i <
count($this->bo->xi['msg_list_dsp']); $i++)
{
// NOT SUPPORTED YET IN MLIST
@@ -770,7 +792,7 @@
'delmov_listbox' =>
$this->bo->xi['delmov_listbox']
);
$GLOBALS['phpgw']->template->set_var($tpl_vars);
-
+
// make the voluminous MLIST hidden vars array
$loop_to =
count($GLOBALS['phpgw']->msg->args['mlist_set']);
$mlist_hidden_vars = '';
@@ -779,10 +801,10 @@
$this_msg_num =
$GLOBALS['phpgw']->msg->args['mlist_set'][$i];
$mlist_hidden_vars .= '<input type="hidden"
name="mlist_set['.(string)$i.']" value="'.$this_msg_num.'">'."\r\n";
}
- // make the first prev next last arrows
+ // make the first prev next last arrows
$GLOBALS['phpgw']->template->set_var('mlist_hidden_vars',$mlist_hidden_vars);
-
$GLOBALS['phpgw']->template->parse('V_arrows_form_table','B_arrows_form_table');
-
+
$GLOBALS['phpgw']->template->parse('V_arrows_form_table','B_arrows_form_table');
+
// FOLDER SIZE N/A FOR MLIST SETS
$GLOBALS['phpgw']->template->set_var('V_get_size',$this->bo->xi['stats_size']);
$GLOBALS['phpgw']->template->set_var('V_show_size',$this->bo->xi['stats_size']);
@@ -804,14 +826,14 @@
$GLOBALS['phpgw']->template->set_var('V_show_size','');
}
*/
-
+
$GLOBALS['phpgw']->msg->end_request();
-
+
// we are the BO and the UI, we take care of outputting
the HTML to the client browser
// Template->pparse means "print parse" which parses
the template and uses php print command
// to output the HTML, note "unknowns" are never
handled ("finished") in that method.
//$GLOBALS['phpgw']->template->pparse('out','T_index_main');
-
+
// COMMENT NEXT LINE OUT for producvtion use, (unknowns
should be "remove"d in production use)
//$GLOBALS['phpgw']->template->set_unknowns("comment");
// production use, use this:
$GLOBALS['phpgw']->template->set_unknowns("remove");
@@ -820,7 +842,7 @@
// note, for some reason, eventhough it seems we
*should* call common->phpgw_footer(),
// if we do that, the client browser will get TWO page
footers, so we do not call it here
}
-
-
+
+
}
?>
====================================================
Index: email/inc/class.uifolder.inc.php
diff -u email/inc/class.uifolder.inc.php:1.6
email/inc/class.uifolder.inc.php:1.7
--- email/inc/class.uifolder.inc.php:1.6 Thu Dec 30 23:13:50 2004
+++ email/inc/class.uifolder.inc.php Sun Mar 13 23:22:44 2005
@@ -27,12 +27,12 @@
{
//return;
}
-
+
function folder()
{
$this->bo = CreateObject('email.bofolder');
$this->bo->folder();
-
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
// we point to the global template for this
version of phpgw templatings
@@ -44,7 +44,7 @@
// we use a PRIVATE template object for 0.9.14
conpat and during xslt porting
$this->tpl =
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
}
-
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
unset($GLOBALS['phpgw_info']['flags']['noheader']);
@@ -59,21 +59,21 @@
{
$GLOBALS['phpgw']->xslttpl->add_file(array('app_data'));
}
-
+
$this->tpl->set_file(
Array(
'T_folder_out' => 'folder.tpl'
)
);
-
$this->tpl->set_block('T_folder_out','B_folder_list','V_folder_list');
-
- //= = = = TESTING NEW TOOLBAR WIDGET = = =
+
$this->tpl->set_block('T_folder_out','B_folder_list','V_folder_list');
+
+ //= = = = TESTING NEW TOOLBAR WIDGET = = =
$this->widgets = CreateObject('email.html_widgets');
// this will have a msg to the user if folder was
renamed, created, or deleted
$this->widgets->set_toolbar_msg($this->bo->xi['action_report']);
$this->tpl->set_var('widget_toolbar',$this->widgets->get_toolbar());
-
-
+
+
for ($i=0;
$i<count($this->bo->xi['folder_list_display']);$i++)
{
$this->tpl->set_var('list_backcolor',$this->bo->xi['folder_list_display'][$i]['list_backcolor']);
@@ -88,12 +88,12 @@
$this->tpl->set_var('all_folders_listbox',$this->bo->xi['all_folders_listbox']);
-
+
// ---- Set Up Form Variables ---
$this->tpl->set_var('form_action',$this->bo->xi['form_action']);
//$this->tpl->set_var('all_folders_listbox',$GLOBALS['phpgw']->msg->all_folders_listbox('','','',False));
//$this->tpl->set_var('select_name_rename','source_folder');
-
+
$this->tpl->set_var('form_create_txt',$this->bo->xi['form_create_txt']);
$this->tpl->set_var('form_delete_txt',$this->bo->xi['form_delete_txt']);
$this->tpl->set_var('form_rename_txt',$this->bo->xi['form_rename_txt']);
@@ -101,12 +101,12 @@
$this->tpl->set_var('form_delete_expert_txt',$this->bo->xi['form_delete_expert_txt']);
$this->tpl->set_var('form_rename_expert_txt',$this->bo->xi['form_rename_expert_txt']);
$this->tpl->set_var('form_submit_txt',$this->bo->xi['form_submit_txt']);
-
+
$this->tpl->set_var('hiddenvar_target_acctnum_name',$this->bo->xi['hiddenvar_target_acctnum_name']);
$this->tpl->set_var('hiddenvar_target_acctnum_value',$this->bo->xi['hiddenvar_target_acctnum_value']);
$this->tpl->set_var('target_fldball_boxname',$this->bo->xi['target_fldball_boxname']);
-
- // ---- Set Up Other Variables ---
+
+ // ---- Set Up Other Variables ---
$this->tpl->set_var('title_backcolor',$this->bo->xi['title_backcolor']);
$this->tpl->set_var('title_textcolor',$this->bo->xi['title_textcolor']);
$this->tpl->set_var('title_text',$this->bo->xi['title_text']);
@@ -114,18 +114,18 @@
//$this->tpl->set_var('label_messages_text',$this->bo->xi['label_messages_text']);
$this->tpl->set_var('label_new_text',$this->bo->xi['label_new_text']);
$this->tpl->set_var('label_total_text',$this->bo->xi['label_total_text']);
-
+
$this->tpl->set_var('view_txt',$this->bo->xi['view_txt']);
$this->tpl->set_var('view_lnk',$this->bo->xi['view_lnk']);
-
+
//$this->tpl->set_var('view_long_txt',$this->bo->xi['view_long_txt']);
//$this->tpl->set_var('view_long_lnk',$this->bo->xi['view_long_lnk']);
//$this->tpl->set_var('view_short_txt',$this->bo->xi['view_short_txt']);
//$this->tpl->set_var('view_short_lnk',$this->bo->xi['view_short_lnk']);
-
+
$this->tpl->set_var('the_font',$this->bo->xi['the_font']);
$this->tpl->set_var('th_backcolor',$this->bo->xi['th_backcolor']);
-
+
// new way to handle debug data, if there is debug
data, this will put it in the template source data vars
$this->tpl->set_var('debugdata',
$GLOBALS['phpgw']->msg->dbug->notice_pagedone());
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
@@ -150,7 +150,7 @@
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('generic_out' => $data));
$GLOBALS['phpgw']->xslttpl->pp();
}
-
+
// close down ALL mailserver streams
$GLOBALS['phpgw']->msg->end_request();
// destroy the object
====================================================
Index: email/inc/class.uicompose.inc.php
diff -u email/inc/class.uicompose.inc.php:1.6
email/inc/class.uicompose.inc.php:1.7
--- email/inc/class.uicompose.inc.php:1.6 Thu Dec 30 23:13:50 2004
+++ email/inc/class.uicompose.inc.php Sun Mar 13 23:22:44 2005
@@ -9,12 +9,12 @@
* Free Software Foundation; either version 2 of the License, or (at
your *
* option) any later version.
*
\**************************************************************************/
-
+
/* $Id$ */
-
+
class uicompose
{
- var $bo;
+ var $bo;
var $debug = 0;
var $tpl;
var $widgets;
@@ -27,7 +27,7 @@
{
//return;
}
-
+
/*!
@function compose
@abstract calls bocompose and makes the compose page
@@ -36,22 +36,22 @@
@access public
*/
function compose($reuse_feed_args='')
- {
+ {
if ((is_string($reuse_feed_args))
&& ($reuse_feed_args == ''))
{
// we were passed an empty string, make it an
empty array just to be consistant
$reuse_feed_args = array();
-
+
}
- // ok, class.spell will pass $special_instructions as
$reuse_feed_args string data,
+ // ok, class.spell will pass $special_instructions as
$reuse_feed_args string data,
// this must be passed onto bocompose->compose()
-
+
$this->bo = CreateObject("email.bocompose");
- // concept of $reuse_feed_args is depreciated HOWEVER
the spell code will
+ // concept of $reuse_feed_args is depreciated HOWEVER
the spell code will
// pass "special_instructions" back to bocompose, so
leave this here
$this->bo->compose($reuse_feed_args);
-
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
// we point to the global template for this
version of phpgw templatings
@@ -63,7 +63,7 @@
// we use a PRIVATE template object for 0.9.14
conpat and during xslt porting
$this->tpl =
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
}
-
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
// we are the BO and the UI, we take care of
outputting the HTML to the client browser
@@ -77,20 +77,20 @@
{
$GLOBALS['phpgw']->xslttpl->add_file(array('app_data'));
}
-
+
$this->tpl->set_file(
Array(
'T_compose_out' => 'compose.tpl'
)
);
$this->tpl->set_block('T_compose_out','B_checkbox_sig','V_checkbox_sig');
-
+
if ($this->debug > 2) { echo 'GLOBALS[phpgw_info]
dump:<pre>'; print_r($GLOBALS['phpgw_info']) ; echo '</pre>'; }
-
- //= = = = TOOLBAR WIDGET = = =
+
+ //= = = = TOOLBAR WIDGET = = =
$this->widgets = CreateObject('email.html_widgets');
$this->tpl->set_var('widget_toolbar',$this->widgets->get_toolbar());
-
+
// fill template vars
$tpl_vars = Array(
'to_box_value' =>
$this->bo->xi['to_box_value'],
@@ -131,9 +131,10 @@
'addressbook_button' =>
$this->bo->xi['addressbook_button'],
'send_button' =>
$this->bo->xi['send_button'],
'spellcheck_button' =>
$this->bo->xi['spellcheck_button'],
- 'attachfile_js_button' =>
$this->bo->xi['attachfile_js_button'],
+ 'attachfile_js_button' =>
$this->bo->xi['attachfile_js_button'],
'attachfile_js_onclick' =>
$this->bo->xi['attachfile_js_onclick'],
- 'body_box_name' =>
$this->bo->xi['body_box_name']
+ 'body_box_name' =>
$this->bo->xi['body_box_name'],
+ 'save_button' =>
$this->bo->xi['save_button']
);
$this->tpl->set_var($tpl_vars);
if ($this->bo->xi['ischecked_checkbox_sig'])
@@ -161,7 +162,7 @@
{
$this->tpl->set_var('ischecked_checkbox_req_notify','');
}
-
+
// new way to handle debug data, if there is debug
data, this will put it in the template source data vars
$this->tpl->set_var('debugdata',
$GLOBALS['phpgw']->msg->dbug->notice_pagedone());
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
@@ -178,11 +179,10 @@
//$data['appname'] = lang('E-Mail');
//$data['function_msg'] = lang('compose
message');
$data['email_page'] =
$this->tpl->parse('out','T_compose_out');
-
//$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('uimessage' => $data));
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('generic_out' => $data));
$GLOBALS['phpgw']->xslttpl->pp();
}
-
+
$GLOBALS['phpgw']->msg->end_request();
}
}
====================================================
Index: email/inc/class.uifilters.inc.php
diff -u email/inc/class.uifilters.inc.php:1.15
email/inc/class.uifilters.inc.php:1.16
--- email/inc/class.uifilters.inc.php:1.15 Thu Dec 30 23:13:50 2004
+++ email/inc/class.uifilters.inc.php Sun Mar 13 23:22:44 2005
@@ -15,15 +15,15 @@
/*!
@class uifilters
- @abstract UI code for display of filter list and creating or editing
individual filters.
- NOTE that class bofilters will leave the pref filter data with any html
encoding AS-IS if
- it sees "uifilters" in the menuaction. So the UI functions should call
functions in this
- class because "ui" is in the menuaction. HOWEVER any real action or use
or submission
- of the filter data MUST actually call a function in class "bofilters"
so that the lack of
- "uifilters" in the menuaction triggers the database defanging (html
decoding) of the
- pref filter data. So actually showing the filters requires leaving the
html encoding intact.
- This encoding is referring to the pref table "database defanging" of
certain offensive chars,
- like slashes and quote chars.
+ @abstract UI code for display of filter list and creating or editing
individual filters.
+ NOTE that class bofilters will leave the pref filter data with any html
encoding AS-IS if
+ it sees "uifilters" in the menuaction. So the UI functions should call
functions in this
+ class because "ui" is in the menuaction. HOWEVER any real action or use
or submission
+ of the filter data MUST actually call a function in class "bofilters"
so that the lack of
+ "uifilters" in the menuaction triggers the database defanging (html
decoding) of the
+ pref filter data. So actually showing the filters requires leaving the
html encoding intact.
+ This encoding is referring to the pref table "database defanging" of
certain offensive chars,
+ like slashes and quote chars.
@author Angles
*/
class uifilters
@@ -41,10 +41,10 @@
/*!
@function uifilters
- @abstract constructor
- @discussion This actually creates the bofilters object, in
which the bo constructor reads
- the filter data from prefs, leaving the html encoding in tact
if the string "uifilters" is in the
- menuaction.
+ @abstract constructor
+ @discussion This actually creates the bofilters object, in
which the bo constructor reads
+ the filter data from prefs, leaving the html encoding in tact
if the string "uifilters" is in the
+ menuaction.
@author Angles
*/
function uifilters()
@@ -55,15 +55,15 @@
$this->bo = CreateObject("email.bofilters");
//return;
}
-
+
/*!
@function filters_edit
- @abstract Display an html form with an individual filter for
the user to see or edit,
- also called when makign a new filter.
+ @abstract Display an html form with an individual filter for
the user to see or edit,
+ also called when makign a new filter.
@author Angles
*/
function filters_edit()
- {
+ {
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
// we point to the global template for this
version of phpgw templatings
@@ -75,7 +75,7 @@
// we use a PRIVATE template object for 0.9.14
conpat and during xslt porting
$this->tpl =
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
}
-
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
unset($GLOBALS['phpgw_info']['flags']['noheader']);
@@ -88,7 +88,7 @@
{
$GLOBALS['phpgw']->xslttpl->add_file(array('app_data'));
}
-
+
$this->tpl->set_file(
Array(
'T_filters_out' => 'filters.tpl',
@@ -101,11 +101,11 @@
$this->tpl->set_block('T_filters_blocks','B_action_with_ignore_me','V_action_with_ignore_me');
$this->tpl->set_block('T_filters_out','B_matches_row','V_matches_row');
$this->tpl->set_block('T_filters_out','B_actions_row','V_actions_row');
-
+
// ---- LANGS ----
$this->tpl->set_var('lang_email_filters',lang('EMail
Filters'));
$this->tpl->set_var('lang_filter_name',lang('Filter
Name'));
- $this->tpl->set_var('lang_filter_number',lang('Filter
Number'));
+ $this->tpl->set_var('lang_filter_number',lang('Filter
Number'));
$this->tpl->set_var('lang_if_messages_match',lang('If
Messages Match'));
$this->tpl->set_var('lang_inbox_for_account',lang('Filter INBOX for accounts'));
$not_available_yet = ' (NA)';
@@ -129,7 +129,7 @@
$this->tpl->set_var('lang_contains',lang('Contains'));
$this->tpl->set_var('lang_notcontains',lang('Does Not
Contain'));
$this->tpl->set_var('lang_take_actions',lang('Then do
this'));
- $this->tpl->set_var('lang_or_enter_text',lang('or enter
text'));
+ $this->tpl->set_var('lang_or_enter_text',lang('or enter
text'));
$this->tpl->set_var('lang_stop_if_matched',lang('and
stop filtering'));
$this->tpl->set_var('lang_ignore_me2',lang('not used'));
$this->tpl->set_var('lang_keep',lang('Keep'));
@@ -144,27 +144,27 @@
$this->tpl->set_var('lang_submit',lang('Submit'));
$this->tpl->set_var('lang_clear',lang('Clear'));
$this->tpl->set_var('lang_cancel',lang('Cancel'));
-
-
- //= = = = TESTING NEW LISTBOX WIDGET = = =
+
+
+ //= = = = TESTING NEW LISTBOX WIDGET = = =
if (!(isset($this->widgets))
|| (!is_object($this->widgets)))
{
$this->widgets =
CreateObject('email.html_widgets');
}
-
+
// get all filters
// THIS IS DONE AUTOMATICALLY in boaction constructor
// AND the if the constructor sees "uifilters" in the
menuaction, it LEAVES the pref data html encoded for use in the form
//$this->bo->read_filter_data_from_prefs();
-
+
// ---- Filter Number ----
// what filter are we supposed to edit
$filter_num = $this->bo->obtain_filer_num();
$this->tpl->set_var('filter_num',$filter_num);
-
+
if ($this->debug > 2) { echo 'uifilters.filters:
$this->bo->obtain_filer_num(): ['.$this->bo->obtain_filer_num().'] ;
$this->bo->all_filters DUMP<pre>'; print_r($this->bo->all_filters); echo
'</pre>'."\r\n"; }
-
+
// setup some form vars
//$form_edit_filter_action = $GLOBALS['phpgw']->link(
// '/index.php',
@@ -172,24 +172,24 @@
$form_edit_filter_action = $GLOBALS['phpgw']->link(
'/index.php',
'menuaction=email.bofilters.process_submitted_data');
-
+
$form_cancel_action = $GLOBALS['phpgw']->link(
'/index.php',
'menuaction=email.uifilters.filters_list');
-
+
$apply_this_filter_url = $GLOBALS['phpgw']->link(
'/index.php',
'menuaction=email.bofilters.do_filter'
.'&filter_num='.$filter_num);
$apply_this_filter_href = '<a
href="'.$apply_this_filter_url.'">'.lang('<b>*apply*</b> this filter').'</a>';
-
+
$test_this_filter_url =
$apply_this_filter_url.'&filter_test=1';
$test_this_filter_href = '<a
href="'.$test_this_filter_url.'">'.lang('Test Run This Filter').'</a>';
-
+
$this->tpl->set_var('apply_this_filter_href',$apply_this_filter_href);
$this->tpl->set_var('test_this_filter_href',$test_this_filter_href);
-
-
+
+
// does the data exist or is this a new filter
/*
if ((isset($this->bo->all_filters[$filter_num]))
@@ -203,7 +203,7 @@
}
*/
$filter_exists = $this->bo->filter_exists($filter_num);
-
+
// ---- Filter Name ----
$filter_name_box_name = 'filtername';
if ($filter_exists)
@@ -215,10 +215,10 @@
//$filter_name_box_value = 'Filter
'.$filter_num;
$filter_name_box_value = 'My Mail Filter';
}
-
+
$this->tpl->set_var('filter_name_box_name',$filter_name_box_name);
$this->tpl->set_var('filter_name_box_value',$filter_name_box_value);
-
+
// ---- source_account_listbox_name Selected logic ----
if ($filter_exists)
{
@@ -243,7 +243,7 @@
// preselect the default account
$pre_select_multi = '0';
}
-
+
// --- many email apps offer 2 matches options rows
---
// --- others offer 1 match options row with the
option of more ---
// --- for now we will offer 2 rows ---
@@ -274,7 +274,7 @@
// get you custom built HTML combobox
(a.k.a. selectbox) widget
$account_multi_box =
$GLOBALS['phpgw']->msg->all_ex_accounts_listbox($feed_args);
$this->tpl->set_var('account_multi_box', $account_multi_box);
- $V_match_left_td =
$this->tpl->parse('V_match_account_box','B_match_account_box');
+ $V_match_left_td =
$this->tpl->parse('V_match_account_box','B_match_account_box');
}
else
{
@@ -305,7 +305,7 @@
$this->tpl->set_var('or_selected',$or_selected);
$this->tpl->set_var('and_selected',$and_selected);
$this->tpl->set_var('ignore_me_selected',$ignore_me_selected);
- $V_match_left_td =
$this->tpl->parse('V_match_and_or_ignore','B_match_and_or_ignore');
+ $V_match_left_td =
$this->tpl->parse('V_match_and_or_ignore','B_match_and_or_ignore');
}
// things both rows have
$examine_selectbox_name =
'match_'.(string)$i.'[examine]';
@@ -430,7 +430,7 @@
{
$V_action_widget =
$this->tpl->parse('V_action_with_ignore_me','B_action_with_ignore_me');
}
-
+
// --- Folders Listbox ---
$folder_listbox_name =
'action_'.$action_rownum.'[folder]';
$listbox_show_unseen = False;
@@ -453,14 +453,14 @@
$pre_select_fldball['acctnum'] =
(int)$parsed_folder['acctnum'];
//echo '$pre_select_folder:
['.$pre_select_folder.'] ; pre_select_folder_acctnum
['.$pre_select_folder_acctnum.']';
}
-
+
// TESTING new all folders listbox widget
$this->widgets->new_all_folders_megalist();
$this->widgets->prop_megalist_widget_name($folder_listbox_name);
$this->widgets->prop_megalist_preselected_fldball($pre_select_fldball);
$this->widgets->prop_megalist_first_item_text(lang('if fileto then select
destination folder'));
$folder_listbox =
$this->widgets->all_folders_megalist();
-
+
/*
$feed_args = Array(
'mailsvr_stream' => '',
@@ -477,7 +477,7 @@
$folder_listbox =
$GLOBALS['phpgw']->msg->folders_mega_listbox($feed_args);
*/
// ACTIONTEXT
- $action_textbox_name =
'action_'.$action_rownum.'[actiontext]';
+ $action_textbox_name =
'action_'.$action_rownum.'[actiontext]';
if
((!isset($this->bo->all_filters[$filter_num]['actions'][$i]['actiontext']))
||
($this->bo->all_filters[$filter_num]['actions'][$i]['actiontext'] == ''))
{
@@ -498,49 +498,49 @@
{
$stop_filtering_checkbox_checked =
'checked';
}
-
+
$this->tpl->set_var('V_action_widget',$V_action_widget);
$this->tpl->set_var('folder_listbox',
$folder_listbox);
$this->tpl->set_var('action_textbox_name',$action_textbox_name);
$this->tpl->set_var('action_textbox_txt',$action_textbox_txt);
$this->tpl->set_var('stop_filtering_checkbox_name',$stop_filtering_checkbox_name);
$this->tpl->set_var('stop_filtering_checkbox_checked',$stop_filtering_checkbox_checked);
-
//$this->tpl->parse('V_actions_row','B_actions_row',True);
-
$this->tpl->parse('V_actions_row','B_actions_row');
+
//$this->tpl->parse('V_actions_row','B_actions_row',True);
+
$this->tpl->parse('V_actions_row','B_actions_row');
}
-
+
$this->tpl->set_var('form_edit_filter_action',$form_edit_filter_action);
$this->tpl->set_var('form_cancel_action',$form_cancel_action);
-
+
$this->tpl->set_var('body_bg_color',$this->theme['bg_color']);
$this->tpl->set_var('row_on',$this->theme['row_on']);
$this->tpl->set_var('row_off',$this->theme['row_off']);
$this->tpl->set_var('row_text',$this->theme['row_text']);
-
-
-
+
+
+
// debugging result list
$mlist_html = '';
if (count($this->bo->filters) > 0)
{
-
- if ($this->debug > 1) { echo
'uifilters.filters_edit: count($this->bo->filters):
['.count($this->bo->filters).'] ; <br>'."\r\n"; }
+
+ if ($this->debug > 1) { echo
'uifilters.filters_edit: count($this->bo->filters):
['.count($this->bo->filters).'] ; <br />'."\r\n"; }
//$this->bo->sieve_to_imap_string();
// WHAT THE F*** IS THIS - this is OLD left
over code
//$this->bo->do_imap_search();
- //if ($this->debug > 0) { echo 'message list
print_r dump:<b><pre>'."\r\n"; print_r($this->bo->result_set_mlist); echo
'</pre><br><br>'."\r\n"; }
+ //if ($this->debug > 0) { echo 'message list
print_r dump:<b><pre>'."\r\n"; print_r($this->bo->result_set_mlist); echo
'</pre><br /><br />'."\r\n"; }
$this->bo->make_mlist_box();
- $mlist_html =
+ $mlist_html =
'<table border="0" cellpadding="4"
cellspacing="1" width="90%" align="center">'."\r\n"
.$this->bo->finished_mlist."\r\n"
.'</table>'."\r\n"
.'<p> </p>'."\r\n"
.$this->bo->submit_mlist_to_class_form
.'<p> </p>'."\r\n";
-
+
}
$this->tpl->set_var('V_mlist_html',$mlist_html);
-
+
// new way to handle debug data, if there is debug
data, this will put it in the template source data vars
$this->tpl->set_var('debugdata',
trim($GLOBALS['phpgw']->msg->dbug->notice_pagedone()));
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
@@ -563,79 +563,79 @@
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('generic_out' => $data));
$GLOBALS['phpgw']->xslttpl->pp();
}
-
+
// tell the msg object we are done with it
$GLOBALS['phpgw']->msg->end_request();
}
/*!
@function useless_function_echo_constants
- @abstract Echos out certain constants associated with php email
usage. Info can be obtained
- in other ways, but I leave this here in case using the sockets
classes (which must define this
- constants in the absence of the php imap extension) is perhaps
more easily debugged with
- this function. However, until that is proven I leave this as a
useless function.
- Also note the things output here may not be all the constants
anyway.
+ @abstract Echos out certain constants associated with php email
usage. Info can be obtained
+ in other ways, but I leave this here in case using the sockets
classes (which must define this
+ constants in the absence of the php imap extension) is perhaps
more easily debugged with
+ this function. However, until that is proven I leave this as a
useless function.
+ Also note the things output here may not be all the constants
anyway.
@author Angles
*/
function useless_function_echo_constants()
- {
+ {
// GENERAL INFO
- //echo 'get_loaded_extensions returns:<br><pre>';
print_r(get_loaded_extensions()); echo '</pre>';
- //echo 'phpinfo returns:<br><pre>'; print_r(phpinfo());
echo '</pre>';
-
- echo 'SA_MESSAGES:
['.(string)SA_MESSAGES.']<br>'."\r\n";
- echo 'SA_RECENT: ['.(string)SA_RECENT.']<br>'."\r\n";
- echo 'SA_UNSEEN: ['.(string)SA_UNSEEN.']<br>'."\r\n";
- echo 'SA_UIDNEXT: ['.(string)SA_UIDNEXT.']<br>'."\r\n";
- echo 'SA_UIDVALIDITY:
['.(string)SA_UIDVALIDITY.']<br>'."\r\n";
- echo 'SA_ALL: ['.(string)SA_ALL.']<br>'."\r\n";
-
- echo 'SORTDATE: ['.(string)SORTDATE.']<br>'."\r\n";
- echo 'SORTARRIVAL:
['.(string)SORTARRIVAL.']<br>'."\r\n";
- echo 'SORTFROM: ['.(string)SORTFROM.']<br>'."\r\n";
- echo 'SORTSUBJECT:
['.(string)SORTSUBJECT.']<br>'."\r\n";
- echo 'SORTTO: ['.(string)SORTTO.']<br>'."\r\n";
- echo 'SORTCC: ['.(string)SORTCC.']<br>'."\r\n";
- echo 'SORTSIZE: ['.(string)SORTSIZE.']<br>'."\r\n";
-
- echo 'TYPETEXT: ['.(string)TYPETEXT.']<br>'."\r\n";
- echo 'TYPEMULTIPART:
['.(string)TYPEMULTIPART.']<br>'."\r\n";
- echo 'TYPEMESSAGE:
['.(string)TYPEMESSAGE.']<br>'."\r\n";
- echo 'TYPEAPPLICATION:
['.(string)TYPEAPPLICATION.']<br>'."\r\n";
- echo 'TYPEAUDIO: ['.(string)TYPEAUDIO.']<br>'."\r\n";
- echo 'TYPEIMAGE: ['.(string)TYPEIMAGE.']<br>'."\r\n";
- echo 'TYPEVIDEO: ['.(string)TYPEVIDEO.']<br>'."\r\n";
- echo 'TYPEOTHER: ['.(string)TYPEOTHER.']<br>'."\r\n";
- echo 'TYPEMODEL: ['.(string)TYPEMODEL.']<br>'."\r\n";
-
- echo 'ENC7BIT: ['.(string)ENC7BIT.']<br>'."\r\n";
- echo 'ENC8BIT: ['.(string)ENC8BIT.']<br>'."\r\n";
- echo 'ENCBINARY: ['.(string)ENCBINARY.']<br>'."\r\n";
- echo 'ENCBASE64: ['.(string)ENCBASE64.']<br>'."\r\n";
- echo 'ENCQUOTEDPRINTABLE:
['.(string)ENCQUOTEDPRINTABLE.']<br>'."\r\n";
- echo 'ENCOTHER: ['.(string)ENCOTHER.']<br>'."\r\n";
- echo 'ENCUU: ['.(string)ENCUU.']<br>'."\r\n";
-
- echo 'FT_UID: ['.(string)FT_UID.']<br>'."\r\n";
- echo 'FT_PEEK: ['.(string)FT_PEEK.']<br>'."\r\n";
- echo 'FT_NOT: ['.(string)FT_NOT.']<br>'."\r\n";
- echo 'FT_INTERNAL:
['.(string)FT_INTERNAL.']<br>'."\r\n";
- echo 'FT_PREFETCHTEXT:
['.(string)FT_PREFETCHTEXT.']<br>'."\r\n";
-
- echo 'SE_UID: ['.(string)SE_UID.']<br>'."\r\n";
- echo 'SE_FREE: ['.(string)SE_FREE.']<br>'."\r\n";
- echo 'SE_NOPREFETCH:
['.(string)SE_NOPREFETCH.']<br>'."\r\n";
-
+ //echo 'get_loaded_extensions returns:<br /><pre>';
print_r(get_loaded_extensions()); echo '</pre>';
+ //echo 'phpinfo returns:<br /><pre>';
print_r(phpinfo()); echo '</pre>';
+
+ echo 'SA_MESSAGES: ['.(string)SA_MESSAGES.']<br
/>'."\r\n";
+ echo 'SA_RECENT: ['.(string)SA_RECENT.']<br />'."\r\n";
+ echo 'SA_UNSEEN: ['.(string)SA_UNSEEN.']<br />'."\r\n";
+ echo 'SA_UIDNEXT: ['.(string)SA_UIDNEXT.']<br
/>'."\r\n";
+ echo 'SA_UIDVALIDITY: ['.(string)SA_UIDVALIDITY.']<br
/>'."\r\n";
+ echo 'SA_ALL: ['.(string)SA_ALL.']<br />'."\r\n";
+
+ echo 'SORTDATE: ['.(string)SORTDATE.']<br />'."\r\n";
+ echo 'SORTARRIVAL: ['.(string)SORTARRIVAL.']<br
/>'."\r\n";
+ echo 'SORTFROM: ['.(string)SORTFROM.']<br />'."\r\n";
+ echo 'SORTSUBJECT: ['.(string)SORTSUBJECT.']<br
/>'."\r\n";
+ echo 'SORTTO: ['.(string)SORTTO.']<br />'."\r\n";
+ echo 'SORTCC: ['.(string)SORTCC.']<br />'."\r\n";
+ echo 'SORTSIZE: ['.(string)SORTSIZE.']<br />'."\r\n";
+
+ echo 'TYPETEXT: ['.(string)TYPETEXT.']<br />'."\r\n";
+ echo 'TYPEMULTIPART: ['.(string)TYPEMULTIPART.']<br
/>'."\r\n";
+ echo 'TYPEMESSAGE: ['.(string)TYPEMESSAGE.']<br
/>'."\r\n";
+ echo 'TYPEAPPLICATION: ['.(string)TYPEAPPLICATION.']<br
/>'."\r\n";
+ echo 'TYPEAUDIO: ['.(string)TYPEAUDIO.']<br />'."\r\n";
+ echo 'TYPEIMAGE: ['.(string)TYPEIMAGE.']<br />'."\r\n";
+ echo 'TYPEVIDEO: ['.(string)TYPEVIDEO.']<br />'."\r\n";
+ echo 'TYPEOTHER: ['.(string)TYPEOTHER.']<br />'."\r\n";
+ echo 'TYPEMODEL: ['.(string)TYPEMODEL.']<br />'."\r\n";
+
+ echo 'ENC7BIT: ['.(string)ENC7BIT.']<br />'."\r\n";
+ echo 'ENC8BIT: ['.(string)ENC8BIT.']<br />'."\r\n";
+ echo 'ENCBINARY: ['.(string)ENCBINARY.']<br />'."\r\n";
+ echo 'ENCBASE64: ['.(string)ENCBASE64.']<br />'."\r\n";
+ echo 'ENCQUOTEDPRINTABLE:
['.(string)ENCQUOTEDPRINTABLE.']<br />'."\r\n";
+ echo 'ENCOTHER: ['.(string)ENCOTHER.']<br />'."\r\n";
+ echo 'ENCUU: ['.(string)ENCUU.']<br />'."\r\n";
+
+ echo 'FT_UID: ['.(string)FT_UID.']<br />'."\r\n";
+ echo 'FT_PEEK: ['.(string)FT_PEEK.']<br />'."\r\n";
+ echo 'FT_NOT: ['.(string)FT_NOT.']<br />'."\r\n";
+ echo 'FT_INTERNAL: ['.(string)FT_INTERNAL.']<br
/>'."\r\n";
+ echo 'FT_PREFETCHTEXT: ['.(string)FT_PREFETCHTEXT.']<br
/>'."\r\n";
+
+ echo 'SE_UID: ['.(string)SE_UID.']<br />'."\r\n";
+ echo 'SE_FREE: ['.(string)SE_FREE.']<br />'."\r\n";
+ echo 'SE_NOPREFETCH: ['.(string)SE_NOPREFETCH.']<br
/>'."\r\n";
+
}
-
-
+
+
/*!
@function filters_list
- @abstract Display the list of all filters stored in the users
pref table.
- @discussion From here the user can choose to create or edit an
individual filter, or to test or apply
- ALL filters, or rearrange the sequence in which the filters are
applied.
- Note this may change before this doc text is updated, so see
the actual page for its exact current content.
+ @abstract Display the list of all filters stored in the users
pref table.
+ @discussion From here the user can choose to create or edit an
individual filter, or to test or apply
+ ALL filters, or rearrange the sequence in which the filters are
applied.
+ Note this may change before this doc text is updated, so see
the actual page for its exact current content.
@author Angles
*/
function filters_list()
@@ -651,7 +651,7 @@
// we use a PRIVATE template object for 0.9.14
conpat and during xslt porting
$this->tpl =
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
}
-
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
unset($GLOBALS['phpgw_info']['flags']['noheader']);
@@ -664,18 +664,18 @@
{
$GLOBALS['phpgw']->xslttpl->add_file(array('app_data'));
}
-
+
$this->tpl->set_file(
Array(
'T_filters_list' =>
'filters_list.tpl'
)
);
$this->tpl->set_block('T_filters_list','B_filter_list_row','V_filter_list_row');
-
- //= = = = TESTING NEW TOOLBAR WIDGET = = =
+
+ //= = = = TESTING NEW TOOLBAR WIDGET = = =
$this->widgets = CreateObject('email.html_widgets');
$this->tpl->set_var('widget_toolbar',$this->widgets->get_toolbar());
-
+
$var = Array(
'pref_errors' => '',
'font' =>
$this->theme['font'],
@@ -690,17 +690,17 @@
'lang_test_or_apply' => lang('test or apply ALL
filters')
);
$this->tpl->set_var($var);
-
+
$filters_list = array();
// get all filters
// THIS IS DONE AUTOMATICALLY in boaction constructor
// AND the if the constructor sees "uifilters" in the
menuaction, it LEAVES the pref data html encoded for use in the form
//$filters_list =
$this->bo->read_filter_data_from_prefs();
$filters_list = $this->bo->all_filters;
-
-
+
+
if ($this->debug > 2) { echo
'email.uifilters.filters_list: $filters_list dump<pre>';
print_r($filters_list); echo '</pre>'; }
-
+
$tr_color = $this->theme['row_off'];
$loops = count($filters_list);
if ($loops == 0)
@@ -710,7 +710,7 @@
//$tr_color =
$this->nextmatchs->alternate_row_color($tr_color);
$tr_color =
$GLOBALS['phpgw_info']['theme']['row_on'];
$tr_color_class = 'row_on';
-
+
$this->tpl->set_var('tr_color',$tr_color);
$this->tpl->set_var('tr_color_class',$tr_color_class);
$this->tpl->set_var('filter_identity',$nothing);
@@ -730,7 +730,7 @@
//$tr_color =
$this->nextmatchs->alternate_row_color($tr_color);
$tr_color = (($i + 1)/2 == floor(($i +
1)/2)) ? $GLOBALS['phpgw_info']['theme']['row_off'] :
$GLOBALS['phpgw_info']['theme']['row_on'];
$tr_color_class = (($i + 1)/2 ==
floor(($i + 1)/2)) ? 'row_off' : 'row_on';
-
+
// Don't move up the first filter (Sam Przyswa)
if ($i != 0)
{
@@ -748,7 +748,7 @@
.'&filter_num='.$i);
$filters_list[$i]['move_up_href'] = '<a
href="'.$filters_list[$i]['move_up_url'].'"></a>';
}
-
+
// Don't move down the last filter (Sam
Przyswa)
if ($i != $loops-1)
{
@@ -767,19 +767,19 @@
$filters_list[$i]['move_down_href'] = '<a
href="'.$filters_list[$i]['move_down_url'].'"></a>';
}
// end of changes (Sam Przyswa)
-
+
$filters_list[$i]['edit_url'] =
$GLOBALS['phpgw']->link(
'/index.php',
'menuaction=email.uifilters.filters_edit'
.'&filter_num='.$i);
$filters_list[$i]['edit_href'] = '<a
href="'.$filters_list[$i]['edit_url'].'">'.lang('Edit').'</a>';
-
+
$filters_list[$i]['delete_url'] =
$GLOBALS['phpgw']->link(
'/index.php',
'menuaction=email.bofilters.delete_filter'
.'&filter_num='.$i);
$filters_list[$i]['delete_href'] = '<a
href="'.$filters_list[$i]['delete_url'].'">'.lang('Delete').'</a>';
-
+
$this->tpl->set_var('tr_color',$tr_color);
$this->tpl->set_var('tr_color_class',$tr_color_class);
$this->tpl->set_var('filter_identity',$filters_list[$i]['display_string']);
@@ -808,23 +808,23 @@
.'&filter_num='.$this->bo->add_new_filter_token);
$add_new_filter_href = '<a
href="'.$add_new_filter_url.'">'.lang('New Filter').'</a>';
$this->tpl->set_var('add_new_filter_href',$add_new_filter_href);
-
+
$done_url = $GLOBALS['phpgw']->link(
'/preferences/index.php');
$done_href = '<a
href="'.$done_url.'">'.lang('Done').'</a>';
$this->tpl->set_var('done_href',$done_href);
-
+
// TEST AND APPLY LINKS
$run_all_filters_url = $GLOBALS['phpgw']->link(
'/index.php',
'menuaction=email.bofilters.do_filter');
$run_all_filters_href = '<a
href="'.$run_all_filters_url.'">'.lang('<b>APPLY ALL</b> Filters').'</a>';
$this->tpl->set_var('run_all_filters_href',$run_all_filters_href);
-
+
$test_all_filters_url =
$run_all_filters_url.'&filter_test=1';
$test_all_filters_href = '<a
href="'.$test_all_filters_url.'">'.lang('Test All Filters').'</a>';
$this->tpl->set_var('test_all_filters_href',$test_all_filters_href);
-
+
// new way to handle debug data, if there is debug
data, this will put it in the template source data vars
$this->tpl->set_var('debugdata',
$GLOBALS['phpgw']->msg->dbug->notice_pagedone());
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
@@ -847,11 +847,11 @@
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('generic_out' => $data));
$GLOBALS['phpgw']->xslttpl->pp();
}
-
+
// tell the msg object we are done with it
$GLOBALS['phpgw']->msg->end_request();
}
-
-
+
+
}
?>
====================================================
Index: email/inc/class.uipreferences.inc.php
diff -u email/inc/class.uipreferences.inc.php:1.18
email/inc/class.uipreferences.inc.php:1.19
--- email/inc/class.uipreferences.inc.php:1.18 Thu Dec 30 23:13:50 2004
+++ email/inc/class.uipreferences.inc.php Sun Mar 13 23:22:44 2005
@@ -10,9 +10,9 @@
* Free Software Foundation; either version 2 of the License, or (at
your *
* option) any later version.
*
\**************************************************************************/
-
+
/* $Id$ */
-
+
class uipreferences
{
var $public_functions = array(
@@ -39,18 +39,18 @@
$temp_prefs =
$GLOBALS['phpgw']->preferences->create_email_preferences();
$this->prefs = $temp_prefs['email'];
}
-
+
/*!
@function create_prefs_block
- @abstract create 2 columns TR's (TableRows) from preference
data as standardized in email
+ @abstract create 2 columns TR's (TableRows) from preference
data as standardized in email
bopreferences class vars ->std_prefs[] and ->cust_prefs[],
various HTML widgets supported
- @param $feed_prefs : array : preference data as standardized in
email bopreferences class
+ @param $feed_prefs : array : preference data as standardized in
email bopreferences class
vars ->std_prefs[] and ->cust_prefs[]
@result : string : HTML data accumulated for parsed prefernce
widget TR's
@discussion email bopreferences class vars ->std_prefs[] and
->cust_prefs[], as filled by
email bopreferences->init_available_prefs(), represent a
standardized preferences schema,
- this function generates TR's from that data, using elements
"id", "widget", "other_props",
- "lang_blurb", and "values" from that array structure. This
function uses that data to fill
+ this function generates TR's from that data, using elements
"id", "widget", "other_props",
+ "lang_blurb", and "values" from that array structure. This
function uses that data to fill
a template block that contatains the requested widget and the
appropriate data.
Available HTML widgets are:
* textarea
@@ -58,7 +58,7 @@
* passwordbox
* combobox
* checkbox
- If prefs data "other_props" contains "hidden", as with password
data, then the actual
+ If prefs data "other_props" contains "hidden", as with password
data, then the actual
preference value is not shown and the "text blurb" is appended
with "(hidden)".
Array can contain any number of preference "records", all
generated TR's are cumulative.
@author Angles
@@ -66,7 +66,7 @@
*/
function create_prefs_block($feed_prefs='')
{
- if ($this->debug > 0 ) { echo
'email.uipreferences.create_prefs_block: ENTERING, $this->bo->account_group:
['.$this->bo->account_group.']; $this->bo->acctnum:
['.$this->bo->acctnum.']<br>'; }
+ if ($this->debug > 0 ) { echo
'email.uipreferences.create_prefs_block: ENTERING, $this->bo->account_group:
['.$this->bo->account_group.']; $this->bo->acctnum: ['.$this->bo->acctnum.']<br
/>'; }
$return_block = '';
if(!$feed_prefs)
{
@@ -74,20 +74,20 @@
}
if (count($feed_prefs) == 0)
{
- if ($this->debug > 0 ) { echo
'email.uipreferences.create_prefs_block: LEAVING early, $feed_prefs param was
empty<br>'; }
+ if ($this->debug > 0 ) { echo
'email.uipreferences.create_prefs_block: LEAVING early, $feed_prefs param was
empty<br />'; }
return $return_block;
}
-
+
// initialial backcolor, will be alternated between
row_on and row_off
$back_color = $this->theme['row_off'];
$back_color_class = 'row_off';
-
+
// what existing user preferences data do we use to
retrieve what the user has already saved for a particular pref
if (($this->bo->account_group == 'extra_accounts')
&& (isset($this->bo->acctnum)))
{
// the existing prefs are for en ectra email
account
- if ($this->debug > 1) { echo
'email.uipreferences.create_prefs_block: ('.$this->bo->account_group.') get
user prefs from DB by calling
$GLOBALS[phpgw]->preferences->create_email_preferences(\'\',
'.$this->bo->acctnum.')<br>'; }
+ if ($this->debug > 1) { echo
'email.uipreferences.create_prefs_block: ('.$this->bo->account_group.') get
user prefs from DB by calling
$GLOBALS[phpgw]->preferences->create_email_preferences(\'\',
'.$this->bo->acctnum.')<br />'; }
//by calling this function with a specific
acctnum, we get back fully procecessed prefs data from the DB
// for the that acctnum
$temp_prefs =
$GLOBALS['phpgw']->preferences->create_email_preferences('',
$this->bo->acctnum);
@@ -96,51 +96,51 @@
else
{
// default email account, top level data
- if ($this->debug > 1) { echo
'email.uipreferences.create_prefs_block: ('.$this->bo->account_group.') for
default account, top level prefs already processed<br>'; }
+ if ($this->debug > 1) { echo
'email.uipreferences.create_prefs_block: ('.$this->bo->account_group.') for
default account, top level prefs already processed<br />'; }
$actual_user_prefs = $this->prefs;
}
if ($this->debug > 2) { echo
'email.uipreferences.create_prefs_block: $this->bo->account_group:
['.$this->bo->account_group.'] ; $this->bo->acctnum: ['.$this->bo->acctnum.'] ;
$actual_user_prefs dump:<pre>'; print_r($actual_user_prefs); echo '</pre>'; }
-
+
$c_prefs = count($feed_prefs);
// --- Prefs Loops ---
for($i=0;$i<$c_prefs;$i++)
{
$this_item = $feed_prefs[$i];
if ($this->debug > 2) { echo '** loop ['.$i.']
**: email.uipreferences.create_prefs_block: $this_item = $feed_prefs['.$i.'] =
[<code>'.serialize($this_item).'</code>] ; $this_item DUMP <pre>';
print_r($this_item); echo '</pre>'; }
-
+
// ---- do not show logic ----
// do we show this for "default" account and/or
"extra_accounts"
if (($this->bo->account_group == 'default')
&& (!stristr($this_item['accts_usage'] ,
'default')))
{
// we are not supposed to show this
item for the default account, skip this pref item
- // continue is used within looping
structures to skip the rest of the current loop
+ // continue is used within looping
structures to skip the rest of the current loop
// iteration and continue execution at
the beginning of the next iteration
- if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: skip showing this item because it is
not applicable to the default account<br>'; }
+ if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: skip showing this item because it is
not applicable to the default account<br />'; }
continue;
}
elseif (($this->bo->account_group ==
'extra_accounts')
&& (!stristr($this_item['accts_usage'] ,
'extra_accounts')))
{
// we are not supposed to show this
item for extra accounts, skip this pref item
- if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: skip showing this item because it is
not applicable to the extra accounts<br>'; }
+ if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: skip showing this item because it is
not applicable to the extra accounts<br />'; }
continue;
}
elseif (strstr($this_item['type'] , 'INACTIVE'))
{
// this item has been depreciated or
otherwise no longer is being used
// we are not supposed to show this
item, skip this pref item
- if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: skip showing this item because
"INACTIVE" is in $this_item[type] : ['.$this_item['type'].']<br>'; }
+ if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: skip showing this item because
"INACTIVE" is in $this_item[type] : ['.$this_item['type'].']<br />'; }
continue;
}
-
+
// ---- ok to show this, continue... ----
- if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: ... this item passed skip test, so it
should be displayed ...<br>'; }
+ if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: ... this item passed skip test, so it
should be displayed ...<br />'; }
// ROW BACK COLOR
//$back_color =
$this->nextmatchs->alternate_row_color($back_color);
$back_color = (($i + 1)/2 == floor(($i + 1)/2))
? $this->theme['row_off'] : $this->theme['row_on'];
$back_color_class = (($i + 1)/2 == floor(($i +
1)/2)) ? 'row_off' : 'row_on';
-
+
$var = Array(
'back_color' => $back_color,
'back_color_class' =>
$back_color_class,
@@ -148,11 +148,11 @@
'extra_text' => ''
);
$this->tpl->set_var($var);
-
+
// this will be the HTTP_POST_VARS[*key*] key
value, the "id" for the submitted pref item
if ($this->bo->account_group == 'default')
{
- if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: html post array $key for this item is
$this_item[id]: '.$this_item['id'].'<br>'; }
+ if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: html post array $key for this item is
$this_item[id]: '.$this_item['id'].'<br />'; }
$this->tpl->set_var('pref_id',
$this_item['id']);
}
else
@@ -162,38 +162,38 @@
// so the submitted prefs are then
array based, wit the acctnum being the top level array item
// and the pref item "id"'s being child
elements of that acctnum
$html_pref_id =
$this->bo->acctnum.'['.$this_item['id'].']';
- if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: html post array $key for this item is
$html_pref_id: '.$html_pref_id.'<br>'; }
+ if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: html post array $key for this item is
$html_pref_id: '.$html_pref_id.'<br />'; }
$this->tpl->set_var('pref_id',
$html_pref_id);
}
-
+
// we don't want to show a hidden value
if (!stristr($this_item['write_props'],
'hidden'))
{
- if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: obtain $this_item_value, because
"hidden" is not in $this_item[write_props]<br>'; }
+ if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: obtain $this_item_value, because
"hidden" is not in $this_item[write_props]<br />'; }
// "user strings" may have quotes and
stuff that need to be encoded b4 we display it
if ($this_item['type'] == 'user_string')
{
- if ($this->debug > 1) { echo '
* email.uipreferences.create_prefs_block: $this_item[type] == "user string" ,
before htmlspecialchars_encode:
[<code>'.$actual_user_prefs[$this_item['id']].'</code>]<br>'; }
+ if ($this->debug > 1) { echo '
* email.uipreferences.create_prefs_block: $this_item[type] == "user string" ,
before htmlspecialchars_encode:
[<code>'.$actual_user_prefs[$this_item['id']].'</code>]<br />'; }
$this_item_value =
$GLOBALS['phpgw']->msg->htmlspecialchars_encode($actual_user_prefs[$this_item['id']]);
- if ($this->debug > 1) { echo '
* email.uipreferences.create_prefs_block: $this_item[type] == "user string" ,
after htmlspecialchars_encode: [<code>'.$this_item_value.'</code>]<br>'; }
+ if ($this->debug > 1) { echo '
* email.uipreferences.create_prefs_block: $this_item[type] == "user string" ,
after htmlspecialchars_encode: [<code>'.$this_item_value.'</code>]<br />'; }
}
else
{
$this_item_value =
$actual_user_prefs[$this_item['id']];
- if ($this->debug > 1) { echo '
* email.uipreferences.create_prefs_block: $this_item[type] NOT a "user string"
, so NO htmlspecialchars_encode required: $this_item_value:
[<code>'.$this_item_value.'</code>]<br>'; }
+ if ($this->debug > 1) { echo '
* email.uipreferences.create_prefs_block: $this_item[type] NOT a "user string"
, so NO htmlspecialchars_encode required: $this_item_value:
[<code>'.$this_item_value.'</code>]<br />'; }
}
}
else
{
// if the data is hidden (ex. a
password), we do not show the value (obviously)
- if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: HIDDEN $this_item_value should be empty
string, this "hidden" is in $this_item[write_props]<br>'; }
+ if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: HIDDEN $this_item_value should be empty
string, this "hidden" is in $this_item[write_props]<br />'; }
$this_item_value = '';
// tell user we are hiding the value
(that's whay the box is empty)
$prev_lang_blurb =
$this->tpl->get_var('lang_blurb');
$this->tpl->set_var('lang_blurb',
$prev_lang_blurb.' ('.lang('hidden').')');
}
if ($this->debug > 1) { echo ' *
email.uipreferences.create_prefs_block: after processing, $this_item_value:
[<code>'.serialize($this_item_value).'</code>] ; $this_item DUMP <pre>';
print_r($this_item); echo '</pre>'; }
-
+
// ** possible widget are: **
// textarea
// textbox
@@ -205,13 +205,13 @@
//$this_item_value =
$actual_user_prefs[$this_item['id']];
$this->tpl->set_var('pref_value',
$this_item_value);
$this->tpl->parse('V_tr_textarea','B_tr_textarea');
- $done_widget =
$this->tpl->get_var('V_tr_textarea');
+ $done_widget =
$this->tpl->get_var('V_tr_textarea');
}
elseif ($this_item['widget'] == 'textbox')
{
$this->tpl->set_var('pref_value',
$this_item_value);
$this->tpl->parse('V_tr_textbox','B_tr_textbox');
- $done_widget =
$this->tpl->get_var('V_tr_textbox');
+ $done_widget =
$this->tpl->get_var('V_tr_textbox');
}
elseif ($this_item['widget'] == 'passwordbox')
{
@@ -219,14 +219,14 @@
// if $this_item['write_props']
contains the word "hidden"
$this->tpl->set_var('pref_value',
$this_item_value);
$this->tpl->parse('V_tr_passwordbox','B_tr_passwordbox');
- $done_widget =
$this->tpl->get_var('V_tr_passwordbox');
+ $done_widget =
$this->tpl->get_var('V_tr_passwordbox');
}
elseif ($this_item['widget'] == 'combobox')
{
// set up combobox available options as
KEYS array with empty VALUES
reset($this_item['values']);
$combo_availables = Array();
- $x = 0;
+ $x = 0;
while ( list ($key,$prop) = each
($this_item['values']))
{
$combo_availables[$key] = '';
@@ -240,14 +240,14 @@
$x = 0;
while ( list ($key,$prop) = each
($this_item['values']))
{
- $combobox_html .=
+ $combobox_html .=
'<option
value="'.$key.'"'.$combo_available[$key].'>'.$prop.'</option>' ."\r\n";
$x++;
}
$this_item_value = $combobox_html;
$this->tpl->set_var('pref_value',
$this_item_value);
$this->tpl->parse('V_tr_combobox','B_tr_combobox');
- $done_widget =
$this->tpl->get_var('V_tr_combobox');
+ $done_widget =
$this->tpl->get_var('V_tr_combobox');
}
elseif ($this_item['widget'] == 'checkbox')
{
@@ -261,16 +261,16 @@
}
$this->tpl->set_var('pref_value',
$this_item_value);
$this->tpl->parse('V_tr_checkbox','B_tr_checkbox');
- $done_widget =
$this->tpl->get_var('V_tr_checkbox');
+ $done_widget =
$this->tpl->get_var('V_tr_checkbox');
}
else
{
- //$this->pref_errors .= 'call for
unsupported widget:'.$this_item['widget'].'<br>';
+ //$this->pref_errors .= 'call for
unsupported widget:'.$this_item['widget'].'<br />';
$this->tpl->set_var('back_color',
$back_color);
$this->tpl->set_var('back_color_class',
$back_color_class);
$this->tpl->set_var('section_title',
'call for unsupported widget:'.$this_item['widget']);
$this->tpl->parse('V_tr_sec_title','B_tr_sec_title');
- $done_widget =
$this->tpl->get_var('V_tr_sec_title');
+ $done_widget =
$this->tpl->get_var('V_tr_sec_title');
}
// add long help if requested
if
((isset($GLOBALS['phpgw']->msg->ref_GET['show_help']))
@@ -282,10 +282,10 @@
// for each loop, add the finished widget row
to the return_block variable
$return_block .= $done_widget;
}
- if ($this->debug > 0 ) { echo
'email.uipreferences.create_prefs_block: LEAVING, returning $return_block if
widgets<br>'; }
+ if ($this->debug > 0 ) { echo
'email.uipreferences.create_prefs_block: LEAVING, returning $return_block if
widgets<br />'; }
return $return_block;
}
-
+
/*!
@function preferences
@abstract call this function to display the typical UI html
page for email preferences
@@ -316,7 +316,7 @@
$this->preferences_default_acct_zero();
}
}
-
+
/*!
@function preferences_default_acct_zero
@abstract call this function to display the UI html page for
email preferences for the Default Account
@@ -329,11 +329,11 @@
function preferences_default_acct_zero()
{
// this tells "create_prefs_block" that we are dealing
with the default email account
- if ($this->debug > 0) { echo
'email.uipreferences.preferences: ENTERING, this function *should* only be
called for the default email account prefs submission<br>'; }
- if ($this->debug > 1) { echo
'email.uipreferences.preferences: about to set $this->bo->account_group<br>'; }
+ if ($this->debug > 0) { echo
'email.uipreferences.preferences: ENTERING, this function *should* only be
called for the default email account prefs submission<br />'; }
+ if ($this->debug > 1) { echo
'email.uipreferences.preferences: about to set $this->bo->account_group<br />';
}
$this->bo->account_group = 'default';
- if ($this->debug > 1) { echo
'email.uipreferences.preferences: just set $this->bo->account_group to
['.$this->bo->account_group.']<br>'; }
-
+ if ($this->debug > 1) { echo
'email.uipreferences.preferences: just set $this->bo->account_group to
['.$this->bo->account_group.']<br />'; }
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
// we point to the global template for this
version of phpgw templatings
@@ -345,7 +345,7 @@
// we use a PRIVATE template object for 0.9.14
conpat and during xslt porting
$this->tpl =
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
}
-
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
unset($GLOBALS['phpgw_info']['flags']['noheader']);
@@ -358,7 +358,7 @@
{
$GLOBALS['phpgw']->xslttpl->add_file(array('app_data'));
}
-
+
$this->tpl->set_file(
Array(
'T_prefs_ui_out' =>
'class_prefs_ui.tpl',
@@ -375,7 +375,7 @@
$this->tpl->set_block('T_pref_blocks','B_tr_checkbox','V_tr_checkbox');
$this->tpl->set_block('T_pref_blocks','B_submit_btn_only','V_submit_btn_only');
$this->tpl->set_block('T_pref_blocks','B_submit_and_cancel_btns','V_submit_and_cancel_btns');
-
+
$var = Array(
'pref_errors' => '',
'page_title' => lang('E-Mail
preferences'),
@@ -396,16 +396,16 @@
'btn_cancel_url' =>
$GLOBALS['phpgw']->link('/preferences/index.php',array())
);
$this->tpl->set_var($var);
-
+
// this will fill the $this->bo->std_prefs[] and
cust_prefs[] "schema" arrays
- if ($this->debug > 1) { echo
'email.uipreferences.preferences: calling $this->bo->init_available_prefs() to
init $this->bo->std_prefs[] and cust_prefs[] "schema" arrays<br>'; }
- $this->bo->init_available_prefs();
-
+ if ($this->debug > 1) { echo
'email.uipreferences.preferences: calling $this->bo->init_available_prefs() to
init $this->bo->std_prefs[] and cust_prefs[] "schema" arrays<br />'; }
+ $this->bo->init_available_prefs();
+
if ($this->debug > 3) { echo
'email.uipreferences.preferences: initiated schema dump:';
$this->bo->debug_dump_prefs(); }
-
+
// initialize a local var to hold the cumulative main
block data
$prefs_ui_rows = '';
-
+
// --- Standars Prefs ---
// section title for standars prefs
$this->tpl->set_var('section_title', lang('Standard
E-Mail preferences'));
@@ -435,43 +435,43 @@
// add the finished widget row to the main block
variable
$prefs_ui_rows .= $done_widget;
// generate Std Prefs HTML Block
- if ($this->debug > 1) { echo
'email.uipreferences.preferences: about to generate the html for standard email
prefs block<br>'; }
+ if ($this->debug > 1) { echo
'email.uipreferences.preferences: about to generate the html for standard email
prefs block<br />'; }
$prefs_ui_rows .=
$this->create_prefs_block($this->bo->std_prefs);
-
+
// blank row
$this->tpl->set_var('back_color',
$this->theme['bg_color']);
$done_widget =
$this->tpl->parse('V_tr_blank','B_tr_blank');
$prefs_ui_rows .= $done_widget;
-
+
// --- Custom Prefs ---
$this->tpl->set_var('section_title', lang('Custom
E-Mail preferences'));
$done_widget =
$this->tpl->parse('V_tr_sec_title','B_tr_sec_title');
$prefs_ui_rows .= $done_widget;
// generate Custom Prefs HTML Block
- if ($this->debug > 1) { echo
'email.uipreferences.preferences: about to generate the html for custom email
prefs block<br>'; }
+ if ($this->debug > 1) { echo
'email.uipreferences.preferences: about to generate the html for custom email
prefs block<br />'; }
$prefs_ui_rows .=
$this->create_prefs_block($this->bo->cust_prefs);
-
+
// blank row
$this->tpl->set_var('back_color',
$this->theme['bg_color']);
$done_widget =
$this->tpl->parse('V_tr_blank','B_tr_blank');
$prefs_ui_rows .= $done_widget;
-
+
// --- Commit HTML Prefs rows to Main Template
// put all widget rows data into the template var
$this->tpl->set_var('prefs_ui_rows', $prefs_ui_rows);
-
+
// Submit Button only
//$submit_btn_row =
$this->tpl->parse('V_submit_btn_only','B_submit_btn_only');
//$this->tpl->set_var('submit_btn_row',
$submit_btn_row);
// Submit Button and Cancel button
$submit_btn_row =
$this->tpl->parse('V_submit_and_cancel_btns','B_submit_and_cancel_btns');
$this->tpl->set_var('submit_btn_row', $submit_btn_row);
-
+
// new way to handle debug data, if there is debug
data, this will put it in the template source data vars
$this->tpl->set_var('debugdata',
$GLOBALS['phpgw']->msg->dbug->notice_pagedone());
-
+
// output the template
- if ($this->debug > 0) { echo
'email.uipreferences.preferences: LEAVING, about to output the template<br>'; }
+ if ($this->debug > 0) { echo
'email.uipreferences.preferences: LEAVING, about to output the template<br />';
}
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
$this->tpl->set_unknowns('comment');
@@ -491,7 +491,7 @@
$GLOBALS['phpgw']->xslttpl->pp();
}
}
-
+
/*!
@function ex_accounts_edit
@abstract call this function to display the typical UI html
page Extra Email Accounts Preferences
@@ -501,17 +501,17 @@
function ex_accounts_edit()
{
// this tells "create_prefs_block" that we are dealing
with the extra email accounts
- if ($this->debug > 0) { echo
'email.uipreferences.ex_accounts_edit: ENTERING, this function *should* only be
called for the EXTRA email account prefs submission<br>'; }
- if ($this->debug > 1) { echo
'email.uipreferences.ex_accounts_edit: about to set
$this->bo->account_group<br>'; }
+ if ($this->debug > 0) { echo
'email.uipreferences.ex_accounts_edit: ENTERING, this function *should* only be
called for the EXTRA email account prefs submission<br />'; }
+ if ($this->debug > 1) { echo
'email.uipreferences.ex_accounts_edit: about to set $this->bo->account_group<br
/>'; }
$this->bo->account_group = 'extra_accounts';
- if ($this->debug > 1) { echo
'email.uipreferences.ex_accounts_edit: just set $this->bo->account_group to
['.$this->bo->account_group.']<br>'; }
-
+ if ($this->debug > 1) { echo
'email.uipreferences.ex_accounts_edit: just set $this->bo->account_group to
['.$this->bo->account_group.']<br />'; }
+
// obtain the acctnum for the extra email account we
are dealing with here
$acctnum = $this->bo->obtain_ex_acctnum();
- if ($this->debug > 1) { echo
'email.uipreferences.ex_accounts_edit: $this->bo->obtain_ex_acctnum() returns
['.serialize($acctnum).']<br>'; }
+ if ($this->debug > 1) { echo
'email.uipreferences.ex_accounts_edit: $this->bo->obtain_ex_acctnum() returns
['.serialize($acctnum).']<br />'; }
$this->bo->acctnum = $acctnum;
- if ($this->debug > 1) { echo
'email.uipreferences.ex_accounts_edit: we just set $this->bo->acctnum to
['.serialize($this->bo->acctnum).']<br>'; }
-
+ if ($this->debug > 1) { echo
'email.uipreferences.ex_accounts_edit: we just set $this->bo->acctnum to
['.serialize($this->bo->acctnum).']<br />'; }
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
// we point to the global template for this
version of phpgw templatings
@@ -523,7 +523,7 @@
// we use a PRIVATE template object for 0.9.14
conpat and during xslt porting
$this->tpl =
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
}
-
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
unset($GLOBALS['phpgw_info']['flags']['noheader']);
@@ -536,7 +536,7 @@
{
$GLOBALS['phpgw']->xslttpl->add_file(array('app_data'));
}
-
+
$this->tpl->set_file(
Array(
'T_prefs_ui_out' =>
'class_prefs_ui.tpl',
@@ -553,7 +553,7 @@
$this->tpl->set_block('T_pref_blocks','B_tr_checkbox','V_tr_checkbox');
$this->tpl->set_block('T_pref_blocks','B_submit_btn_only','V_submit_btn_only');
$this->tpl->set_block('T_pref_blocks','B_submit_and_cancel_btns','V_submit_and_cancel_btns');
-
+
$var = Array(
'pref_errors' => '',
'page_title' => lang('E-Mail Extra
Accounts'),
@@ -580,16 +580,16 @@
)
);
$this->tpl->set_var($var);
-
+
// this will fill the $this->bo->std_prefs[] and
cust_prefs[] "schema" arrays
- if ($this->debug > 1) { echo
'email.uipreferences.ex_accounts_edit: calling
$this->bo->init_available_prefs() to init $this->bo->std_prefs[] and
cust_prefs[] "schema" arrays<br>'; }
- $this->bo->init_available_prefs();
-
+ if ($this->debug > 1) { echo
'email.uipreferences.ex_accounts_edit: calling
$this->bo->init_available_prefs() to init $this->bo->std_prefs[] and
cust_prefs[] "schema" arrays<br />'; }
+ $this->bo->init_available_prefs();
+
if ($this->debug > 3) { echo
'email.uipreferences.ex_accounts_edit: initiated schema dump:';
$this->bo->debug_dump_prefs(); }
-
+
// initialize a local var to hold the cumulative main
block data
$prefs_ui_rows = '';
-
+
// --- Extra Account Pref Items ---
// section title
$this->tpl->set_var('section_title', '***
'.lang('E-Mail Extra Account').' *** '.lang('Number').' '.$this->bo->acctnum);
@@ -620,19 +620,19 @@
$done_widget =
$this->tpl->parse('V_tr_sec_title','B_tr_sec_title');
// add the finished widget row to the main block
variable
$prefs_ui_rows .= $done_widget;
-
+
// instructions: fill in everything you need
$this->tpl->set_var('section_title', lang('Please fill
in everything you need'));
// parse the block,
$done_widget =
$this->tpl->parse('V_tr_sec_title','B_tr_sec_title');
// get the parsed data and put into a local variable
- if ($this->debug > 1) { echo
'email.uipreferences.ex_accounts_edit: about to generate the html for standard
email prefs block<br>'; }
+ if ($this->debug > 1) { echo
'email.uipreferences.ex_accounts_edit: about to generate the html for standard
email prefs block<br />'; }
// add the finished widget row to the main block
variable
$prefs_ui_rows .= $done_widget;
-
+
// generate Std Prefs HTML Block
$prefs_ui_rows .=
$this->create_prefs_block($this->bo->std_prefs);
-
+
// --- Custom Prefs ---
$this->tpl->set_var('section_title', lang('Custom
E-Mail Settings').' ('.lang('required').')');
$done_widget =
$this->tpl->parse('V_tr_sec_title','B_tr_sec_title');
@@ -642,27 +642,27 @@
$done_widget =
$this->tpl->parse('V_tr_sec_title','B_tr_sec_title');
$prefs_ui_rows .= $done_widget;
// generate Custom Prefs HTML Block
- if ($this->debug > 1) { echo
'email.uipreferences.ex_accounts_edit: about to generate the html for custom
email prefs block<br>'; }
+ if ($this->debug > 1) { echo
'email.uipreferences.ex_accounts_edit: about to generate the html for custom
email prefs block<br />'; }
$prefs_ui_rows .=
$this->create_prefs_block($this->bo->cust_prefs);
-
+
// blank row
$this->tpl->set_var('back_color',
$this->theme['bg_color']);
$done_widget =
$this->tpl->parse('V_tr_blank','B_tr_blank');
$prefs_ui_rows .= $done_widget;
-
+
// --- Commit HTML Prefs rows to Main Template
// put all widget rows data into the template var
$this->tpl->set_var('prefs_ui_rows', $prefs_ui_rows);
-
+
// Submit Button and Cancel button
$submit_btn_row =
$this->tpl->parse('V_submit_and_cancel_btns','B_submit_and_cancel_btns');
$this->tpl->set_var('submit_btn_row', $submit_btn_row);
-
+
// new way to handle debug data, if there is debug
data, this will put it in the template source data vars
$this->tpl->set_var('debugdata',
$GLOBALS['phpgw']->msg->dbug->notice_pagedone());
-
+
// output the template
- if ($this->debug > 0) { echo
'email.uipreferences.ex_accounts_edit: LEAVING, about to output the
template<br>'; }
+ if ($this->debug > 0) { echo
'email.uipreferences.ex_accounts_edit: LEAVING, about to output the template<br
/>'; }
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
$this->tpl->set_unknowns('comment');
@@ -682,8 +682,8 @@
$GLOBALS['phpgw']->xslttpl->pp();
}
}
-
-
+
+
function ex_accounts_list()
{
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
@@ -697,7 +697,7 @@
// we use a PRIVATE template object for 0.9.14
conpat and during xslt porting
$this->tpl =
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
}
-
+
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
unset($GLOBALS['phpgw_info']['flags']['noheader']);
@@ -710,14 +710,14 @@
{
$GLOBALS['phpgw']->xslttpl->add_file(array('app_data'));
}
-
+
$this->tpl->set_file(
Array(
'T_prefs_ex_accounts' =>
'class_prefs_ex_accounts.tpl'
)
);
$this->tpl->set_block('T_prefs_ex_accounts','B_accts_list','V_accts_list');
-
+
$var = Array(
'pref_errors' => '',
'font' =>
$this->theme['font'],
@@ -731,10 +731,10 @@
'lang_delete' => lang('Delete')
);
$this->tpl->set_var($var);
-
+
$acctount_list = array();
$acctount_list = $this->bo->ex_accounts_list();
-
+
// here's what we get back
//$acctount_list[$X]['acctnum']
//$acctount_list[$X]['status']
@@ -745,9 +745,9 @@
//$acctount_list[$X]['edit_href']
//$acctount_list[$X]['delete_url']
//$acctount_list[$X]['delete_href']
-
+
if ($this->debug) { echo 'email:
uipreferences.ex_accounts_list: $acctount_list dump<pre>';
print_r($acctount_list); echo '</pre>'; }
-
+
$tr_color = $this->theme['row_off'];
$loops = count($acctount_list);
if ($loops == 0)
@@ -788,15 +788,15 @@
.'&ex_acctnum='.$this->bo->add_new_account_token);
$add_new_acct_href = '<a
href="'.$add_new_acct_url.'">'.lang('New Account').'</a>';
$this->tpl->set_var('add_new_acct_href',$add_new_acct_href);
-
+
$done_url = $GLOBALS['phpgw']->link(
'/preferences/index.php');
$done_href = '<a
href="'.$done_url.'">'.lang('Done').'</a>';
$this->tpl->set_var('done_href',$done_href);
-
+
// new way to handle debug data, if there is debug
data, this will put it in the template source data vars
$this->tpl->set_var('debugdata',
$GLOBALS['phpgw']->msg->dbug->notice_pagedone());
-
+
// output the template
if ($GLOBALS['phpgw']->msg->phpgw_before_xslt)
{
====================================================
Index: email/inc/class.uisearch.inc.php
diff -u email/inc/class.uisearch.inc.php:1.2
email/inc/class.uisearch.inc.php:1.3
--- email/inc/class.uisearch.inc.php:1.2 Thu Dec 30 23:13:50 2004
+++ email/inc/class.uisearch.inc.php Sun Mar 13 23:22:44 2005
@@ -353,7 +353,7 @@
$num_msg = 0;
# No messages found
- echo '<br>'.lang("No message found in folder
'%1'",$search_vars['fldball']['folder']).'<br><br><br>';
+ echo '<br />'.lang("No message found in folder
'%1'",$search_vars['fldball']['folder']).'<br /><br /><br />';
continue;
}
====================================================
Index: email/inc/hook_notifywindow.inc.php
diff -u email/inc/hook_notifywindow.inc.php:1.12
email/inc/hook_notifywindow.inc.php:1.13
--- email/inc/hook_notifywindow.inc.php:1.12 Thu Dec 30 23:13:50 2004
+++ email/inc/hook_notifywindow.inc.php Sun Mar 13 23:22:44 2005
@@ -14,7 +14,7 @@
$d1 = strtolower(substr(APP_INC,0,3));
if($d1 == 'htt' || $d1 == 'ftp' )
{
- echo "Failed attempt to break in via an old Security
Hole!<br>\n";
+ echo "Failed attempt to break in via an old Security Hole!<br
/>\n";
$GLOBALS['phpgw']->common->phpgw_exit();
}
unset($d1);
@@ -70,21 +70,21 @@
if($new_msgs>0)
{
- echo '<a
href="JavaScript:CheckEmail();"><b>New:</b> '.$new_msgs.'</a><br>';
+ echo '<a
href="JavaScript:CheckEmail();"><b>New:</b> '.$new_msgs.'</a><br />';
$urgent=true;
}
else
{
- echo '<a
href="JavaScript:CheckEmail();"><b>New:</b> None</a><br>'."\r\n";
+ echo '<a
href="JavaScript:CheckEmail();"><b>New:</b> None</a><br />'."\r\n";
}
if($inbox_data['number_new']>0)
{
- echo '<a
href="JavaScript:CheckEmail();"><b>Unread:</b>
'.$inbox_data['number_new'].'</a><br>'."\r\n";
+ echo '<a
href="JavaScript:CheckEmail();"><b>Unread:</b>
'.$inbox_data['number_new'].'</a><br />'."\r\n";
}
else
{
- echo '<a
href="JavaScript:CheckEmail();"><b>Unread:</b> None</a><br>'."\r\n";
+ echo '<a
href="JavaScript:CheckEmail();"><b>Unread:</b> None</a><br />'."\r\n";
}
if($inbox_data['number_all']<100)
====================================================
Index: email/inc/hook_notifywindow_simple.inc.php
diff -u email/inc/hook_notifywindow_simple.inc.php:1.10
email/inc/hook_notifywindow_simple.inc.php:1.11
--- email/inc/hook_notifywindow_simple.inc.php:1.10 Thu Dec 30 23:13:50 2004
+++ email/inc/hook_notifywindow_simple.inc.php Sun Mar 13 23:22:44 2005
@@ -14,7 +14,7 @@
$d1 = strtolower(substr(APP_INC,0,3));
if($d1 == 'htt' || $d1 == 'ftp' )
{
- echo "Failed attempt to break in via an old Security
Hole!<br>\n";
+ echo "Failed attempt to break in via an old Security Hole!<br
/>\n";
$GLOBALS['phpgw']->common->phpgw_exit();
}
unset($d1);
====================================================
====================================================
Index: email/inc/hook_home.inc.php
diff -u email/inc/hook_home.inc.php:1.57 email/inc/hook_home.inc.php:1.58
--- email/inc/hook_home.inc.php:1.57 Thu Dec 30 23:13:50 2004
+++ email/inc/hook_home.inc.php Sun Mar 13 23:22:44 2005
@@ -14,7 +14,7 @@
$d1 =
strtolower(substr($GLOBALS['phpgw_info']['server']['app_inc'],0,3));
if($d1 == 'htt' || $d1 == 'ftp' )
{
- echo "Failed attempt to break in via an old Security
Hole!<br>\n";
+ echo "Failed attempt to break in via an old Security Hole!<br
/>\n";
$GLOBALS['phpgw']->common->phpgw_exit();
}
unset($d1);
@@ -81,7 +81,7 @@
for($i=0; $i<$check_msgs; $i++)
{
$this_loop_msgball =
$GLOBALS['phpgw']->msg->ball_data_parse_str($msgball_list[$i]);
- //if ($debug_hook_home > 1) { echo ' *
hook_home('.__LINE__.'): $msgball_list['.$i.'] ['.$msgball_list[$i].'];
$this_loop_msgball: ['.serialize($this_loop_msgball).']<br>'; }
+ //if ($debug_hook_home > 1) { echo ' *
hook_home('.__LINE__.'): $msgball_list['.$i.'] ['.$msgball_list[$i].'];
$this_loop_msgball: ['.serialize($this_loop_msgball).']<br />'; }
$msg_headers =
$GLOBALS['phpgw']->msg->phpgw_header($this_loop_msgball);
$subject =
$GLOBALS['phpgw']->msg->get_subject($msg_headers,'');
if(strlen($subject) > 65)
@@ -276,7 +276,7 @@
'</ul>'."\r\n"
.'</td>'."\r\n"
.'</tr>'."\r\n"
- .'<tr><td><hr></td></tr>'."\r\n"
+ .'<tr><td><hr /></td></tr>'."\r\n"
.'<tr>'."\r\n"
.$form_folder_switch_opentag
.'<td width="100%" align="left">'."\r\n"
====================================================
Index: email/inc/functions.inc.php
diff -u email/inc/functions.inc.php:1.118 email/inc/functions.inc.php:1.119
--- email/inc/functions.inc.php:1.118 Thu Dec 30 23:13:50 2004
+++ email/inc/functions.inc.php Sun Mar 13 23:22:44 2005
@@ -16,7 +16,7 @@
$d1 = strtolower(substr(APP_INC,0,3));
if($d1 == 'htt' || $d1 == 'ftp' )
{
- echo "Failed attempt to break in via an old Security
Hole!<br>\n";
+ echo "Failed attempt to break in via an old Security Hole!<br
/>\n";
$GLOBALS['phpgw']->common->phpgw_exit();
}
unset($d1);
====================================================
====================================================
Index: email/inc/class.uiattach_file.inc.php
diff -u email/inc/class.uiattach_file.inc.php:1.3
email/inc/class.uiattach_file.inc.php:1.4
--- email/inc/class.uiattach_file.inc.php:1.3 Thu Dec 30 23:13:50 2004
+++ email/inc/class.uiattach_file.inc.php Sun Mar 13 23:22:44 2005
@@ -35,7 +35,7 @@
function attach()
{
- if ($this->debug > 0) { echo 'ENTERING
emai.uiattach_file.attach'.'<br>'; }
+ if ($this->debug > 0) { echo 'ENTERING
emai.uiattach_file.attach'.'<br />'; }
if ($this->debug > 2) { echo
'emai.uiattach_file.attach: initial $GLOBALS[phpgw_info][flags] DUMP<pre>';
print_r($GLOBALS['phpgw_info']['flags']); echo '</pre>'; }
//return;
@@ -84,7 +84,7 @@
}
// shut down this transaction
- if ($this->debug > 0) { echo 'LEAVING
emai.uiattach_file.attach with call to phpgw_exit'.'<br>'; }
+ if ($this->debug > 0) { echo 'LEAVING
emai.uiattach_file.attach with call to phpgw_exit'.'<br />'; }
$GLOBALS['phpgw']->common->phpgw_exit(False);
}
====================================================
Index: email/inc/class.ui_mail_debug.inc.php
diff -u email/inc/class.ui_mail_debug.inc.php:1.3
email/inc/class.ui_mail_debug.inc.php:1.4
--- email/inc/class.ui_mail_debug.inc.php:1.3 Thu Dec 30 23:13:50 2004
+++ email/inc/class.ui_mail_debug.inc.php Sun Mar 13 23:22:44 2005
@@ -2,7 +2,7 @@
/**************************************************************************\
* AngleMail - E-Mail Module for phpGroupWare
*
* http://www.anglemail.org
*
- * http://www.phpgroupware.org
*
+ * http://www.phpgroupware.org
*
*/
/**************************************************************************\
* AngleMail - E-Mail Debug Page
*
@@ -22,25 +22,25 @@
* along with this library; if not, write to the Free Software
Foundation, *
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
\**************************************************************************/
-
+
/* $Id$ */
-
+
/*!
@class ui_mail_debug
@abstract Useful debug and inline docs access page.
- @discussion Uncomment the "public_functions" line to enable the Email
Debug Page.
+ @discussion Uncomment the "public_functions" line to enable the Email
Debug Page.
Should be disabled by default, this is a developers tool.
@author Angles
- */
+ */
class ui_mail_debug
{
/**************************************************************************\
* VARS
\**************************************************************************/
-
+
/*!
@capability Debug Page
- @discussion Uncomment the next line of code to enable the Email
Debug Page.
+ @discussion Uncomment the next line of code to enable the Email
Debug Page.
This is file email / class.ui_mail_debug.inc.php
*/
// UNCOMMENT TO ENABLE THIS PAGE
@@ -49,40 +49,40 @@
var $debug=0;
//var $debug=1;
var $tpl='##NOTHING##';
-
+
/*!
@function ui_mail_debug
@abstract CONSTRUCTOR
*/
function ui_mail_debug()
{
- if ($this->debug > 0) { echo 'ENTERING:
email.ui_mail_debug.CONSTRUCTOR'.'<br>'."\r\n"; }
-
+ if ($this->debug > 0) { echo 'ENTERING:
email.ui_mail_debug.CONSTRUCTOR'.'<br />'."\r\n"; }
+
$this->widgets = CreateObject("email.html_widgets");
$this->ensure_tpl_object();
- if ($this->debug > 0) { echo 'EXIT:
email.ui_mail_debug.CONSTRUCTOR'.'<br>'."\r\n"; }
+ if ($this->debug > 0) { echo 'EXIT:
email.ui_mail_debug.CONSTRUCTOR'.'<br />'."\r\n"; }
}
-
+
/*!
@function invoke_bootatrap
@abstract convience function to bootstrap msg object
- @discussion in debugging we may not have or want a ->msg
object, but if we do
- need one, like now we need it just to get the GPC vars (or
change the code here to _GET),
+ @discussion in debugging we may not have or want a ->msg
object, but if we do
+ need one, like now we need it just to get the GPC vars (or
change the code here to _GET),
or just make -> msg object an use ->ref_GET or whatever else
you need it for
@author Angles
*/
function invoke_bootatrap()
{
- if ($this->debug > 0) { echo 'ENTERING:
email.ui_mail_debug.invoke_bootatrap'.'<br>'; }
+ if ($this->debug > 0) { echo 'ENTERING:
email.ui_mail_debug.invoke_bootatrap'.'<br />'; }
// make sure we have msg object and a server stream
$this->msg_bootstrap =
CreateObject("email.msg_bootstrap");
// FIX ME: do_login False when using msg for UTILITY,
does that still work?
//$this->msg_bootstrap->set_do_login(False);
-
$this->msg_bootstrap->ensure_mail_msg_exists('emai.ui_mail_debug.invoke_bootatrap',
$this->debug);
-
- if ($this->debug > 0) { echo 'EXITing:
email.ui_mail_debug.invoke_bootatrap'.'<br>'; }
+
$this->msg_bootstrap->ensure_mail_msg_exists('emai.ui_mail_debug.invoke_bootatrap',
$this->debug);
+
+ if ($this->debug > 0) { echo 'EXITing:
email.ui_mail_debug.invoke_bootatrap'.'<br />'; }
}
-
+
/*!
@function end_msg_session_object
@abstract convience function to logout and then clear and unset
the msg object, if it exists
@@ -91,7 +91,7 @@
*/
function end_msg_session_object()
{
- if ($this->debug > 0) { echo 'ENTERING:
email.ui_mail_debug.end_msg_session_object'.'<br>'; }
+ if ($this->debug > 0) { echo 'ENTERING:
email.ui_mail_debug.end_msg_session_object'.'<br />'; }
// kill this script, we re outa here...
if (is_object($GLOBALS['phpgw']->msg))
{
@@ -101,7 +101,7 @@
}
// WHEN do we need to call phpgw_exit now with updated
phpgw API?
//$GLOBALS['phpgw']->common->phpgw_exit(False);
- if ($this->debug > 0) { echo 'EXITing:
email.ui_mail_debug.end_msg_session_object'.'<br>'; }
+ if ($this->debug > 0) { echo 'EXITing:
email.ui_mail_debug.end_msg_session_object'.'<br />'; }
}
/*!
@@ -127,23 +127,23 @@
}
}
}
-
+
/**************************************************************************\
* CODE
\**************************************************************************/
/*!
@function index
@abstract This page is displayed by exposing this as a public
function then calling it .
- @discussion Uncomment the "public_functions" line to enable the
Email Debug Page.
- Should be disabled by default, this is a developers tool. If
enabled, call this function to
+ @discussion Uncomment the "public_functions" line to enable the
Email Debug Page.
+ Should be disabled by default, this is a developers tool. If
enabled, call this function to
display the page.
@example /index.php?menuaction=email.ui_mail_debug.index
@author Angles
- */
+ */
function index()
{
- if ($this->debug > 0) { echo 'ENTERING:
email.ui_mail_debug.index'.'<br>'; }
-
+ if ($this->debug > 0) { echo 'ENTERING:
email.ui_mail_debug.index'.'<br />'; }
+
if (is_object($GLOBALS['phpgw']->xslttpl) == False)
{
unset($GLOBALS['phpgw_info']['flags']['noheader']);
@@ -156,122 +156,122 @@
{
$GLOBALS['phpgw']->xslttpl->add_file(array('app_data'));
}
-
+
$this->tpl->set_file(array(
'T_debug_main' => 'debug.tpl'
));
$this->tpl->set_block('T_debug_main','B_before_echo','V_before_echo');
$this->tpl->set_block('T_debug_main','B_after_echo','V_after_echo');
-
-
+
+
$this->tpl->set_var('page_desc', 'Email Debug Stuff');
-
+
// make a list of available debub calls
// Enviornment data
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=phpinfo'));
//$this->widgets->set_href_target('new');
$this->widgets->set_href_clickme('phpinfo page');
$this->tpl->set_var('func_E1',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=get_defined_constants'));
$this->widgets->set_href_target('new');
$this->widgets->set_href_clickme('get_defined_constants
DUMP');
$this->tpl->set_var('func_E2',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=globals_dump'));
$this->widgets->set_href_target('new');
$this->widgets->set_href_clickme('dump the entire
globals[] array');
$this->tpl->set_var('func_E3',
$this->widgets->get_href());
-
+
// DUMP functions
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=common.debug_list_core_functions'));
$this->widgets->set_href_clickme('common.debug_list_core_functions');
$this->tpl->set_var('func_D1',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=globals_phpgw_dump'));
$this->widgets->set_href_clickme('dump the entire
globals[phpgw] structure');
$this->tpl->set_var('func_D2',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=globals_phpgw_info_dump'));
$this->widgets->set_href_clickme('dump the entire
globals[phpgw_info] structure');
$this->tpl->set_var('func_D3',
$this->widgets->get_href());
-
+
//$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=globals_phpgw_session_dump'));
//$this->widgets->set_href_clickme('dump the entire
globals[phpgw_session] structure');
//$this->tpl->set_var('func_D4',
$this->widgets->get_href());
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=ref_session_dump'));
$this->widgets->set_href_clickme('dump the entire
msg->ref_SESSION structure');
$this->tpl->set_var('func_D4',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=msg_object_dump'));
$this->widgets->set_href_clickme('dump the entire
globals[phpgw]->msg object');
$this->tpl->set_var('func_D5',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=preferences_object_dump'));
$this->widgets->set_href_clickme('dump the entire
$GLOBALS[phpgw]->preferences object');
$this->tpl->set_var('func_D6',
$this->widgets->get_href());
-
+
// inline docs
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/doc/inlinedocparser.php?app=phpgwapi'));
$this->widgets->set_href_target('new');
- $this->widgets->set_href_clickme('inlinedocparser for
phpgwapi');
+ $this->widgets->set_href_clickme('inlinedocparser for
phpgwapi');
$this->tpl->set_var('func_I1',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/doc/inlinedocparser.php?app=phpwebhosting'));
$this->widgets->set_href_target('new');
$this->widgets->set_href_clickme('inlinedocparser for
phpwebhosing VFS');
$this->tpl->set_var('func_I2',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/doc/inlinedocparser.php?app=email'));
$this->widgets->set_href_target('new');
$this->widgets->set_href_clickme('inlinedocparser for
email');
$this->tpl->set_var('func_I3',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/doc/inlinedocparser.php?app=email&fn=class.mail_msg_base.inc.php'));
$this->widgets->set_href_target('new');
$this->widgets->set_href_clickme('inlinedocparser for
email, file "class.mail_msg_base.inc.php"');
$this->tpl->set_var('func_I4',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/doc/inlinedocparser.php?app=email&fn=class.mail_msg_display.inc.php'));
$this->widgets->set_href_target('new');
$this->widgets->set_href_clickme('inlinedocparser for
email, file "class.mail_msg_display.inc.php"');
$this->tpl->set_var('func_I5',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/doc/inlinedocparser.php?app=email&fn=class.mail_msg_wrappers.inc.php'));
$this->widgets->set_href_target('new');
$this->widgets->set_href_clickme('inlinedocparser for
email, file "class.mail_msg_wrappers.inc.php"');
$this->tpl->set_var('func_I6',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/doc/inlinedocparser.php?app=email&fn=class.mail_dcom_imap_sock.inc.php'));
$this->widgets->set_href_target('new');
$this->widgets->set_href_clickme('inlinedocparser for
email, file "class.mail_dcom_imap_sock.inc.php"');
$this->tpl->set_var('func_I7',
$this->widgets->get_href());
-
+
// other stuff
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=copyinteresting'));
$this->widgets->set_href_clickme('copy emails in BOB
interesting to Local folder (no workie)');
$this->tpl->set_var('func_O1',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=env_test'));
$this->widgets->set_href_clickme('utility for testing
env code parts');
$this->tpl->set_var('func_O2',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=db_admin_make_table'));
$this->widgets->set_href_clickme('Create the email DB
table');
$this->tpl->set_var('func_O3',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=db_admin_rm_table'));
$this->widgets->set_href_clickme('Delete the email DB
table');
$this->tpl->set_var('func_O4',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=db_admin_clear_entire_table'));
$this->widgets->set_href_clickme('Wipe the email DB
table');
$this->tpl->set_var('func_O5',
$this->widgets->get_href());
-
+
$this->widgets->set_href_link($GLOBALS['phpgw']->link('/index.php','menuaction=email.ui_mail_debug.index&dfunc=db_am_table_exists'));
$this->widgets->set_href_clickme('Check if email DB
table exists');
$this->tpl->set_var('func_O6',
$this->widgets->get_href());
-
+
if (is_object($GLOBALS['phpgw']->xslttpl) == False)
{
$this->tpl->parse('V_before_echo','B_before_echo');
@@ -298,55 +298,54 @@
// new way to handle debug data, if there is
debug data, this will put it in the template source data vars
$this->tpl->set_var('debugdata',
$GLOBALS['phpgw']->msg->dbug->notice_pagedone());
$data['email_page'] =
$this->tpl->parse('out','T_debug_main');
-
//$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('generic_out' => $data));
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('generic_out' => $data));
$GLOBALS['phpgw']->xslttpl->pp();
}
-
- if ($this->debug > 0) { echo 'EXITing...:
email.ui_mail_debug.index'.'<br>'; }
-
+
+ if ($this->debug > 0) { echo 'EXITing...:
email.ui_mail_debug.index'.'<br />'; }
+
$this->end_msg_session_object();
}
-
+
function show_desired_data()
{
// DAMN, we need a ->msg just to do the ref_GET stuff
and tpl stuff
$this->invoke_bootatrap();
-
+
// NOW WE HAVE A MSG OBJECT!!! we can use its debug
functions now
-
- //echo 'REQUEST_URI:
'.$GLOBALS['phpgw']->msg->ref_SERVER['REQUEST_URI'].'<br>';
- //echo 'QUERY_STRING:
'.$GLOBALS['phpgw']->msg->ref_SERVER['QUERY_STRING'].'<br>';
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
REQUEST_URI: '.$GLOBALS['phpgw']->msg->ref_SERVER['REQUEST_URI'].'<br>');
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
QUERY_STRING: '.$GLOBALS['phpgw']->msg->ref_SERVER['QUERY_STRING'].'<br>');
-
+
+ //echo 'REQUEST_URI:
'.$GLOBALS['phpgw']->msg->ref_SERVER['REQUEST_URI'].'<br />';
+ //echo 'QUERY_STRING:
'.$GLOBALS['phpgw']->msg->ref_SERVER['QUERY_STRING'].'<br />';
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
REQUEST_URI: '.$GLOBALS['phpgw']->msg->ref_SERVER['REQUEST_URI'].'<br />');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
QUERY_STRING: '.$GLOBALS['phpgw']->msg->ref_SERVER['QUERY_STRING'].'<br />');
+
$desired_function = '';
$uri_confirm = '';
-
+
if ((isset($GLOBALS['phpgw']->msg->ref_GET['dfunc']))
&& ($GLOBALS['phpgw']->msg->ref_GET['dfunc'] != ''))
{
$desired_function =
$GLOBALS['phpgw']->msg->ref_GET['dfunc'];
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
You requested: '.$desired_function.'<br>');
-
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
You requested: '.$desired_function.'<br />');
+
// some things require you manually type in
"&confirn=1" to really make it work
if
((isset($GLOBALS['phpgw']->msg->ref_GET['confirm']))
&& ($GLOBALS['phpgw']->msg->ref_GET['confirm']
!= ''))
{
$uri_confirm =
$GLOBALS['phpgw']->msg->ref_GET['confirm'];
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
confirm token is present in URI: '.$uri_confirm.'<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
confirm token is present in URI: '.$uri_confirm.'<br />');
}
else
{
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
no confirm token is in the URI'.'<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
no confirm token is in the URI'.'<br />');
}
}
else
{
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
no desired data'.'<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
no desired data'.'<br />');
return;
}
-
+
// check against a list of available debug stuff
if ($desired_function == 'phpinfo')
{
@@ -357,7 +356,7 @@
// this function echos out its data
//echo 'get_defined_constants DUMP:<pre>';
print_r(get_defined_constants()); echo '</pre>';
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
get_defined_constants DUMP:', get_defined_constants());
-
+
}
elseif ($desired_function == 'globals_dump')
{
@@ -433,52 +432,52 @@
}
else
{
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
unknown desired debug request: '.$desired_function.']<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
unknown desired debug request: '.$desired_function.']<br />');
}
-
+
// DAMN, since we invoked bootstrap above, we should
kill the msg session
// BUT WILL WE NEED IT AGAIN?
// php does not have a definitive destructor, so we
have to guess where script will end
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
calling "end_msg_session_object" so I hope you do not need it anymore<br>');
-
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.show_desired_data('.__LINE__.'):
calling "end_msg_session_object" so I hope you do not need it anymore<br />');
+
// new way to handle debug data, if there is debug
data, this will put it in the template source data vars
//$this->tpl->set_var('debugdata',
$GLOBALS['phpgw']->msg->dbug->notice_pagedone());
// TOO SOON to end msg object
//$this->end_msg_session_object();
- }
-
+ }
+
// THIS NEVER WORKED
function copyinteresting()
{
// this function echos out its data
- echo 'This will copy from devel mail account folder
"Phpgw Interesting" to Brick sysmail folder "Interesting
Emails"<br><br>'."\r\n";
+ echo 'This will copy from devel mail account folder
"Phpgw Interesting" to Brick sysmail folder "Interesting Emails"<br /><br
/>'."\r\n";
// FROM:
&fldball[folder]=INBOX.Phpgw+Interesting&fldball[acctnum]=1
// TO:
&fldball[folder]=mail%2FInteresting+Emails&fldball[acctnum]=3
-
-
+
+
// begin TYPICAL CLASS MSG INITALIZATION ROUTINE
if (is_object($GLOBALS['phpgw']->msg))
{
- if ($this->debug > 0) { echo
'emai.ui_mail_debug.copyinteresting: is_object test: $GLOBALS[phpgw]->msg is
already set, do not create again<br>'; }
+ if ($this->debug > 0) { echo
'emai.ui_mail_debug.copyinteresting: is_object test: $GLOBALS[phpgw]->msg is
already set, do not create again<br />'; }
}
else
{
- if ($this->debug > 0) { echo
'emai.ui_mail_debug.copyinteresting: is_object test: $GLOBALS[phpgw]->msg is
NOT set, creating mail_msg object<br>'; }
+ if ($this->debug > 0) { echo
'emai.ui_mail_debug.copyinteresting: is_object test: $GLOBALS[phpgw]->msg is
NOT set, creating mail_msg object<br />'; }
$GLOBALS['phpgw']->msg =
CreateObject("email.mail_msg");
}
-
+
// for EXTERNAL CONTROL of msg class (i.e. not a result
of GET POST) it seems very important
// to specify the account number and folder in the args
array
// acctnum is expected to be an integer
$my_acctnum = 1;
// it is customary to feed the folder name in the style
of a URL encoded name, ex. SPACE is represented as a PLUS, etc...
$my_folder = urlencode("INBOX.Phpgw Interesting");
-
+
$args_array = Array();
$args_array['acctnum'] = $my_acctnum;
$args_array['folder'] = $my_folder;
$args_array['do_login'] = True;
-
+
$some_stream =
$GLOBALS['phpgw']->msg->begin_request($args_array);
if (($args_array['do_login'] == True)
&& (!$some_stream))
@@ -486,8 +485,8 @@
$GLOBALS['phpgw']->msg->login_error($GLOBALS['PHP_SELF'].', copyinteresting()');
}
// end TYPICAL CLASS MSG INITALIZATION ROUTINE
-
-
+
+
// function get_msgball_list($acctnum='', $folder='')
//not necessary and is discouraged to actually provide
any args to get_msgball_list()
// instead, a well done begin request opens the desired
accftnum folder and get_msgball_list uses that info.
@@ -495,14 +494,14 @@
echo 'Msgball List for account number ['.$my_acctnum.']
folder name ['.$my_folder.']:<pre>';
print_r($my_from_list) ;
echo '</pre>';
-
+
$GLOBALS['phpgw']->msg->end_request();
}
-
+
// this evenually made it to boaction and is not used there
function env_test()
{
- $expected_args =
+ $expected_args =
'/mail/index_php?menuaction'.','.
'fldball'.','.
'msgball'.','.
@@ -512,12 +511,12 @@
'sort'.','.
'order'.','.
'start';
-
- echo '$expected_args ['.$expected_args.']<br>';
+
+ echo '$expected_args ['.$expected_args.']<br />';
/*
$exploded_expected_args = array();
$exploded_expected_args = explode(',',$expected_args);
- if (2 > 1) { echo '$exploded_expected_args DUMP:<pre>';
print_r($exploded_expected_args); echo '</pre>'; }
+ if (2 > 1) { echo '$exploded_expected_args DUMP:<pre>';
print_r($exploded_expected_args); echo '</pre>'; }
$expected_args = array();
$loops = count($exploded_expected_args);
for ($i = 0; $i < $loops; $i++)
@@ -525,14 +524,14 @@
$arg_name = $exploded_expected_args[$i];
$expected_args[$arg_name] = '-1';
}
- if (2 > 1) { echo '$expected_args DUMP:<pre>';
print_r($expected_args); echo '</pre>'; }
-
+ if (2 > 1) { echo '$expected_args DUMP:<pre>';
print_r($expected_args); echo '</pre>'; }
+
// make sure we have msg object and a server stream
$this->msg_bootstrap =
CreateObject("email.msg_bootstrap");
$this->msg_bootstrap->set_do_login(False);
$this->msg_bootstrap->ensure_mail_msg_exists('emai.ui_mail_debug.env_test', 1);
-
- if (2 > 1) { echo
'$GLOBALS[phpgw]->msg->known_external_args DUMP:<pre>';
print_r($GLOBALS['phpgw']->msg->known_external_args); echo '</pre>'; }
+
+ if (2 > 1) { echo
'$GLOBALS[phpgw]->msg->known_external_args DUMP:<pre>';
print_r($GLOBALS['phpgw']->msg->known_external_args); echo '</pre>'; }
*/
// make sure we have msg object and a server stream
$this->msg_bootstrap =
CreateObject("email.msg_bootstrap");
@@ -542,26 +541,26 @@
// test run thru the functions
$boaction_obj->set_expected_args($expected_args);
// the URI of the redirect string contains data needed
for the next page view
-
+
//$redirect_to =
'/mail/index_php?menuaction=email.uiindex.index&fldball[folder]=INBOX&fldball[acctnum]=4&sort=1&order=1&start=0';
$redirect_to =
'/mail/index_php?menuaction=email.uimessage.message&msgball[msgnum]=102&msgball[folder]=INBOX&msgball[acctnum]=4&sort=1&order=1&start=0';
$boaction_obj->set_new_args_uri($redirect_to);
- // clear existing args, apply the new arg enviornment,
+ // clear existing args, apply the new arg enviornment,
// we get back the menuaction the redirect would have
asked for
$my_menuaction = $boaction_obj->apply_new_args_env();
- echo 'returned $my_menuaction ['.$my_menuaction.']<br>';
-
+ echo 'returned $my_menuaction ['.$my_menuaction.']<br
/>';
+
$GLOBALS['phpgw']->msg->end_request();
}
-
-
+
+
function db_admin_make_table($really_do_it=False)
{
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_make_table('.__LINE__.'):
ENTERING<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_make_table('.__LINE__.'):
ENTERING<br />');
if ($really_do_it == False)
{
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_make_table('.__LINE__.'):
param $really_do_it ['.serialize($really_do_it).'] so we are DO NOTHING, and
we EXIT<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_make_table('.__LINE__.'):
param $really_do_it ['.serialize($really_do_it).'] so we are DO NOTHING, and
we EXIT<br />');
return;
}
// this function makes a table for email in the phpgw DB
@@ -573,11 +572,11 @@
. "content text DEFAULT '' NOT NULL, "
. "PRIMARY KEY (account_id,data_key) )";
$GLOBALS['phpgw']->db->query($query,__LINE__,__FILE__);
-
+
$table_names = $GLOBALS['phpgw']->db->table_names();
//echo '$table_names dump:<pre>';
print_r($table_names); echo '</pre>';
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_make_table('.__LINE__.'):
$table_names DUMP:', $table_names);
-
+
/*
'phpgw_anglemail' => array(
'fd' => array(
@@ -590,69 +589,69 @@
'ix' => array(),
'uc' => array()
*/
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_make_table('.__LINE__.'):
LEAVING<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_make_table('.__LINE__.'):
LEAVING<br />');
}
-
+
function db_admin_rm_table($really_do_it=False)
{
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_rm_table('.__LINE__.'):
ENTERING<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_rm_table('.__LINE__.'):
ENTERING<br />');
if (!$really_do_it)
{
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_rm_table('.__LINE__.'):
param $really_do_it ['.serialize($really_do_it).'] so we are DO NOTHING, and
we EXIT<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_rm_table('.__LINE__.'):
param $really_do_it ['.serialize($really_do_it).'] so we are DO NOTHING, and
we EXIT<br />');
return;
}
// this function drops the table for email in the phpgw
DB
$sTableName = 'phpgw_anglemail';
$query = "DROP TABLE " . $sTableName;
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_rm_table('.__LINE__.'):
about to CALL
$GLOBALS[phpgw]->db->query('.$query.','.__LINE__.','.__FILE__.');<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_rm_table('.__LINE__.'):
about to CALL
$GLOBALS[phpgw]->db->query('.$query.','.__LINE__.','.__FILE__.');<br />');
$GLOBALS['phpgw']->db->query($query,__LINE__,__FILE__);
-
+
$table_names = $GLOBALS['phpgw']->db->table_names();
//echo '$table_names dump:<pre>';
print_r($table_names); echo '</pre>';
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_rm_table('.__LINE__.'):
$table_names DUMP:', $table_names);
}
-
+
function db_admin_clear_entire_table($really_do_it=False)
{
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_clear_entire_table('.__LINE__.'):
ENTERING<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_clear_entire_table('.__LINE__.'):
ENTERING<br />');
if (!$really_do_it)
{
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_clear_entire_table('.__LINE__.'):
param $really_do_it ['.serialize($really_do_it).'] so we are DO NOTHING, and
we EXIT<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_clear_entire_table('.__LINE__.'):
param $really_do_it ['.serialize($really_do_it).'] so we are DO NOTHING, and
we EXIT<br />');
return;
}
// If you issue a DELETE with no WHERE clause, all rows
are deleted.
// THIS WIPES THE TABLE CLEAN OF ALL DATA
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_clear_entire_table('.__LINE__.'):
param $really_do_it ['.serialize($really_do_it).'] so we CALL
$GLOBALS[phpgw]->db->query("DELETE FROM
phpgw_anglemail",'.__LINE__.','.__FILE__.');<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_clear_entire_table('.__LINE__.'):
param $really_do_it ['.serialize($really_do_it).'] so we CALL
$GLOBALS[phpgw]->db->query("DELETE FROM
phpgw_anglemail",'.__LINE__.','.__FILE__.');<br />');
$GLOBALS['phpgw']->db->query("DELETE FROM
phpgw_anglemail",__LINE__,__FILE__);
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_clear_entire_table('.__LINE__.'):
LEAVING<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_admin_clear_entire_table('.__LINE__.'):
LEAVING<br />');
}
-
+
function db_am_table_exists()
{
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_am_table_exists('.__LINE__.'):
ENTERING<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_am_table_exists('.__LINE__.'):
ENTERING<br />');
$look_for_me = 'phpgw_anglemail';
$found_table = False;
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_am_table_exists('.__LINE__.'):
about to call $GLOBALS[phpgw]->db->table_names()<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_am_table_exists('.__LINE__.'):
about to call $GLOBALS[phpgw]->db->table_names()<br />');
$table_names = $GLOBALS['phpgw']->db->table_names();
$table_names_serialized = serialize($table_names);
if (strstr($table_names_serialized, $look_for_me))
{
-
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_am_table_exists('.__LINE__.'):
result: table ['.$look_for_me.'] DOES exist<br>');
+
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_am_table_exists('.__LINE__.'):
result: table ['.$look_for_me.'] DOES exist<br />');
$found_table = True;
}
else
{
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_am_table_exists('.__LINE__.'):
result: table ['.$look_for_me.'] does NOT exist<br>');
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_am_table_exists('.__LINE__.'):
result: table ['.$look_for_me.'] does NOT exist<br />');
$found_table = False;
}
//echo '$table_names dump:<pre>';
print_r($table_names); echo '</pre>';
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_am_table_exists('.__LINE__.'):
$table_names DUMP:', $table_names);
-
-
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_am_table_exists('.__LINE__.'):
LEAVING: returning ['.serialize($found_table).']<br>');
+
+
$GLOBALS['phpgw']->msg->dbug->out('ui_mail_debug.db_am_table_exists('.__LINE__.'):
LEAVING: returning ['.serialize($found_table).']<br />');
return $found_table;
}
-
+
/*
// these bext functions will go inti the future SO class
function so_set_data($data_key, $content)
@@ -661,10 +660,10 @@
$data_key =
$GLOBALS['phpgw']->db->db_addslashes($data_key);
$content = serialize($content);
$content =
$GLOBALS['phpgw']->db->db_addslashes($content);
-
+
$GLOBALS['phpgw']->db->query("SELECT content FROM
phpgw_anglemail WHERE "
. "account_id = '".$account_id."' AND data_key
= '".$data_key."'",__LINE__,__FILE__);
-
+
if ($GLOBALS['phpgw']->db->num_rows()==0)
{
$GLOBALS['phpgw']->db->query("INSERT INTO
phpgw_anglemail (account_id,data_key,content) "
@@ -672,19 +671,19 @@
}
else
{
- $GLOBALS['phpgw']->db->query("UPDATE
phpgw_anglemail set content='" . $content
+ $GLOBALS['phpgw']->db->query("UPDATE
phpgw_anglemail set content='" . $content
. "' WHERE account_id='" . $account_id
. "' AND data_key='" . $data_key . "'",__LINE__,__FILE__);
}
}
-
+
function so_get_data($data_key)
{
$account_id =
get_account_id($accountid,$GLOBALS['phpgw']->session->account_id);
$data_key =
$GLOBALS['phpgw']->db->db_addslashes($data_key);
-
+
$GLOBALS['phpgw']->db->query("SELECT content FROM
phpgw_anglemail WHERE "
. "account_id = '".$account_id."' AND data_key
= '".$data_key."'",__LINE__,__FILE__);
-
+
if ($GLOBALS['phpgw']->db->num_rows()==0)
{
return False;
@@ -702,7 +701,7 @@
return $my_content;
}
}
-
+
function so_delete_data($data_key)
{
$account_id =
get_account_id($accountid,$GLOBALS['phpgw']->session->account_id);
@@ -710,7 +709,7 @@
$GLOBALS['phpgw']->db->query("DELETE FROM
phpgw_anglemail "
. " WHERE account_id='" . $account_id . "' AND
data_key='" . $data_key . "'",__LINE__,__FILE__);
}
-
+
function so_clear_all_data_this_user()
{
$account_id =
get_account_id($accountid,$GLOBALS['phpgw']->session->account_id);
@@ -718,6 +717,6 @@
. " WHERE account_id='" . $account_id .
"'",__LINE__,__FILE__);
}
*/
-
+
}
?>
====================================================
Index: email/inc/class.mail_msg_wrappers.inc.php
diff -u email/inc/class.mail_msg_wrappers.inc.php:1.39
email/inc/class.mail_msg_wrappers.inc.php:1.40
--- email/inc/class.mail_msg_wrappers.inc.php:1.39 Thu Dec 30 23:13:50 2004
+++ email/inc/class.mail_msg_wrappers.inc.php Sun Mar 13 23:22:44 2005
@@ -152,7 +152,7 @@
$meta_data['msg_structure'] = $data;
// SET_CACHE_ITEM
- //echo 'saving msg_structure to
cache<br>';
+ //echo 'saving msg_structure to
cache<br />';
$this->save_session_cache_item('msg_structure', $meta_data, $acctnum);
}
return $data;
@@ -287,7 +287,7 @@
// SET_CACHE_ITEM
// NOTE that $extra_keys is generated
FOR US in the function that saves this to appsesion cache
- //echo 'saving phpgw_header to
cache<br>';
+ //echo 'saving phpgw_header to cache<br
/>';
$this->save_session_cache_item('phpgw_header', $meta_data, $acctnum);
}
if (!$data)
@@ -480,6 +480,16 @@
return
$GLOBALS['phpgw_dcom_'.$this->acctnum]->dcom->get_flag($this->get_arg_value('mailsvr_stream'),$this->get_arg_value('["msgball"]["msgnum"]'),$flag);
}
}
+
+ /*!
+ @function phpgw_get_flag
+ @abstract ?
+ */
+ function phpgw_set_flag($msgball, $flag)
+ {
+ $this->ensure_stream_and_folder($msgball ,
'phpgw_set_flag'.' LINE '.__LINE__);
+ return $GLOBALS['phpgw_dcom_'.$msgball['acctnum']
]->dcom->set_flag($this->get_arg_value('mailsvr_stream'), $msgball['msgnum'],
$flag);
+ }
// ==== Functions For Getting A Message Or A Part (MIME Part)
Of A Message ====
@@ -547,7 +557,7 @@
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
$msgnum = $msgball['msgnum'];
$part_no = $msgball['part_no'];
- //echo 'mail_msg(_wrappers): phpgw_fetchbody:
processed: $acctnum: '.$acctnum.'; $mailsvr_stream:
'.serialize($mailsvr_stream).'; $msgnum: '.$msgnum.'; $part_no:
'.$part_no.'<br> * $msgball dump<pre>'; print_r($msgball); echo '</pre>';
+ //echo 'mail_msg(_wrappers): phpgw_fetchbody:
processed: $acctnum: '.$acctnum.'; $mailsvr_stream:
'.serialize($mailsvr_stream).'; $msgnum: '.$msgnum.'; $part_no: '.$part_no.'<br
/> * $msgball dump<pre>'; print_r($msgball); echo '</pre>';
$data = '';
$data =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->fetchbody($mailsvr_stream, $msgnum,
$part_no, $flags);
@@ -590,7 +600,7 @@
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
$msgnum = $msgball['msgnum'];
$part_no = $msgball['part_no'];
- //echo 'mail_msg(_wrappers): phpgw_fetchbody:
processed: $acctnum: '.$acctnum.'; $mailsvr_stream:
'.serialize($mailsvr_stream).'; $msgnum: '.$msgnum.'; $part_no:
'.$part_no.'<br> * $msgball dump<pre>'; print_r($msgball); echo '</pre>';
+ //echo 'mail_msg(_wrappers): phpgw_fetchbody:
processed: $acctnum: '.$acctnum.'; $mailsvr_stream:
'.serialize($mailsvr_stream).'; $msgnum: '.$msgnum.'; $part_no: '.$part_no.'<br
/> * $msgball dump<pre>'; print_r($msgball); echo '</pre>';
// notice of event
$this->event_msg_seen($msgball, 'phpgw_fetchbody');
@@ -628,7 +638,7 @@
*/
function get_msgball_list($acctnum='', $folder='',
$only_fill_cache=False)
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(wrappers).get_msgball_list: ENTERING $acctnum
['.$acctnum.'] ; $folder ['.$folder.'] <br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(wrappers).get_msgball_list: ENTERING $acctnum
['.$acctnum.'] ; $folder ['.$folder.'] <br />'); }
// IF specifying a folder, as a filter search may do,
we need to ensure stream and folder
if ((isset($acctnum))
&& ((string)$acctnum != '')
@@ -673,14 +683,14 @@
$cached_msgball_list =
$this->read_session_cache_item('msgball_list', $acctnum, $folder);
if ($cached_msgball_list)
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(wrappers).get_msgball_list: ('.__LINE__.') LEAVING,
returning appsession cached "msgball_list"<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(wrappers).get_msgball_list: ('.__LINE__.') LEAVING,
returning appsession cached "msgball_list"<br />'); }
//
//return $cached_msgball_data['msgball_list'];
return $cached_msgball_list;
}
else
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(wrappers).get_msgball_list: ('.__LINE__.') <font
color="brown">cached had NO DATA for "msgball_list"</font><br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(wrappers).get_msgball_list: ('.__LINE__.') <font
color="brown">cached had NO DATA for "msgball_list"</font><br />'); }
// right now only specialized filter searching
requires tp specify a folder
$fake_fldball = array();
$fake_fldball['acctnum'] = $acctnum;
@@ -694,7 +704,7 @@
//{
// $server_msgnum_list =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->sort($this->get_arg_value('mailsvr_stream',
$acctnum), $this->get_arg_value('sort', $acctnum),
$this->get_arg_value('order', $acctnum));
//}
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): get_msgball_list: ('.__LINE__.') <font
color="red">MAILSERVER CALL</font> calling
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->sort('.$this->get_arg_value('mailsvr_stream',
$acctnum).', '.$this->get_arg_value('sort', $acctnum).',
'.$this->get_arg_value('order', $acctnum).')<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): get_msgball_list: ('.__LINE__.') <font
color="red">MAILSERVER CALL</font> calling
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->sort('.$this->get_arg_value('mailsvr_stream',
$acctnum).', '.$this->get_arg_value('sort', $acctnum).',
'.$this->get_arg_value('order', $acctnum).')<br />'); }
$server_msgnum_list =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->sort($this->get_arg_value('mailsvr_stream',
$acctnum), $this->get_arg_value('sort', $acctnum),
$this->get_arg_value('order', $acctnum));
// put more information about these particular
messages into the msgball_list[] structure
@@ -757,7 +767,7 @@
// use the folder name that was fed as a param,
since this most likely represents a good key to use
// just in case the msgball_list, in the
future, is a virtual one composed of msg from many folders
$this->save_session_cache_item('msgball_list',
$meta_data, $acctnum, $folder);
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): get_msgball_list: ('.__LINE__.')
LEAVING, <font color="red">had to get data from server</font><br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): get_msgball_list: ('.__LINE__.')
LEAVING, <font color="red">had to get data from server</font><br />'); }
return $msgball_list;
}
}
@@ -806,19 +816,19 @@
*/
function get_folder_size()
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): get_folder_size: ('.__LINE__.')
ENTERING<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): get_folder_size: ('.__LINE__.')
ENTERING<br />'); }
$fldball = array();
$fldball['acctnum'] = $this->get_acctnum();
$fldball['folder'] =
$this->prep_folder_out($this->get_arg_value('folder', $fldball['acctnum']));
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): get_folder_size: ('.__LINE__.') this
function does not take a param, we made a fldball:
['.serialize($fldball).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): get_folder_size: ('.__LINE__.') this
function does not take a param, we made a fldball: ['.serialize($fldball).']<br
/>'); }
// make sure a stream is open
- if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('mail_msg(_wrappers):
get_folder_size: ('.__LINE__.') call to $this->ensure_stream_and_folder(),
$fldball ['.serialize($fldball).'] <br>'); }
- if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('mail_msg(_wrappers):
get_folder_size: ('.__LINE__.') NOTE THIS DOES REQUIRE A CHANGE OF FOLDER to
get the data, this may cause problems. <br>'); }
+ if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('mail_msg(_wrappers):
get_folder_size: ('.__LINE__.') call to $this->ensure_stream_and_folder(),
$fldball ['.serialize($fldball).'] <br />'); }
+ if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('mail_msg(_wrappers):
get_folder_size: ('.__LINE__.') NOTE THIS DOES REQUIRE A CHANGE OF FOLDER to
get the data, this may cause problems. <br />'); }
$this->ensure_stream_and_folder($fldball,
'get_folder_size'.' LINE '.__LINE__);
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): get_folder_size: ('.__LINE__.') calling
$GLOBALS[phpgw_dcom_'.$this->acctnum.']->dcom->mailboxmsginfo('.$this->get_arg_value('mailsvr_stream').',
'.$fldball['acctnum'].')<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): get_folder_size: ('.__LINE__.') calling
$GLOBALS[phpgw_dcom_'.$this->acctnum.']->dcom->mailboxmsginfo('.$this->get_arg_value('mailsvr_stream').',
'.$fldball['acctnum'].')<br />'); }
$mailbox_detail =
$GLOBALS['phpgw_dcom_'.$fldball['acctnum']]->dcom->mailboxmsginfo($this->get_arg_value('mailsvr_stream'),
$fldball['acctnum']);
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): get_folder_size: ('.__LINE__.') LEAVING,
returning ['.(serialize($mailbox_detail)).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): get_folder_size: ('.__LINE__.') LEAVING,
returning ['.(serialize($mailbox_detail)).']<br />'); }
return $mailbox_detail->Size;
}
@@ -943,7 +953,7 @@
*/
function get_folder_status_info($fldball='',
$force_refresh=False)
{
- if (($this->debug_session_caching > 0) ||
($this->debug_wrapper_dcom_calls > 0)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') ENTERING, $fldball:
'.serialize($fldball).' ; $force_refresh (DEPRECIATED):
'.serialize($force_refresh).' <br>'); }
+ if (($this->debug_session_caching > 0) ||
($this->debug_wrapper_dcom_calls > 0)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') ENTERING, $fldball:
'.serialize($fldball).' ; $force_refresh (DEPRECIATED):
'.serialize($force_refresh).' <br />'); }
// note: param $fldball WAS just folder previously,
watch out for old code still passing that string instead of the fldball
if ( (!isset($fldball))
@@ -969,11 +979,11 @@
$fldball['folder'] =
$this->prep_folder_out($this->get_arg_value('folder', $fldball['acctnum']));
}
- if (($this->debug_session_caching > 0) ||
($this->debug_wrapper_dcom_calls > 0)) { $this->dbug->out('class_msg:
get_folder_status_info('.__LINE__.'): ONLY L1 CACHE OF THIS INFO IF IN
NON-EXTREME MODE<br>'); }
+ if (($this->debug_session_caching > 0) ||
($this->debug_wrapper_dcom_calls > 0)) { $this->dbug->out('class_msg:
get_folder_status_info('.__LINE__.'): ONLY L1 CACHE OF THIS INFO IF IN
NON-EXTREME MODE<br />'); }
if ($this->session_cache_extreme == False)
{
- if ($this->debug_session_caching > 1) {
$this->dbug->out('class_msg: get_folder_status_info: ('.__LINE__.')
(non-extreme mode) uses L1/class var cache, NO appsession cache used in
non-extreme <br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('class_msg: get_folder_status_info: ('.__LINE__.')
(non-extreme mode) uses L1/class var cache, NO appsession cache used in
non-extreme <br />'); }
// do we have cached data in L1 cache / class
object var, that we can use
// ONLY L1 CACHE OF THIS INFO IF IN NON-EXTREME
MODE
//$folder_status_info =
$this->get_arg_value('folder_status_info', $fldball['acctnum']);
@@ -989,12 +999,12 @@
// add this "timestamp" array element
only to imitate what exists in data structure if extreme-mode were on (which it
is not here).
$timestamp_age = (time() -
$folder_status_info['timestamp']);
if (($this->debug_session_caching > 1)
|| ($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (non-extreme mode) got L1/class var
cached data, $timestamp_age ['.$timestamp_age.'] ; $folder_status_info dump:',
$folder_status_info); }
- if (($this->debug_session_caching > 0)
|| ($this->debug_wrapper_dcom_calls > 0)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (non-extreme mode) LEAVING '.'<font
color="purple">'.'successfully returning cached L1/class
data'.'</font>'.'<br>'); }
+ if (($this->debug_session_caching > 0)
|| ($this->debug_wrapper_dcom_calls > 0)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (non-extreme mode) LEAVING '.'<font
color="purple">'.'successfully returning cached L1/class data'.'</font>'.'<br
/>'); }
return $folder_status_info;
}
else
{
- if (($this->debug_session_caching > 1)
|| ($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (non-extreme mode) NO data found in
L1/class var cached <br>'); }
+ if (($this->debug_session_caching > 1)
|| ($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (non-extreme mode) NO data found in
L1/class var cached <br />'); }
}
}
else
@@ -1005,15 +1015,15 @@
// below is for extreme-mode, which only uses
appsession cache for this data, does NOT use "L1 cache"
// try to restore from saved session data store
- if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (extreme mode) calling
$this->read_session_cache_item(folder_status_info,
'.serialize($fldball['acctnum']).', '.($fldball['folder']).') NOTE the folder
name MUST be urlencoded as that param<br>'); }
+ if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (extreme mode) calling
$this->read_session_cache_item(folder_status_info,
'.serialize($fldball['acctnum']).', '.($fldball['folder']).') NOTE the folder
name MUST be urlencoded as that param<br />'); }
$cached_folder_status_info =
$this->read_session_cache_item('folder_status_info', $fldball['acctnum'],
$fldball['folder']);
if (($this->debug_session_caching > 2) ||
($this->debug_wrapper_dcom_calls > 2)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (extreme mode)
$cached_folder_status_info dump:', $cached_folder_status_info); }
if ($cached_folder_status_info)
{
- if (($this->debug_session_caching > 0)
|| ($this->debug_wrapper_dcom_calls > 0)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (extreme mode) LEAVING '.'<font
color="purple">'.'returning data obtained from cache'.'</font>'.'<br>'); }
+ if (($this->debug_session_caching > 0)
|| ($this->debug_wrapper_dcom_calls > 0)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (extreme mode) LEAVING '.'<font
color="purple">'.'returning data obtained from cache'.'</font>'.'<br />'); }
return $cached_folder_status_info;
}
- if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (extreme mode) NO data found in cache
(or it was stale) <br>'); }
+ if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (extreme mode) NO data found in cache
(or it was stale) <br />'); }
}
// Make Sure Stream Exists
@@ -1036,18 +1046,18 @@
$special_fldball['folder'] = $fldball['folder'];
// STATUS does not require opening the folder we want
information about
$special_fldball['no_switch_away'] = True;
- if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') call to
$this->ensure_stream_and_folder(), $special_fldball
['.serialize($special_fldball).'] <br>'); }
- if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') DO NOT pass a folderame IN THIS
PARTICULAR case because getting folder status DOES NOT require opening that
folder, "ensure_stream_and_folder" understands this.<br>'); }
+ if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') call to
$this->ensure_stream_and_folder(), $special_fldball
['.serialize($special_fldball).'] <br />'); }
+ if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') DO NOT pass a folderame IN THIS
PARTICULAR case because getting folder status DOES NOT require opening that
folder, "ensure_stream_and_folder" understands this.<br />'); }
$this->ensure_stream_and_folder($special_fldball,
'get_folder_status_info'.' LINE '.__LINE__);
//$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $fldball['acctnum']);
$server_str = $this->get_arg_value('mailsvr_callstr',
$fldball['acctnum']);
- if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') will use $mailsvr_stream
['.serialize($mailsvr_stream).'] ; $server_str ['.$server_str.'] ; $fldball:
'.serialize($fldball).' <br>'); }
+ if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') will use $mailsvr_stream
['.serialize($mailsvr_stream).'] ; $server_str ['.$server_str.'] ; $fldball:
'.serialize($fldball).' <br />'); }
$clean_folder_name =
$this->prep_folder_in($fldball['folder']);
$urlencoded_folder =
$this->prep_folder_out($clean_folder_name);
- if (($this->debug_session_caching > 0) ||
($this->debug_wrapper_dcom_calls > 0)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (extreme mode) <b>problem area:
urlencoding only 1 time</b> $clean_folder_name ['.$clean_folder_name.'],
$urlencoded_folder : ['.$urlencoded_folder.']);<br>'); }
+ if (($this->debug_session_caching > 0) ||
($this->debug_wrapper_dcom_calls > 0)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (extreme mode) <b>problem area:
urlencoding only 1 time</b> $clean_folder_name ['.$clean_folder_name.'],
$urlencoded_folder : ['.$urlencoded_folder.']);<br />'); }
// initialize return structure
$return_data = Array();
@@ -1068,7 +1078,7 @@
// $mailbox_status =
$GLOBALS['phpgw_dcom_'.$fldball['acctnum']]->dcom->status($mailsvr_stream,$server_str.$fldball['folder'],SA_ALL);
//}
// earlier we called $this->ensure_stream_and_folder,
so stream *should* exist
- if (($this->debug_session_caching > 0) ||
($this->debug_wrapper_dcom_calls > 0)) { $this->dbug->out('mail_msg(_wrappers):
get_folder_status_info: ('.__LINE__.') calling
$GLOBALS[phpgw_dcom_'.$fldball['acctnum'].']->dcom->status('.$mailsvr_stream.','.$server_str.$clean_folder_name.',SA_ALL)<br>');
}
+ if (($this->debug_session_caching > 0) ||
($this->debug_wrapper_dcom_calls > 0)) { $this->dbug->out('mail_msg(_wrappers):
get_folder_status_info: ('.__LINE__.') calling
$GLOBALS[phpgw_dcom_'.$fldball['acctnum'].']->dcom->status('.$mailsvr_stream.','.$server_str.$clean_folder_name.',SA_ALL)<br
/>'); }
$mailbox_status =
$GLOBALS['phpgw_dcom_'.$fldball['acctnum']]->dcom->status($mailsvr_stream,$server_str.$clean_folder_name,SA_ALL);
if (($this->debug_session_caching > 2) ||
($this->debug_wrapper_dcom_calls > 2)) { $this->dbug->out('mail_msg(_wrappers):
get_folder_status_info: ('.__LINE__.') ->dcom->status returns: $mailbox_status
DUMP', $mailbox_status); }
@@ -1118,7 +1128,7 @@
if ($this->session_cache_extreme == False)
{
- if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (non-extreme mode) uses L1/class var
cache, NO appsession cache used in non-extreme <br>'); }
+ if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (non-extreme mode) uses L1/class var
cache, NO appsession cache used in non-extreme <br />'); }
// cache data in a class var (L1 Cache)
// USE L1 CACHE ONLY IN NON-EXTREME MODE
if (($this->debug_session_caching > 2) ||
($this->debug_wrapper_dcom_calls > 2)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (non-extreme mode) saving to L1 class
var cache, $this->set_arg_value(folder_status_info, $return_data,
'.$fldball['acctnum'].') ; $return_data dump:', $return_data); }
@@ -1127,13 +1137,13 @@
}
else
{
- if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (extreme mode) uses appsession cache, no
L1/class var cached is used in extreme mode <br>'); }
- if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (extreme mode) saving to session cache,
$this->save_session_cache_item("folder_status_info", $return_data, $acctnum)
NOTE that acctnum used here is ['.$acctnum.']<br>'); }
+ if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (extreme mode) uses appsession cache, no
L1/class var cached is used in extreme mode <br />'); }
+ if (($this->debug_session_caching > 1) ||
($this->debug_wrapper_dcom_calls > 1)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (extreme mode) saving to session cache,
$this->save_session_cache_item("folder_status_info", $return_data, $acctnum)
NOTE that acctnum used here is ['.$acctnum.']<br />'); }
if (($this->debug_session_caching > 2) ||
($this->debug_wrapper_dcom_calls > 2)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') (extreme mode) $return_data DUMP',
$return_data); }
// NOTE that the $extra_keys param is generated
FOR US in the function that saves this to appsession cache, we are doing that
now
$this->save_session_cache_item('folder_status_info', $return_data,
$fldball['acctnum'], $fldball['folder']);
}
- if (($this->debug_session_caching > 0) ||
($this->debug_wrapper_dcom_calls > 0)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') LEAVING, '.'<font color="red">'.'had
contact mailserver to get data'.'</font>'.'<br>'); }
+ if (($this->debug_session_caching > 0) ||
($this->debug_wrapper_dcom_calls > 0)) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') LEAVING, '.'<font color="red">'.'had
contact mailserver to get data'.'</font>'.'<br />'); }
return $return_data;
}
@@ -1147,16 +1157,16 @@
*/
function phpgw_status($feed_folder_long='')
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(wrappers): phpgw_status ('.__LINE__.'): ENTERING,
$feed_folder_long ['.($feed_folder_long).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(wrappers): phpgw_status ('.__LINE__.'): ENTERING,
$feed_folder_long ['.($feed_folder_long).']<br />'); }
$fake_fldball = array();
$fake_fldball['acctnum'] = $this->get_acctnum();
$fake_fldball['folder'] = $feed_folder_long;
$this->ensure_stream_and_folder($fake_fldball,
'phpgw_status'.' LINE '.__LINE__);
$server_str = $this->get_arg_value('mailsvr_callstr');
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream');
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(wrappers): phpgw_status ('.__LINE__.'): calling
$GLOBALS[phpgw_dcom_$fake_fldball[acctnum]('.$fake_fldball['acctnum'].')]->dcom->status($mailsvr_stream['.$mailsvr_stream.'],"$server_str"."$feed_folder_long"['.htmlspecialchars("$server_str"."$feed_folder_long").'],SA_ALL)<br>');
}
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(wrappers): phpgw_status ('.__LINE__.'): calling
$GLOBALS[phpgw_dcom_$fake_fldball[acctnum]('.$fake_fldball['acctnum'].')]->dcom->status($mailsvr_stream['.$mailsvr_stream.'],"$server_str"."$feed_folder_long"['.htmlspecialchars("$server_str"."$feed_folder_long").'],SA_ALL)<br
/>'); }
$retval =
$GLOBALS['phpgw_dcom_'.$fake_fldball['acctnum']]->dcom->status($mailsvr_stream,"$server_str"."$feed_folder_long",SA_ALL);
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(wrappers): phpgw_status ('.__LINE__.'): LEAVING,
returning $retval ['.serialize($retval).'] <br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(wrappers): phpgw_status ('.__LINE__.'): LEAVING,
returning $retval ['.serialize($retval).'] <br />'); }
return $retval;
}
@@ -1174,7 +1184,7 @@
{
$acctnum = $this->get_acctnum();
}
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_server_last_error: ('.__LINE__.')
calling $GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->server_last_error()<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_server_last_error: ('.__LINE__.')
calling $GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->server_last_error()<br />'); }
return
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->server_last_error();
}
@@ -1192,11 +1202,11 @@
{
$acctnum = $this->get_acctnum();
}
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_ping ('.__LINE__.'): ENTERING,
$acctnum ['.$acctnum.'], we DO NOT use "ensure_stream_and_folder" here because
that would open the stream we are testing, making this test useless.<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_ping ('.__LINE__.'): ENTERING,
$acctnum ['.$acctnum.'], we DO NOT use "ensure_stream_and_folder" here because
that would open the stream we are testing, making this test useless.<br />'); }
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_ping ('.__LINE__.'): calling
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->noop_ping_test('.$mailsvr_stream.')
<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_ping ('.__LINE__.'): calling
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->noop_ping_test('.$mailsvr_stream.')
<br />'); }
$retval =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->noop_ping_test($mailsvr_stream);
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_ping ('.__LINE__.'): LEAVING,
returing $retval ['.serialize($retval).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_ping ('.__LINE__.'): LEAVING,
returing $retval ['.serialize($retval).']<br />'); }
return $retval;
}
@@ -1209,7 +1219,7 @@
*/
function phpgw_search($fldball='', $criteria='', $flags='')
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_search ('.__LINE__.'): ENTERING,
$fldball ['.serialize($fldball).']; $criteria ['.$criteria.'];
$flags['.serialize($flags).'] <br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_search ('.__LINE__.'): ENTERING,
$fldball ['.serialize($fldball).']; $criteria ['.$criteria.'];
$flags['.serialize($flags).'] <br />'); }
$acctnum = (int)$fldball['acctnum'];
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
@@ -1233,9 +1243,9 @@
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
// now we have the stream and the desired folder open
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_search ('.__LINE__.'): calling
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->i_search($mailsvr_stream['.$mailsvr_stream.'],
$criteria['.$criteria.'],$flags['.serialize($flags).']) <br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_search ('.__LINE__.'): calling
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->i_search($mailsvr_stream['.$mailsvr_stream.'],
$criteria['.$criteria.'],$flags['.serialize($flags).']) <br />'); }
$retval =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->i_search($mailsvr_stream,$criteria,$flags);
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_search ('.__LINE__.'): LEAVING,
returing $retval ['.serialize($retval).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_search ('.__LINE__.'): LEAVING,
returing $retval ['.serialize($retval).']<br />'); }
return $retval;
}
@@ -1293,7 +1303,7 @@
*/
function phpgw_createmailbox_ex($target_fldball)
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('phpgw_createmailbox_ex('.__LINE__.'): ENTERING: raw
$target_fldball arg ['.htmlspecialchars($target_fldball).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('phpgw_createmailbox_ex('.__LINE__.'): ENTERING: raw
$target_fldball arg ['.htmlspecialchars($target_fldball).']<br />'); }
if ((isset($target_fldball['acctnum']))
&& ((string)$target_fldball['acctnum'] != ''))
{
@@ -1329,7 +1339,7 @@
$target_folder_clean =
$mailsvr_callstr.$target_folder_clean;
}
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('phpgw_createmailbox_ex('.__LINE__.'): calling
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->createmailbox('.serialize($mailsvr_stream).',
'.htmlspecialchars($target_folder_clean).'<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('phpgw_createmailbox_ex('.__LINE__.'): calling
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->createmailbox('.serialize($mailsvr_stream).',
'.htmlspecialchars($target_folder_clean).'<br />'); }
return
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->createmailbox($mailsvr_stream,
$target_folder_clean);
}
@@ -1361,7 +1371,7 @@
*/
function phpgw_deletemailbox_ex($target_fldball)
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('phpgw_deletemailbox_ex('.__LINE__.'): ENTERING: raw
$target_fldball arg ['.htmlspecialchars($target_fldball).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('phpgw_deletemailbox_ex('.__LINE__.'): ENTERING: raw
$target_fldball arg ['.htmlspecialchars($target_fldball).']<br />'); }
if ((isset($target_fldball['acctnum']))
&& ((string)$target_fldball['acctnum'] != ''))
{
@@ -1397,7 +1407,7 @@
$target_folder_clean =
$mailsvr_callstr.$target_folder_clean;
}
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('phpgw_deletemailbox_ex('.__LINE__.'): calling
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->deletemailbox('.serialize($mailsvr_stream).',
'.htmlspecialchars($target_folder_clean).'<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('phpgw_deletemailbox_ex('.__LINE__.'): calling
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->deletemailbox('.serialize($mailsvr_stream).',
'.htmlspecialchars($target_folder_clean).'<br />'); }
return
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->deletemailbox($mailsvr_stream,
$target_folder_clean);
}
@@ -1430,8 +1440,8 @@
*/
function phpgw_renamemailbox_ex($source_fldball,$target_fldball)
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('phpgw_renamemailbox_ex('.__LINE__.'): ENTERING<br>'); }
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('phpgw_renamemailbox_ex('.__LINE__.'): raw $source_fldball arg
['.htmlspecialchars($source_fldball).']; raw $target_fldball arg
['.htmlspecialchars($target_fldball).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('phpgw_renamemailbox_ex('.__LINE__.'): ENTERING<br />'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('phpgw_renamemailbox_ex('.__LINE__.'): raw $source_fldball arg
['.htmlspecialchars($source_fldball).']; raw $target_fldball arg
['.htmlspecialchars($target_fldball).']<br />'); }
if ((isset($target_fldball['acctnum']))
&& ((string)$target_fldball['acctnum'] != ''))
{
@@ -1489,7 +1499,7 @@
// OK WE are ready to do it!
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('phpgw_renamemailbox_ex('.__LINE__.'): calling
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->renamemailbox('.serialize($mailsvr_stream).',
'.htmlspecialchars($source_folder_clean).',
'.htmlspecialchars($target_folder_clean).'<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('phpgw_renamemailbox_ex('.__LINE__.'): calling
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->renamemailbox('.serialize($mailsvr_stream).',
'.htmlspecialchars($source_folder_clean).',
'.htmlspecialchars($target_folder_clean).'<br />'); }
//return
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->createmailbox($mailsvr_stream,
$target_folder_clean);
return
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->renamemailbox($mailsvr_stream,
$source_folder_clean, $target_folder_clean);
}
@@ -1520,7 +1530,7 @@
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
// ... so stream exists, do the transaction ...
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_listmailbox ('.__LINE__.'):
calling
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->listmailbox($mailsvr_stream['.$mailsvr_stream.'],$ref['.$ref.'],
$pattern['.$pattern.']); <br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_listmailbox ('.__LINE__.'):
calling
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->listmailbox($mailsvr_stream['.$mailsvr_stream.'],$ref['.$ref.'],
$pattern['.$pattern.']); <br />'); }
return
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->listmailbox($mailsvr_stream,$ref,$pattern);
}
@@ -1533,7 +1543,7 @@
*/
function phpgw_append($folder="Sent", $message, $flags=0)
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_append: ('.__LINE__.') ENTERING,
folder: '.$folder.'<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_append: ('.__LINE__.') ENTERING,
folder: '.$folder.'<br />'); }
$server_str = $this->get_arg_value('mailsvr_callstr');
@@ -1542,7 +1552,7 @@
$folder = $this->ensure_no_brackets($folder);
// attempt to find a folder match in the lookup list
$official_folder_long = $this->folder_lookup('',
$folder);
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_append: ('.__LINE__.')
$official_folder_long: '.$official_folder_long.'<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_append: ('.__LINE__.')
$official_folder_long: '.$official_folder_long.'<br />'); }
if ($official_folder_long != '')
{
$havefolder = True;
@@ -1552,7 +1562,7 @@
$havefolder = False;
}
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_append: ('.__LINE__.') $havefolder
['.serialize($havefolder).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_append: ('.__LINE__.') $havefolder
['.serialize($havefolder).']<br />'); }
if ($havefolder == False)
{
// add whatever namespace we believe should
exist
@@ -1564,12 +1574,12 @@
$fake_fldball = array();
$fake_fldball['folder'] =
$server_str.$folder_long;
$fake_fldball['acctnum'] = $this->get_acctnum();
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_append: ('.__LINE__.') calling
$this->phpgw_createmailbox('.serialize($fake_fldball).')<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_append: ('.__LINE__.') calling
$this->phpgw_createmailbox('.serialize($fake_fldball).')<br />'); }
$this->phpgw_createmailbox($fake_fldball);
// try again to get the real long folder name
of the just created trash folder
$official_folder_long =
$this->folder_lookup('', $folder);
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_append: ('.__LINE__.')
$official_folder_long: '.$official_folder_long.'<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_append: ('.__LINE__.')
$official_folder_long: '.$official_folder_long.'<br />'); }
// did the folder get created and do we now
have the official full name of that folder?
if ($official_folder_long != '')
{
@@ -1595,9 +1605,9 @@
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream');
// do the append
if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_append:
$GLOBALS["phpgw_dcom_'.$target_fldball['acctnum'].']->dcom->append('.$mailsvr_stream.',
'."$server_str"."$official_folder_long".', $message, '.$flags.') '); }
- //$acctnum: ['.$acctnum.'] $mailsvr_stream:
['.$mailsvr_stream.'] $msgnum: ['.$msgnum.'] $mailbox:
['.htmlspecialchars($mailbox).']<br>'; }
- $retval =
$GLOBALS['phpgw_dcom_'.$target_fldball['acctnum']]->dcom->append($mailsvr_stream,
"$server_str"."$official_folder_long", $message, $flags);
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_append ('.__LINE__.'): LEAVING,
returning $retval ['.serialize($retval).']<br>'); }
+ //$acctnum: ['.$acctnum.'] $mailsvr_stream:
['.$mailsvr_stream.'] $msgnum: ['.$msgnum.'] $mailbox:
['.htmlspecialchars($mailbox).']<br />'; }
+ $retval =
$GLOBALS['phpgw_dcom_'.$target_fldball['acctnum']]->dcom->append($mailsvr_stream,
$server_str.$official_folder_long, $message, $flags);
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_append ('.__LINE__.'): LEAVING,
returning $retval ['.serialize($retval).']<br />'); }
return $retval;
}
else
@@ -1606,7 +1616,7 @@
// we can NOT append the message to a folder
name we are not SURE is corrent
// it will fail HANG the browser for a while
// so just SKIP IT
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_append ('.__LINE__.'): LEAVING on
error, returning FALSE, unable to get good foldername, unable to append <br>');
}
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_append ('.__LINE__.'): LEAVING on
error, returning FALSE, unable to get good foldername, unable to append <br
/>'); }
return False;
}
}
@@ -1619,14 +1629,14 @@
*/
function phpgw_mail_move($msg_list,$mailbox)
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_mail_move: (DEPRECIATED)
ENTERING<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_mail_move: (DEPRECIATED)
ENTERING<br />'); }
// OLD FUNCTION does not provide enough information,
all we can do is expire
$this->event_msg_move_or_delete(array(),
'phpgw_mail_move');
// delete session msg array data thAt is now stale
//$this->expire_session_cache_item('msgball_list');
$retval =
$GLOBALS['phpgw_dcom_'.$this->acctnum]->dcom->mail_move($this->get_arg_value('mailsvr_stream'),
$msg_list, $mailbox);
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_mail_move: (DEPRECIATED) LEAVING,
$retval ['.serialize($retval).'] <br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_mail_move: (DEPRECIATED) LEAVING,
$retval ['.serialize($retval).'] <br />'); }
return $retval;
}
@@ -1638,8 +1648,8 @@
*/
function interacct_mail_move($mov_msgball='', $to_fldball='')
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): interacct_mail_move: ENTERING<br>'); }
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): interacct_mail_move: $mov_msgball
['.serialize($mov_msgball).'] ; $to_fldball
['.serialize($to_fldball).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): interacct_mail_move: ENTERING<br />'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): interacct_mail_move: $mov_msgball
['.serialize($mov_msgball).'] ; $to_fldball ['.serialize($to_fldball).']<br
/>'); }
// this needs A LOT of work!!! do not rely on this yet
// delete session msg array data thAt is now stale
@@ -1655,7 +1665,7 @@
}
$this->ensure_stream_and_folder($mov_msgball,
'interacct_mail_move'.' LINE '.__LINE__);
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): interacct_mail_move:'.' LINE
'.__LINE__.' If this is a move to a DIFFERENT account, then THIS FUNCTION is
the WRONG ONE to use, it can not handle that<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): interacct_mail_move:'.' LINE
'.__LINE__.' If this is a move to a DIFFERENT account, then THIS FUNCTION is
the WRONG ONE to use, it can not handle that<br />'); }
// NO - this function only works with folders within
the same account
//$this->ensure_stream_and_folder($to_fldball,
'interacct_mail_move'.' LINE '.__LINE__);
@@ -1667,11 +1677,30 @@
// the acctnum we are moving FROM *may* be different
from the acctnum we are moving TO
// that requires a fetch then an append - FIXME!!!
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): interacct_mail_move: $acctnum:
['.$acctnum.'] $mailsvr_stream: ['.$mailsvr_stream.'] $msgnum: ['.$msgnum.']
$mailbox: ['.htmlspecialchars($mailbox).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): interacct_mail_move: $acctnum:
['.$acctnum.'] $mailsvr_stream: ['.$mailsvr_stream.'] $msgnum: ['.$msgnum.']
$mailbox: ['.htmlspecialchars($mailbox).']<br />'); }
$retval =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->mail_move($mailsvr_stream ,$msgnum,
$mailbox);
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): interacct_mail_move: LEAVING, $retval
['.serialize($retval).'] <br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): interacct_mail_move: LEAVING, $retval
['.serialize($retval).'] <br />'); }
return $retval;
}
+
+ /**
+ * Empty the "trash" folder
+ *
+ * @author skwashd
+ * @param int $acctnum target account number
+ * @param string $folder target folder
+ */
+ function empty_trash($acctnum = '')
+ {
+ $acctnum = ($acctnum >= 0 ? $acctnum :
$this->get_acctnum());
+ $folder =
$this->get_arg_value('verified_trash_folder_long', $acctnum);
+
+ $this->ensure_stream_and_folder(array('folder' =>
$folder, 'acctnum' => $acctnum));
+ $this->set_arg_value('fldball[folder]', $folder,
$acctnum);
+ $mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
+
+
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->empty_trash($mailsvr_stream);
+ }
/*!
@function industrial_interacct_mail_move
@@ -1684,16 +1713,16 @@
*/
function industrial_interacct_mail_move($mov_msgball='',
$to_fldball='')
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): industrial_interacct_mail_move:
ENTERING, handing off to $this->buffer_move_commands()<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): industrial_interacct_mail_move:
ENTERING, handing off to $this->buffer_move_commands()<br />'); }
// Note: Only call this function with ONE msgball at a
time, i.e. NOT a list of msgballs
// then we buffer each command with this function
$this->buffer_move_commands($mov_msgball, $to_fldball);
- //if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): industrial_interacct_mail_move
('.__LINE__.'): ok, now add this folder to this accounts "expunge_folders" arg
via "track_expungable_folders"<br>'); }
+ //if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): industrial_interacct_mail_move
('.__LINE__.'): ok, now add this folder to this accounts "expunge_folders" arg
via "track_expungable_folders"<br />'); }
// do this during actual moves
$this->track_expungable_folders($mov_msgball);
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): industrial_interacct_mail_move: LEAVING,
return True so we do not confuse calling process<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): industrial_interacct_mail_move: LEAVING,
return True so we do not confuse calling process<br />'); }
return True;
}
@@ -1708,8 +1737,8 @@
*/
function buffer_move_commands($mov_msgball='', $to_fldball='')
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
ENTERING<br>'); }
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
$mov_msgball ['.serialize($mov_msgball).'] $to_fldball
['.serialize($to_fldball).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
ENTERING<br />'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
$mov_msgball ['.serialize($mov_msgball).'] $to_fldball
['.serialize($to_fldball).']<br />'); }
// assemble the URI like string that will hold the
command move request instructions
$this_move_data = '';
@@ -1720,7 +1749,7 @@
.'&to_fldball[folder]='.$to_fldball['folder']
.'&mov_msgball[msgnum]='.$mov_msgball['msgnum'];
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
$this_move_data ['.htmlspecialchars($this_move_data).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
$this_move_data ['.htmlspecialchars($this_move_data).']<br />'); }
if ($this->debug_wrapper_dcom_calls > 2)
{
$this_move_balls = array();
@@ -1735,7 +1764,7 @@
$this->buffered_move_commmands_count++;
if ($this->debug_wrapper_dcom_calls > 2) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
added new item to array, new $this->buffered_move_commmands DUMP:',
$this->buffered_move_commmands); }
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
LEAVING: did add $this_move_data to array, new array count
$this->buffered_move_commmands_count:
['.$this->buffered_move_commmands_count.'], "from" acctnum is
['.$mov_msgball['acctnum'].']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
LEAVING: did add $this_move_data to array, new array count
$this->buffered_move_commmands_count:
['.$this->buffered_move_commmands_count.'], "from" acctnum is
['.$mov_msgball['acctnum'].']<br />'); }
return;
}
@@ -1750,8 +1779,8 @@
*/
function buffer_delete_commands($mov_msgball='', $to_fldball='')
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
ENTERING<br>'); }
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
$mov_msgball ['.serialize($mov_msgball).'] $to_fldball
['.serialize($to_fldball).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
ENTERING<br />'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
$mov_msgball ['.serialize($mov_msgball).'] $to_fldball
['.serialize($to_fldball).']<br />'); }
// assemble the URI like string that will hold the
command move request instructions
$this_move_data = '';
@@ -1762,7 +1791,7 @@
.'&to_fldball[folder]='.$to_fldball['folder']
.'&mov_msgball[msgnum]='.$mov_msgball['msgnum'];
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
$this_move_data ['.htmlspecialchars($this_move_data).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
$this_move_data ['.htmlspecialchars($this_move_data).']<br />'); }
if ($this->debug_wrapper_dcom_calls > 2)
{
$this_move_balls = array();
@@ -1777,7 +1806,7 @@
$this->buffered_move_commmands_count++;
if ($this->debug_wrapper_dcom_calls > 2) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
added new item to array, new $this->buffered_move_commmands DUMP:',
$this->buffered_move_commmands); }
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
LEAVING: did add $this_move_data to array, new array count
$this->buffered_move_commmands_count:
['.$this->buffered_move_commmands_count.'], "from" acctnum is
['.$mov_msgball['acctnum'].']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): buffer_move_commands ('.__LINE__.'):
LEAVING: did add $this_move_data to array, new array count
$this->buffered_move_commmands_count:
['.$this->buffered_move_commmands_count.'], "from" acctnum is
['.$mov_msgball['acctnum'].']<br />'); }
return;
}
@@ -1840,11 +1869,11 @@
// we tell the cache to flush and surn off during a big
move, if we find a move is requested, just call the notice once.
$did_give_big_move_notice = False;
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands
('.__LINE__.'): ENTERING, called by ['.$called_by.'], <br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands
('.__LINE__.'): ENTERING, called by ['.$called_by.'], <br />'); }
// leave now if nothing is in the buffered command array
if ($this->buffered_move_commmands_count == 0)
{
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands
('.__LINE__.'): LEAVING, nothing to do, return False,
$this->buffered_move_commmands_count:
['.$this->buffered_move_commmands_count.']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands
('.__LINE__.'): LEAVING, nothing to do, return False,
$this->buffered_move_commmands_count:
['.$this->buffered_move_commmands_count.']<br />'); }
return False;
}
@@ -1854,7 +1883,7 @@
$is_big_move = False;
if ($this->buffered_move_commmands_count >
$big_move_thresh)
{
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands
('.__LINE__.'): issue $this->event_begin_big_move because $big_move_thresh:
['.$big_move_thresh.'] $this->buffered_move_commmands_count:
['.$this->buffered_move_commmands_count.']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands
('.__LINE__.'): issue $this->event_begin_big_move because $big_move_thresh:
['.$big_move_thresh.'] $this->buffered_move_commmands_count:
['.$this->buffered_move_commmands_count.']<br />'); }
$this->event_begin_big_move(array(),
'mail_msg(_wrappers): buffered_move_commmands: LINE '.__LINE__);
$is_big_move = True;
}
@@ -1878,7 +1907,7 @@
{
$this_move_balls = array();
parse_str($this->buffered_move_commmands[$x],
$this_move_balls);
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out(' * mail_msg(_wrappers): flush_buffered_move_commmands: loop
['.$x.']: $this_move_balls:
['.htmlspecialchars(serialize($this_move_balls)).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out(' * mail_msg(_wrappers): flush_buffered_move_commmands: loop
['.$x.']: $this_move_balls:
['.htmlspecialchars(serialize($this_move_balls)).']<br />'); }
// NOTE PARSE_STR ***WILL ADD SLASHES*** TO
ESCAPE QUOTES
// NO MATTER WHAT YOUR MAGIC SLASHES SETTING IS
if ($this->debug_args_input_flow > 1) {
$this->dbug->out(' * mail_msg(_wrappers): flush_buffered_move_commmands: loop
['.$x.']: NOTE PARSE_STR ***WILL ADD SLASHES*** TO ESCAPE QUOTES NO MATTER WHAT
YOUR MAGIC SLASHES SETTING IS **stripping slashes NOW***'); }
@@ -1895,7 +1924,7 @@
// IF WE ISSUED A BIG MOVE NOTICE THEN THE
CACHE IS FLUSHED ALREADY
if ($is_big_move == False)
{
- if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out(' * mail_msg(_wrappers): flush_buffered_move_commmands:
loop ['.$x.'] $is_big_move: ['.serialize($is_big_move).'] so calling
$this->event_msg_move_or_delete()<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out(' * mail_msg(_wrappers): flush_buffered_move_commmands:
loop ['.$x.'] $is_big_move: ['.serialize($is_big_move).'] so calling
$this->event_msg_move_or_delete()<br />'); }
$this->event_msg_move_or_delete($this_move_balls['mov_msgball'],
'flush_buffered_move_commmands'.' LINE: '.__LINE__,
$this_move_balls['to_fldball']);
}
@@ -1911,12 +1940,12 @@
{
// SKIP TO NEXT LOOP, we need
to compare (try to group) b4 we know to issue the actual move command or not
// NOTE: CONTINUE
- if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
mail_msg(_wrappers): flush_buffered_move_commmands('.__LINE__.'): loop
['.$x.']: added item to array, skip to next iteration<br>'); }
+ if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
mail_msg(_wrappers): flush_buffered_move_commmands('.__LINE__.'): loop
['.$x.']: added item to array, skip to next iteration<br />'); }
continue;
}
else
{
- if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
mail_msg(_wrappers): flush_buffered_move_commmands('.__LINE__.'): loop
['.$x.']: added item to array, NOT skipping to next iteration because there is
only 1 item in array ['.$this->buffered_move_commmands_count.']<br>'); }
+ if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
mail_msg(_wrappers): flush_buffered_move_commmands('.__LINE__.'): loop
['.$x.']: added item to array, NOT skipping to next iteration because there is
only 1 item in array ['.$this->buffered_move_commmands_count.']<br />'); }
}
}
//elseif (($count_grouped > 0)
@@ -1934,7 +1963,7 @@
// AND this is NOT the last item in
buffered_move_commmands (that would require action, not another loop)
array_push($grouped_move_balls,
$this_move_balls);
// NOTE: CONTINUE
- if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out(' * mail_msg(_wrappers):
flush_buffered_move_commmands('.__LINE__.'): loop ['.$x.']: added item to
array, skip to next iteration<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out(' * mail_msg(_wrappers):
flush_buffered_move_commmands('.__LINE__.'): loop ['.$x.']: added item to
array, skip to next iteration<br />'); }
continue;
}
elseif (($count_grouped > 0)
@@ -1947,7 +1976,7 @@
// PASSES the "is grouped" test, add to
the "grouped array"
// AND this is the FINAL ITEM, so KEEP
GOING down to the code to issue the actual move command
array_push($grouped_move_balls,
$this_move_balls);
- if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out(' * mail_msg(_wrappers):
flush_buffered_move_commmands('.__LINE__.'): loop ['.$x.']: added item to
array, but NOT skipping to next iteration<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out(' * mail_msg(_wrappers):
flush_buffered_move_commmands('.__LINE__.'): loop ['.$x.']: added item to
array, but NOT skipping to next iteration<br />'); }
// DO NOT issue "CONTINUE" here
}
else
@@ -1957,7 +1986,7 @@
if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out(' * mail_msg(_wrappers):
flush_buffered_move_commmands('.__LINE__.'): loop ['.$x.']: UNHANDLED if ..
then, $$this_move_balls DUMP', $this_move_balls); }
}
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands: if we get
here, we can not group anymore, or the series just ended, so issue the command
now<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands: if we get
here, we can not group anymore, or the series just ended, so issue the command
now<br />'); }
// OK if we are here then we know this
// * "grouped_move_balls" has at least one
command in it
// ** the current command does not match the
preious one in terms or grouping them together
@@ -1975,7 +2004,7 @@
if ( ($count_grouped = 1)
&&
((int)$grouped_move_balls[0]['mov_msgball']['acctnum'] !=
(int)$grouped_move_balls[0]['to_fldball']['acctnum']) )
{
- if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands
('.__LINE__.'): ($do_it_for_real is '.serialize($do_it_for_real).'): 1 single
**DIFFERENT** Account Move item in $grouped_move_balls, hand off to
"single_interacct_mail_move"<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands
('.__LINE__.'): ($do_it_for_real is '.serialize($do_it_for_real).'): 1 single
**DIFFERENT** Account Move item in $grouped_move_balls, hand off to
"single_interacct_mail_move"<br />'); }
if ($do_it_for_real == True)
{
$this->single_interacct_mail_move($grouped_move_balls[$count_grouped-1]['mov_msgball'],
$grouped_move_balls[$count_grouped-1]['to_fldball']);
@@ -1984,8 +2013,8 @@
elseif ( ($count_grouped > 1)
&&
((int)$grouped_move_balls[$count_grouped-1]['mov_msgball']['acctnum'] !=
(int)$grouped_move_balls[$count_grouped-1]['to_fldball']['acctnum']) )
{
- if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands
('.__LINE__.'): LEAVING with ERROR: ERROR: unhandled if .. then,
$grouped_move_balls has multiple items but accounts do not match, different
accounts should be handled one at a time!!!<br>'); }
- echo 'mail_msg(_wrappers):
flush_buffered_move_commmands ('.__LINE__.'): LEAVING with ERROR: unhandled if
.. then, $grouped_move_balls has multiple items but accounts do not match,
different accounts should be handled one at a time!!!<br>';
+ if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands
('.__LINE__.'): LEAVING with ERROR: ERROR: unhandled if .. then,
$grouped_move_balls has multiple items but accounts do not match, different
accounts should be handled one at a time!!!<br />'); }
+ echo 'mail_msg(_wrappers):
flush_buffered_move_commmands ('.__LINE__.'): LEAVING with ERROR: unhandled if
.. then, $grouped_move_balls has multiple items but accounts do not match,
different accounts should be handled one at a time!!!<br />';
return False;
}
else
@@ -2011,7 +2040,7 @@
// BETTER way, use rfv2060 specs to put
range of msgnums together seperated by a colon
for ($group_loops=0; $group_loops <
$count_grouped; $group_loops++)
{
- if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
flush_buffered_move_commmands ('.__LINE__.'): loop ['.$group_loops.'] of
['.(string)($count_grouped-1).'], $collected_msg_num_string:
['.$collected_msg_num_string.']<br>'); }
+ if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
flush_buffered_move_commmands ('.__LINE__.'): loop ['.$group_loops.'] of
['.(string)($count_grouped-1).'], $collected_msg_num_string:
['.$collected_msg_num_string.']<br />'); }
if ( ($group_loops > 0)
//&&
(($grouped_move_balls[$group_loops-1]['mov_msgball']['msgnum']+1) ==
$grouped_move_balls[$group_loops]['mov_msgball']['msgnum']) )
&&
($grouped_move_balls[$group_loops-1]['mov_msgball']['msgnum']+1 ==
$grouped_move_balls[$group_loops]['mov_msgball']['msgnum']) )
@@ -2034,7 +2063,7 @@
&& ($last_char
!= ':'))
{
//
COLON OR A COMMAN NEEDED
- if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
flush_buffered_move_commmands ('.__LINE__.'): loop ['.$group_loops.'] of
['.(string)($count_grouped-1).'], COLON OR COMMA NEEDED: $last_char:
['.$last_char.'], $collected_msg_num_string:
['.$collected_msg_num_string.']<br>'); }
+ if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
flush_buffered_move_commmands ('.__LINE__.'): loop ['.$group_loops.'] of
['.(string)($count_grouped-1).'], COLON OR COMMA NEEDED: $last_char:
['.$last_char.'], $collected_msg_num_string: ['.$collected_msg_num_string.']<br
/>'); }
if
(($count_grouped > 2)
//&&
(strlen((string)$collected_msg_num_string) == 1))
&&
(!stristr($collected_msg_num_string, ':'))
@@ -2045,14 +2074,14 @@
// (b) there is so far only ONE number in our $collected_msg_num_string
// then this is a series that had been uninterupted since it began looping here
// situation is nums are 1, 2, 3, 4, 5, so in the last loop
$collected_msg_num_string = "1:5"
-
if ($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
flush_buffered_move_commmands ('.__LINE__.'): loop ['.$group_loops.'] of
['.(string)($count_grouped-1).'], ADDING A COLON: $last_char: ['.$last_char.'],
$collected_msg_num_string: ['.$collected_msg_num_string.']<br>'); }
+
if ($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
flush_buffered_move_commmands ('.__LINE__.'): loop ['.$group_loops.'] of
['.(string)($count_grouped-1).'], ADDING A COLON: $last_char: ['.$last_char.'],
$collected_msg_num_string: ['.$collected_msg_num_string.']<br />'); }
$collected_msg_num_string .= ':';
}
else
{
// ADD A COMMA, these are
// situation is nums are 3, 37, 38, so in the last loop
$collected_msg_num_string = "3,37"
-
if ($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
flush_buffered_move_commmands ('.__LINE__.'): loop ['.$group_loops.'] of
['.(string)($count_grouped-1).'], ADDING A COMMA: $last_char: ['.$last_char.'],
$collected_msg_num_string: ['.$collected_msg_num_string.']<br>'); }
+
if ($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
flush_buffered_move_commmands ('.__LINE__.'): loop ['.$group_loops.'] of
['.(string)($count_grouped-1).'], ADDING A COMMA: $last_char: ['.$last_char.'],
$collected_msg_num_string: ['.$collected_msg_num_string.']<br />'); }
$collected_msg_num_string .= ',';
}
}
@@ -2087,7 +2116,7 @@
// AND the
number we are about to add are IN A SERIES
// so a colon
would not create an unwanted series becuase we KNOW we have a series at this
point
// so ... a
colon can not hurt, a colon between contiguous numbers is still valid syntax
(i.e. "3:4"
- if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
flush_buffered_move_commmands ('.__LINE__.'): loop ['.$group_loops.'] of
['.(string)($count_grouped-1).'], ADDING A COLON: $last_char: ['.$last_char.'],
$collected_msg_num_string: ['.$collected_msg_num_string.']<br>'); }
+ if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
flush_buffered_move_commmands ('.__LINE__.'): loop ['.$group_loops.'] of
['.(string)($count_grouped-1).'], ADDING A COLON: $last_char: ['.$last_char.'],
$collected_msg_num_string: ['.$collected_msg_num_string.']<br />'); }
$collected_msg_num_string .= ':';
}
// inset the number of
the end of the series, a comman, and the current non-contiguous number
@@ -2105,10 +2134,10 @@
}
$collected_msg_num_string .=
(string)$grouped_move_balls[$group_loops]['mov_msgball']['msgnum'];
}
- if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
flush_buffered_move_commmands ('.__LINE__.'): $collected_msg_num_string:
['.$collected_msg_num_string.']<br>'); }
+ if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out(' *
flush_buffered_move_commmands ('.__LINE__.'): $collected_msg_num_string:
['.$collected_msg_num_string.']<br />'); }
}
- if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands:
final $collected_msg_num_string: ['.$collected_msg_num_string.']<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands:
final $collected_msg_num_string: ['.$collected_msg_num_string.']<br />'); }
// 1b) issue the delete COMMAND finally
now
$mov_msgball = array();
$mov_msgball =
$grouped_move_balls[$count_grouped-1]['mov_msgball'];
@@ -2118,11 +2147,11 @@
$this_acctnum = $mov_msgball['acctnum'];
// EXPIRE MSGBALL ???? wasn't this done
with the notice of big move?
// note since we ALWAYS turn off
extreme caching when weuse this function, we *could* DIRECTLY expire it
- //if ($this->debug_wrapper_dcom_calls >
1) { echo 'mail_msg(_wrappers): flush_buffered_move_commmands: expire msgball
list with call to $this->event_msg_move_or_delete<br>'; }
+ //if ($this->debug_wrapper_dcom_calls >
1) { echo 'mail_msg(_wrappers): flush_buffered_move_commmands: expire msgball
list with call to $this->event_msg_move_or_delete<br />'; }
//$this->event_msg_move_or_delete($mov_msgball,
'flush_buffered_move_commmands'.' LINE: '.__LINE__.' and CACHE SHOULD BE OFF
NOW', $to_fldball);
- //if ($this->debug_wrapper_dcom_calls >
1) { echo 'mail_msg(_wrappers): flush_buffered_move_commmands: expire msgball
list with DIRECT call to $this->expire_session_cache_item (because we know
extreme caching os turned off for the duration of this function)<br>'; }
+ //if ($this->debug_wrapper_dcom_calls >
1) { echo 'mail_msg(_wrappers): flush_buffered_move_commmands: expire msgball
list with DIRECT call to $this->expire_session_cache_item (because we know
extreme caching os turned off for the duration of this function)<br />'; }
//$this->expire_session_cache_item('msgball_list', $this_acctnum);
- if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands:
($do_it_for_real is '.serialize($do_it_for_real).'): calling
$this->ensure_stream_and_folder($mov_msgball ['.serialize($mov_msgball).'],
who_is_calling) <br>'); }
+ if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands:
($do_it_for_real is '.serialize($do_it_for_real).'): calling
$this->ensure_stream_and_folder($mov_msgball ['.serialize($mov_msgball).'],
who_is_calling) <br />'); }
if ($do_it_for_real == True)
{
$this->ensure_stream_and_folder($mov_msgball, 'flush_buffered_move_commmands'.'
LINE: '.__LINE__);
@@ -2132,16 +2161,16 @@
if ($to_fldball['folder'] ==
$this->del_pseudo_folder || $to_fldball['folder'] == '##NOTHING##')
{
// STRAIGHT DELETE
- if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out('mail_msg(_wrappers):
flush_buffered_move_commmands: SRAIGHT DELETE ($do_it_for_real is
'.serialize($do_it_for_real).'):
$GLOBALS[phpgw_dcom_'.$this_acctnum.']->dcom->delete('.serialize($mailsvr_stream).'
,'.$collected_msg_num_string.')<br>'); }
+ if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out('mail_msg(_wrappers):
flush_buffered_move_commmands: SRAIGHT DELETE ($do_it_for_real is
'.serialize($do_it_for_real).'):
$GLOBALS[phpgw_dcom_'.$this_acctnum.']->dcom->delete('.serialize($mailsvr_stream).'
,'.$collected_msg_num_string.')<br />'); }
if ($do_it_for_real == True)
{
$did_delete =
$GLOBALS['phpgw_dcom_'.$this_acctnum]->dcom->delete($mailsvr_stream ,
$collected_msg_num_string);
if (!$did_delete)
{
$imap_err =
$GLOBALS['phpgw_dcom_'.$this_acctnum]->dcom->server_last_error();
- if
($this->debug_wrapper_dcom_calls > 0) { $this->dbug->out('mail_msg(_wrappers):
flush_buffered_move_commmands: STRAIGHT DELETE: LEAVING on ERROR, $imap_err:
['.$imap_err.'] return False'.' LINE '.__LINE__.'<br>'); }
- echo
'mail_msg(_wrappers): flush_buffered_move_commmands: LEAVING on ERROR,
$imap_err: ['.$imap_err.'] return False'.' LINE '.__LINE__.'<br>';
- echo '
command was:
$GLOBALS[phpgw_dcom_'.$this_acctnum.']->dcom->delete('.serialize($mailsvr_stream).'
,'.$collected_msg_num_string.')<br>';
+ if
($this->debug_wrapper_dcom_calls > 0) { $this->dbug->out('mail_msg(_wrappers):
flush_buffered_move_commmands: STRAIGHT DELETE: LEAVING on ERROR, $imap_err:
['.$imap_err.'] return False'.' LINE '.__LINE__.'<br />'); }
+ echo
'mail_msg(_wrappers): flush_buffered_move_commmands: LEAVING on ERROR,
$imap_err: ['.$imap_err.'] return False'.' LINE '.__LINE__.'<br />';
+ echo '
command was:
$GLOBALS[phpgw_dcom_'.$this_acctnum.']->dcom->delete('.serialize($mailsvr_stream).'
,'.$collected_msg_num_string.')<br />';
return False;
}
}
@@ -2149,21 +2178,21 @@
else
{
// MOVE
- if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out('mail_msg(_wrappers):
flush_buffered_move_commmands: ($do_it_for_real is
'.serialize($do_it_for_real).'):
$GLOBALS[phpgw_dcom_'.$this_acctnum.']->dcom->mail_move('.serialize($mailsvr_stream).'
,'.$collected_msg_num_string.', '.serialize($to_fldball['folder']).')<br>'); }
+ if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out('mail_msg(_wrappers):
flush_buffered_move_commmands: ($do_it_for_real is
'.serialize($do_it_for_real).'):
$GLOBALS[phpgw_dcom_'.$this_acctnum.']->dcom->mail_move('.serialize($mailsvr_stream).'
,'.$collected_msg_num_string.', '.serialize($to_fldball['folder']).')<br />');
}
if ($do_it_for_real == True)
{
$did_move =
$GLOBALS['phpgw_dcom_'.$this_acctnum]->dcom->mail_move($mailsvr_stream ,
$collected_msg_num_string, $to_fldball['folder']);
if (!$did_move)
{
$imap_err =
$GLOBALS['phpgw_dcom_'.$this_acctnum]->dcom->server_last_error();
- if
($this->debug_wrapper_dcom_calls > 0) { $this->dbug->out('mail_msg(_wrappers):
flush_buffered_move_commmands: LEAVING on ERROR, $imap_err: ['.$imap_err.']
return False'.' LINE '.__LINE__.'<br>'); }
- echo
'mail_msg(_wrappers): flush_buffered_move_commmands: LEAVING on ERROR,
$imap_err: ['.$imap_err.'] return False'.' LINE '.__LINE__.'<br>';
- echo '
command was:
$GLOBALS[phpgw_dcom_'.$this_acctnum.']->dcom->mail_move('.serialize($mailsvr_stream).'
,'.$collected_msg_num_string.', '.serialize($to_fldball['folder']).')<br>';
+ if
($this->debug_wrapper_dcom_calls > 0) { $this->dbug->out('mail_msg(_wrappers):
flush_buffered_move_commmands: LEAVING on ERROR, $imap_err: ['.$imap_err.']
return False'.' LINE '.__LINE__.'<br />'); }
+ echo
'mail_msg(_wrappers): flush_buffered_move_commmands: LEAVING on ERROR,
$imap_err: ['.$imap_err.'] return False'.' LINE '.__LINE__.'<br />';
+ echo '
command was:
$GLOBALS[phpgw_dcom_'.$this_acctnum.']->dcom->mail_move('.serialize($mailsvr_stream).'
,'.$collected_msg_num_string.', '.serialize($to_fldball['folder']).')<br />';
return False;
}
}
}
- if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands: LINE
'.__LINE__.': is we get here we probably just issued a move or delete command,
we may try to group more (usually only with filter usage) or we may be done
with buffered command list<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands: LINE
'.__LINE__.': is we get here we probably just issued a move or delete command,
we may try to group more (usually only with filter usage) or we may be done
with buffered command list<br />'); }
}
// 2) if NOT the final item in
$this->buffered_move_commmands we need to
@@ -2174,19 +2203,19 @@
$grouped_move_balls = array();
array_push($grouped_move_balls,
$this_move_balls);
// 3) then run again thru the loop
after that
- if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands:
continue; ... to look for groupable move commands for acctnum
['.$mailsvr_stream.']<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands:
continue; ... to look for groupable move commands for acctnum
['.$mailsvr_stream.']<br />'); }
// doesn't this happen anyway here?
continue;
}
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands: still in
that loop $x: ['.$x.'] $this->buffered_move_commmands_count-1:
['.(string)($this->buffered_move_commmands_count-1).'], if we get to here we
SHOULD be done with all moves, else a continue would have been hit<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands: still in
that loop $x: ['.$x.'] $this->buffered_move_commmands_count-1:
['.(string)($this->buffered_move_commmands_count-1).'], if we get to here we
SHOULD be done with all moves, else a continue would have been hit<br />'); }
}
if ($is_big_move == True)
{
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands:
$is_big_move: ['.serialize($is_big_move).'] we get to here we SHOULD be done so
call $this->event_begin_big_end <br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands:
$is_big_move: ['.serialize($is_big_move).'] we get to here we SHOULD be done so
call $this->event_begin_big_end <br />'); }
$this->event_begin_big_end('flush_buffered_move_commmands '.__LINE__);
}
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands
('.__LINE__.'): LEAVING<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): flush_buffered_move_commmands
('.__LINE__.'): LEAVING<br />'); }
// FIXME return something more useful
return True;
}
@@ -2205,7 +2234,7 @@
*/
function single_interacct_mail_move($mov_msgball='',
$to_fldball='')
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move: ENTERING
(note: only feed ONE msgball at a time, i.e. NOT a list of msgballs) <br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move: ENTERING
(note: only feed ONE msgball at a time, i.e. NOT a list of msgballs) <br />'); }
// Note: Only call this function with ONE msgball at a
time, i.e. NOT a list of msgballs
// INTERACCOUNT -OR- SAME ACCOUNT ?
if ($this->debug_wrapper_dcom_calls > 2) {
$this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move: $mov_msgball
DUMP:', $mov_msgball); }
@@ -2230,7 +2259,7 @@
// SAME ACCOUNT MAIL MOVE
$common_acctnum = $mov_msgball['acctnum'];
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move: SAME ACCOUNT
MOVE $common_acctnum: '.$common_acctnum.' $mailsvr_stream: '.$mailsvr_stream.'
$msgnum: '.$msgnum.' $mailsvr_callstr: '.$mailsvr_callstr.' $mailbox:
'.$mailbox.'<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move: SAME ACCOUNT
MOVE $common_acctnum: '.$common_acctnum.' $mailsvr_stream: '.$mailsvr_stream.'
$msgnum: '.$msgnum.' $mailsvr_callstr: '.$mailsvr_callstr.' $mailbox:
'.$mailbox.'<br />'); }
$this->event_msg_move_or_delete($mov_msgball,
'single_interacct_mail_move'.' LINE: '.__LINE__, $to_fldball);
//$this->expire_session_cache_item('msgball_list', $common_acctnum);
// we need to SELECT the folder the message is
being moved FROM
@@ -2240,20 +2269,20 @@
$mov_msgball['msgnum'] =
(string)$mov_msgball['msgnum'];
$to_fldball['folder'] =
urldecode($to_fldball['folder']);
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $common_acctnum);
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move:
$GLOBALS[phpgw_dcom_'.$common_acctnum.']->dcom->mail_move('.serialize($mailsvr_stream).'
,'.serialize($mov_msgball['msgnum']).',
'.serialize($to_fldball['folder']).')<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move:
$GLOBALS[phpgw_dcom_'.$common_acctnum.']->dcom->mail_move('.serialize($mailsvr_stream).'
,'.serialize($mov_msgball['msgnum']).',
'.serialize($to_fldball['folder']).')<br />'); }
$did_move =
$GLOBALS['phpgw_dcom_'.$common_acctnum]->dcom->mail_move($mailsvr_stream
,$mov_msgball['msgnum'], $to_fldball['folder']);
if (!$did_move)
{
- if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move:
LEAVING, return False'.' LINE '.__LINE__.'<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move:
LEAVING, return False'.' LINE '.__LINE__.'<br />'); }
return False;
}
else
{
- if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move
('.__LINE__.'): SAME ACCOUNT MOVE *SUCCESS*, $did_move
['.serialize($did_move).'], now add this folder to this accounts
"expunge_folders" arg via "track_expungable_folders"<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move
('.__LINE__.'): SAME ACCOUNT MOVE *SUCCESS*, $did_move
['.serialize($did_move).'], now add this folder to this accounts
"expunge_folders" arg via "track_expungable_folders"<br />'); }
$this->track_expungable_folders($mov_msgball);
- //if ($this->debug_wrapper_dcom_calls >
0) { echo 'mail_msg(_wrappers): industrial_interacct_mail_move: LEAVING, about
to call $this->phpgw_expunge('.$mov_msgball['acctnum'].')'.' LINE
'.__LINE__.'<br>'; }
+ //if ($this->debug_wrapper_dcom_calls >
0) { echo 'mail_msg(_wrappers): industrial_interacct_mail_move: LEAVING, about
to call $this->phpgw_expunge('.$mov_msgball['acctnum'].')'.' LINE
'.__LINE__.'<br />'; }
//return
$this->phpgw_expunge($mov_msgball['acctnum']);
- if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move
('.__LINE__.'): LEAVING, returning True, SAME ACCOUNT MOVE SUCCESS (do not
forget to expunge later) <br>'); }
+ if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move
('.__LINE__.'): LEAVING, returning True, SAME ACCOUNT MOVE SUCCESS (do not
forget to expunge later) <br />'); }
return True;
}
}
@@ -2261,7 +2290,7 @@
{
// DIFFERENT ACCOUNT MAIL MOVE
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move: Different
ACCOUNT MOVE $common_acctnum: '.$common_acctnum.' $mailsvr_stream:
'.$mailsvr_stream.' $msgnum: '.$msgnum.' $mailsvr_callstr: '.$mailsvr_callstr.'
$mailbox: '.$mailbox.'<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move: Different
ACCOUNT MOVE $common_acctnum: '.$common_acctnum.' $mailsvr_stream:
'.$mailsvr_stream.' $msgnum: '.$msgnum.' $mailsvr_callstr: '.$mailsvr_callstr.'
$mailbox: '.$mailbox.'<br />'); }
$good_to_go = False;
// delete session msg array data thAt is now
stale
$this->event_msg_move_or_delete($mov_msgball,
'single_interacct_mail_move'.' LINE: '.__LINE__, $to_fldball);
@@ -2286,7 +2315,7 @@
$good_to_go = (strlen($moving_message) > 3);
if (!$good_to_go)
{
- if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move:
LEAVING, return False'.' LINE '.__LINE__.'<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move:
LEAVING, return False'.' LINE '.__LINE__.'<br />'); }
return False;
}
@@ -2311,7 +2340,7 @@
$good_to_go =
$GLOBALS['phpgw_dcom_'.$to_fldball['acctnum']]->dcom->append($to_mailsvr_stream,
$mailsvr_callstr.$to_fldball['folder'], $moving_message,
$mov_msgball['flags']);
if (!$good_to_go)
{
- if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move:
LEAVING, return False'.' LINE '.__LINE__.'<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move:
LEAVING, return False'.' LINE '.__LINE__.'<br />'); }
return False;
}
// DELETE and EXPUNGE from FROM FOLDER
@@ -2319,20 +2348,20 @@
$good_to_go =
$GLOBALS['phpgw_dcom_'.$mov_msgball['acctnum']]->dcom->delete($from_mailsvr_stream,
$mov_msgball['msgnum']);
if (!$good_to_go)
{
- if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move:
LEAVING, return False'.' LINE '.__LINE__.'<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move:
LEAVING, return False'.' LINE '.__LINE__.'<br />'); }
return False;
}
//$good_to_go =
$GLOBALS['phpgw']->msg->phpgw_expunge($mov_msgball['acctnum']);
//$good_to_go =
$this->phpgw_expunge($mov_msgball['acctnum']);
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move
('.__LINE__.'): different account append and delete SUCCESS, now add this
folder to this accounts "expunge_folders" arg via
"track_expungable_folders"<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move
('.__LINE__.'): different account append and delete SUCCESS, now add this
folder to this accounts "expunge_folders" arg via "track_expungable_folders"<br
/>'); }
$this->track_expungable_folders($mov_msgball);
if (!$good_to_go)
{
- if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move:
LEAVING, return False'.' LINE '.__LINE__.'<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move:
LEAVING, return False'.' LINE '.__LINE__.'<br />'); }
return False;
}
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move: LEAVING,
return TRUE'.' LINE '.__LINE__.'<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): single_interacct_mail_move: LEAVING,
return TRUE'.' LINE '.__LINE__.'<br />'); }
return True;
}
}
@@ -2349,7 +2378,7 @@
*/
function track_expungable_folders($fldball='')
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): track_expungable_folders ('.__LINE__.'):
ENTERING, $fldball ['.serialize($fldball).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): track_expungable_folders ('.__LINE__.'):
ENTERING, $fldball ['.serialize($fldball).']<br />'); }
if (!(isset($fldball['acctnum']))
|| ((string)$fldball['acctnum'] == ''))
{
@@ -2371,7 +2400,7 @@
$my_fldball = array();
$my_fldball['folder'] = $folder;
$my_fldball['acctnum'] = $acctnum;
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): track_expungable_folders ('.__LINE__.'):
$my_fldball ['.serialize($my_fldball).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): track_expungable_folders ('.__LINE__.'):
$my_fldball ['.serialize($my_fldball).']<br />'); }
$first_addition_to_array = False;
// get an array of folders that need expunging that we
know of
@@ -2391,7 +2420,7 @@
$already_listed = False;
for ($i=0; $i<$loops;$i++)
{
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): track_expungable_folders ('.__LINE__.'):
loop ['.$i.'] of ['.$loops.'] $expunge_folders[$i]
['.htmlspecialchars($expunge_folders[$i]).'] same as $my_fldball[folder]
['.htmlspecialchars($my_fldball['folder']).'] test<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): track_expungable_folders ('.__LINE__.'):
loop ['.$i.'] of ['.$loops.'] $expunge_folders[$i]
['.htmlspecialchars($expunge_folders[$i]).'] same as $my_fldball[folder]
['.htmlspecialchars($my_fldball['folder']).'] test<br />'); }
if ($expunge_folders[$i] ==
$my_fldball['folder'])
{
$already_listed = True;
@@ -2406,17 +2435,17 @@
if ($first_addition_to_array == True)
{
$this->set_arg_value('expunge_folders',
$expunge_folders, $my_fldball['acctnum']);
- if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): track_expungable_folders
('.__LINE__.'): LEAVING: added first item to $my_fldball[folder]
['.$my_fldball['folder'].'] to $expunge_folders
['.htmlspecialchars(serialize($expunge_folders)).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): track_expungable_folders
('.__LINE__.'): LEAVING: added first item to $my_fldball[folder]
['.$my_fldball['folder'].'] to $expunge_folders
['.htmlspecialchars(serialize($expunge_folders)).']<br />'); }
}
else
{
- if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): track_expungable_folders
('.__LINE__.'): LEAVING: added VIA REFERENCE $my_fldball[folder]
['.$my_fldball['folder'].'] to $expunge_folders
['.htmlspecialchars(serialize($expunge_folders)).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
0) { $this->dbug->out('mail_msg(_wrappers): track_expungable_folders
('.__LINE__.'): LEAVING: added VIA REFERENCE $my_fldball[folder]
['.$my_fldball['folder'].'] to $expunge_folders
['.htmlspecialchars(serialize($expunge_folders)).']<br />'); }
}
return True;
}
else
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): track_expungable_folders ('.__LINE__.'):
LEAVING: $my_fldball[folder] ['.$my_fldball['folder'].'] was ALREADY in
$expunge_folders ['.htmlspecialchars(serialize($expunge_folders)).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): track_expungable_folders ('.__LINE__.'):
LEAVING: $my_fldball[folder] ['.$my_fldball['folder'].'] was ALREADY in
$expunge_folders ['.htmlspecialchars(serialize($expunge_folders)).']<br />'); }
return False;
}
}
@@ -2431,7 +2460,7 @@
*/
function expunge_expungable_folders($called_by='not_specified')
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): expunge_expungable_folders
('.__LINE__.'): ENTERING, called by ['.$called_by.'], <br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): expunge_expungable_folders
('.__LINE__.'): ENTERING, called by ['.$called_by.'], <br />'); }
$this->flush_buffered_move_commmands('expunge_expungable_folders');
@@ -2441,7 +2470,7 @@
if
($this->extra_and_default_acounts[$i]['status'] == 'enabled')
{
$this_acctnum =
$this->extra_and_default_acounts[$i]['acctnum'];
- if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): expunge_expungable_folders
('.__LINE__.'): acctnum ['.$this_acctnum.'] needs to be checked<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): expunge_expungable_folders
('.__LINE__.'): acctnum ['.$this_acctnum.'] needs to be checked<br />'); }
if
($this->get_isset_arg('expunge_folders', $this_acctnum) == True)
{
$expunge_folders = array();
@@ -2455,20 +2484,20 @@
$fake_fldball['acctnum'] = $i;
$fake_fldball['folder']
= $expunge_folders[$x];
$success =
$this->phpgw_expunge('', $fake_fldball);
- if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out('mail_msg(_wrappers):
expunge_expungable_folders ('.__LINE__.'): expunge for $fake_fldball
['.htmlspecialchars(serialize($fake_fldball)).'] returns
['.serialize($success).']<br>'); }
+ if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out('mail_msg(_wrappers):
expunge_expungable_folders ('.__LINE__.'): expunge for $fake_fldball
['.htmlspecialchars(serialize($fake_fldball)).'] returns
['.serialize($success).']<br />'); }
}
// we are done with this
account, we expunged all expungable folders, not UNSET that arg so it is not
left hanging around
- if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out('mail_msg(_wrappers):
expunge_expungable_folders ('.__LINE__.'): finished expunging folders for
acctnum ['.$this_acctnum.'] , now issue: $this->unset_arg("expunge_folders",
'.$this_acctnum.') <br>'); }
+ if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out('mail_msg(_wrappers):
expunge_expungable_folders ('.__LINE__.'): finished expunging folders for
acctnum ['.$this_acctnum.'] , now issue: $this->unset_arg("expunge_folders",
'.$this_acctnum.') <br />'); }
$this->unset_arg('expunge_folders', $this_acctnum);
}
else
{
$expunge_folders = array();
- if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out('mail_msg(_wrappers):
expunge_expungable_folders ('.__LINE__.'): acctnum ['.$this_acctnum.'] has NO
value for "expunge_folders"<br>'); }
+ if
($this->debug_wrapper_dcom_calls > 1) { $this->dbug->out('mail_msg(_wrappers):
expunge_expungable_folders ('.__LINE__.'): acctnum ['.$this_acctnum.'] has NO
value for "expunge_folders"<br />'); }
}
}
}
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): expunge_expungable_folders
('.__LINE__.'): LEAVING<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): expunge_expungable_folders
('.__LINE__.'): LEAVING<br />'); }
// FIXME return something more useful
return True;
}
@@ -2518,9 +2547,9 @@
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
$note_folder = $this->get_arg_value('folder', $acctnum);
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): dcom_call: phpgw_expunge: $acctnum:
'.serialize($acctnum).' NOTE current "folder" arg set for that acct is
['.$note_folder.']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): dcom_call: phpgw_expunge: $acctnum:
'.serialize($acctnum).' NOTE current "folder" arg set for that acct is
['.$note_folder.']<br />'); }
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): dcom_call: phpgw_expunge: $acctnum:
'.serialize($acctnum).' $mailsvr_stream: '.$mailsvr_stream.'<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): dcom_call: phpgw_expunge: $acctnum:
'.serialize($acctnum).' $mailsvr_stream: '.$mailsvr_stream.'<br />'); }
return
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->expunge($mailsvr_stream);
}
@@ -2544,7 +2573,7 @@
*/
function phpgw_delete($msg_num,$flags=0, $currentfolder="",
$acctnum='', $known_single_delete=False)
{
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete: ENTERING <br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete: ENTERING <br />'); }
if (!(isset($acctnum))
|| ((string)$acctnum == ''))
@@ -2554,7 +2583,7 @@
// everything from now on MUST specify this $acctnum
// now get the stream that applies to that acctnum
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete: $acctnum: ['.$acctnum.'],
$msg_num: ['.$msg_num.']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete: $acctnum: ['.$acctnum.'],
$msg_num: ['.$msg_num.']<br />'); }
// this get arg value checks the pref for enabled or
not enabled, no need to do it again
if ($this->get_isset_arg('verified_trash_folder_long',
$acctnum) == False)
@@ -2573,34 +2602,34 @@
$currentfolder_encoded = $currentfolder;
$currentfolder_clean =
urldecode($currentfolder);
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): "Trash"
folder pref is enabled, does $currentfolder_clean
['.htmlspecialchars($currentfolder_clean).'] equal $trash_folder_long
['.htmlspecialchars($trash_folder_long).'] <br>'); }
- //echo 'mail_msg(_wrappers):
phpgw_delete('.__LINE__.'): "Trash" folder pref is enabled, does
['.$currentfolder.'] == ['.$trash_folder_long.']<br>';
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): "Trash"
folder pref is enabled, does $currentfolder_clean
['.htmlspecialchars($currentfolder_clean).'] equal $trash_folder_long
['.htmlspecialchars($trash_folder_long).'] <br />'); }
+ //echo 'mail_msg(_wrappers):
phpgw_delete('.__LINE__.'): "Trash" folder pref is enabled, does
['.$currentfolder.'] == ['.$trash_folder_long.']<br />';
if ( ($currentfolder_clean != '')
&& ($currentfolder_clean == $trash_folder_long)
)
{
$straight_delete = True;
- if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): "Trash"
folder pref is enabled, YES to does $currentfolder_clean
['.htmlspecialchars($currentfolder_clean).'] equal $trash_folder_long
['.htmlspecialchars($trash_folder_long).'] <br>'); }
- //echo 'mail_msg(_wrappers):
phpgw_delete('.__LINE__.'): "Trash" folder pref is enabled, shortcut good<br>';
+ if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): "Trash"
folder pref is enabled, YES to does $currentfolder_clean
['.htmlspecialchars($currentfolder_clean).'] equal $trash_folder_long
['.htmlspecialchars($trash_folder_long).'] <br />'); }
+ //echo 'mail_msg(_wrappers):
phpgw_delete('.__LINE__.'): "Trash" folder pref is enabled, shortcut good<br
/>';
}
else
{
$straight_delete = False;
- if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): "Trash"
folder pref is enabled, NO to does $currentfolder_clean
['.htmlspecialchars($currentfolder_clean).'] equal $trash_folder_long
['.htmlspecialchars($trash_folder_long).'] <br>'); }
+ if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): "Trash"
folder pref is enabled, NO to does $currentfolder_clean
['.htmlspecialchars($currentfolder_clean).'] equal $trash_folder_long
['.htmlspecialchars($trash_folder_long).'] <br />'); }
}
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'):
$straight_delete: ['.serialize($straight_delete).'], $currentfolder_clean:
['.htmlspecialchars($currentfolder_clean).'] $trash_folder_long:
['.htmlspecialchars($trash_folder_long).'] <br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'):
$straight_delete: ['.serialize($straight_delete).'], $currentfolder_clean:
['.htmlspecialchars($currentfolder_clean).'] $trash_folder_long:
['.htmlspecialchars($trash_folder_long).'] <br />'); }
}
else
{
$straight_delete = True;
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'):
$straight_delete: ['.serialize($straight_delete).'] because $trash_folder_long
['.htmlspecialchars($trash_folder_long).'] is empty string<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'):
$straight_delete: ['.serialize($straight_delete).'] because $trash_folder_long
['.htmlspecialchars($trash_folder_long).'] is empty string<br />'); }
}
// now that we know if this is a straight delete or not
// TAKE ACTION
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): taking
action based on info that $straight_delete:
['.serialize($straight_delete).']<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): taking
action based on info that $straight_delete:
['.serialize($straight_delete).']<br />'); }
if ($straight_delete == True)
{
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): begin code
for STRAIGHT DELETE<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): begin code
for STRAIGHT DELETE<br />'); }
$mov_msgball = array();
if ((isset($currentfolder_encoded))
&& ((string)$currentfolder_encoded != ''))
@@ -2624,39 +2653,39 @@
$to_fldball['folder'] =
$this->del_pseudo_folder;
// PUT THIS COMMAND IN THE BUFFERED MOVE (OR
DELETE) ARRAY
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): STRAIGHT
DELETE: calling
$this->industrial_interacct_mail_move($mov_msgball['.serialize($mov_msgball).'],$to_fldball['.serialize($to_fldball).'])
<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): STRAIGHT
DELETE: calling
$this->industrial_interacct_mail_move($mov_msgball['.serialize($mov_msgball).'],$to_fldball['.serialize($to_fldball).'])
<br />'); }
$did_take_action =
$this->industrial_interacct_mail_move($mov_msgball, $to_fldball);
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): LEAVING,
returning $did_take_action ['.serialize($did_take_action).'] (does not really
mean anything since we buffer the command) DO NOT FORGET TO EXPUNGE
LATER<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): LEAVING,
returning $did_take_action ['.serialize($did_take_action).'] (does not really
mean anything since we buffer the command) DO NOT FORGET TO EXPUNGE LATER<br
/>'); }
// LEAVING
return $did_take_action;
/*
// BELOW HERE SHOULD GO INTO THE NEW STRAIGHT
DELETE BUFFER
- if ($this->debug_wrapper_dcom_calls > 1) { echo
'mail_msg(_wrappers): phpgw_delete('.__LINE__.'): calling
$this->event_msg_move_or_delete()<br>'; }
+ if ($this->debug_wrapper_dcom_calls > 1) { echo
'mail_msg(_wrappers): phpgw_delete('.__LINE__.'): calling
$this->event_msg_move_or_delete()<br />'; }
$this->event_msg_move_or_delete($mov_msgball,
'phpgw_delete'.' LINE: '.__LINE__);
//$this->expire_session_cache_item('msgball_list', $acctnum);
// delete this when we start buffering straight
deletes
- if ($this->debug_wrapper_dcom_calls > 1) { echo
'mail_msg(_wrappers): phpgw_delete('.__LINE__.'): calling
$this->ensure_stream_and_folder()<br>'; }
+ if ($this->debug_wrapper_dcom_calls > 1) { echo
'mail_msg(_wrappers): phpgw_delete('.__LINE__.'): calling
$this->ensure_stream_and_folder()<br />'; }
$this->ensure_stream_and_folder($mov_msgball,
'phpgw_delete'.' LINE '.__LINE__);
- if ($this->debug_wrapper_dcom_calls > 1) { echo
'mail_msg(_wrappers): phpgw_delete('.__LINE__.'): getting
"mailsvr_stream"<br>'; }
+ if ($this->debug_wrapper_dcom_calls > 1) { echo
'mail_msg(_wrappers): phpgw_delete('.__LINE__.'): getting "mailsvr_stream"<br
/>'; }
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
//return imap_delete($mailsvr_stream,$msg_num);
- if ($this->debug_wrapper_dcom_calls > 1) { echo
'mail_msg(_wrappers): phpgw_delete('.__LINE__.'): calling
GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->delete('.serialize($mailsvr_stream).',
'.serialize($msg_num).') <br>'; }
+ if ($this->debug_wrapper_dcom_calls > 1) { echo
'mail_msg(_wrappers): phpgw_delete('.__LINE__.'): calling
GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->delete('.serialize($mailsvr_stream).',
'.serialize($msg_num).') <br />'; }
$retval =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->delete($mailsvr_stream, $msg_num);
if ($retval)
{
- if ($this->debug_wrapper_dcom_calls >
1) { echo 'mail_msg(_wrappers): phpgw_delete ('.__LINE__.'): delete *SUCCESS*,
now add this folder to this accounts "expunge_folders" arg via
"track_expungable_folders"<br>'; }
+ if ($this->debug_wrapper_dcom_calls >
1) { echo 'mail_msg(_wrappers): phpgw_delete ('.__LINE__.'): delete *SUCCESS*,
now add this folder to this accounts "expunge_folders" arg via
"track_expungable_folders"<br />'; }
$this->track_expungable_folders($mov_msgball);
}
- if ($this->debug_wrapper_dcom_calls > 0) { echo
'mail_msg(_wrappers): phpgw_delete('.__LINE__.'): EXITING with $retval
['.serialize($retval).'] DO NOT FORGET TO EXPUNGE LATER<br>'; }
+ if ($this->debug_wrapper_dcom_calls > 0) { echo
'mail_msg(_wrappers): phpgw_delete('.__LINE__.'): EXITING with $retval
['.serialize($retval).'] DO NOT FORGET TO EXPUNGE LATER<br />'; }
// LEAVING
return $retval;
*/
}
else
{
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): begin do
move to trash folder<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): begin do
move to trash folder<br />'); }
$mov_msgball = array();
if ((isset($currentfolder_encoded))
&& ((string)$currentfolder_encoded != ''))
@@ -2675,26 +2704,26 @@
$to_fldball['folder'] = $trash_folder_long;
$to_fldball['acctnum'] = $acctnum;
// this event MOVED to flush command
- //if ($this->debug_wrapper_dcom_calls > 1) {
echo 'mail_msg(_wrappers): phpgw_delete('.__LINE__.'): calling
$this->event_msg_move_or_delete<br>'; }
+ //if ($this->debug_wrapper_dcom_calls > 1) {
echo 'mail_msg(_wrappers): phpgw_delete('.__LINE__.'): calling
$this->event_msg_move_or_delete<br />'; }
//$this->event_msg_move_or_delete($mov_msgball,
'phpgw_delete'.' LINE: '.__LINE__, $to_fldball);
//$this->expire_session_cache_item('msgball_list', $acctnum);
//if ($known_single_delete == True)
//{
// // we were told this is just a SINGLE
delete call, NOT multiple deletes involved
- // if ($this->debug_wrapper_dcom_calls >
1) { echo 'mail_msg(_wrappers): phpgw_delete('.__LINE__.'):
$known_single_delete: ['.serialize($known_single_delete).'] so calling
$this->single_interacct_mail_move($mov_msgball['.serialize($mov_msgball).'],$to_fldball['.serialize($to_fldball).'])
<br>'; }
+ // if ($this->debug_wrapper_dcom_calls >
1) { echo 'mail_msg(_wrappers): phpgw_delete('.__LINE__.'):
$known_single_delete: ['.serialize($known_single_delete).'] so calling
$this->single_interacct_mail_move($mov_msgball['.serialize($mov_msgball).'],$to_fldball['.serialize($to_fldball).'])
<br />'; }
// $did_move =
$this->single_interacct_mail_move($mov_msgball, $to_fldball);
//}
//else
//{
// most (WAS) likely multiple deletes,
so use the command that buffers the moves
// this logic concerning single or not
has been moved elsewhere
- if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'):
$known_single_delete: ['.serialize($known_single_delete).'] so calling
$this->industrial_interacct_mail_move($mov_msgball['.serialize($mov_msgball).'],$to_fldball['.serialize($to_fldball).'])
<br>'); }
+ if ($this->debug_wrapper_dcom_calls >
1) { $this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'):
$known_single_delete: ['.serialize($known_single_delete).'] so calling
$this->industrial_interacct_mail_move($mov_msgball['.serialize($mov_msgball).'],$to_fldball['.serialize($to_fldball).'])
<br />'); }
$did_move =
$this->industrial_interacct_mail_move($mov_msgball, $to_fldball);
//}
- if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): $did_move:
['.serialize($did_move).'], does not mean unless you called
$this->single_interacct_mail_move()<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 1) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete('.__LINE__.'): $did_move:
['.serialize($did_move).'], does not mean unless you called
$this->single_interacct_mail_move()<br />'); }
- if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete ('.__LINE__.'): LEAVING,
returning $did_move ['.serialize($did_move).'] DO NOT FORGET TO EXPUNGE
LATER<br>'); }
+ if ($this->debug_wrapper_dcom_calls > 0) {
$this->dbug->out('mail_msg(_wrappers): phpgw_delete ('.__LINE__.'): LEAVING,
returning $did_move ['.serialize($did_move).'] DO NOT FORGET TO EXPUNGE
LATER<br />'); }
return $did_move;
}
}
@@ -2717,23 +2746,23 @@
*/
function get_verified_trash_folder_long($acctnum='')
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: ENTERING<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: ENTERING<br />'); }
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
$acctnum = $this->get_acctnum();
}
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_verified_trash_folder_long('.__LINE__.'): after
testing feed arg, using $acctnum: ['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_verified_trash_folder_long('.__LINE__.'): after
testing feed arg, using $acctnum: ['.$acctnum.']<br />'); }
// L1 (temporary) CACHED data available ?
$class_cached_verified_trash_folder_long =
$this->_direct_access_arg_value('verified_trash_folder_long', $acctnum);
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_verified_trash_folder_long('.__LINE__.'): check
for L1 class var cached data:
$this->_direct_access_arg_value(verified_trash_folder_long, '.$acctnum.');
returns: '.serialize($class_cached_verified_trash_folder_long).'<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_verified_trash_folder_long('.__LINE__.'): check
for L1 class var cached data:
$this->_direct_access_arg_value(verified_trash_folder_long, '.$acctnum.');
returns: '.serialize($class_cached_verified_trash_folder_long).'<br />'); }
if ((isset($class_cached_verified_trash_folder_long))
&& ($class_cached_verified_trash_folder_long != ''))
{
// return the cached data
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_verified_trash_folder_long('.__LINE__.'):
LEAVING, returned class var cached data:
'.serialize($class_cached_verified_trash_folder_long).'<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_verified_trash_folder_long('.__LINE__.'):
LEAVING, returned class var cached data:
'.serialize($class_cached_verified_trash_folder_long).'<br />'); }
return $class_cached_verified_trash_folder_long;
}
// NO CACHED data, continue ...
@@ -2741,7 +2770,7 @@
// does the mailserver have folders, if not then there
is NO trash folder no matter what
if ($this->get_mailsvr_supports_folders($acctnum) ==
False)
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: LEAVING, mailserver does NOT support folders,
so storing and returning empty string<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: LEAVING, mailserver does NOT support folders,
so storing and returning empty string<br />'); }
// exit, trash folder pref is NOT TO USE ONE,
so we certainly do not have a "verified" name in this case
$this->set_arg_value('verified_trash_folder_long', '', $acctnum);
return '';
@@ -2751,16 +2780,16 @@
if ( (!$this->get_isset_pref('use_trash_folder',
$acctnum))
|| (!$this->get_pref_value('use_trash_folder',
$acctnum)) )
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: LEAVING, user does NOT prefer to use a trash
folder, so storing and returning empty string<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: LEAVING, user does NOT prefer to use a trash
folder, so storing and returning empty string<br />'); }
// exit, trash folder pref is NOT TO USE ONE,
so we certainly do not have a "verified" name in this case
$this->set_arg_value('verified_trash_folder_long', '', $acctnum);
return '';
}
// does the trash folder actually exist ?
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: humm... does the "Trash" folder actually exist
:: this->get_pref_value("trash_folder_name", '.$acctnum.') =
['.htmlspecialchars($this->get_pref_value('trash_folder_name',
$acctnum)).']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: humm... does the "Trash" folder actually exist
:: this->get_pref_value("trash_folder_name", '.$acctnum.') =
['.htmlspecialchars($this->get_pref_value('trash_folder_name', $acctnum)).']<br
/>'); }
$verified_trash_folder_long = $this->folder_lookup('',
$this->get_pref_value('trash_folder_name', $acctnum));
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: did lookup on pref value for "Trash" folder,
got $verified_trash_folder_long
['.htmlspecialchars($verified_trash_folder_long).']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: did lookup on pref value for "Trash" folder,
got $verified_trash_folder_long
['.htmlspecialchars($verified_trash_folder_long).']<br />'); }
if ((isset($verified_trash_folder_long))
&& ($verified_trash_folder_long != ''))
{
@@ -2771,11 +2800,11 @@
$havefolder = False;
}
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: "Trash" folder $havefolder so far is
['.serialize($havefolder).']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: "Trash" folder $havefolder so far is
['.serialize($havefolder).']<br />'); }
if (!$havefolder)
{
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: we have to create the "Trash" folder so it will
exist<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: we have to create the "Trash" folder so it will
exist<br />'); }
// create the Trash folder so it will exist
(Netscape does this too)
//$mailsvr_callstr =
$this->get_arg_value('mailsvr_callstr', $acctnum);
$namespace =
$this->get_arg_value('mailsvr_namespace', $acctnum);
@@ -2787,7 +2816,7 @@
$fake_fldball = array();
$fake_fldball['folder'] =
$make_this_folder_encoded;
$fake_fldball['acctnum'] = $acctnum;
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: calling
$this->phpgw_createmailbox_ex('.serialize($fake_fldball).') <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: calling
$this->phpgw_createmailbox_ex('.serialize($fake_fldball).') <br />'); }
//$did_create =
$this->phpgw_createmailbox($fake_fldball);
$did_create =
$this->phpgw_createmailbox_ex($fake_fldball);
if (!$did_create)
@@ -2795,17 +2824,17 @@
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: UNABLE TO CREATE
['.htmlspecialchars(serialize($fake_fldball)).']');
echo
'mail_msg(_wrappers)('.__LINE__.'): get_verified_trash_folder_long: UNABLE TO
CREATE ['.htmlspecialchars(serialize($fake_fldball)).']';
}
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: phpgw_createmailbox returns $did_create
['.serialize($did_create ).'] <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: phpgw_createmailbox returns $did_create
['.serialize($did_create ).'] <br />'); }
// try again to get the real long folder name
of the just created trash folder
$verified_trash_folder_long =
$this->folder_lookup('', $this->get_pref_value('trash_folder_name', $acctnum));
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: Another lookup on pref value for "Trash"
folder, got $verified_trash_folder_long
['.htmlspecialchars($verified_trash_folder_long).']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: Another lookup on pref value for "Trash"
folder, got $verified_trash_folder_long
['.htmlspecialchars($verified_trash_folder_long).']<br />'); }
// did the folder get created and do we now
have the official full name of that folder?
if ($verified_trash_folder_long != '')
{
$havefolder = True;
}
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: Another check of "Trash" folder $havefolder so
far is ['.serialize($havefolder).']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'):
get_verified_trash_folder_long: Another check of "Trash" folder $havefolder so
far is ['.serialize($havefolder).']<br />'); }
}
if ($havefolder == False)
@@ -2817,11 +2846,11 @@
{
// SUCCESS, put the result in L1 (page view
only) cache
// cache the result in "level one cache" class
var holder
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_verified_trash_folder_long('.__LINE__.'): set
"level 1 cache, class var" arg $this->set_arg_value(verified_trash_folder_long,
'.$verified_trash_folder_long.', '.$acctnum.']) <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_verified_trash_folder_long('.__LINE__.'): set
"level 1 cache, class var" arg $this->set_arg_value(verified_trash_folder_long,
'.$verified_trash_folder_long.', '.$acctnum.']) <br />'); }
$this->set_arg_value('verified_trash_folder_long', $verified_trash_folder_long,
$acctnum);
// LATER put it in appsession cache BUT make
code to delete it from cache when submitting new prefs
}
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_wrappers):
get_verified_trash_folder_long('.__LINE__.'): LEAVING, returning
$verified_trash_folder_long ['.serialize($verified_trash_folder_long).']<br>');
}
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_wrappers):
get_verified_trash_folder_long('.__LINE__.'): LEAVING, returning
$verified_trash_folder_long ['.serialize($verified_trash_folder_long).']<br
/>'); }
return $verified_trash_folder_long;
}
@@ -2862,22 +2891,22 @@
*/
function is_ball_data($maybe_ball='##NOTHING##',
$expect_ball_type='any', $is_uri_type_string='')
{
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): ENTERING<br>'); }
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): param $maybe_ball
['.htmlspecialchars(serialize($maybe_ball)).'], param $expect_ball_type
['.$expect_ball_type.'], param $is_uri_type_string
['.htmlspecialchars(serialize($is_uri_type_string)).'] <br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): ENTERING<br />'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): param $maybe_ball
['.htmlspecialchars(serialize($maybe_ball)).'], param $expect_ball_type
['.$expect_ball_type.'], param $is_uri_type_string
['.htmlspecialchars(serialize($is_uri_type_string)).'] <br />'); }
// sanity check on input data
if ((!isset($maybe_ball))
|| ($maybe_ball == $this->nothing)
|| (!isset($expect_ball_type))
|| (!isset($is_uri_type_string)))
{
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): LEAVING with error,
input params error, returning False <br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): LEAVING with error,
input params error, returning False <br />'); }
return False;
}
elseif (($expect_ball_type != 'fldball')
&& ($expect_ball_type != 'msgball')
&& ($expect_ball_type != 'any'))
{
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): LEAVING with error,
param $expect_ball_type ['.htmlspecialchars(serialize($expect_ball_type)).'],
is neither "fldball" nor "msgball" nor "any" , returning False <br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): LEAVING with error,
param $expect_ball_type ['.htmlspecialchars(serialize($expect_ball_type)).'],
is neither "fldball" nor "msgball" nor "any" , returning False <br />'); }
return False;
}
// baseline data
@@ -2890,7 +2919,7 @@
{
$maybe_ball_uri = $maybe_ball;
$maybe_ball =
$this->ball_data_parse_str($maybe_ball_uri);
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): needed to converted
$maybe_ball_uri ['.htmlspecialchars(serialize($maybe_ball_uri)).'] to ball data
array $maybe_ball ['.htmlspecialchars(serialize($maybe_ball)).'] <br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): needed to converted
$maybe_ball_uri ['.htmlspecialchars(serialize($maybe_ball_uri)).'] to ball data
array $maybe_ball ['.htmlspecialchars(serialize($maybe_ball)).'] <br />'); }
}
// easiest test, is it a fldball
if ((isset($maybe_ball['folder']))
@@ -2898,7 +2927,7 @@
&& (isset($maybe_ball['acctnum']))
&& ((string)$maybe_ball['acctnum'] != ''))
{
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): input data DOES have
minimun data of a FLDBALL, so generically it is "ball data", but also do the
"msgnum" test, we may need it later. <br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): input data DOES have
minimun data of a FLDBALL, so generically it is "ball data", but also do the
"msgnum" test, we may need it later. <br />'); }
$test_results['verified_is_fldball'] = True;
}
@@ -2909,7 +2938,7 @@
&& ((string)$maybe_ball['msgnum'] != ''))
{
$test_results['verified_is_msgball'] = True;
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): input data is a
MSGBALL, so it is not a FLDBALL, but is "ball data" in the generic sence<br>');
}
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): input data is a
MSGBALL, so it is not a FLDBALL, but is "ball data" in the generic sence<br
/>'); }
}
//make a determination
if (($expect_ball_type == 'any')
@@ -2917,7 +2946,7 @@
{
// testing for "any" type of ball data is True
if minimal criteria of fldball are met
$test_results['final_verdict'] = True;
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): testing for
'.$expect_ball_type.' data and input data meets minimum criteria for
FLDBALL<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): testing for
'.$expect_ball_type.' data and input data meets minimum criteria for FLDBALL<br
/>'); }
}
elseif (($expect_ball_type == 'fldball')
&& ($test_results['verified_is_fldball'] == True)
@@ -2926,22 +2955,22 @@
// strictly speaking, data is NOT a fldball if
it ALSO has a msgnum, if using a strict match, not "any" ball
// if the data ALSO HAS a msgnum, is is NOT a
fldball, it is a msgball in the strict sence.
$test_results['final_verdict'] = True;
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): expected a
'.$expect_ball_type.' and input data is a FLDBALL, and dod NOT have msgball
element(s) <br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): expected a
'.$expect_ball_type.' and input data is a FLDBALL, and dod NOT have msgball
element(s) <br />'); }
}
elseif (($expect_ball_type == 'msgball')
&& ($test_results['verified_is_fldball'] == True)
&& ($test_results['verified_is_msgball'] == True))
{
$test_results['final_verdict'] = True;
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): expected a
'.$expect_ball_type.' and input data is a MSGBALL<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): expected a
'.$expect_ball_type.' and input data is a MSGBALL<br />'); }
}
else
{
$test_results['final_verdict'] = False;
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): expected a
'.$expect_ball_type.' but input data does not match that or is not ball data at
all.<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): expected a
'.$expect_ball_type.' but input data does not match that or is not ball data at
all.<br />'); }
}
// return the result
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): LEAVING, returning
$test_results[final_verdict] of
['.htmlspecialchars(serialize($test_results['final_verdict'])).']<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: is_ball_data('.__LINE__.'): LEAVING, returning
$test_results[final_verdict] of
['.htmlspecialchars(serialize($test_results['final_verdict'])).']<br />'); }
return $test_results['final_verdict'];
}
@@ -2965,8 +2994,8 @@
*/
function ball_data_parse_str($uri_ball_data='',
$do_stripslashes=True)
{
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: ball_data_parse_str('.__LINE__.'): ENTERING<br>'); }
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: ball_data_parse_str('.__LINE__.'): param
$uri_ball_data ['.$uri_ball_data.']<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: ball_data_parse_str('.__LINE__.'): ENTERING<br
/>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: ball_data_parse_str('.__LINE__.'): param
$uri_ball_data ['.$uri_ball_data.']<br />'); }
$return_struct = array();
if (!$uri_ball_data)
{
@@ -2984,7 +3013,7 @@
}
else
{
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: ball_data_parse_str('.__LINE__.'): UNHANDLED and
unexpected if .. then data <br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: ball_data_parse_str('.__LINE__.'): UNHANDLED and
unexpected if .. then data <br />'); }
}
// add to this data a "uri" element that is the
$uri_ball_data
//if (isset($return_struct['uri']) == False)
@@ -3004,7 +3033,7 @@
//rebuild the uri string
$return_struct['uri'] =
'msgball[msgnum]='.$return_struct['msgnum'].'&msgball[folder]='.$return_struct['folder'].'&msgball[acctnum]='.$return_struct['acctnum'];
if ($this->debug_args_input_flow > 2) {
$this->dbug->out('mail_msg: ball_data_parse_str('.__LINE__.'): final
$return_struct DUMP:', $return_struct); }
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: ball_data_parse_str('.__LINE__.'): LEAVING<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: ball_data_parse_str('.__LINE__.'): LEAVING<br />');
}
return $return_struct;
}
@@ -3052,7 +3081,7 @@
*/
$embeded_data = array();
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: decode_fake_uri('.__LINE__.'): ENTERED
$uri_type_string ['.$uri_type_string.'] <br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: decode_fake_uri('.__LINE__.'): ENTERED
$uri_type_string ['.$uri_type_string.'] <br />'); }
parse_str($uri_type_string, $embeded_data);
if ($this->debug_args_input_flow > 2) {
$this->dbug->out('mail_msg: decode_fake_uri('.__LINE__.'):
parse_str('.$uri_type_string.', into $embeded_data DUMP:', $embeded_data); }
@@ -3073,7 +3102,7 @@
// some embeded uri-faked data needs to be raised up
one level from sub-elements to top level
if ($raise_up)
{
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: decode_fake_uri('.__LINE__.'): attempt to raise up
data one level in the array <br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: decode_fake_uri('.__LINE__.'): attempt to raise up
data one level in the array <br />'); }
$count_embeded = count($embeded_data);
if ($count_embeded == 1)
{
@@ -3098,14 +3127,14 @@
&&
((string)$this_array_item[$i]['folder'] != ''))
{
$re_urlencoded_folder = urlencode($this_array_item[$i]['folder']);
- if
($this->debug_args_input_flow > 1) { echo 'mail_msg: decode_fake_uri:
re-urlencode (hopefully) folder element $this_array_item['.$i.'][folder] from
['.$this_array_item[$i]['folder'].'] into ['.$re_urlencoded_folder.'] <br>'; }
+ if
($this->debug_args_input_flow > 1) { echo 'mail_msg: decode_fake_uri:
re-urlencode (hopefully) folder element $this_array_item['.$i.'][folder] from
['.$this_array_item[$i]['folder'].'] into ['.$re_urlencoded_folder.'] <br />'; }
$this_array_item[$i]['folder'] = $re_urlencoded_folder;
}
if
((isset($this_array_item[$i]['acctnum']))
&&
((string)$this_array_item[$i]['acctnum'] != ''))
{
$make_int_acctnum = (int)$this_array_item[$i]['acctnum'];
- if
($this->debug_args_input_flow > 1) { echo 'mail_msg: decode_fake_uri:
$make_int_acctnum (hopefully) acctnum element $this_array_item['.$i.'][acctnum]
from ['.serialize($this_array_item[$i]['acctnum']).'] into
['.serialize($make_int_acctnum).'] <br>'; }
+ if
($this->debug_args_input_flow > 1) { echo 'mail_msg: decode_fake_uri:
$make_int_acctnum (hopefully) acctnum element $this_array_item['.$i.'][acctnum]
from ['.serialize($this_array_item[$i]['acctnum']).'] into
['.serialize($make_int_acctnum).'] <br />'; }
$this_array_item[$i]['acctnum'] = $make_int_acctnum;
}
}
@@ -3117,7 +3146,7 @@
}
else
{
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: decode_fake_uri('.__LINE__.'): original result had
more than one element, can not raise <br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: decode_fake_uri('.__LINE__.'): original result had
more than one element, can not raise <br />'); }
}
}
// parse_str will "urldecode" the folder string, we
need to re-urlencode it,
@@ -3129,20 +3158,20 @@
{
//$re_urlencoded_folder =
urlencode($embeded_data[$key]);
$re_urlencoded_folder =
$this->prep_folder_out($embeded_data[$key]);
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: decode_fake_uri('.__LINE__.'): re-urlencode
(hopefully) folder element $embeded_data['.$key.'] from
['.$embeded_data[$key].'] into ['.$re_urlencoded_folder.'] <br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: decode_fake_uri('.__LINE__.'): re-urlencode
(hopefully) folder element $embeded_data['.$key.'] from
['.$embeded_data[$key].'] into ['.$re_urlencoded_folder.'] <br />'); }
$embeded_data[$key] =
$re_urlencoded_folder;
}
elseif ((strstr($key, 'acctnum'))
&& ((string)$embeded_data[$key] != ''))
{
$make_int_acctnum =
(int)$embeded_data[$key];
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: decode_fake_uri('.__LINE__.'): $make_int_acctnum
(hopefully) acctnum element $embeded_data['.$key.'] from
['.serialize($embeded_data[$key]).'] into ['.serialize($make_int_acctnum).']
<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: decode_fake_uri('.__LINE__.'): $make_int_acctnum
(hopefully) acctnum element $embeded_data['.$key.'] from
['.serialize($embeded_data[$key]).'] into ['.serialize($make_int_acctnum).']
<br />'); }
$embeded_data[$key] = $make_int_acctnum;
}
}
if ($this->debug_args_input_flow > 2) {
$this->dbug->out('mail_msg: decode_fake_uri('.__LINE__.'): final $embeded_data
(sub parts made into an associative array) DUMP:', $embeded_data); }
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: decode_fake_uri('.__LINE__.'): LEAVING <br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: decode_fake_uri('.__LINE__.'): LEAVING <br />'); }
return $embeded_data;
}
@@ -3178,7 +3207,7 @@
*/
function grab_class_args_gpc()
{
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: grab_class_args_gpc('.__LINE__.'): ENTERING<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: grab_class_args_gpc('.__LINE__.'): ENTERING<br
/>'); }
if ($this->debug_args_input_flow > 2) {
$this->dbug->out('mail_msg: grab_class_args_gpc('.__LINE__.'): $this->ref_POST
DUMP:', $this->ref_POST); }
if ($this->debug_args_input_flow > 2) {
$this->dbug->out('mail_msg: grab_class_args_gpc('.__LINE__.'): $this->ref_GET
DUMP:', $this->ref_GET); }
@@ -3189,10 +3218,10 @@
{
while(list($key,$value) = each($this->ref_POST))
{
- if ($this->debug_args_input_flow > 2) {
$this->dbug->out('mail_msg: grab_class_args_gpc('.__LINE__.'): looking for
"_fake_uri" token in HTTP_POST_VARS ['.$key.'] =
'.$this->ref_POST[$key].'<br>'); }
+ if ($this->debug_args_input_flow > 2) {
$this->dbug->out('mail_msg: grab_class_args_gpc('.__LINE__.'): looking for
"_fake_uri" token in HTTP_POST_VARS ['.$key.'] = '.$this->ref_POST[$key].'<br
/>'); }
if ($key == 'delmov_list')
{
- if
($this->debug_args_input_flow > 1) { $this->dbug->out('mail_msg:
grab_class_args_gpc('.__LINE__.'): FOUND "delmov_list_fake_uri" needs decoding
HTTP_POST_VARS['.$key.'] = ['.$this->ref_POST[$key].'] <br>'); }
+ if
($this->debug_args_input_flow > 1) { $this->dbug->out('mail_msg:
grab_class_args_gpc('.__LINE__.'): FOUND "delmov_list_fake_uri" needs decoding
HTTP_POST_VARS['.$key.'] = ['.$this->ref_POST[$key].'] <br />'); }
// apache2 on test RH8.0 box
submits "delmov_list" array with duplicate items in it, track this
$seen_delmov_list_items=array();
$sub_loops =
count($this->ref_POST[$key]);
@@ -3201,14 +3230,14 @@
// bug2: apache2 on
test RH8.0 box submits "delmov_list" array with "what=delall" tacked on to one
of the array items
if
(strstr($this->ref_POST[$key][$i], 'what=delall'))
{
- if
($this->debug_args_input_flow > 1) { $this->dbug->out('mail_msg:
grab_class_args_gpc('.__LINE__.'): (apache2 bug2) **fixing** "delmov_list"
array has string "what=delall" added to one item
['.$this->ref_POST[$key][$i].'] <br>'); }
+ if
($this->debug_args_input_flow > 1) { $this->dbug->out('mail_msg:
grab_class_args_gpc('.__LINE__.'): (apache2 bug2) **fixing** "delmov_list"
array has string "what=delall" added to one item
['.$this->ref_POST[$key][$i].'] <br />'); }
$this->ref_POST[$key][$i] = str_replace('what=delall', '',
$this->ref_POST[$key][$i]);
}
// bug1: apache2: do
duplicate test on the "delmov_list" array items
if
(in_array($this->ref_POST[$key][$i], $seen_delmov_list_items) == True)
{
- if
($this->debug_args_input_flow > 1) { $this->dbug->out('mail_msg:
grab_class_args_gpc('.__LINE__.'): <u>unsetting</u> and *skipping* duplicate
(buggy apache2) "delmov_list" array item ['.$this->ref_POST[$key][$i].']
<br>'); }
+ if
($this->debug_args_input_flow > 1) { $this->dbug->out('mail_msg:
grab_class_args_gpc('.__LINE__.'): <u>unsetting</u> and *skipping* duplicate
(buggy apache2) "delmov_list" array item ['.$this->ref_POST[$key][$i].'] <br
/>'); }
$this->ref_POST[$key][$i] = '';
// can I UNSET
this and have the next $i index item actually be the next one
// YES, a)
array count calculated before loop, and b) does not squash array to unset an
item
@@ -3221,7 +3250,7 @@
else
{
// track seen
items for duplicate test
- if
($this->debug_args_input_flow > 1) { $this->dbug->out('mail_msg:
grab_class_args_gpc('.__LINE__.'): good (not duplicate, not buggy apache2)
"delmov_list" array item ['.$this->ref_POST[$key][$i].'] <br>'); }
+ if
($this->debug_args_input_flow > 1) { $this->dbug->out('mail_msg:
grab_class_args_gpc('.__LINE__.'): good (not duplicate, not buggy apache2)
"delmov_list" array item ['.$this->ref_POST[$key][$i].'] <br />'); }
$tmp_next_idx =
count($seen_delmov_list_items);
$seen_delmov_list_items[$tmp_next_idx] = $this->ref_POST[$key][$i];
}
@@ -3236,12 +3265,12 @@
}
elseif (strstr($key, '_fake_uri'))
{
- if
($this->debug_args_input_flow > 1) { $this->dbug->out('mail_msg:
grab_class_args_gpc('.__LINE__.'): FOUND "_fake_uri" token in
HTTP_POST_VARS['.$key.'] = ['.$this->ref_POST[$key].'] <br>'); }
+ if
($this->debug_args_input_flow > 1) { $this->dbug->out('mail_msg:
grab_class_args_gpc('.__LINE__.'): FOUND "_fake_uri" token in
HTTP_POST_VARS['.$key.'] = ['.$this->ref_POST[$key].'] <br />'); }
$embedded_data = array();
$embedded_data =
$this->decode_fake_uri($this->ref_POST[$key]);
// Strip "_fake_uri" from $key
and insert the associative array into HTTP_POST_VARS
$new_key =
str_replace('_fake_uri', '', $key);
- if
($this->debug_args_input_flow > 1) { $this->dbug->out('mail_msg:
grab_class_args_gpc('.__LINE__.'): embedded "_fake_uri" data will be inserted
into POST VARS with key name: ['.$new_key.'] = ['.$this->ref_POST[$key].']
<br>'); }
+ if
($this->debug_args_input_flow > 1) { $this->dbug->out('mail_msg:
grab_class_args_gpc('.__LINE__.'): embedded "_fake_uri" data will be inserted
into POST VARS with key name: ['.$new_key.'] = ['.$this->ref_POST[$key].'] <br
/>'); }
$this->ref_POST[$new_key] =
array();
$this->ref_POST[$new_key] =
$embedded_data;
if
($this->debug_args_input_flow > 2) { $this->dbug->out('mail_msg:
grab_class_args_gpc('.__LINE__.'): decoded "_fake_uri" data:
HTTP_POST_VARS['.$new_key.'] data DUMP:', $this->ref_POST[$new_key]); }
@@ -3249,7 +3278,7 @@
/*
elseif ($key == 'delmov_list')
{
- if
($this->debug_args_input_flow > 1) { echo 'mail_msg: grab_class_args_gpc: FOUND
"delmov_list" needs decoding HTTP_POST_VARS['.$key.'] =
['.$this->ref_POST[$key].'] <br>'; }
+ if
($this->debug_args_input_flow > 1) { echo 'mail_msg: grab_class_args_gpc: FOUND
"delmov_list" needs decoding HTTP_POST_VARS['.$key.'] =
['.$this->ref_POST[$key].'] <br />'; }
$sub_loops =
count($this->ref_POST[$key]);
for($i=0;$i<$sub_loops;$i++)
{
@@ -3265,20 +3294,20 @@
$got_args = array();
// insert *known* external args we find into
$got_args[], then return that data
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: grab_class_args_gpc('.__LINE__.'): about to loop
thru $this->known_external_args<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: grab_class_args_gpc('.__LINE__.'): about to loop
thru $this->known_external_args<br />'); }
$loops = count($this->known_external_args);
for($i=0;$i<$loops;$i++)
{
$this_arg_name = $this->known_external_args[$i];
- //if ($this->debug_args_input_flow > 2) {
$this->dbug->out(' * * (grab pref - external) $this_arg_name:
['.$this_arg_name.']<br>'); }
+ //if ($this->debug_args_input_flow > 2) {
$this->dbug->out(' * * (grab pref - external) $this_arg_name:
['.$this_arg_name.']<br />'); }
if (isset($this->ref_POST[$this_arg_name]))
{
- if ($this->debug_args_input_flow> 2) {
$this->dbug->out(' * * (grab pref - external)('.__LINE__.')
$this->ref_POST['.$this_arg_name.'] IS set to
['.$this->ref_POST[$this_arg_name].']<br>'); }
+ if ($this->debug_args_input_flow> 2) {
$this->dbug->out(' * * (grab pref - external)('.__LINE__.')
$this->ref_POST['.$this_arg_name.'] IS set to
['.$this->ref_POST[$this_arg_name].']<br />'); }
$got_args[$this_arg_name] =
$this->ref_POST[$this_arg_name];
}
elseif (isset($this->ref_GET[$this_arg_name]))
{
- if ($this->debug_args_input_flow > 2) {
$this->dbug->out(' * * (grab pref - external)('.__LINE__.')
$this->ref_GET['.$this_arg_name.'] IS set to
['.serialize($this->ref_GET[$this_arg_name]).']<br>'); }
+ if ($this->debug_args_input_flow > 2) {
$this->dbug->out(' * * (grab pref - external)('.__LINE__.')
$this->ref_GET['.$this_arg_name.'] IS set to
['.serialize($this->ref_GET[$this_arg_name]).']<br />'); }
$got_args[$this_arg_name] =
$this->ref_GET[$this_arg_name];
// STRIPSLASHES IF NEEDED
@@ -3291,7 +3320,7 @@
// i.e. we have not yet used
"parse_str" yet, that always addes slashes, but not using it yet means any
slashes are GPC slashes
$not_urlencoded_but_stripslashed_folder =
$this->stripslashes_gpc($got_args[$this_arg_name]['folder']);
// now we have no unwanted
slashes, so put this back in the input args
- if
($this->debug_args_input_flow > 2) { $this->dbug->out(' * * (grab pref -
external)('.__LINE__.'): msgball[folder] STRIPSLASH watch:
$got_args[$this_arg_name]["folder"]:
['.htmlspecialchars($got_args[$this_arg_name]['folder']).'];
$not_urlencoded_but_stripslashed_folder:
['.htmlspecialchars($not_urlencoded_but_stripslashed_folder).']<br>'); }
+ if
($this->debug_args_input_flow > 2) { $this->dbug->out(' * * (grab pref -
external)('.__LINE__.'): msgball[folder] STRIPSLASH watch:
$got_args[$this_arg_name]["folder"]:
['.htmlspecialchars($got_args[$this_arg_name]['folder']).'];
$not_urlencoded_but_stripslashed_folder:
['.htmlspecialchars($not_urlencoded_but_stripslashed_folder).']<br />'); }
$got_args[$this_arg_name]['folder'] = $not_urlencoded_but_stripslashed_folder;
$not_urlencoded_but_stripslashed_folder = '';
unset($not_urlencoded_but_stripslashed_folder);
@@ -3313,7 +3342,7 @@
}
else
{
- if ($this->debug_args_input_flow > 2) {
$this->dbug->out(' * (grab pref - external)('.__LINE__.') neither POST nor GET
vars have this item set ['.$this_arg_name.'] <br>'); }
+ if ($this->debug_args_input_flow > 2) {
$this->dbug->out(' * (grab pref - external)('.__LINE__.') neither POST nor GET
vars have this item set ['.$this_arg_name.'] <br />'); }
}
}
if ($this->debug_args_input_flow > 2) {
$this->dbug->out('mail_msg: grab_class_args_gpc('.__LINE__.'): post-loop
(external args) $got_args[] DUMP:', $got_args); }
@@ -3321,7 +3350,7 @@
// in order to know wgat account's arg array to insert
$got_args[] into, we need to determine what account
// we are dealing with before we can call
$this->set_arg_array or "->get_isset_arg" or "->get_arg_value", etc...
// so whoever called this function should obtain that
before calling $this->set_arg_array() with the data we return here
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: grab_class_args_gpc('.__LINE__.'): LEAVING,
returning $got_args<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: grab_class_args_gpc('.__LINE__.'): LEAVING,
returning $got_args<br />'); }
return $got_args;
}
@@ -3383,49 +3412,49 @@
*/
function get_best_acctnum($args_array='', $got_args='',
$force_feed_acctnum='')
{
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): ENTERING, param
$force_feed_acctnum ['.$force_feed_acctnum.']<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): ENTERING, param
$force_feed_acctnum ['.$force_feed_acctnum.']<br />'); }
if ($this->debug_args_input_flow > 2) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): parm $args_array[]
DUMP:', $args_array); }
if ($this->debug_args_input_flow > 2) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): parm $got_args[]
DUMP:', $got_args); }
// --- which email account do are these args intended
to apply to ----
// ORDER OF PREFERENCE for determining account num:
just look at the code, it has comments
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": searching...: <br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": searching...: <br />'); }
// initialize
$acctnum = '';
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): get acctnum from
feed args if possible<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): get acctnum from
feed args if possible<br />'); }
$found_acctnum = False;
while(list($key,$value) = each($args_array))
{
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (acctnum search)
this loop feed arg : ['.$key.'] => ['.serialize($args_array[$key]).'] <br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (acctnum search)
this loop feed arg : ['.$key.'] => ['.serialize($args_array[$key]).'] <br />');
}
// try to find feed acctnum value
if ($key == 'fldball')
{
$fldball = $args_array[$key];
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (acctnum search)
$args_array passed in $fldball[] : '.serialize($fldball).'<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (acctnum search)
$args_array passed in $fldball[] : '.serialize($fldball).'<br />'); }
$acctnum = (int)$fldball['acctnum'];
// SET OUR ACCTNUM ACCORDING TO FEED
ARGS
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (acctnum search)
ACCTNUM from $args_array fldball : ['.$acctnum.']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (acctnum search)
ACCTNUM from $args_array fldball : ['.$acctnum.']<br />'); }
$found_acctnum = True;
break;
}
elseif ($key == 'msgball')
{
$msgball = $args_array[$key];
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (acctnum search)
$args_array passed in $msgball[] : '.serialize($msgball).'<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (acctnum search)
$args_array passed in $msgball[] : '.serialize($msgball).'<br />'); }
$acctnum = (int)$msgball['acctnum'];
// SET OUR ACCTNUM ACCORDING TO FEED
ARGS
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (acctnum search)
ACCTNUM from $args_array msgball : ['.$acctnum.']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (acctnum search)
ACCTNUM from $args_array msgball : ['.$acctnum.']<br />'); }
$found_acctnum = True;
break;
}
elseif ($key == 'acctnum')
{
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (acctnum search)
$args_array passed in "acctnum" : '.serialize($args_array[$key]).'<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (acctnum search)
$args_array passed in "acctnum" : '.serialize($args_array[$key]).'<br />'); }
$acctnum = (int)$args_array[$key];
// SET OUR ACCTNUM ACCORDING TO FEED
ARGS
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (acctnum search)
ACCTNUM from $args_array "acctnum" feed args : ['.$acctnum.']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (acctnum search)
ACCTNUM from $args_array "acctnum" feed args : ['.$acctnum.']<br />'); }
$found_acctnum = True;
break;
}
@@ -3434,19 +3463,19 @@
if ($found_acctnum == True)
{
// SET THE ACCTNUM AND RETURN IT
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (from $args_array)
* * * *SETTING CLASS ACCTNUM* * * * by calling
$this->set_acctnum('.serialize($acctnum).')<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): (from $args_array)
* * * *SETTING CLASS ACCTNUM* * * * by calling
$this->set_acctnum('.serialize($acctnum).')<br />'); }
$this->set_acctnum($acctnum);
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): LEAVING early,
$args_array had the data, returning $acctnum ['.serialize($acctnum).']<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): LEAVING early,
$args_array had the data, returning $acctnum ['.serialize($acctnum).']<br />');
}
return $acctnum;
}
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": continue searching...: <br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": continue searching...: <br />'); }
// ok, now we need to broaden the search for a legit
account number
if ((isset($force_feed_acctnum))
&& ((string)$force_feed_acctnum != ''))
{
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": will use function param
$force_feed_acctnum=['.serialize($force_feed_acctnum).']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": will use function param
$force_feed_acctnum=['.serialize($force_feed_acctnum).']<br />'); }
$acctnum = (int)$force_feed_acctnum;
}
elseif ((isset($got_args['msgball']['acctnum']))
@@ -3456,7 +3485,7 @@
$acctnum = (int)$got_args['msgball']['acctnum'];
// make sure this is an integer
$got_args['msgball']['acctnum'] = $acctnum;
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": will use GPC aquired $got_args[msgball][acctnum] :
['.serialize($got_args['msgball']['acctnum']).']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": will use GPC aquired $got_args[msgball][acctnum] :
['.serialize($got_args['msgball']['acctnum']).']<br />'); }
}
elseif ((isset($got_args['fldball']['acctnum']))
&& ((string)$got_args['fldball']['acctnum'] != ''))
@@ -3465,7 +3494,7 @@
$acctnum = (int)$got_args['fldball']['acctnum'];
// make sure this is an integer
$got_args['fldball']['acctnum'] = $acctnum;
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": will use GPC aquired $got_args[fldball][acctnum] :
['.serialize($got_args['fldball']['acctnum']).']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": will use GPC aquired $got_args[fldball][acctnum] :
['.serialize($got_args['fldball']['acctnum']).']<br />'); }
}
elseif ((isset($got_args['source_fldball']['acctnum']))
&& ((string)$got_args['source_fldball']['acctnum'] !=
''))
@@ -3474,7 +3503,7 @@
$acctnum =
(int)$got_args['source_fldball']['acctnum'];
// make sure this is an integer
$got_args['source_fldball']['acctnum'] =
$acctnum;
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": will use GPC aquired $got_args[source_fldball][acctnum] :
['.serialize($got_args['source_fldball']['acctnum']).']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": will use GPC aquired $got_args[source_fldball][acctnum] :
['.serialize($got_args['source_fldball']['acctnum']).']<br />'); }
}
elseif ((isset($got_args['delmov_list'][0]['acctnum']))
&& ((string)$got_args['delmov_list'][0]['acctnum'] !=
''))
@@ -3482,7 +3511,7 @@
// at the very least we know that we'll need to
login to this account to delete or move this particular msgball
// also, we will need to open the particular
folder where the msg is localted
$acctnum =
(int)$got_args['delmov_list'][0]['acctnum'];
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": will use GPC aquired $got_args[delmov_list][0][acctnum] :
['.serialize($got_args['delmov_list'][0]['acctnum']).']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": will use GPC aquired $got_args[delmov_list][0][acctnum] :
['.serialize($got_args['delmov_list'][0]['acctnum']).']<br />'); }
}
elseif ((isset($got_args['target_fldball']['acctnum']))
&& ((string)$got_args['target_fldball']['acctnum'] !=
''))
@@ -3494,7 +3523,7 @@
$acctnum =
(int)$got_args['target_fldball']['acctnum'];
// make sure this is an integer
$got_args['target_fldball']['acctnum'] =
$acctnum;
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": will use GPC aquired $got_args[target_fldball][acctnum] :
['.serialize($got_args['target_fldball']['acctnum']).']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": will use GPC aquired $got_args[target_fldball][acctnum] :
['.serialize($got_args['target_fldball']['acctnum']).']<br />'); }
}
else
{
@@ -3505,15 +3534,15 @@
// note, this is identical to
$this->get_acctnum(True) because True is the default arg there if one is not
passed
// True means "return a default value, NOT
boolean false, if $this->acctnum is not set
$acctnum = $this->get_acctnum(True);
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": NO *incoming* acctnum specified, called $this->get_acctnum(True), got:
['.serialize($acctnum).']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): "what acctnum to
use": NO *incoming* acctnum specified, called $this->get_acctnum(True), got:
['.serialize($acctnum).']<br />'); }
}
// SET THE ACCTNUM WITH THE "BEST VALUE" WE COULD FIND
// DEPRECIATED - we no longer set it here
- //if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: get_best_acctnum: * * * *SETTING CLASS ACCTNUM* * *
* by calling $this->set_acctnum('.serialize($acctnum).')<br>'); }
+ //if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: get_best_acctnum: * * * *SETTING CLASS ACCTNUM* * *
* by calling $this->set_acctnum('.serialize($acctnum).')<br />'); }
//$this->set_acctnum($acctnum);
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): LEAVING, returning
$acctnum ['.serialize($acctnum).']<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: get_best_acctnum('.__LINE__.'): LEAVING, returning
$acctnum ['.serialize($acctnum).']<br />'); }
return $acctnum;
}
@@ -3543,7 +3572,7 @@
*/
function init_internal_args_and_set_them($acctnum='')
{
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: init_internal_args: ENTERING, (parm
$acctnum=['.serialize($acctnum).'])<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: init_internal_args: ENTERING, (parm
$acctnum=['.serialize($acctnum).'])<br />'); }
// we SHOULD have already obtained a valid acctnum
before calling this function
if (!(isset($acctnum))
|| ((string)$acctnum == ''))
@@ -3555,22 +3584,22 @@
// preserve pre-existing value, for which "acctnum"
must be already obtained, so we
// know what account to check for existing arg values
when we use "get_isset_arg" or "get_arg_value"
$internal_args = Array();
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: init_internal_args: about to loop thru
$this->known_internal_args<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: init_internal_args: about to loop thru
$this->known_internal_args<br />'); }
$loops = count($this->known_internal_args);
for($i=0;$i<$loops;$i++)
{
$this_arg_name = $this->known_internal_args[$i];
- //if ($this->debug_args_input_flow > 2) {
$this->dbug->out(' * * (grab pref - internal) $this_arg_name:
'.$this_arg_name.'<br>'); }
+ //if ($this->debug_args_input_flow > 2) {
$this->dbug->out(' * * (grab pref - internal) $this_arg_name:
'.$this_arg_name.'<br />'); }
// see if there is a value we can preserve for
this arg
if ($this->get_isset_arg($this_arg_name))
{
$preserve_this =
$this->get_arg_value($this_arg_name);
- if ($this->debug_args_input_flow> 2) {
$this->dbug->out(' * * (grab pref - internal) preserving internal pre-existing
arg: ['.$this_arg_name.'] = ['.$preserve_this.']<br>'); }
+ if ($this->debug_args_input_flow> 2) {
$this->dbug->out(' * * (grab pref - internal) preserving internal pre-existing
arg: ['.$this_arg_name.'] = ['.$preserve_this.']<br />'); }
$internal_args[$this_arg_name] =
$preserve_this;
}
else
{
- if ($this->debug_args_input_flow > 2) {
$this->dbug->out(' * (grab pref - internal) no pre-existing value for
['.$this_arg_name.'], using initialization default: <br>'); }
+ if ($this->debug_args_input_flow > 2) {
$this->dbug->out(' * (grab pref - internal) no pre-existing value for
['.$this_arg_name.'], using initialization default: <br />'); }
if ($this_arg_name ==
'folder_status_info')
{
$internal_args['folder_status_info'] = array();
@@ -3629,15 +3658,15 @@
//$this->set_arg_array($internal_args);
// add these items to the args array for the
appropriate account
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: init_internal_args: about to add $internal_args to
acounts class args array<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: init_internal_args: about to add $internal_args to
acounts class args array<br />'); }
while(list($key,$value) = each($internal_args))
{
- if ($this->debug_args_input_flow > 2) {
$this->dbug->out(' * mail_msg: init_internal_args: (looping) setting internal
arg: $this->set_arg_value('.$key.', '.$internal_args[$key].', '.$acctnum.');
<br>'); }
+ if ($this->debug_args_input_flow > 2) {
$this->dbug->out(' * mail_msg: init_internal_args: (looping) setting internal
arg: $this->set_arg_value('.$key.', '.$internal_args[$key].', '.$acctnum.');
<br />'); }
$this->set_arg_value($key,
$internal_args[$key], $acctnum);
//$this->set_arg_value($key,
$internal_args[$key]);
}
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: grab_class_args_gpc: LEAVING, returning
$internal_args<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: grab_class_args_gpc: LEAVING, returning
$internal_args<br />'); }
return $internal_args;
}
@@ -3687,7 +3716,7 @@
*/
function get_best_folder_arg($args_array='', $got_args='',
$acctnum='')
{
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: get_best_folder_arg: ENTERING <br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: get_best_folder_arg: ENTERING <br />'); }
if ($this->debug_args_input_flow > 2) {
$this->dbug->out('mail_msg: get_best_folder_arg: param $acctnum ['.$acctnum.']
; parm $args_array[] DUMP:', $args_array); }
if ($this->debug_args_input_flow > 2) {
$this->dbug->out('mail_msg: get_best_folder_arg: param $acctnum ['.$acctnum.']
; parm $got_args[] DUMP:', $got_args); }
// initialize
@@ -3712,22 +3741,22 @@
if ((isset($args_array['folder']))
&& ($args_array['folder'] != ''))
{
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: $input_folder_arg chooses
$args_array[folder] ('.$args_array['folder'].') over any existing "folder"
arg<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: $input_folder_arg chooses
$args_array[folder] ('.$args_array['folder'].') over any existing "folder"
arg<br />'); }
$input_folder_arg = $args_array['folder'];
}
elseif ($this->get_isset_arg('["msgball"]["folder"]'))
{
$input_folder_arg =
$this->get_arg_value('["msgball"]["folder"]');
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: $input_folder_arg chooses
$this->get_arg_value(["msgball"]["folder"]): ['.$input_folder_arg.']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: $input_folder_arg chooses
$this->get_arg_value(["msgball"]["folder"]): ['.$input_folder_arg.']<br />'); }
//VERIFY
$processed_folder_arg =
$this->prep_folder_in($input_folder_arg,
$this->get_arg_value('["msgball"]["acctnum"]'));
// when putting back into the ball data we need
to urlencode it because folder element in ball data stays urlencoded until the
last monent
$processed_folder_arg =
urlencode($processed_folder_arg);
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg('.__LINE__.'): after
"prep_folder_in", $processed_folder_arg : ['.$processed_folder_arg.']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg('.__LINE__.'): after
"prep_folder_in", $processed_folder_arg : ['.$processed_folder_arg.']<br />'); }
// both these should be urlencoded so this is
apples to apples comparison
if ($processed_folder_arg != $input_folder_arg)
{
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg('.__LINE__.'):
$processed_folder_arg != $input_folder_arg so about to call
$this->set_arg_value(["msgball"]["folder"], $processed_folder_arg) <br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg('.__LINE__.'):
$processed_folder_arg != $input_folder_arg so about to call
$this->set_arg_value(["msgball"]["folder"], $processed_folder_arg) <br />'); }
$this->set_arg_value('["msgball"]["folder"]', $processed_folder_arg);
}
// now that is done, urldecode because a legacy
quirk requires a urldecded return from this function
@@ -3736,16 +3765,16 @@
elseif ($this->get_isset_arg('["fldball"]["folder"]'))
{
$input_folder_arg =
$this->get_arg_value('["fldball"]["folder"]');
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: $input_folder_arg chooses
$this->get_arg_value(["fldball"]["folder"]): ['.$input_folder_arg.']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: $input_folder_arg chooses
$this->get_arg_value(["fldball"]["folder"]): ['.$input_folder_arg.']<br />'); }
//VERIFY
$processed_folder_arg =
$this->prep_folder_in($input_folder_arg,
$this->get_arg_value('["fldball"]["acctnum"]'));
// when putting back into the ball data we need
to urlencode it because folder element in ball data stays urlencoded until the
last monent
$processed_folder_arg =
urlencode($processed_folder_arg);
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg('.__LINE__.'): after
"prep_folder_in", $processed_folder_arg : ['.$processed_folder_arg.']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg('.__LINE__.'): after
"prep_folder_in", $processed_folder_arg : ['.$processed_folder_arg.']<br />'); }
// both these should be urlencoded so this is
apples to apples comparison
if ($processed_folder_arg != $input_folder_arg)
{
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg('.__LINE__.'):
$processed_folder_arg != $input_folder_arg so about to call
$this->set_arg_value(["fldball"]["folder"], $processed_folder_arg) <br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg('.__LINE__.'):
$processed_folder_arg != $input_folder_arg so about to call
$this->set_arg_value(["fldball"]["folder"], $processed_folder_arg) <br />'); }
$this->set_arg_value('["fldball"]["folder"]', $processed_folder_arg);
}
// now that is done, urldecode because a legacy
quirk requires a urldecded return from this function
@@ -3757,7 +3786,7 @@
// there may be other msgballs in the
delmov_list array, but we know at the very list we'll need to open this folder
anyway
$this_delmov_list =
$this->get_arg_value('delmov_list');
$input_folder_arg =
$this_delmov_list[0]['folder'];
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: $input_folder_arg chooses
$this_delmov_list[0][folder]: ['.$input_folder_arg.']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: $input_folder_arg chooses
$this_delmov_list[0][folder]: ['.$input_folder_arg.']<br />'); }
}
else
{
@@ -3766,17 +3795,17 @@
{
$input_folder_arg =
$this->get_arg_value('folder');
}
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: $input_folder_arg *might*
chooses $this->get_arg_value(folder): ['.serialize($input_folder_arg).']<br>');
}
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: $input_folder_arg *might*
chooses $this->get_arg_value(folder): ['.serialize($input_folder_arg).']<br
/>'); }
$input_folder_arg = (string)$input_folder_arg;
$input_folder_arg = trim($input_folder_arg);
if ($input_folder_arg != '')
{
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: $this->get_arg_value(folder)
passes test, so $input_folder_arg chooses $this->get_arg_value(folder):
['.serialize($input_folder_arg).']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: $this->get_arg_value(folder)
passes test, so $input_folder_arg chooses $this->get_arg_value(folder):
['.serialize($input_folder_arg).']<br />'); }
}
else
{
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: no folder value found, so
$input_folder_arg takes an empty string<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: no folder value found, so
$input_folder_arg takes an empty string<br />'); }
$input_folder_arg = '';
}
}
@@ -3784,15 +3813,15 @@
// folder prepping does a lookup which requires a
folder list which *usually* (unless caching) requires a login
if ($processed_folder_arg != '')
{
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: we already obtained above a
$processed_folder_arg ['.$processed_folder_arg.']<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: we already obtained above a
$processed_folder_arg ['.$processed_folder_arg.']<br />'); }
}
else
{
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: about to issue
$processed_folder_arg = $this->prep_folder_in('.$input_folder_arg.')<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: about to issue
$processed_folder_arg = $this->prep_folder_in('.$input_folder_arg.')<br />'); }
$processed_folder_arg =
$this->prep_folder_in($input_folder_arg);
}
- if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: remember legacy quirk says
return value from here should be urdecoded, eventhough msgball and fldball keep
folder element urlencoded usually<br>'); }
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: get_best_folder_arg: LEAVING, returning
$processed_folder_arg value: ['.$processed_folder_arg.'] remember legacy quirk
says return value from here should be urdecoded, eventhough msgball and fldball
keep folder element urlencoded usually<br>'); }
+ if ($this->debug_args_input_flow > 1) {
$this->dbug->out('mail_msg: get_best_folder_arg: remember legacy quirk says
return value from here should be urdecoded, eventhough msgball and fldball keep
folder element urlencoded usually<br />'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: get_best_folder_arg: LEAVING, returning
$processed_folder_arg value: ['.$processed_folder_arg.'] remember legacy quirk
says return value from here should be urdecoded, eventhough msgball and fldball
keep folder element urlencoded usually<br />'); }
return $processed_folder_arg;
}
@@ -3849,7 +3878,7 @@
*/
function
save_session_cache_item($data_name='misc',$data,$acctnum='',$extra_keys='')
{
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): ENTERED,
$this->session_cache_enabled='.serialize($this->session_cache_enabled).',
$data_name: ['.$data_name.'], $acctnum (optional): ['.$acctnum.'], $extra_keys:
['.$extra_keys.']<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): ENTERED,
$this->session_cache_enabled='.serialize($this->session_cache_enabled).',
$data_name: ['.$data_name.'], $acctnum (optional): ['.$acctnum.'], $extra_keys:
['.$extra_keys.']<br />'); }
$has_handler = False;
if ((!isset($acctnum))
@@ -3860,38 +3889,38 @@
if ($this->session_cache_enabled == False)
{
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING,
because
$this->session_cache_enabled='.serialize($this->session_cache_enabled).', so
not this basic stuff, and not the extra "extreme cache" stuff, nothing can use
the appsession cache.<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING,
because
$this->session_cache_enabled='.serialize($this->session_cache_enabled).', so
not this basic stuff, and not the extra "extreme cache" stuff, nothing can use
the appsession cache.<br />'); }
// LEAVING
return False;
}
// IF EMPTY DATA - LEAVE
if (!$data)
{
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING with
ERROR, no $data param was provided for $data_name ['.$data_name.'] $acctnum
['.$acctnum.'], we gotta return false because no data was saved<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING with
ERROR, no $data param was provided for $data_name ['.$data_name.'] $acctnum
['.$acctnum.'], we gotta return false because no data was saved<br />'); }
// LEAVING
return False;
}
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): extra param
(if provided) $extra_keys: ['.serialize($extra_keys).'] <br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): extra param
(if provided) $extra_keys: ['.serialize($extra_keys).'] <br />'); }
// 1st -- session_cache_enabled stuff
// this stuff is cached REGARDLESS of extreme mode,
extreme mode is *extra* caching in addition to the "session_cache_enabled" stuff
// process the data according to what it is
if ($data_name == 'msgball_list')
{
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
session_cache_enabled and data exists AND $data_name ['.$data_name.'] has a
handler<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
session_cache_enabled and data exists AND $data_name ['.$data_name.'] has a
handler<br />'); }
// we damn well better have a msgball_list or
else we have nothing to save
if ((isset($data['msgball_list']) == False)
|| (!$data['msgball_list']))
{
- $this->dbug->out('mail_msg:
save_session_cache_item: LEAVING on ERROR, FIXME line '.__LINE__.' we have no
msgball_list<br>');
- echo 'mail_msg:
save_session_cache_item: LEAVING on ERROR, FIXME line '.__LINE__.' we have no
msgball_list<br>';
+ $this->dbug->out('mail_msg:
save_session_cache_item: LEAVING on ERROR, FIXME line '.__LINE__.' we have no
msgball_list<br />');
+ echo 'mail_msg:
save_session_cache_item: LEAVING on ERROR, FIXME line '.__LINE__.' we have no
msgball_list<br />';
// LEAVING ERROR
return False;
}
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): $data_name
['.$data_name.'] is saved with validity data from "get_folder_status_info" for
later staleness testing<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): $data_name
['.$data_name.'] is saved with validity data from "get_folder_status_info" for
later staleness testing<br />'); }
// NOTE 1: if you provide this 1 thing:
// data['msgball_list']
@@ -4035,7 +4064,7 @@
//$my_location =
(string)$acctnum.';'.$data_name;
// SET DATA USING FOLDER ALSO
$my_location =
(string)$acctnum.';'.$data_name.';'.$folder_name;
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to put data into database anglemail table,
$my_location ['.$my_location.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to put data into database anglemail table,
$my_location ['.$my_location.']<br />'); }
if ($this->use_private_table == True)
{
//$this->so->so_set_data($my_location, $data);
@@ -4051,28 +4080,28 @@
$data = array();
unset($data);
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did
SET data for location: [email][dat][$acctnum][$data_name][$extra_keys] ::
[email][dat]['.$acctnum.']['.$data_name.']['.$folder_name.'] <br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did
SET data for location: [email][dat][$acctnum][$data_name][$extra_keys] ::
[email][dat]['.$acctnum.']['.$data_name.']['.$folder_name.'] <br />'); }
return True;
}
// DEFANG special handler for data that might b0rk a
database, stuff like ' " / \ and maybe some others, only "mailsvr_callstr"
needs this right now
elseif ($data_name == 'mailsvr_callstr_OLD_HANDLER')
//elseif ($data_name == 'mailsvr_callstr')
{
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
session_cache_enabled and DEFANG because
$GLOBALS[phpgw_info][server][sessions_type] is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] and data exists for
"'.$data_name.'" AND has a handler *here* because phpgw db code may be
sensitive to the chars in this data.<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
session_cache_enabled and DEFANG because
$GLOBALS[phpgw_info][server][sessions_type] is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] and data exists for
"'.$data_name.'" AND has a handler *here* because phpgw db code may be
sensitive to the chars in this data.<br />'); }
// we know what to do here, so this data "has a
handler"
$has_handler = True;
//$location =
'acctnum='.(string)$acctnum.';data_name='.$data_name.$extra_keys;
//$app = 'email';
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
"'.$data_name.'" before encoding: '.serialize($data).'<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
"'.$data_name.'" before encoding: '.serialize($data).'<br />'); }
// DATABASE DEFANG, this item has "database
unfriendly" chars in it so we encode it before it goes to appsession cache
$data = base64_encode($data);
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
"'.$data_name.'" AFTER encoding: '.serialize($data).'<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
"'.$data_name.'" AFTER encoding: '.serialize($data).'<br />'); }
if ($this->debug_session_caching > 2) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
[email][dat]['.$acctnum.']['.$data_name.'] DUMP:', $data); }
// SET DATA
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name]
= $data;
$data = array();
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did
SET data for location: [email][dat][$acctnum][$data_name] ::
[email][dat]['.$acctnum.']['.$data_name.'] <br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did
SET data for location: [email][dat][$acctnum][$data_name] ::
[email][dat]['.$acctnum.']['.$data_name.'] <br />'); }
unset($data);
return True;
}
@@ -4082,7 +4111,7 @@
|| ($data_name == 'mailsvr_callstr'))
{
// note "mailsvr_callstr" is handled here is
php4 session is used, because no "defanging" is necessary since data does not
go into a database via the phpgw api
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
session_cache_enabled and data exists for "'.$data_name.'" AND has a
handler<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
session_cache_enabled and data exists for "'.$data_name.'" AND has a handler<br
/>'); }
// we know what to do here, so this data "has a
handler"
$has_handler = True;
//$location =
'acctnum='.(string)$acctnum.';data_name='.$data_name.$extra_keys;
@@ -4097,7 +4126,7 @@
|| ($this->use_private_table == True))
{
$my_location =
(string)$acctnum.';'.$data_name;
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to put data into phpgw_app_sessions table,
$my_location ['.$my_location.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to put data into phpgw_app_sessions table,
$my_location ['.$my_location.']<br />'); }
if ($this->use_private_table == True)
{
$this->so->so_set_data($my_location, $data);
@@ -4109,24 +4138,24 @@
}
$data = array();
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did
SET data for location: [email][dat][$acctnum][$data_name] ::
[email][dat]['.$acctnum.']['.$data_name.'] <br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did
SET data for location: [email][dat][$acctnum][$data_name] ::
[email][dat]['.$acctnum.']['.$data_name.'] <br />'); }
unset($data);
return True;
}
else
{
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): in
non-extreme mode block, $data_name ['.$data_name.'] has no handler, so Your
data better be handled in the extreme mode block or you are SOL!<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): in
non-extreme mode block, $data_name ['.$data_name.'] has no handler, so Your
data better be handled in the extreme mode block or you are SOL!<br />'); }
}
// 2nd -- "session_cache_extreme" stuff, ADDITIONAL
EXTRA CACHED ITEMS
if ($this->session_cache_extreme == False)
{
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING,
return False, because
$this->session_cache_extreme='.serialize($this->session_cache_extreme).', so
the extra "extreme cache" stuff can NOT use the appsession cache.<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING,
return False, because
$this->session_cache_extreme='.serialize($this->session_cache_extreme).', so
the extra "extreme cache" stuff can NOT use the appsession cache.<br />'); }
return False;
}
elseif ($data_name == 'folder_status_info')
{
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
(extreme-mode) data exists for "'.$data_name.'" AND has a handler<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
(extreme-mode) data exists for "'.$data_name.'" AND has a handler<br />'); }
if ($this->debug_session_caching > 2) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
"'.$data_name.'" ARRIVING param $data as it is passed into this function
DUMP:', $data); }
// DATA REQUIRING "extra_keys" because it is
probably one element of a larger group of related data
// we will not waste time making a sub array,
instead we add the "extra_keys" to the "location"
@@ -4159,7 +4188,7 @@
// but within that account there are
many folders, all data for those folders is indexed by a unique KEY
// by using KEY of msgnum and
foldername, we know everything we need to identify the exact data we need
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item: ('.__LINE__.')
['.$data_name.'] needs folder stats to have a PLAIN (not urlencoded) "folder"
value ['.$data[$data_name]['folder'].'] so we can urlencode it to make the
$specific_key<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item: ('.__LINE__.')
['.$data_name.'] needs folder stats to have a PLAIN (not urlencoded) "folder"
value ['.$data[$data_name]['folder'].'] so we can urlencode it to make the
$specific_key<br />'); }
// $data has info to generate out
specific key
// KEY MUST BE FOLDER IN URLENCODED FORM
//$specific_key =
$this->prep_folder_out($data[$data_name]['folder']);
@@ -4187,7 +4216,7 @@
|| ($this->use_private_table == True))
{
$my_location =
(string)$acctnum.';'.$data_name.';'.$extra_keys;
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to put data into phpgw_app_sessions table,
$my_location ['.$my_location.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to put data into phpgw_app_sessions table,
$my_location ['.$my_location.']<br />'); }
if ($this->use_private_table == True)
{
$this->so->so_set_data($my_location, $data);
@@ -4199,13 +4228,13 @@
}
$data = array();
unset($data);
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did
SET data for location: [email][dat][$acctnum][$data_name][$extra_keys] ::
[email][dat]['.$acctnum.']['.$data_name.']['.$extra_keys.'] <br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did
SET data for location: [email][dat][$acctnum][$data_name][$extra_keys] ::
[email][dat]['.$acctnum.']['.$data_name.']['.$extra_keys.'] <br />'); }
return True;
}
elseif (($data_name == 'msg_structure')
|| ($data_name == 'phpgw_header'))
{
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
(extreme-mode) data exists for "'.$data_name.'" AND has a handler<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
(extreme-mode) data exists for "'.$data_name.'" AND has a handler<br />'); }
if ($this->debug_session_caching > 2) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
"'.$data_name.'" ARRIVING param $data as it is passed into this function
DUMP:', $data); }
// DATA REQUIRING "extra_keys" because it is
probably one element of a larger group of related data
// we will not waste time making a sub array,
instead we add the "extra_keys" to the "location"
@@ -4279,7 +4308,7 @@
|| ($this->use_private_table == True))
{
$my_location =
(string)$acctnum.';'.$data_name.';'.$ex_folder.';'.$ex_msgnum;
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to put data into phpgw_app_sessions table,
$my_location ['.$my_location.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to put data into phpgw_app_sessions table,
$my_location ['.$my_location.']<br />'); }
if ($this->use_private_table == True)
{
$this->so->so_set_data($my_location, $data);
@@ -4291,13 +4320,13 @@
}
$data = array();
unset($data);
- //if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did
SET data for location:
[email][dat][$acctnum][$data_name][$ex_folder][$ex_msgnum] ::
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']['.$ex_msgnum.']
<br>'); }
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did
SET data for
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']['.$ex_msgnum.']
<br>'); }
+ //if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did
SET data for location:
[email][dat][$acctnum][$data_name][$ex_folder][$ex_msgnum] ::
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']['.$ex_msgnum.'] <br
/>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did
SET data for
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']['.$ex_msgnum.'] <br
/>'); }
return True;
}
elseif ($data_name == 'phpgw_fetchbody')
{
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
(extreme-mode) data exists for "'.$data_name.'" AND has a handler<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
(extreme-mode) data exists for "'.$data_name.'" AND has a handler<br />'); }
if ($this->debug_session_caching > 2) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'):
"'.$data_name.'" ARRIVING param $data as it is passed into this function
DUMP:', $data); }
//(1) Data Param ARRIVES to this function like
this
@@ -4315,14 +4344,14 @@
|| (!$data['msgball']['part_no']))
{
// LEAVING
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING with
ERROR, returning FALSE, insufficient data for ['.$data_name.'] because NOT
GIVEN $data[msgball][part_no]; $data[msgball] was
['.serialize($data['msgball']).'] <br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING with
ERROR, returning FALSE, insufficient data for ['.$data_name.'] because NOT
GIVEN $data[msgball][part_no]; $data[msgball] was
['.serialize($data['msgball']).'] <br />'); }
return False;
}
$strlen_phpgw_fetchbody =
strlen($data['phpgw_fetchbody']);
if ($strlen_phpgw_fetchbody > 60000)
{
// LEAVING
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING with
ERROR, returning FALSE, data TOO LARGE for ['.$data_name.'];
$strlen_phpgw_fetchbody; $data[msgball] was ['.$strlen_phpgw_fetchbody.']
<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING with
ERROR, returning FALSE, data TOO LARGE for ['.$data_name.'];
$strlen_phpgw_fetchbody; $data[msgball] was ['.$strlen_phpgw_fetchbody.'] <br
/>'); }
return False;
}
@@ -4343,7 +4372,7 @@
|| ($this->use_private_table == True))
{
$my_location =
(string)$acctnum.';'.$data_name.';'.$ex_folder.';'.$ex_msgnum.';'.$ex_part_no;
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): AM Table in
use or sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].']
SO we have this additional step to put data into a table table, $my_location
['.$my_location.'], this is always needed for AM table<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): AM Table in
use or sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].']
SO we have this additional step to put data into a table table, $my_location
['.$my_location.'], this is always needed for AM table<br />'); }
if ($this->use_private_table == True)
{
$this->so->so_set_data($my_location, $data);
@@ -4355,16 +4384,16 @@
}
$data = array();
unset($data);
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did
SET data for
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']['.$ex_msgnum.']['.$ex_part_no.']
<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did
SET data for
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']['.$ex_msgnum.']['.$ex_part_no.']
<br />'); }
return True;
}
else
{
// this data_name has no specific handler
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): NOTE: no
handler for data_name='.$data_name.' in extreme-mode block<br>'); }
- //echo 'mail_msg:
save_session_cache_item('.__LINE__.'): LEAVING with ERROR: NO HANDLER for
data_name='.$data_name.' in extreme-mode block, DATA WILL NOT BE SAVED,
returning False<br>';
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): NOTE: no
handler for data_name='.$data_name.' in extreme-mode block<br />'); }
+ //echo 'mail_msg:
save_session_cache_item('.__LINE__.'): LEAVING with ERROR: NO HANDLER for
data_name='.$data_name.' in extreme-mode block, DATA WILL NOT BE SAVED,
returning False<br />';
// LEAVING
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING with
ERROR, no data handler for: [email][dat][$acctnum][$data_name][$extra_keys] ::
[email][dat]['.$acctnum.']['.$data_name.']['.$extra_keys.'] <br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: save_session_cache_item('.__LINE__.'): LEAVING with
ERROR, no data handler for: [email][dat][$acctnum][$data_name][$extra_keys] ::
[email][dat]['.$acctnum.']['.$data_name.']['.$extra_keys.'] <br />'); }
return False;
}
@@ -4381,14 +4410,14 @@
}
else
{
- echo 'mail_msg:
save_session_cache_item('.__LINE__.'): session_cache_debug_nosave disallows
actual saving of data<br>';
+ echo 'mail_msg:
save_session_cache_item('.__LINE__.'): session_cache_debug_nosave disallows
actual saving of data<br />';
}
- if ($this->debug_session_caching > 0) { echo
'mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did set data for
$data_name ['.$data_name.'] $acctnum ['.$acctnum.'], returning True<br>'; }
+ if ($this->debug_session_caching > 0) { echo
'mail_msg: save_session_cache_item('.__LINE__.'): LEAVING, did set data for
$data_name ['.$data_name.'] $acctnum ['.$acctnum.'], returning True<br />'; }
return True;
}
else
{
- if ($this->debug_session_caching > 0) { echo
'mail_msg: save_session_cache_item('.__LINE__.'): LEAVING on ERROR, no handler
for $data_name ['.$data_name.'] $acctnum ['.$acctnum.'], OR data was empty
AFTER we messed with, we screwed it up? returning False<br>'; }
+ if ($this->debug_session_caching > 0) { echo
'mail_msg: save_session_cache_item('.__LINE__.'): LEAVING on ERROR, no handler
for $data_name ['.$data_name.'] $acctnum ['.$acctnum.'], OR data was empty
AFTER we messed with, we screwed it up? returning False<br />'; }
return False;
}
*/
@@ -4429,9 +4458,9 @@
*/
function read_session_cache_item($data_name='misc',
$acctnum='', $ex_folder='', $ex_msgnum='', $ex_part_no='')
{
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): ENTERED,
$data_name: ['.$data_name.']; optional: $acctnum: ['.$acctnum.'], $ex_folder:
['.$ex_folder.'], $ex_msgnum: ['.$ex_msgnum.'], $ex_part_no: ['.$ex_part_no.']
'.'<br>'); }
- if ($this->debug_session_caching > 1) {
$this->dbug->out('AND
$this->session_cache_enabled='.serialize($this->session_cache_enabled).';
$this->session_cache_extreme='.serialize($this->session_cache_extreme).'<br>');
}
- if ($this->debug_session_caching > 0) {
$this->dbug->out('<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): ENTERED,
$data_name: ['.$data_name.']; optional: $acctnum: ['.$acctnum.'], $ex_folder:
['.$ex_folder.'], $ex_msgnum: ['.$ex_msgnum.'], $ex_part_no: ['.$ex_part_no.']
'.'<br />'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('AND
$this->session_cache_enabled='.serialize($this->session_cache_enabled).';
$this->session_cache_extreme='.serialize($this->session_cache_extreme).'<br
/>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('<br />'); }
$font_start = '<font color="purple">';
$font_end = '</font>';
@@ -4443,7 +4472,7 @@
if ($this->session_cache_enabled == False)
{
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
nothing to do since
$this->session_cache_enabled='.serialize($this->session_cache_enabled).'
returning False I guess<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
nothing to do since
$this->session_cache_enabled='.serialize($this->session_cache_enabled).'
returning False I guess<br />'); }
// EXITING NOW!~!!!!!
return False;
}
@@ -4459,7 +4488,7 @@
|| ($this->use_private_table == True))
{
$my_location =
(string)$acctnum.';'.$data_name.';'.$ex_folder;
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to read data from phpgw_app_sessions table,
$my_location ['.$my_location.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to read data from phpgw_app_sessions table,
$my_location ['.$my_location.']<br />'); }
if ($this->use_private_table == True)
{
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$ex_folder]
@@ -4485,26 +4514,26 @@
//$this->get_arg_value('["msgball"]["msgnum"]')
if ($this->debug_session_caching > 2) {
$this->dbug->out('mail_msg: read_session_cache_item: ('.__LINE__.') location:
['.$location.'] $app='.$app.'; $got_data DUMP:', $got_data); }
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item: ('.__LINE__.') $data_name
['.$data_name.'], is only cached is $this->session_cache_extreme is TRUE<br>');
}
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item: ('.__LINE__.') $data_name
['.$data_name.'], timestamp check is SKIPPED if $already_checked_ok is set,
$already_checked_ok: ['.serialize($already_checked_ok).']<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item: ('.__LINE__.') $data_name
['.$data_name.'], is only cached is $this->session_cache_extreme is TRUE<br
/>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item: ('.__LINE__.') $data_name
['.$data_name.'], timestamp check is SKIPPED if $already_checked_ok is set,
$already_checked_ok: ['.serialize($already_checked_ok).']<br />'); }
// this is set as a class param in file
mail_msg_base
$timestamp_age_limit =
$this->timestamp_age_limit;
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item: ('.__LINE__.') handler
exists for $data_name ['.$data_name.'], this item requires param $extra_keys
['.serialize($extra_keys).']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item: ('.__LINE__.') handler
exists for $data_name ['.$data_name.'], this item requires param $extra_keys
['.serialize($extra_keys).']<br />'); }
// this special handler uses timestamp
info to determine "freshness"
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item: ('.__LINE__.') KEY
($special_extra_stuff) MUST BE FED INTO HERE AS A FOLDER IN URLENCODED
FORM<br>'); }
- //if ($this->debug_session_caching > 1)
{ echo 'mail_msg: read_session_cache_item: ('.__LINE__.') $data_name
['.$data_name.'], param $special_extra_stuff gives us $specific_key
['.$specific_key.']<br>'; }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item: ('.__LINE__.') KEY
($special_extra_stuff) MUST BE FED INTO HERE AS A FOLDER IN URLENCODED FORM<br
/>'); }
+ //if ($this->debug_session_caching > 1)
{ echo 'mail_msg: read_session_cache_item: ('.__LINE__.') $data_name
['.$data_name.'], param $special_extra_stuff gives us $specific_key
['.$specific_key.']<br />'; }
//$folder_status_info =
unserialize($folder_status_info);
$timestamp_age = (time() -
$folder_status_info['timestamp']);
- if ($this->debug_session_caching > 1) {
$this->dbug->out('class_msg: get_folder_status_info: ('.__LINE__.') got cached
data, $timestamp_age ['.$timestamp_age.'] ; $timestamp_age_limit
['.$timestamp_age_limit.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('class_msg: get_folder_status_info: ('.__LINE__.') got cached
data, $timestamp_age ['.$timestamp_age.'] ; $timestamp_age_limit
['.$timestamp_age_limit.']<br />'); }
if ($this->debug_session_caching > 2) {
$this->dbug->out('class_msg: get_folder_status_info: ('.__LINE__.')
$folder_status_info DUMP:', $folder_status_info); }
if ($already_checked_ok == True)
{
- if
($this->debug_session_caching > 1) { $this->dbug->out('mail_msg:
read_session_cache_item: ('.__LINE__.') $data_name ['.$data_name.'], timestamp
check will be '.'<font color="red">'.'SKIPPED'.'</font>'.' because we already
checked it this page view, $already_checked_ok:
['.serialize($already_checked_ok).']<br>'); }
+ if
($this->debug_session_caching > 1) { $this->dbug->out('mail_msg:
read_session_cache_item: ('.__LINE__.') $data_name ['.$data_name.'], timestamp
check will be '.'<font color="red">'.'SKIPPED'.'</font>'.' because we already
checked it this page view, $already_checked_ok:
['.serialize($already_checked_ok).']<br />'); }
}
elseif ($timestamp_age >
$timestamp_age_limit)
{
- if
($this->debug_session_caching > 1) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') LEAVING, $timestamp_age
['.$timestamp_age.'] EXCEEDS $timestamp_age_limit ['.$timestamp_age_limit.'],
this data NEEDS REFRESHING, expire this element<br>'); }
+ if
($this->debug_session_caching > 1) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') LEAVING, $timestamp_age
['.$timestamp_age.'] EXCEEDS $timestamp_age_limit ['.$timestamp_age_limit.'],
this data NEEDS REFRESHING, expire this element<br />'); }
$got_data = '';
unset($got_data);
//$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$ex_folder]
= array();
@@ -4512,19 +4541,19 @@
// this does the same thing, so
use this instead
$this->expire_session_cache_item('folder_status_info', $acctnum, $ex_folder);
- if
($this->debug_session_caching > 0) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') LEAVING, $data_name ['.$data_name.']
$specific_key ['.$specific_key.'], $timestamp_age ['.$timestamp_age.'] EXCEEDS
$timestamp_age_limit ['.$timestamp_age_limit.'], this data NEEDS REFRESHING,
returning False<br>'); }
+ if
($this->debug_session_caching > 0) { $this->dbug->out('class_msg:
get_folder_status_info: ('.__LINE__.') LEAVING, $data_name ['.$data_name.']
$specific_key ['.$specific_key.'], $timestamp_age ['.$timestamp_age.'] EXCEEDS
$timestamp_age_limit ['.$timestamp_age_limit.'], this data NEEDS REFRESHING,
returning False<br />'); }
return False;
}
// set flag
"folder_status_info_already_checked_ok" for this ex_folder so we do NOT
timestamp check again the rest of THIS PAGEVIEW
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item: ('.__LINE__.') $data_name
['.$data_name.'], set arg
["folder_status_info_already_checked_ok"]['.$ex_folder.'] so we DO NOT
timestamp check this data again for the rest of this script run<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item: ('.__LINE__.') $data_name
['.$data_name.'], set arg
["folder_status_info_already_checked_ok"]['.$ex_folder.'] so we DO NOT
timestamp check this data again for the rest of this script run<br />'); }
$this->set_arg_value('["folder_status_info_already_checked_ok"]["'.$ex_folder.'"]',
'timestamp_ok', $acctnum);
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item: ('.__LINE__.') LEAVING,
'.$font_start.'successfully restored ['.$data_name.']'.$font_end.' session
data, $acctnum: ['.$acctnum.'], $ex_folder ['.htmlspecialchars($ex_folder).'],
data passed timestamp test<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item: ('.__LINE__.') LEAVING,
'.$font_start.'successfully restored ['.$data_name.']'.$font_end.' session
data, $acctnum: ['.$acctnum.'], $ex_folder ['.htmlspecialchars($ex_folder).'],
data passed timestamp test<br />'); }
return $folder_status_info;
}
else
{
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item: ('.__LINE__.') LEAVING,
returning False, $data_name ['.$data_name.'] had NO data stored, $acctnum:
['.$acctnum.'], $ex_folder ['.htmlspecialchars($ex_folder).']<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item: ('.__LINE__.') LEAVING,
returning False, $data_name ['.$data_name.'] had NO data stored, $acctnum:
['.$acctnum.'], $ex_folder ['.htmlspecialchars($ex_folder).']<br />'); }
return False;
}
@@ -4532,7 +4561,7 @@
elseif ($data_name == 'msgball_list')
{
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handler
exists for $data_name ['.$data_name.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handler
exists for $data_name ['.$data_name.']<br />'); }
/*!
@capability VERIFY appsession cached
"msgball_list" data is still valid (in read_session_cache_item)
@@ -4575,12 +4604,12 @@
// (b) it must be URLENCODED, or preped_out
if ($ex_folder != '')
{
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handling
['.$data_name.'] we DID get passed param $ex_folder ['.$ex_folder.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handling
['.$data_name.'] we DID get passed param $ex_folder ['.$ex_folder.']<br />'); }
}
else
{
$ex_folder =
$this->prep_folder_out($this->get_arg_value('folder', $acctnum));
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handling
['.$data_name.'] we did NOT get param $ex_folder so we just obtained and set it
to this: ['.$ex_folder.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handling
['.$data_name.'] we did NOT get param $ex_folder so we just obtained and set it
to this: ['.$ex_folder.']<br />'); }
}
// GET DATA
@@ -4591,7 +4620,7 @@
//$my_location =
(string)$acctnum.';'.$data_name;
// WE N OW USE FOLDER DATA TOO
$my_location =
(string)$acctnum.';'.$data_name.';'.$ex_folder;
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to read data from a database table, $my_location
['.$my_location.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to read data from a database table, $my_location
['.$my_location.']<br />'); }
if ($this->use_private_table == True)
{
//$got_data = array();
@@ -4631,20 +4660,20 @@
if (($this->debug_session_caching > 2) &&
($this->debug_allow_magball_list_dumps)) { $this->dbug->out('mail_msg:
read_session_cache_item: $data_name ['.$data_name.'] verified NOT Stale,
restored data DUMP:', $got_data); }
if (!$got_data)
{
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
returning False, <font color="red">$data_name ['.$data_name.'] had NO data
stored</font>, $acctnum: ['.$acctnum.'], $ex_folder ['.$ex_folder.']<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
returning False, <font color="red">$data_name ['.$data_name.'] had NO data
stored</font>, $acctnum: ['.$acctnum.'], $ex_folder ['.$ex_folder.']<br />'); }
return False;
}
else
{
// folder_info used to test validity
(stale or not) of the cached msgball_list data
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handling
$data_name ['.$data_name.'] session validity and/or relevance, check against
"get_folder_status_info" data<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handling
$data_name ['.$data_name.'] session validity and/or relevance, check against
"get_folder_status_info" data<br />'); }
// UPDATE THIS CRAP TO HANDLE ANY
FOLDER WITHIN A SINGLE ACCOUNT, not just the current one
$fldball = array();
$fldball['acctnum'] = $acctnum;
$fldball['folder'] =
$this->prep_folder_out($this->get_arg_value('folder', $acctnum));
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handling
['.$data_name.'] requires obtaining "folder_status_info" we get by calling
$this->get_folder_status_info('.serialize($fldball).')<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handling
['.$data_name.'] requires obtaining "folder_status_info" we get by calling
$this->get_folder_status_info('.serialize($fldball).')<br />'); }
$folder_info =
$this->get_folder_status_info($fldball);
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'):
['.$data_name.'] will be verified as representing this folder and acctnum, then
freshness checked <i>details: with the stored "folder_status_info" compared to
the "folder_status_info" we just obtained a few lines up, which
"folder_status_info" was itself validated in the function we got it from. The
"msgball_list" is appsession cached whether in "extreme-mode" or not, as long
as "enable_session_cache" is true </i><br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'):
['.$data_name.'] will be verified as representing this folder and acctnum, then
freshness checked <i>details: with the stored "folder_status_info" compared to
the "folder_status_info" we just obtained a few lines up, which
"folder_status_info" was itself validated in the function we got it from. The
"msgball_list" is appsession cached whether in "extreme-mode" or not, as long
as "enable_session_cache" is true </i><br />'); }
// "validity_test" is what the test is
like, but it's only really used for the debug data dump
// because the real test below gets all
the same info all over again as exists in this "match_to_be_fresh" array
@@ -4684,19 +4713,19 @@
&&
($got_data['validity']['mailsvr_account_username'] ==
$this->get_arg_value('mailsvr_account_username', $acctnum)))
{
if
(($this->debug_session_caching > 2) && ($this->debug_allow_magball_list_dumps))
{ $this->dbug->out('mail_msg: read_session_cache_item: $data_name
['.$data_name.'] verified NOT Stale, restored data DUMP:', $got_data); }
- if
($this->debug_session_caching > 0) { $this->dbug->out('mail_msg:
read_session_cache_item('.__LINE__.'): LEAVING, '.$font_start.'successfully
restored ['.$data_name.']'.$font_end.' VALID and NOT Stale session data,
$acctnum: ['.$acctnum.'] param (or obtained) $ex_folder ['.$ex_folder.']<br>');
}
+ if
($this->debug_session_caching > 0) { $this->dbug->out('mail_msg:
read_session_cache_item('.__LINE__.'): LEAVING, '.$font_start.'successfully
restored ['.$data_name.']'.$font_end.' VALID and NOT Stale session data,
$acctnum: ['.$acctnum.'] param (or obtained) $ex_folder ['.$ex_folder.']<br
/>'); }
return
$got_data['msgball_list'];
}
else
{
- if
($this->debug_session_caching > 1) { $this->dbug->out('mail_msg:
read_session_cache_item('.__LINE__.'): EXPIRE STALE ['.$data_name.'] session
data for $acctnum: ['.$acctnum.'], $ex_folder ['.$ex_folder.']<br>'); }
+ if
($this->debug_session_caching > 1) { $this->dbug->out('mail_msg:
read_session_cache_item('.__LINE__.'): EXPIRE STALE ['.$data_name.'] session
data for $acctnum: ['.$acctnum.'], $ex_folder ['.$ex_folder.']<br />'); }
//$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name]
= array();
//unset($this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name]);
// this is better to use
//$this->expire_session_cache_item($data_name, $acctnum);
// NOW WE USE FOLDER IN DATA
KEY ALSO
$this->expire_session_cache_item($data_name, $acctnum, $ex_folder);
- if
($this->debug_session_caching > 0) { $this->dbug->out('mail_msg:
read_session_cache_item('.__LINE__.'): LEAVING, returning False, $data_name
['.$data_name.'] session was STALE, $acctnum: ['.$acctnum.'], $ex_folder
['.$ex_folder.']<br>'); }
+ if
($this->debug_session_caching > 0) { $this->dbug->out('mail_msg:
read_session_cache_item('.__LINE__.'): LEAVING, returning False, $data_name
['.$data_name.'] session was STALE, $acctnum: ['.$acctnum.'], $ex_folder
['.$ex_folder.']<br />'); }
return False;
}
}
@@ -4706,7 +4735,7 @@
{
// GET DATA
$got_data =
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name];
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): DEFANG
because session cache is "db", this handler exists for $data_name
['.$data_name.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): DEFANG
because session cache is "db", this handler exists for $data_name
['.$data_name.']<br />'); }
// this special handler decodes the database
defanging
if ($got_data)
{
@@ -4715,12 +4744,12 @@
if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): restored
$data_name ['.$data_name.'] (pre-decoded) data DUMP:', $got_data); }
$got_data = base64_decode($got_data);
if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): restored
$data_name ['.$data_name.'] (decoded) data DUMP:', $got_data); }
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
'.$font_start.'successfully restored ['.$data_name.']'.$font_end.' session
data, $acctnum: ['.$acctnum.'], $extra_keys: ['.$extra_keys.']<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
'.$font_start.'successfully restored ['.$data_name.']'.$font_end.' session
data, $acctnum: ['.$acctnum.'], $extra_keys: ['.$extra_keys.']<br />'); }
return $got_data;
}
else
{
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
returning False, $data_name='.$data_name.' had NO data stored, $acctnum:
['.$acctnum.'], $extra_keys: ['.$extra_keys.']<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
returning False, $data_name='.$data_name.' had NO data stored, $acctnum:
['.$acctnum.'], $extra_keys: ['.$extra_keys.']<br />'); }
return False;
}
}
@@ -4734,7 +4763,7 @@
|| ($this->use_private_table == True))
{
$my_location =
(string)$acctnum.';'.$data_name;
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to read data from phpgw_app_sessions table,
$my_location ['.$my_location.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to read data from phpgw_app_sessions table,
$my_location ['.$my_location.']<br />'); }
if ($this->use_private_table == True)
{
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name]
@@ -4750,17 +4779,17 @@
$got_data =
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name];
// "mailsvr_callstr" if session is NOT "db" is
handled here because no database defang if necessary
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handler
exists for $data_name ['.$data_name.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handler
exists for $data_name ['.$data_name.']<br />'); }
// this is not really a special handler
if ($got_data)
{
if ($this->debug_session_caching > 2) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): restored
$data_name ['.$data_name.'] data DUMP:', $got_data); }
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
'.$font_start.'successfully restored ['.$data_name.']'.$font_end.' session
data, $acctnum: ['.$acctnum.'], $extra_keys: ['.$extra_keys.']<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
'.$font_start.'successfully restored ['.$data_name.']'.$font_end.' session
data, $acctnum: ['.$acctnum.'], $extra_keys: ['.$extra_keys.']<br />'); }
return $got_data;
}
else
{
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
returning False, $data_name ['.$data_name.'] had NO data stored, $acctnum:
['.$acctnum.'], $extra_keys: ['.$extra_keys.']<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
returning False, $data_name ['.$data_name.'] had NO data stored, $acctnum:
['.$acctnum.'], $extra_keys: ['.$extra_keys.']<br />'); }
return False;
}
@@ -4772,7 +4801,7 @@
)
{
// THIS DATA IS NEVER CACHED IF
$this->session_cache_extreme IS FALSE
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handler
exists for $data_name ['.$data_name.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handler
exists for $data_name ['.$data_name.']<br />'); }
// this IS a special handler because we do not
return the entire cached array of "msg_structure" elements,
// we only return ONE SINGLE "msg_structure"
(or "phpgw_header" ) value from that array,
// if it exists in that array.
@@ -4787,7 +4816,7 @@
|| ($this->use_private_table == True))
{
$my_location =
(string)$acctnum.';'.$data_name.';'.$ex_folder.';'.$ex_msgnum;
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to read data from phpgw_app_sessions table,
$my_location ['.$my_location.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to read data from phpgw_app_sessions table,
$my_location ['.$my_location.']<br />'); }
if ($this->use_private_table == True)
{
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$ex_folder][$ex_msgnum]
@@ -4810,7 +4839,7 @@
// SUCCESS - desired single element
within that array does exist
// also unserialize it back into an
object
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
'.$font_start.'successfully restored ['.$data_name.']'.$font_end.' session data
for
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']['.$ex_msgnum.']<br>');
}
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
'.$font_start.'successfully restored ['.$data_name.']'.$font_end.' session data
for
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']['.$ex_msgnum.']<br
/>'); }
// NOTE unserializing an already
inserialized thing gives you NOTHING, so damn well better serialize this on
saving to the appsession cache.
return $got_data;
@@ -4820,7 +4849,7 @@
&& ($data_name == 'phpgw_fetchbody'))
{
// THIS DATA IS NEVER CACHED IF
$this->session_cache_extreme IS FALSE
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handler
exists for $data_name ['.$data_name.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): handler
exists for $data_name ['.$data_name.']<br />'); }
// GET DATA
// for DB sessions_db ONLY
@@ -4828,7 +4857,7 @@
|| ($this->use_private_table == True))
{
$my_location =
(string)$acctnum.';'.$data_name.';'.$ex_folder.';'.$ex_msgnum.';'.$ex_part_no;
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): AM table in
use or sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].']
SO we have this additional step to read data from a table table, $my_location
['.$my_location.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): AM table in
use or sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].']
SO we have this additional step to read data from a table table, $my_location
['.$my_location.']<br />'); }
if ($this->use_private_table == True)
{
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$ex_folder][$ex_msgnum][$ex_part_no]
@@ -4846,17 +4875,17 @@
if ($got_data)
{
if ($this->debug_session_caching > 2) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): found an
existing array of items for $data_name ['.$data_name.'] data DUMP:',
$got_data); }
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
'.$font_start.'successfully restored ['.$data_name.']'.$font_end.' session data
for
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']['.$ex_msgnum.']['.$ex_part_no.']<br>');
}
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
'.$font_start.'successfully restored ['.$data_name.']'.$font_end.' session data
for
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']['.$ex_msgnum.']['.$ex_part_no.']<br
/>'); }
return $got_data;
}
else
{
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
returning False, $data_name ['.$data_name.'] had NO data stored, $acctnum:
['.$acctnum.'], $extra_keys: ['.$extra_keys.']<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING,
returning False, $data_name ['.$data_name.'] had NO data stored, $acctnum:
['.$acctnum.'], $extra_keys: ['.$extra_keys.']<br />'); }
return False;
}
}
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING with
ERROR, NO SPECIAL HANDLER exists for $data_name ['.$data_name.']<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: read_session_cache_item('.__LINE__.'): LEAVING with
ERROR, NO SPECIAL HANDLER exists for $data_name ['.$data_name.']<br />'); }
//return $got_data;
return False;
}
@@ -4879,7 +4908,7 @@
{
$acctnum = $this->get_acctnum();
}
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): ENTERED,
$this->session_cache_enabled='.serialize($this->session_cache_enabled).',
$data_name: ['.$data_name.'], $acctnum (optional): ['.$acctnum.'], $extra_keys:
['.$extra_keys.']<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): ENTERED,
$this->session_cache_enabled='.serialize($this->session_cache_enabled).',
$data_name: ['.$data_name.'], $acctnum (optional): ['.$acctnum.'], $extra_keys:
['.$extra_keys.']<br />'); }
// process $extra_keys input
// BEFORE we do anything else, if extreme-mode is OFF
then we MANDATORY, ALWAYS, NO-MATTER-WHAT expire "folder_status_info"
@@ -4889,11 +4918,11 @@
if ($this->session_cache_extreme == False)
{
// --- get rid of any L1 cache for
"folder_status_info" ---
- if ($this->debug_session_caching > 1) {
$this->dbug->out('class_msg: expire_session_cache_item('.__LINE__.'):
non-extreme mode ALWAYS EXPIRES "folder_status_info" with ANYTHING ELSE,
because non-extreme mode uses "folder_status_info" L1/class var cache only, NO
appsession cache used in non-extreme <br>'); }
- if ($this->debug_session_caching > 1) {
$this->dbug->out('class_msg: expire_session_cache_item('.__LINE__.'): NOTE
non-extreme mode uses "folder_status_info" L1/class var cache only, NO
appsession cache used in non-extreme <br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('class_msg: expire_session_cache_item('.__LINE__.'):
non-extreme mode ALWAYS EXPIRES "folder_status_info" with ANYTHING ELSE,
because non-extreme mode uses "folder_status_info" L1/class var cache only, NO
appsession cache used in non-extreme <br />'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('class_msg: expire_session_cache_item('.__LINE__.'): NOTE
non-extreme mode uses "folder_status_info" L1/class var cache only, NO
appsession cache used in non-extreme <br />'); }
// cache data in a class var (L1 Cache)
// ALWAYS expire "folder_status_info" because
many time this expire function is called because of a message move or delete
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'):
(non-extreme mode) Mandatory clearing of L1 cache/class data
"folder_status_info" <br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'):
(non-extreme mode) Mandatory clearing of L1 cache/class data
"folder_status_info" <br />'); }
$empty_array = array();
//$this->set_arg_value('folder_status_info',
$empty_array, $acctnum);
$this->set_arg_value('["folder_status_info"]["'.$ex_folder.'"]', $empty_array,
$acctnum);
@@ -4901,8 +4930,8 @@
}
// now eliminate the EXPIRED data, 1st get rid of any
L1 cache it it exists for this item
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): checking
for L1 cache/class var for $data_name = ['.$data_name.']<br>'); }
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): NOTE when
session_class_extreme is True, "folder_status_info" is NOT cached in L1
cache/class var, only in appsession<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): checking
for L1 cache/class var for $data_name = ['.$data_name.']<br />'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): NOTE when
session_class_extreme is True, "folder_status_info" is NOT cached in L1
cache/class var, only in appsession<br />'); }
// FIRST -- EXPIRE ANY L1 CACHE for this data_name
if (($this->get_isset_arg($data_name, $acctnum))
@@ -4910,7 +4939,7 @@
{
// NOTE L1 cached "folder_status_info" was (a)
expired above for non-extreme mode and (b) never uses L1 cached in extreme mode
//$old_content =
$this->get_arg_value($data_name, $acctnum);
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): does L1
cache/class for ['.$data_name.'], to find out we call
"_direct_access_arg_value" <b>THUS FOLDER_LIST WILL NOT CAUSE A LOGIN</b> using
"get_arg_value" for folder_list WILL ATTEMPT A LOGIN!<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): does L1
cache/class for ['.$data_name.'], to find out we call
"_direct_access_arg_value" <b>THUS FOLDER_LIST WILL NOT CAUSE A LOGIN</b> using
"get_arg_value" for folder_list WILL ATTEMPT A LOGIN!<br />'); }
$old_content =
$this->_direct_access_arg_value($data_name, $acctnum);
if ($this->debug_session_caching > 2) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): found and
clearing L1 cache/class for ['.$data_name.'] OLD value DUMP:', $old_content); }
if (gettype($old_content) == 'array')
@@ -4956,12 +4985,12 @@
if ($this->use_private_table == True)
{
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): we are
using private table, SO we have this additional step to blank data in the
"phpgw_anglemail" table, $my_location ['.$my_location.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): we are
using private table, SO we have this additional step to blank data in the
"phpgw_anglemail" table, $my_location ['.$my_location.']<br />'); }
$this->so->so_delete_data($my_location);
}
else
{
- if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to blank data in the "phpgw_app_sessions" table,
$my_location ['.$my_location.']<br>'); }
+ if ($this->debug_session_caching > 1) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'):
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to blank data in the "phpgw_app_sessions" table,
$my_location ['.$my_location.']<br />'); }
$GLOBALS['phpgw']->session->appsession($my_location, 'email', '');
}
}
@@ -4974,7 +5003,7 @@
{
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name]
= '';
unset($this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name]);
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): LEAVING
return True, did expire existing data for
[email][dat]['.$acctnum.']['.$data_name.']<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): LEAVING
return True, did expire existing data for
[email][dat]['.$acctnum.']['.$data_name.']<br />'); }
return True;
}
//elseif (($ex_folder)
@@ -4985,7 +5014,7 @@
{
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$ex_folder]
= '';
unset($this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$ex_folder]);
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): LEAVING
return True, did expire existing data for
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']<br>'); }
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): LEAVING
return True, did expire existing data for
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']<br />'); }
return True;
}
//elseif (($ex_folder)
@@ -4996,7 +5025,7 @@
{
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$ex_folder][$ex_msgnum]
= '';
unset($this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$ex_folder][$ex_msgnum]);
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): LEAVING
return True, did expire existing data for
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']['.$ex_msgnum.']<br>');
}
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): LEAVING
return True, did expire existing data for
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']['.$ex_msgnum.']<br
/>'); }
return True;
}
elseif (((string)$ex_folder != '')
@@ -5006,10 +5035,10 @@
{
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$ex_folder][$ex_msgnum][$ex_part_no]
= '';
unset($this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$ex_folder][$ex_msgnum][$ex_part_no]);
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): LEAVING
return True, did expire existing data for
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']['.$ex_msgnum.']['.$ex_part_no.']<br>');
}
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): LEAVING
return True, did expire existing data for
[email][dat]['.$acctnum.']['.$data_name.']['.$ex_folder.']['.$ex_msgnum.']['.$ex_part_no.']<br
/>'); }
return True;
}
- if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): LEAVING,
return False, data did not exist for
[email][dat]['.$acctnum.']['.$data_name.']['.serialize($ex_folder).']['.serialize($ex_msgnum).']['.serialize($ex_part_no).']<br>');
}
+ if ($this->debug_session_caching > 0) {
$this->dbug->out('mail_msg: expire_session_cache_item('.__LINE__.'): LEAVING,
return False, data did not exist for
[email][dat]['.$acctnum.']['.$data_name.']['.serialize($ex_folder).']['.serialize($ex_msgnum).']['.serialize($ex_part_no).']<br
/>'); }
return False;
}
@@ -5059,24 +5088,24 @@
*/
function get_acctnum($unset_returns_default=True)
{
- if ($this->debug_accts > 0) {
$this->dbug->out('mail_msg: get_acctnum: ENTERING, (parm
$unset_returns_default=['.serialize($unset_returns_default).'])<br>'); }
+ if ($this->debug_accts > 0) {
$this->dbug->out('mail_msg: get_acctnum: ENTERING, (parm
$unset_returns_default=['.serialize($unset_returns_default).'])<br />'); }
if ((isset($this->acctnum))
&& ((string)$this->acctnum != ''))
{
- if ($this->debug_accts > 0) {
$this->dbug->out('mail_msg: get_acctnum: LEAVING, $this->acctnum exists,
returning it: '.serialize($this->acctnum).'<br>'); }
+ if ($this->debug_accts > 0) {
$this->dbug->out('mail_msg: get_acctnum: LEAVING, $this->acctnum exists,
returning it: '.serialize($this->acctnum).'<br />'); }
return $this->acctnum;
}
// ok, no useful acctnumber exists, what should we do
elseif ($unset_returns_default == True)
{
- if ($this->debug_accts > 0) {
$this->dbug->out('mail_msg: get_acctnum: LEAVING, NO $this->acctnum exists,
returning $this->fallback_default_acctnum :
'.serialize($this->fallback_default_acctnum).'<br>'); }
+ if ($this->debug_accts > 0) {
$this->dbug->out('mail_msg: get_acctnum: LEAVING, NO $this->acctnum exists,
returning $this->fallback_default_acctnum :
'.serialize($this->fallback_default_acctnum).'<br />'); }
return $this->fallback_default_acctnum;
}
else
{
- if ($this->debug_accts > 0) {
$this->dbug->out('mail_msg: get_acctnum: LEAVING, NO $this->acctnum exists,
returning FALSE<br>'); }
+ if ($this->debug_accts > 0) {
$this->dbug->out('mail_msg: get_acctnum: LEAVING, NO $this->acctnum exists,
returning FALSE<br />'); }
return False;
}
}
@@ -5094,17 +5123,17 @@
*/
function set_acctnum($acctnum='')
{
- if ($this->debug_accts > 0) {
$this->dbug->out('mail_msg: set_acctnum: ENTERING, (parm
$acctnum=['.serialize($acctnum).'])<br>'); }
+ if ($this->debug_accts > 0) {
$this->dbug->out('mail_msg: set_acctnum: ENTERING, (parm
$acctnum=['.serialize($acctnum).'])<br />'); }
if ((isset($acctnum))
&& ((string)$acctnum != ''))
{
$this->acctnum = $acctnum;
- if ($this->debug_accts > 0) {
$this->dbug->out('mail_msg: set_acctnum: LEAVING, returning True, made
$this->acctnum = $acctnum ('.serialize($acctnum).')<br>'); }
+ if ($this->debug_accts > 0) {
$this->dbug->out('mail_msg: set_acctnum: LEAVING, returning True, made
$this->acctnum = $acctnum ('.serialize($acctnum).')<br />'); }
return True;
}
else
{
- if ($this->debug_accts > 0) {
$this->dbug->out('mail_msg: set_acctnum: LEAVING, returning False, value
$acctnum not sufficient to set $this->acctnum<br>'); }
+ if ($this->debug_accts > 0) {
$this->dbug->out('mail_msg: set_acctnum: LEAVING, returning False, value
$acctnum not sufficient to set $this->acctnum<br />'); }
return False;
}
}
@@ -5125,25 +5154,25 @@
*/
function get_pref_value($pref_name='',$acctnum='')
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_pref_value: ENTERING, $pref_name:
['.$pref_name.'] $acctnum: ['.$acctnum.']'.'<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_pref_value: ENTERING, $pref_name:
['.$pref_name.'] $acctnum: ['.$acctnum.']'.'<br />'); }
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
$acctnum = $this->get_acctnum();
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers): get_pref_value: obtained acctnum from
"$this->get_acctnum()", got $acctnum: ['.$acctnum.']'.'<br>'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers): get_pref_value: obtained acctnum from
"$this->get_acctnum()", got $acctnum: ['.$acctnum.']'.'<br />'); }
}
if ((isset($pref_name))
&& ((string)$pref_name != '')
&& (isset($this->a[$acctnum]['prefs'][$pref_name])))
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_pref_value: LEAVING, returning
$this->a['.$acctnum.'][prefs]['.$pref_name.'] :
['.$this->a[$acctnum]['prefs'][$pref_name].'] <br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_pref_value: LEAVING, returning
$this->a['.$acctnum.'][prefs]['.$pref_name.'] :
['.$this->a[$acctnum]['prefs'][$pref_name].'] <br />'); }
return $this->a[$acctnum]['prefs'][$pref_name];
}
else
{
// arg not set, or invalid input $arg_name
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_pref_value: LEAVING with ERRROR,
pref item was not found<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_pref_value: LEAVING with ERRROR,
pref item was not found<br />'); }
return;
}
}
@@ -5380,7 +5409,7 @@
{
$report = '*NOT* KNOWN *NOT* KNOWN *NOT* KNOWN
*NOT* KNOWN';
}
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): _arg_is_known: TEST: '.$report.' ;
$arg_name: ['.$arg_name.'] called by $calling_function_name:
['.$calling_function_name.'] '.'<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): _arg_is_known: TEST: '.$report.' ;
$arg_name: ['.$arg_name.'] called by $calling_function_name:
['.$calling_function_name.'] '.'<br />'); }
return $finding;
}
@@ -5397,14 +5426,14 @@
*/
function get_isset_arg($arg_name='',$acctnum='', $extra_keys='')
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_isset_arg: ENTERING, $arg_name:
['.$arg_name.'] $acctnum: ['.$acctnum.']'.'<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_isset_arg: ENTERING, $arg_name:
['.$arg_name.'] $acctnum: ['.$acctnum.']'.'<br />'); }
if ($this->debug_args_oop_access > 1) {
$this->_get_arg_is_known($arg_name, 'get_isset_arg'); }
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
$acctnum = $this->get_acctnum();
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers): get_isset_arg: obtained $acctnum from
$this->get_acctnum(): ['.$acctnum.']'.'<br>'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers): get_isset_arg: obtained $acctnum from
$this->get_acctnum(): ['.$acctnum.']'.'<br />'); }
}
/*
@@ -5428,16 +5457,16 @@
&& (strstr($arg_name, '][')))
{
// request for $arg_name['sub-element']
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers): get_isset_arg: $arg_name is requesting
sub-level array element(s), use EVAL, $arg_name:
'.serialize($arg_name).'<br>'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers): get_isset_arg: $arg_name is requesting
sub-level array element(s), use EVAL, $arg_name: '.serialize($arg_name).'<br
/>'); }
$evaled = '';
//$code = '$evaled =
$this->a[$acctnum][\'args\']'.$arg_name.';';
$code = '$evaled =
$this->a[$acctnum]["args"]'.$arg_name.';';
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' * $code: '.$code.'<br>'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' * $code: '.$code.'<br />'); }
eval($code);
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' * $evaled: '.$evaled.'<br>'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' * $evaled: '.$evaled.'<br />'); }
if (isset($evaled))
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_isset_arg: LEAVING returning
$evaled: ['.$evaled.'] produced by $code: '.$code.'<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_isset_arg: LEAVING returning
$evaled: ['.$evaled.'] produced by $code: '.$code.'<br />'); }
return True;
}
}
@@ -5445,17 +5474,17 @@
elseif ((isset($this->a[$acctnum]['args'][$arg_name]))
&& (!$extra_keys))
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_isset_arg: LEAVING returning
$this->a[$acctnum('.$acctnum.')][args][$arg_name]:
'.$this->a[$acctnum]['args'][$arg_name].'<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_isset_arg: LEAVING returning
$this->a[$acctnum('.$acctnum.')][args][$arg_name]:
'.$this->a[$acctnum]['args'][$arg_name].'<br />'); }
return True;
}
elseif
((isset($this->a[$acctnum]['args'][$arg_name][$extra_keys]))
&& ($extra_keys))
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_isset_arg: LEAVING (using
EXTRA_KEYS) returning
$this->a[$acctnum('.$acctnum.')][args][$arg_name][$extra_keys]:
'.$this->a[$acctnum]['args'][$arg_name][$extra_keys].'<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_isset_arg: LEAVING (using
EXTRA_KEYS) returning
$this->a[$acctnum('.$acctnum.')][args][$arg_name][$extra_keys]:
'.$this->a[$acctnum]['args'][$arg_name][$extra_keys].'<br />'); }
return True;
}
// if we get here, it was not set
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_isset_arg: LEAVING returning
False<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_isset_arg: LEAVING returning
False<br />'); }
return False;
}
@@ -5487,30 +5516,30 @@
{
// make it equal a blank string
$code =
'$this->a[$acctnum]["args"]'.$arg_name.' = "";';
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): unset_arg (sublevels):
$arg_name is requesting sub-level array element(s), use EVAL, $arg_name:
'.serialize($arg_name).'<br>'); }
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' unset_arg (sublevels) * $code: '.$code.'<br>'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): unset_arg (sublevels):
$arg_name is requesting sub-level array element(s), use EVAL, $arg_name:
'.serialize($arg_name).'<br />'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' unset_arg (sublevels) * $code: '.$code.'<br />'); }
eval($code);
// unset it
$code =
'unset($this->a[$acctnum]["args"]'.$arg_name.');';
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): unset_arg (sublevels):
$arg_name is requesting sub-level array element(s), use EVAL, $arg_name:
'.serialize($arg_name).'<br>'); }
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' unset_arg (sublevels) * $code: '.$code.'<br>'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): unset_arg (sublevels):
$arg_name is requesting sub-level array element(s), use EVAL, $arg_name:
'.serialize($arg_name).'<br />'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' unset_arg (sublevels) * $code: '.$code.'<br />'); }
eval($code);
// now were we successful?
$code = '$evaled =
isset($this->a[$acctnum]["args"]'.$arg_name.');';
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): unset_arg (sublevels):
VERIFY that we succeeded, again use EVAL, $arg_name:
'.serialize($arg_name).'<br>'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): unset_arg (sublevels):
VERIFY that we succeeded, again use EVAL, $arg_name:
'.serialize($arg_name).'<br />'); }
$evaled = '';
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' unset_arg(sublevels): (VERIFY) * $code: '.$code.'<br>'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' unset_arg(sublevels): (VERIFY) * $code: '.$code.'<br />'); }
eval($code);
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' unset_arg(sublevels): (VERIFY) * $evaled: '.$evaled.'<br>');
}
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' unset_arg(sublevels): (VERIFY) * $evaled: '.$evaled.'<br
/>'); }
if (isset($evaled))
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): unset_arg (sublevels):
LEAVING returning False, FAILED to unset arg, because VERIFY showed $evaled is
still set<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): unset_arg (sublevels):
LEAVING returning False, FAILED to unset arg, because VERIFY showed $evaled is
still set<br />'); }
return False;
}
else
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): unset_arg (sublevels):
LEAVING returning True, because VERIFY showed $evaled is unset<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): unset_arg (sublevels):
LEAVING returning True, because VERIFY showed $evaled is unset<br />'); }
return True;
}
}
@@ -5545,7 +5574,7 @@
*/
function get_arg_value($arg_name='',$acctnum='', $extra_keys='')
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: ENTERING ($arg_name:
['.$arg_name.'], $acctnum: ['.$acctnum.'] )<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: ENTERING ($arg_name:
['.$arg_name.'], $acctnum: ['.$acctnum.'] )<br />'); }
if ($this->debug_args_oop_access > 1) {
$this->_get_arg_is_known($arg_name, 'get_arg_value'); }
if ((!isset($acctnum))
@@ -5560,52 +5589,52 @@
// ---- SPECIAL HANDLERS ----
if ($arg_name == 'mailsvr_callstr')
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING with HANDOFF to
get_mailsvr_callstr('.$acctnum.')<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING with HANDOFF to
get_mailsvr_callstr('.$acctnum.')<br />'); }
return
$this->get_mailsvr_callstr($acctnum);
}
elseif ($arg_name == 'mailsvr_namespace')
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING with HANDOFF to
get_mailsvr_namespace('.$acctnum.')<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING with HANDOFF to
get_mailsvr_namespace('.$acctnum.')<br />'); }
return
$this->get_mailsvr_namespace($acctnum);
}
elseif ($arg_name == 'mailsvr_delimiter')
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING with HANDOFF to
get_mailsvr_delimiter('.$acctnum.')<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING with HANDOFF to
get_mailsvr_delimiter('.$acctnum.')<br />'); }
return
$this->get_mailsvr_delimiter($acctnum);
}
elseif ($arg_name == 'folder_list')
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING with HANDOFF to
get_folder_list()<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING with HANDOFF to
get_folder_list()<br />'); }
return $this->get_folder_list($acctnum);
}
elseif ($arg_name ==
'verified_trash_folder_long')
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING with HANDOFF to
get_verified_trash_folder_long()<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING with HANDOFF to
get_verified_trash_folder_long()<br />'); }
return
$this->get_verified_trash_folder_long($acctnum);
}
/*
elseif ($arg_name == 'folder')
{
- if ($this->debug_args_oop_access > 1) {
echo 'mail_msg(_wrappers): get_arg_value: request for backwards compat arg
"folder"<br>'; }
+ if ($this->debug_args_oop_access > 1) {
echo 'mail_msg(_wrappers): get_arg_value: request for backwards compat arg
"folder"<br />'; }
// look for foder in (1) msgball , then
(2) fldball , then (3) return default value INBOX
if (
(isset($this->a[$acctnum]['args']['msgball']['folder']))
&&
($this->a[$acctnum]['args']['msgball']['folder'] != '') )
{
$folder_arg_decision =
$this->a[$acctnum]['args']['msgball']['folder'];
- if
($this->debug_args_oop_access > 1) { echo 'mail_msg(_wrappers): get_arg_value:
request for "folder" will use value in
$this->a['.$acctnum.'][args][msgball][folder] =
['.$folder_arg_decision.']<br>'; }
+ if
($this->debug_args_oop_access > 1) { echo 'mail_msg(_wrappers): get_arg_value:
request for "folder" will use value in
$this->a['.$acctnum.'][args][msgball][folder] = ['.$folder_arg_decision.']<br
/>'; }
}
elseif (
(isset($this->a[$acctnum]['args']['fldball']['folder']))
&&
($this->a[$acctnum]['args']['fldball']['folder'] != '') )
{
$folder_arg_decision =
$this->a[$acctnum]['args']['fldball']['folder'];
- if
($this->debug_args_oop_access > 1) { echo 'mail_msg(_wrappers): get_arg_value:
request for "folder" will use value in
$this->a['.$acctnum.'][args][fldball][folder] =
['.$folder_arg_decision.']<br>'; }
+ if
($this->debug_args_oop_access > 1) { echo 'mail_msg(_wrappers): get_arg_value:
request for "folder" will use value in
$this->a['.$acctnum.'][args][fldball][folder] = ['.$folder_arg_decision.']<br
/>'; }
}
else
{
- if
($this->debug_args_oop_access > 1) { echo 'mail_msg(_wrappers): get_arg_value:
request for "folder" using "INBOX", found nothing in [args][msgball][folder]
nor [args][fldball][folder]<br>'; }
+ if
($this->debug_args_oop_access > 1) { echo 'mail_msg(_wrappers): get_arg_value:
request for "folder" using "INBOX", found nothing in [args][msgball][folder]
nor [args][fldball][folder]<br />'; }
$folder_arg_decision = 'INBOX';
}
- if ($this->debug_args_oop_access > 0) {
echo 'mail_msg(_wrappers): get_arg_value: LEAVING, returning (backward compat)
$folder_arg_decision ['.$folder_arg_decision.']<br>'; }
+ if ($this->debug_args_oop_access > 0) {
echo 'mail_msg(_wrappers): get_arg_value: LEAVING, returning (backward compat)
$folder_arg_decision ['.$folder_arg_decision.']<br />'; }
return $folder_arg_decision;
}
*/
@@ -5625,21 +5654,21 @@
//$code = '$evaled =
$this->a[$acctnum][\'args\']'.$arg_name.';';
$code = '$evaled =
$this->a[$acctnum]["args"]'.$arg_name.';';
}
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: $arg_name is requesting
sub-level array element(s), use EVAL, $arg_name:
'.serialize($arg_name).'<br>'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: $arg_name is requesting
sub-level array element(s), use EVAL, $arg_name: '.serialize($arg_name).'<br
/>'); }
$evaled = '';
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' * $code: '.$code.'<br>'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' * $code: '.$code.'<br />'); }
eval($code);
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' * $evaled: '.$evaled.'<br>'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' * $evaled: '.$evaled.'<br />'); }
if ((isset($evaled))
&& (!$extra_keys)
&& (strstr($arg_name,
'folder_status_info')))
{
- if
($this->debug_args_oop_access > 1) { $this->dbug->out('mail_msg(_wrappers):
get_arg_value: sublevels with folder_status_info NEED values to be serialized
since we eval it, so unserialize(base64_decode($evaled)) now: <br>'); }
+ if
($this->debug_args_oop_access > 1) { $this->dbug->out('mail_msg(_wrappers):
get_arg_value: sublevels with folder_status_info NEED values to be serialized
since we eval it, so unserialize(base64_decode($evaled)) now: <br />'); }
$evaled =
unserialize(base64_decode($evaled));
}
if (isset($evaled))
{
- if
($this->debug_args_oop_access > 0) { $this->dbug->out('mail_msg(_wrappers):
get_arg_value: LEAVING returning $evaled: ['.$evaled.'] produced by $code:
'.$code.'<br>'); }
+ if
($this->debug_args_oop_access > 0) { $this->dbug->out('mail_msg(_wrappers):
get_arg_value: LEAVING returning $evaled: ['.$evaled.'] produced by $code:
'.$code.'<br />'); }
return $evaled;
}
}
@@ -5647,13 +5676,13 @@
elseif (($extra_keys)
&&
(isset($this->a[$acctnum]['args'][$arg_name][$extra_keys])))
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING returning
$this->a[$acctnum('.$acctnum.')][args][$arg_name]:
'.$this->a[$acctnum]['args'][$arg_name].'<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING returning
$this->a[$acctnum('.$acctnum.')][args][$arg_name]:
'.$this->a[$acctnum]['args'][$arg_name].'<br />'); }
return
$this->a[$acctnum]['args'][$arg_name];
}
elseif ((!$extra_keys)
&&
(isset($this->a[$acctnum]['args'][$arg_name])))
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING returning
$this->a[$acctnum('.$acctnum.')][args][$arg_name]:
'.$this->a[$acctnum]['args'][$arg_name].'<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING returning
$this->a[$acctnum('.$acctnum.')][args][$arg_name]:
'.$this->a[$acctnum]['args'][$arg_name].'<br />'); }
return
$this->a[$acctnum]['args'][$arg_name];
}
}
@@ -5661,7 +5690,7 @@
// we ONLY get here if there's no data to return,
// arg not set, or invalid input $arg_name
// otherwise, anything that is sucessful returns and
exist at that point, never gets to here
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING, returning
*nothing*, arg not set of input arg invalid, using naked "return" call<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value: LEAVING, returning
*nothing*, arg not set of input arg invalid, using naked "return" call<br />');
}
return;
}
@@ -5756,7 +5785,7 @@
*/
function &get_arg_value_ref($arg_name='',$acctnum='')
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: ENTERING ($arg_name:
['.$arg_name.'], $acctnum: ['.$acctnum.'] )<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: ENTERING ($arg_name:
['.$arg_name.'], $acctnum: ['.$acctnum.'] )<br />'); }
if ($this->debug_args_oop_access > 1) {
$this->_get_arg_is_known($arg_name, 'get_arg_value_ref'); }
if ((!isset($acctnum))
@@ -5767,7 +5796,7 @@
if (isset($this->a[$acctnum]['args'][$arg_name]))
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: LEAVING found and
returning ref for ['.$arg_name.'] for ['.$acctnum.']<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: LEAVING found and
returning ref for ['.$arg_name.'] for ['.$acctnum.']<br />'); }
return $this->a[$acctnum]['args'][$arg_name];
}
else
@@ -5775,44 +5804,44 @@
// try to geberate the arg value, then again
try to return the ref
if ($arg_name == 'mailsvr_callstr')
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: generate arg value
using get_mailsvr_callstr('.$acctnum.')<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: generate arg value
using get_mailsvr_callstr('.$acctnum.')<br />'); }
$this->get_mailsvr_callstr($acctnum);
}
elseif ($arg_name == 'mailsvr_namespace')
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: generate arg value
using get_mailsvr_namespace('.$acctnum.')<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: generate arg value
using get_mailsvr_namespace('.$acctnum.')<br />'); }
$this->get_mailsvr_namespace($acctnum);
}
elseif ($arg_name == 'mailsvr_delimiter')
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: generate arg value
using get_mailsvr_delimiter('.$acctnum.')<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: generate arg value
using get_mailsvr_delimiter('.$acctnum.')<br />'); }
$this->get_mailsvr_delimiter($acctnum);
}
elseif ($arg_name == 'folder_list')
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: generate arg value
using get_folder_list()<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: generate arg value
using get_folder_list()<br />'); }
$this->get_folder_list($acctnum);
}
elseif ($arg_name ==
'verified_trash_folder_long')
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: generate arg value
using get_verified_trash_folder_long()<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: generate arg value
using get_verified_trash_folder_long()<br />'); }
$this->get_verified_trash_folder_long($acctnum);
}
else
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: could not find
"special handler" to generate an arg value, returning ref to $this->nothing
['.$this->nothing.']<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: could not find
"special handler" to generate an arg value, returning ref to $this->nothing
['.$this->nothing.']<br />'); }
return $this->nothing;
}
}
// ok, we tried to generate the arg value, were we
successful?
if (isset($this->a[$acctnum]['args'][$arg_name]))
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: LEAVING was able to
generate arg value, found and returning ref for ['.$arg_name.'] for
['.$acctnum.']<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: LEAVING was able to
generate arg value, found and returning ref for ['.$arg_name.'] for
['.$acctnum.']<br />'); }
return $this->a[$acctnum]['args'][$arg_name];
}
// fallback, we must have failed to find or make then
find an arg value, so no reference to something we can not find
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: if we get here we
probably tried but failed to generate a arg value (tried a "special handler"),
so returning ref to $this->nothing ['.$this->nothing.']<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers): get_arg_value_ref: if we get here we
probably tried but failed to generate a arg value (tried a "special handler"),
so returning ref to $this->nothing ['.$this->nothing.']<br />'); }
return $this->nothing;
}
@@ -5830,7 +5859,7 @@
function set_arg_value($arg_name='', $this_value='',
$acctnum='', $extra_keys='')
{
if ($this->debug_args_oop_access > 1) {
$this->_get_arg_is_known($arg_name, 'set_arg_value'); }
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): set_arg_value: ENTERING,
$arg_name: ['.$arg_name.'] ; $this_value: ['.$this_value.'] ; $acctnum:
['.$acctnum.']<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): set_arg_value: ENTERING,
$arg_name: ['.$arg_name.'] ; $this_value: ['.$this_value.'] ; $acctnum:
['.$acctnum.']<br />'); }
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
@@ -5857,32 +5886,32 @@
{
$code =
'$this->a[$acctnum]["args"]'.$arg_name.' = '.$this_value.';';
}
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): set_arg_value (sublevels):
$arg_name is requesting sub-level array element(s), use EVAL, $arg_name:
'.serialize($arg_name).'<br>'); }
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' set_arg_value (sublevels) * $code: '.$code.'<br>'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): set_arg_value (sublevels):
$arg_name is requesting sub-level array element(s), use EVAL, $arg_name:
'.serialize($arg_name).'<br />'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' set_arg_value (sublevels) * $code: '.$code.'<br />'); }
eval($code);
// additional handling to get an array into an
evaled string
//if (is_array($this_value))
//{
// $code =
'$this->a[$acctnum]["args"]'.$arg_name.' =
unserialize($this->a[$acctnum]["args"]'.$arg_name.');';
- // if ($this->debug_args_oop_access > 1) {
echo ' additional array handling: set_arg_value (sublevels) * $code:
'.$code.'<br>'; }
+ // if ($this->debug_args_oop_access > 1) {
echo ' additional array handling: set_arg_value (sublevels) * $code:
'.$code.'<br />'; }
// eval($code);
//}
// now were we successful?
$code = '$evaled =
$this->a[$acctnum]["args"]'.$arg_name.';';
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): set_arg_value (sublevels):
VERIFY that we succeeded, again use EVAL, $arg_name:
'.serialize($arg_name).'<br>'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): set_arg_value (sublevels):
VERIFY that we succeeded, again use EVAL, $arg_name:
'.serialize($arg_name).'<br />'); }
$evaled = '';
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' set_arg_value(sublevels): (VERIFY) * $code: '.$code.'<br>');
}
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' set_arg_value(sublevels): (VERIFY) * $code: '.$code.'<br
/>'); }
eval($code);
- if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' set_arg_value(sublevels): (VERIFY) * $evaled (seriialized
for this display): '.serialize($evaled).'<br>'); }
+ if ($this->debug_args_oop_access > 1) {
$this->dbug->out(' set_arg_value(sublevels): (VERIFY) * $evaled (seriialized
for this display): '.serialize($evaled).'<br />'); }
if (isset($evaled))
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): set_arg_value (sublevels):
LEAVING returning True, VERIFY indicates $evaled was indeded set<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): set_arg_value (sublevels):
LEAVING returning True, VERIFY indicates $evaled was indeded set<br />'); }
return True;
}
else
{
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): set_arg_value (sublevels):
LEAVING returning False, FAILED to set arg value, because VERIFY showed $evaled
was unset<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): set_arg_value (sublevels):
LEAVING returning False, FAILED to set arg value, because VERIFY showed $evaled
was unset<br />'); }
return False;
}
}
@@ -5901,14 +5930,14 @@
*/
// SET it, any special processing should be
taken care just above here
$this->a[$acctnum]['args'][$arg_name] =
$this_value;
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): set_arg_value: LEAVING,
returning TRUE, set data $this->a['.$acctnum.'][args]['.$arg_name.']:
['.$this->a[$acctnum]['args'][$arg_name].']<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): set_arg_value: LEAVING,
returning TRUE, set data $this->a['.$acctnum.'][args]['.$arg_name.']:
['.$this->a[$acctnum]['args'][$arg_name].']<br />'); }
// return True to indicate success
return True;
}
else
{
// return False to indicate invalid input
$arg_name
- if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): set_arg_value: LEAVING,
returning FALSE, invalid $arg_name: ['.$arg_name.']<br>'); }
+ if ($this->debug_args_oop_access > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): set_arg_value: LEAVING,
returning FALSE, invalid $arg_name: ['.$arg_name.']<br />'); }
return False;
}
}
====================================================
====================================================
Index: email/inc/class.mail_msg_display.inc.php
diff -u email/inc/class.mail_msg_display.inc.php:1.42
email/inc/class.mail_msg_display.inc.php:1.43
--- email/inc/class.mail_msg_display.inc.php:1.42 Thu Dec 30 23:13:50 2004
+++ email/inc/class.mail_msg_display.inc.php Sun Mar 13 23:22:44 2005
@@ -120,8 +120,8 @@
*/
function common_folder_is($query_fldball='##NOTHING##',
$match_fld_name='##NOTHING##')
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: ENTERING
<br>'); }
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: param
$query_fldball ['.htmlspecialchars(serialize($query_fldball)).'] param
$match_fld_name ['.htmlspecialchars($match_fld_name).']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: ENTERING
<br />'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: param
$query_fldball ['.htmlspecialchars(serialize($query_fldball)).'] param
$match_fld_name ['.htmlspecialchars($match_fld_name).']<br />'); }
//return 'FIX ME: stub function not completed.
mail_msg_display.common_folder_is LINE '.__LINE__;
$acctnum = $query_fldball['acctnum'];
@@ -136,19 +136,19 @@
if (((string)$query_fldball == $this->nothing)
|| ((string)$match_fld_name == $this->nothing))
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: LEAVING
with Error, not enough param data supplied, so returning False<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: LEAVING
with Error, not enough param data supplied, so returning False<br />'); }
return False;
}
elseif (($match_fld_name != 'INBOX')
&& (strtolower($match_fld_name) != 'trash')
&& (strtolower($match_fld_name) != 'sent'))
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: LEAVING
with Error, param $match_fld_name ['.htmlspecialchars($match_fld_name).'] is
not INBOX nor Trash, nor Sent, this function can not test for anything else, so
returning False<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: LEAVING
with Error, param $match_fld_name ['.htmlspecialchars($match_fld_name).'] is
not INBOX nor Trash, nor Sent, this function can not test for anything else, so
returning False<br />'); }
return False;
}
elseif ($this->is_ball_data($query_fldball, 'any') == False)
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: LEAVING
with Error, input data fails
$this->is_ball_data('.htmlspecialchars(serialize($query_fldball)).', "any"), so
returning False<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: LEAVING
with Error, input data fails
$this->is_ball_data('.htmlspecialchars(serialize($query_fldball)).', "any"), so
returning False<br />'); }
return False;
}
if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is:
$query_fldball DUMP:', $query_fldball); }
@@ -157,18 +157,18 @@
if (($match_fld_name == 'INBOX')
&& ($query_fldball['folder'] == 'INBOX'))
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: LEAVING,
returning True, tested for and found INBOX<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: LEAVING,
returning True, tested for and found INBOX<br />'); }
return True;
}
else
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is:
match_fld_name and $query_fldball["folder"], either one nor both were INBOX, so
did not match the test, so continue with more checks...<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is:
match_fld_name and $query_fldball["folder"], either one nor both were INBOX, so
did not match the test, so continue with more checks...<br />'); }
}
// continue ...
// does the mailserver have folders, if not then there is NO
trash folder no matter what
if ($this->get_mailsvr_supports_folders($acctnum) == False)
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: LEAVING,
mailserver does NOT support folders, and not testing for INBOX, so returning
False<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: LEAVING,
mailserver does NOT support folders, and not testing for INBOX, so returning
False<br />'); }
return False;
}
// continue ...
@@ -184,23 +184,23 @@
}
else
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): common_folder_is: LEAVING,
with ERROR, we should not ever get here because param sanity test is above,
param $match_fld_name ['.htmlspecialchars($match_fld_name).'] needs to be
either "Trash" or "Sent" at this point in the code, but it is not<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): common_folder_is: LEAVING,
with ERROR, we should not ever get here because param sanity test is above,
param $match_fld_name ['.htmlspecialchars($match_fld_name).'] needs to be
either "Trash" or "Sent" at this point in the code, but it is not<br />'); }
return False;
}
// use that $needle to use the same code to handle both Trash
and Sent matchings
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: now
testing if input data is "'.$needle.'" folder ...<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: now
testing if input data is "'.$needle.'" folder ...<br />'); }
// are we even supposed to use a trash or sent folder
if ( (!$this->get_isset_pref('use_'.$needle.'_folder',
$acctnum))
|| (!$this->get_pref_value('use_'.$needle.'_folder', $acctnum))
)
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: [test:
'.$needle.'] LEAVING, returning False, testing for '.$needle.' folder but user
preferences do NOT even want a '.$needle.' folder<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: [test:
'.$needle.'] LEAVING, returning False, testing for '.$needle.' folder but user
preferences do NOT even want a '.$needle.' folder<br />'); }
return False;
}
// does the trash folder actually exist ?
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): common_folder_is: [test:
'.$needle.'] humm... does the "'.$needle.'" folder actually exist ::
this->get_pref_value("'.$needle.'_folder_name", '.$acctnum.') =
['.htmlspecialchars($this->get_pref_value($needle.'_folder_name',
$acctnum)).']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): common_folder_is: [test:
'.$needle.'] humm... does the "'.$needle.'" folder actually exist ::
this->get_pref_value("'.$needle.'_folder_name", '.$acctnum.') =
['.htmlspecialchars($this->get_pref_value($needle.'_folder_name',
$acctnum)).']<br />'); }
$found_needle_folder_long = $this->folder_lookup('',
$this->get_pref_value($needle.'_folder_name', $acctnum));
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): common_folder_is: [test:
'.$needle.'] did lookup on pref value for "'.$needle.'" folder, got
$found_needle_folder_long
['.htmlspecialchars($found_needle_folder_long).']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): common_folder_is: [test:
'.$needle.'] did lookup on pref value for "'.$needle.'" folder, got
$found_needle_folder_long ['.htmlspecialchars($found_needle_folder_long).']<br
/>'); }
if ((isset($found_needle_folder_long))
&& ($found_needle_folder_long != ''))
{
@@ -213,21 +213,21 @@
// do we even need to continue
if ($havefolder == False)
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: [test:
'.$needle.'] LEAVING, returning False, testing for '.$needle.' folder, user
preferences DO want a '.$needle.' folder, but that folder does NOT exist, so
param certainly can not be a real '.$needle.' folder. <br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_display)('.__LINE__.'): common_folder_is: [test:
'.$needle.'] LEAVING, returning False, testing for '.$needle.' folder, user
preferences DO want a '.$needle.' folder, but that folder does NOT exist, so
param certainly can not be a real '.$needle.' folder. <br />'); }
return False;
}
// so the trash folder exists, does it match the param to test
against
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): common_folder_is: [test:
'.$needle.'] "'.$needle.'" folder exist, does it match a prepped param fldball,
get prepped fldball folder string top use for the comparing<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): common_folder_is: [test:
'.$needle.'] "'.$needle.'" folder exist, does it match a prepped param fldball,
get prepped fldball folder string top use for the comparing<br />'); }
$query_folder_long =
$this->prep_folder_in($query_fldball['folder'], $acctnum);
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): common_folder_is: [test:
'.$needle.'] now we have folder long names to compare, does $query_folder_long
['.htmlspecialchars($query_folder_long).'] equal $found_needle_folder_long
['.htmlspecialchars($found_needle_folder_long).'] <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): common_folder_is: [test:
'.$needle.'] now we have folder long names to compare, does $query_folder_long
['.htmlspecialchars($query_folder_long).'] equal $found_needle_folder_long
['.htmlspecialchars($found_needle_folder_long).'] <br />'); }
if ($query_folder_long == $found_needle_folder_long)
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): common_folder_is: LEAVING,
return True, match '.$needle.', and found '.$needle.' folder exists and matched
the input ball data <br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): common_folder_is: LEAVING,
return True, match '.$needle.', and found '.$needle.' folder exists and matched
the input ball data <br />'); }
return True;
}
else
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): common_folder_is: LEAVING,
return False, match '.$needle.', and found '.$needle.' folder exists BUT input
ball data does not match it. <br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg(_wrappers)('.__LINE__.'): common_folder_is: LEAVING,
return False, match '.$needle.', and found '.$needle.' folder exists BUT input
ball data does not match it. <br />'); }
return False;
}
}
@@ -286,7 +286,7 @@
if ($debug_widget) { $this->dbug->out('all_folders_listbox
$feed_args data DUMP:', $feed_args); }
if (count($feed_args) == 0)
{
- if ($debug_widget) {
$this->dbug->out('all_folders_listbox $feed_args is
EMPTY<br>'.serialize($feed_args).'<br>'); }
+ if ($debug_widget) {
$this->dbug->out('all_folders_listbox $feed_args is EMPTY<br
/>'.serialize($feed_args).'<br />'); }
}
else
{
@@ -296,8 +296,8 @@
while(list($key,$value) = each($local_args))
{
// DEBUG
- if ($debug_widget) { $this->dbug->out('a:
local_args: key=['.$key.'] value=['.(string)$value.']<br>'); }
- if ($debug_widget) { $this->dbug->out('b:
feed_args: key=['.$key.'] value=['.(string)$feed_args[$key].']<br>'); }
+ if ($debug_widget) { $this->dbug->out('a:
local_args: key=['.$key.'] value=['.(string)$value.']<br />'); }
+ if ($debug_widget) { $this->dbug->out('b:
feed_args: key=['.$key.'] value=['.(string)$feed_args[$key].']<br />'); }
if ((isset($feed_args[$key]))
&& ($feed_args[$key] != $value))
{
@@ -305,12 +305,12 @@
&& ($feed_args[$key] == ''))
{
// do nothing, keep the default
value, can not over write a good default stream with an empty value
- if ($debug_widget) {
$this->dbug->out('* keeping default [mailsvr_stream] value, can not override
with a blank string<br>'); }
+ if ($debug_widget) {
$this->dbug->out('* keeping default [mailsvr_stream] value, can not override
with a blank string<br />'); }
}
else
{
// we have a specified arg that
should replace the default value
- if ($debug_widget) {
$this->dbug->out('*** override default value of ['.$local_args[$key] .'] with
feed_args['.$key.'] of ['.(string)$feed_args[$key].']<br>'); }
+ if ($debug_widget) {
$this->dbug->out('*** override default value of ['.$local_args[$key] .'] with
feed_args['.$key.'] of ['.(string)$feed_args[$key].']<br />'); }
$local_args[$key] =
$feed_args[$key];
}
}
@@ -319,7 +319,7 @@
@reset($feed_args);
}
// at this point, local_args[] has anything that was passed in
the feed_args[]
- if ($debug_widget) { $this->dbug->out('FINAL Listbox Local
Args:<br>'.serialize($local_args).'<br>'); }
+ if ($debug_widget) { $this->dbug->out('FINAL Listbox Local
Args:<br />'.serialize($local_args).'<br />'); }
// init some important variables
$item_tags = '';
@@ -457,7 +457,7 @@
{
$debug_mega_listbox = 0;
//$debug_mega_listbox = 3;
- if ($debug_mega_listbox > 0) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): ENTERING<br>'); }
+ if ($debug_mega_listbox > 0) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): ENTERING<br />'); }
if(!$feed_args)
{
@@ -483,7 +483,7 @@
if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): $feed_args data DUMP:',
$feed_args); }
if (count($feed_args) == 0)
{
- if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): $feed_args is
EMPTY<br>'.serialize($feed_args).'<br>'); }
+ if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): $feed_args is EMPTY<br
/>'.serialize($feed_args).'<br />'); }
}
else
{
@@ -493,8 +493,8 @@
while(list($key,$value) = each($local_args))
{
// DEBUG
- if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): a: local_args:
key=['.$key.'] value=['.(string)$value.']<br>'); }
- if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): b: feed_args:
key=['.$key.'] value=['.(string)$feed_args[$key].']<br>'); }
+ if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): a: local_args:
key=['.$key.'] value=['.(string)$value.']<br />'); }
+ if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): b: feed_args:
key=['.$key.'] value=['.(string)$feed_args[$key].']<br />'); }
if ((isset($feed_args[$key]))
&& ($feed_args[$key] != $value))
{
@@ -502,12 +502,12 @@
&& ($feed_args[$key] == ''))
{
// do nothing, keep the default
value, can not over write a good default stream with an empty value
- if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): * keeping default
[mailsvr_stream] value, can not override with a blank string<br>'); }
+ if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): * keeping default
[mailsvr_stream] value, can not override with a blank string<br />'); }
}
else
{
// we have a specified arg that
should replace the default value
- if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): *** override default
value of ['.$local_args[$key] .'] with feed_args['.$key.'] of
['.(string)$feed_args[$key].']<br>'); }
+ if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): *** override default
value of ['.$local_args[$key] .'] with feed_args['.$key.'] of
['.(string)$feed_args[$key].']<br />'); }
$local_args[$key] =
$feed_args[$key];
}
}
@@ -516,7 +516,7 @@
@reset($feed_args);
}
// at this point, local_args[] has anything that was passed in
the feed_args[]
- if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'):FINAL Listbox Local
Args:<br>'.serialize($local_args).'<br>'); }
+ if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'):FINAL Listbox Local
Args:<br />'.serialize($local_args).'<br />'); }
$item_tags = '';
@@ -528,14 +528,14 @@
if ($this_status != 'enabled')
{
// Do Nothing, This account is not in use
- if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): $this_acctnum
['.$this_acctnum.'] is not in use, so skip folderlist<br>'); }
+ if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): $this_acctnum
['.$this_acctnum.'] is not in use, so skip folderlist<br />'); }
}
else
{
// get the actual list of folders we are going
to put into the combobox
//$folder_list =
$this->get_folder_list($this_acctnum);
$folder_list =
$this->get_arg_value('folder_list', $this_acctnum);
- if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): $this_acctnum
['.$this_acctnum.'] IS enabled, got folder list<br>'); }
+ if ($debug_mega_listbox > 1) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): $this_acctnum
['.$this_acctnum.'] IS enabled, got folder list<br />'); }
if ($debug_mega_listbox > 2) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): $folder_list for
$this_acctnum ['.$this_acctnum.'] DUMP:', $folder_list); }
// NNTP = BORKED CODE!!! (ignore for now) ...
if ($this->get_arg_value('newsmode',
$this_acctnum))
@@ -608,7 +608,7 @@
. $item_tags
.'</select>';
// return a pre-built HTML listbox (selectbox) widget
- if ($debug_mega_listbox > 0) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): LEAVING<br>'); }
+ if ($debug_mega_listbox > 0) {
$this->dbug->out('folders_mega_listbox('.__LINE__.'): LEAVING<br />'); }
return $listbox_widget;
}
@@ -729,9 +729,9 @@
if ($debug_sort)
{
- $this->dbug->out('sort:
['.$this->get_arg_value('sort').']<br>');
- $this->dbug->out('order:
['.$this->get_arg_value('order').']<br>');
- $this->dbug->out('start:
['.$this->get_arg_value('start').']<br>');
+ $this->dbug->out('sort:
['.$this->get_arg_value('sort').']<br />');
+ $this->dbug->out('order:
['.$this->get_arg_value('order').']<br />');
+ $this->dbug->out('start:
['.$this->get_arg_value('start').']<br />');
}
}
@@ -748,7 +748,7 @@
//$debug_nav = True;
//$debug_nav = False;
$debug_nav = $this->debug_index_page_display;
- if ($debug_nav > 0) { $this->dbug->out('mail_msg_display:
prev_next_navigation('.__LINE__.'): ENTERING, (try debug_index_page_display = 3
to see data dumps)<br>'); }
+ if ($debug_nav > 0) { $this->dbug->out('mail_msg_display:
prev_next_navigation('.__LINE__.'): ENTERING, (try debug_index_page_display = 3
to see data dumps)<br />'); }
// but we do not want a COPY of this data it can be thousands
of items, so we try to get a reference
$nav_data = array();
@@ -857,7 +857,7 @@
$nav_data['next_msg'] = $this->not_set;
}
if ($debug_nav > 2) { $this->dbug->out('mail_msg_display:
prev_next_navigation('.__LINE__.'): step2 $nav_data[] DUMP:', $nav_data); }
- if ($debug_nav > 0) { $this->dbug->out('mail_msg_display:
prev_next_navigation('.__LINE__.'): LEAVING<br>'); }
+ if ($debug_nav > 0) { $this->dbug->out('mail_msg_display:
prev_next_navigation('.__LINE__.'): LEAVING<br />'); }
return $nav_data;
}
@@ -898,7 +898,7 @@
if ($debug_widget) { $this->dbug->out('all_ex_accounts_listbox
$feed_args data DUMP:', $feed_args); }
if (count($feed_args) == 0)
{
- if ($debug_widget) {
$this->dbug->out('all_ex_accounts_listbox $feed_args is
EMPTY<br>'.serialize($feed_args).'<br>'); }
+ if ($debug_widget) {
$this->dbug->out('all_ex_accounts_listbox $feed_args is EMPTY<br
/>'.serialize($feed_args).'<br />'); }
}
else
{
@@ -908,14 +908,14 @@
while(list($key,$value) = each($local_args))
{
// DEBUG
- if ($debug_widget) { $this->dbug->out('* a:
local_args: key=['.$key.'] value=['.(string)$value.']<br>'); }
- if ($debug_widget) { $this->dbug->out('* b:
feed_args: key=['.$key.'] value=['.(string)$feed_args[$key].']<br>'); }
+ if ($debug_widget) { $this->dbug->out('* a:
local_args: key=['.$key.'] value=['.(string)$value.']<br />'); }
+ if ($debug_widget) { $this->dbug->out('* b:
feed_args: key=['.$key.'] value=['.(string)$feed_args[$key].']<br />'); }
if ((isset($feed_args[$key]))
//&& ($feed_args[$key] != $value))
&& ((string)$feed_args[$key] != (string)$value))
{
// we have a specified arg that should
replace the default value
- if ($debug_widget) {
$this->dbug->out('*** override default value of ['.$local_args[$key] .'] with
feed_args['.$key.'] of ['.(string)$feed_args[$key].']<br>'); }
+ if ($debug_widget) {
$this->dbug->out('*** override default value of ['.$local_args[$key] .'] with
feed_args['.$key.'] of ['.(string)$feed_args[$key].']<br />'); }
$local_args[$key] = $feed_args[$key];
}
}
@@ -923,7 +923,7 @@
@reset($feed_args);
}
// at this point, local_args[] has anything that was passed in
the feed_args[]
- if ($debug_widget) { $this->dbug->out('all_ex_accounts_listbox:
FINAL Listbox Local Args:<br>'.serialize($local_args).'<br>'); }
+ if ($debug_widget) { $this->dbug->out('all_ex_accounts_listbox:
FINAL Listbox Local Args:<br />'.serialize($local_args).'<br />'); }
$item_tags = '';
@@ -1173,8 +1173,8 @@
*/
function get_flat_pgw_struct($struct)
{
- if ($this->debug_message_display > 0) {
$this->dbug->out('mail_msg(display).get_flat_pgw_struct: ENTERING <br>'); }
- //if ($this->debug_message_display > 1) {
$this->dbug->out('mail_msg(display).get_flat_pgw_struct: param $msgball
['.serialize($msgball).']<br>'); }
+ if ($this->debug_message_display > 0) {
$this->dbug->out('mail_msg(display).get_flat_pgw_struct: ENTERING <br />'); }
+ //if ($this->debug_message_display > 1) {
$this->dbug->out('mail_msg(display).get_flat_pgw_struct: param $msgball
['.serialize($msgball).']<br />'); }
if ($this->debug_message_display > 2) {
$this->dbug->out('mail_msg(display).get_flat_pgw_struct: param $struct DUMP:',
$struct); }
/*
@@ -1200,11 +1200,11 @@
//echo '** flat_pgw_struct: $specific_key
['.$specific_key.'] :: $cache_flat_pgw_struct DUMP<pre>';
print_r($cache_phpgw_header); echo '</pre>';
if ($cache_flat_pgw_struct)
{
- if ($this->debug_message_display > 0) {
$this->dbug->out('mail_msg(display).get_flat_pgw_struct: LEAVING returning
cached data<br>'); }
+ if ($this->debug_message_display > 0) {
$this->dbug->out('mail_msg(display).get_flat_pgw_struct: LEAVING returning
cached data<br />'); }
return $cache_flat_pgw_struct;
}
}
- if ($this->debug_message_display > 1) {
$this->dbug->out('mail_msg(display).get_flat_pgw_struct: beginning ... no
cached data available or caching is not enabled<br>'); }
+ if ($this->debug_message_display > 1) {
$this->dbug->out('mail_msg(display).get_flat_pgw_struct: beginning ... no
cached data available or caching is not enabled<br />'); }
*/
if (isset($this->not_set))
@@ -1229,7 +1229,7 @@
//$part = Array();
//$part[0] = $struct;
- //echo '<br>INITIAL var part serialized:<br>' .serialize($part)
.'<br><br>';
+ //echo '<br />INITIAL var part serialized:<br />'
.serialize($part) .'<br /><br />';
$d1_num_parts = count($part);
$part_nice = Array();
@@ -1692,7 +1692,7 @@
// so we do not show these images on their own
if ($part_nice[$i]['m_description'] ==
'presentable/image')
{
- //echo '('.__LINE__.') presentable/image ,
$struct->type ['.$struct->type.'] , $struct->subtype
['.$struct->subtype.']<br>';
+ //echo '('.__LINE__.') presentable/image ,
$struct->type ['.$struct->type.'] , $struct->subtype ['.$struct->subtype.']<br
/>';
// TEST THIS:
// * IS the parent marked as multipart/related
// and CHECK 2 TIMES: note that we test 2 times
@@ -1709,7 +1709,7 @@
&& (stristr($struct->subtype, 'related'))
)
{
- //echo '('.__LINE__.')
presentable/image , alt_hide related to top level<br>';
+ //echo '('.__LINE__.')
presentable/image , alt_hide related to top level<br />';
// SET THIS FLAG: then, in presentation
loop, we can decide not to show it
$part_nice[$i]['m_keywords'] .=
'alt_hide' .' ';
}
@@ -1868,7 +1868,7 @@
// finally, return the customized flat phpgw msg structure array
if ($this->debug_message_display > 2) {
$this->dbug->out('mail_msg(display).get_flat_pgw_struct: returning $part_nice
DUMP:', $part_nice); }
- if ($this->debug_message_display > 0) {
$this->dbug->out('mail_msg(display).get_flat_pgw_struct: LEAVING we made a
$part_nice, returning it<br>'); }
+ if ($this->debug_message_display > 0) {
$this->dbug->out('mail_msg(display).get_flat_pgw_struct: LEAVING we made a
$part_nice, returning it<br />'); }
return $part_nice;
}
@@ -1897,9 +1897,9 @@
$not_set = '-1';
}
- //echo 'BEGIN pgw_msg_struct<br>';
+ //echo 'BEGIN pgw_msg_struct<br />';
//echo var_dump($part);
- //echo '<br>';
+ //echo '<br />';
// TRANSLATE PART STRUCTURE CONSTANTS INTO STRINGS OR TRUE/FALSE
// see php manual page function.imap-fetchstructure.php
@@ -2083,9 +2083,9 @@
$part_nice['ex_level_max_loops'] = $feed_loops;
$part_nice['ex_level_debth'] = $feed_debth;
- //echo 'BEGIN DUMP<br>';
+ //echo 'BEGIN DUMP<br />';
//echo var_dump($part_nice);
- //echo '<br>END DUMP<br>';
+ //echo '<br />END DUMP<br />';
return $part_nice;
}
@@ -2121,9 +2121,9 @@
// $debug = True;
//}
- if ($debug) { $this->dbug->out('ENTER mime_number_smart<br>'); }
- if ($debug) { $this->dbug->out('fed var flat_idx: '.
$flat_idx.'<br>'); }
- if ($debug) { $this->dbug->out('fed var new_mime_dumb: '.
$new_mime_dumb.'<br>'); }
+ if ($debug) { $this->dbug->out('ENTER mime_number_smart<br
/>'); }
+ if ($debug) { $this->dbug->out('fed var flat_idx: '.
$flat_idx.'<br />'); }
+ if ($debug) { $this->dbug->out('fed var new_mime_dumb: '.
$new_mime_dumb.'<br />'); }
//error check
if ($new_mime_dumb == $not_set)
{
@@ -2135,12 +2135,12 @@
$exploded_mime_dumb = Array();
if (strlen($new_mime_dumb) == 1)
{
- if ($debug) { $this->dbug->out('strlen(new_mime_dumb) =
1 :: TRUE ; FIRST debth level<br>'); }
+ if ($debug) { $this->dbug->out('strlen(new_mime_dumb) =
1 :: TRUE ; FIRST debth level<br />'); }
$exploded_mime_dumb[0] = (int)$new_mime_dumb;
}
else
{
- if ($debug) { $this->dbug->out('strlen(new_mime_dumb) =
1 :: FALSE<br>'); }
+ if ($debug) { $this->dbug->out('strlen(new_mime_dumb) =
1 :: FALSE<br />'); }
$exploded_mime_dumb = explode('.', $new_mime_dumb);
}
@@ -2149,30 +2149,30 @@
{
$exploded_mime_dumb[$i] = (int)$exploded_mime_dumb[$i];
}
- if ($debug) { $this->dbug->out('exploded_mime_dumb
'.serialize($exploded_mime_dumb).'<br>'); }
+ if ($debug) { $this->dbug->out('exploded_mime_dumb
'.serialize($exploded_mime_dumb).'<br />'); }
// make an array of all parts of this family tree, from the
current part (the outermost) to innermost (closest to debth level 1)
$dumbs_part_nice = Array();
//loop BACKWARDS
for ($i = count($exploded_mime_dumb) - 1; $i > -1; $i--)
{
- if ($debug) { $this->dbug->out('exploded_mime_dumb
reverse loop i=['.$i.']<br>'); }
+ if ($debug) { $this->dbug->out('exploded_mime_dumb
reverse loop i=['.$i.']<br />'); }
// is this the outermost (current) part ?
if ($i == (count($exploded_mime_dumb) - 1))
{
$dumbs_part_nice[$i] = $part_nice[$flat_idx];
- if ($debug) {
$this->dbug->out('(outermost/current part) dumbs_part_nice[i('.$i.')] =
part_nice[flat_idx('.$flat_idx.')]<br>'); }
- //if ($debug) { $this->dbug->out(' -
prev_parent_flat_idx: '.$prev_parent_flat_idx.'<br>'); }
+ if ($debug) {
$this->dbug->out('(outermost/current part) dumbs_part_nice[i('.$i.')] =
part_nice[flat_idx('.$flat_idx.')]<br />'); }
+ //if ($debug) { $this->dbug->out(' -
prev_parent_flat_idx: '.$prev_parent_flat_idx.'<br />'); }
}
else
{
$this_dumbs_idx =
$dumbs_part_nice[$i+1]['ex_parent_flat_idx'];
$dumbs_part_nice[$i] =
$part_nice[$this_dumbs_idx];
- if ($debug) {
$this->dbug->out('dumbs_part_nice[i('.$i.')] =
part_nice[this_dumbs_idx('.$this_dumbs_idx.')]<br>'); }
+ if ($debug) {
$this->dbug->out('dumbs_part_nice[i('.$i.')] =
part_nice[this_dumbs_idx('.$this_dumbs_idx.')]<br />'); }
}
}
- //if ($debug) { $this->dbug->out('dumbs_part_nice serialized:
'.serialize($dumbs_part_nice) .'<br>'); }
- //if ($debug) { $this->dbug->out('serialize exploded_mime_dumb:
'.serialize($exploded_mime_dumb).'<br>'); }
+ //if ($debug) { $this->dbug->out('dumbs_part_nice serialized:
'.serialize($dumbs_part_nice) .'<br />'); }
+ //if ($debug) { $this->dbug->out('serialize exploded_mime_dumb:
'.serialize($exploded_mime_dumb).'<br />'); }
// NOTE: Packagelist -> Container EXCEPTION Conversions
// a.k.a "Exceptions for Less-Standart Subtypes"
@@ -2253,7 +2253,7 @@
}
}
}
- if ($debug) { $this->dbug->out('FINAL smart_mime_number:
'.$smart_mime_number.'<br><br>'); }
+ if ($debug) { $this->dbug->out('FINAL smart_mime_number:
'.$smart_mime_number.'<br /><br />'); }
return $smart_mime_number;
}
@@ -2468,7 +2468,7 @@
{
$_tf =
$this->prep_folder_in($this->get_arg_value('tf'));
// NOTE if the folder name has html unfriendly
chars, like " or <, we need to do this just in case
- //echo '$this->htmlspecialchars_encode($_tf)
['.$this->htmlspecialchars_encode($_tf).'] <br>';
+ //echo '$this->htmlspecialchars_encode($_tf)
['.$this->htmlspecialchars_encode($_tf).'] <br />';
$_tf = $this->htmlspecialchars_encode($_tf);
}
else
@@ -2641,7 +2641,7 @@
{
//$debug_msg_list_display = 3;
$debug_msg_list_display = $this->debug_index_page_display;
- if ($debug_msg_list_display > 0) {
$this->dbug->out('mail_msg_display: get_msg_list_display('.__LINE__.'):
ENTERING<br>'); }
+ if ($debug_msg_list_display > 0) {
$this->dbug->out('mail_msg_display: get_msg_list_display('.__LINE__.'):
ENTERING<br />'); }
if(!$folder_info)
{
@@ -2797,8 +2797,8 @@
/*
// begin GMT handling by "acros"
// pongo bien la hora de los correos (GMT)
-# echo"hora inicial $hdr_envelope->date<br>";
-# echo"hora inicial
$hdr_envelope->udate<br>";
+# echo"hora inicial $hdr_envelope->date<br />";
+# echo"hora inicial
$hdr_envelope->udate<br />";
///modificacion
$msg_date2=$hdr_envelope->date;
$comma = strpos($msg_date2,',');
@@ -2806,7 +2806,7 @@
{
$msg_date2 = substr($msg_date2,$comma + 2);
}
- //echo 'Msg Date : '.$msg_date."<br>\n";
+ //echo 'Msg Date : '.$msg_date."<br />\n";
$dta = array();
$ta = array();
@@ -2836,8 +2836,8 @@
$new_time2=gmdate("D, d M Y H:m:s",$new_time)." GMT";
$hdr_envelope->date = $new_time2;
$hdr_envelope->udate = $new_time;
-#echo"hora final $hdr_envelope->udate<br>";
-#echo"hora final $hdr_envelope->date<br>";
+#echo"hora final $hdr_envelope->udate<br />";
+#echo"hora final $hdr_envelope->date<br />";
#$message_date =
$GLOBALS['phpgw']->common->show_date($msg_headers->udate);
//fin modificacion
// end GMT handling by "acros"
@@ -3094,7 +3094,7 @@
}
if ($debug_msg_list_display > 2) {
$this->dbug->out('mail_msg_display: get_msg_list_display: exiting
$msg_list_display[] DUMP', $msg_list_display); }
- if ($debug_msg_list_display > 0) {
$this->dbug->out('mail_msg_display: get_msg_list_display('.__LINE__.'):
LEAVING<br>'); }
+ if ($debug_msg_list_display > 0) {
$this->dbug->out('mail_msg_display: get_msg_list_display('.__LINE__.'):
LEAVING<br />'); }
return $msg_list_display;
}
@@ -3114,9 +3114,9 @@
*/
function _image_on($appname,$image,$extension='_on',$navbar=False)
{
- $prefer_ext = '.gif';
- //$prefer_ext = '.png';
- return
$GLOBALS['phpgw_info']['server']['webserver_url'].'/'.$appname.'/templates/default/images'.'/'.$image.$prefer_ext;
+ //$prefer_ext = '.gif';
+ $prefer_ext = '.png';
+ return
$GLOBALS['phpgw_info']['server']['webserver_url'].'/email/templates/default/images/'.$image.$prefer_ext;
}
} // end class mail_msg
====================================================
Index: email/inc/class.mail_msg_base.inc.php
diff -u email/inc/class.mail_msg_base.inc.php:1.80
email/inc/class.mail_msg_base.inc.php:1.81
--- email/inc/class.mail_msg_base.inc.php:1.80 Thu Dec 30 23:13:50 2004
+++ email/inc/class.mail_msg_base.inc.php Sun Mar 13 23:22:44 2005
@@ -361,8 +361,8 @@
*/
function mail_msg_base()
{
- if (($this->debug_logins > 0) &&
(is_object($this->dbug->out))) { $this->dbug->out('mail_msg('.__LINE__.'):
*constructor*: $GLOBALS[PHP_SELF] = ['.$GLOBALS['PHP_SELF'].'] $this->acctnum =
['.$this->acctnum.'] get_class($this) : "'.get_class($this).'" ;
get_parent_class($this) : "'.get_parent_class($this).'"<br>'); }
- if ($this->debug_logins > 0) { echo
'mail_msg('.__LINE__.'): *constructor*: $GLOBALS[PHP_SELF] =
['.$GLOBALS['PHP_SELF'].'] $this->acctnum = ['.$this->acctnum.']
get_class($this) : "'.get_class($this).'" ; get_parent_class($this) :
"'.get_parent_class($this).'"<br>'; }
+ if (($this->debug_logins > 0) &&
(is_object($this->dbug->out))) { $this->dbug->out('mail_msg('.__LINE__.'):
*constructor*: $GLOBALS[PHP_SELF] = ['.$GLOBALS['PHP_SELF'].'] $this->acctnum =
['.$this->acctnum.'] get_class($this) : "'.get_class($this).'" ;
get_parent_class($this) : "'.get_parent_class($this).'"<br />'); }
+ if ($this->debug_logins > 0) { echo
'mail_msg('.__LINE__.'): *constructor*: $GLOBALS[PHP_SELF] =
['.$GLOBALS['PHP_SELF'].'] $this->acctnum = ['.$this->acctnum.']
get_class($this) : "'.get_class($this).'" ; get_parent_class($this) :
"'.get_parent_class($this).'"<br />'; }
return;
}
@@ -392,11 +392,11 @@
$this->dbug = CreateObject('email.svc_debug');
}
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): ENTERING manual
*constructor*: $GLOBALS[PHP_SELF] = ['.$GLOBALS['PHP_SELF'].'] $this->acctnum =
['.$this->acctnum.'] get_class($this) : "'.get_class($this).'" ;
get_parent_class($this) : "'.get_parent_class($this).'"<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): ENTERING manual
*constructor*: $GLOBALS[PHP_SELF] = ['.$GLOBALS['PHP_SELF'].'] $this->acctnum =
['.$this->acctnum.'] get_class($this) : "'.get_class($this).'" ;
get_parent_class($this) : "'.get_parent_class($this).'"<br />'); }
if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: $this->acctnum = ['.$this->acctnum.'] ; $this->a DUMP:',
$this->a); }
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: extra data $p1 (if provided): '.serialize($p1).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: extra data $p1 (if provided): '.serialize($p1).'<br />'); }
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: checking and or setting GET and POST reference based on PHP
version<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: checking and or setting GET and POST reference based on PHP
version<br />'); }
// make GPC reference for php versions < 4.1 and > 4.2
// since this constructor is apparently called many
times
// during the script run (not sure why) we check if
we've already done it first
@@ -441,7 +441,7 @@
// SO object has data storage functions
if ($this->so == '##NOTHING##')
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: creating sub SO object "so_mail_msg"<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: creating sub SO object "so_mail_msg"<br />'); }
$this->so = CreateObject('email.so_mail_msg');
}
@@ -449,7 +449,7 @@
// TEMPORARY ONLY DURING MIGRATION AND TABLE DEVELOPMENT
if ($this->use_private_table)
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: checking if "so_am_table_exists"<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: checking if "so_am_table_exists"<br />'); }
if ($this->so->so_am_table_exists() == False)
{
$this->use_private_table = False;
@@ -462,7 +462,7 @@
// any preferences page menuaction is a NO NO
to cached prefs
if (stristr($this->ref_GET['menuaction'],
'preferences.'))
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: string "preferences." is in menuaction so NO CACHED PREFS,
setting $this->use_cached_prefs to False<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: string "preferences." is in menuaction so NO CACHED PREFS,
setting $this->use_cached_prefs to False<br />'); }
$this->use_cached_prefs = False;
}
}
@@ -473,13 +473,13 @@
if ((stristr($this->ref_GET['menuaction'],
'email.uiindex'))
|| (stristr($this->ref_GET['menuaction'],
'email.uimessage.message')))
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: calling $this->so->so_prop_use_group_data(True)<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: calling $this->so->so_prop_use_group_data(True)<br />'); }
//$this->so->use_group_data = True;
$this->so->so_prop_use_group_data(True);
}
else
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: calling $this->so->so_prop_use_group_data(False)<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: calling $this->so->so_prop_use_group_data(False)<br />'); }
//$this->so->use_group_data = False;
$this->so->so_prop_use_group_data(False);
}
@@ -815,7 +815,7 @@
'already_grab_class_args_gpc'
);
//if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
constructor: $this->known_args[] DUMP:', $this->known_args); }
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: LEAVING<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: LEAVING<br />'); }
}
/*!
@@ -828,7 +828,7 @@
// ---- BEGIN request from Mailserver / Initialize This Mail
Session -----
function begin_request($args_array)
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): ENTERING'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): ENTERING'.'<br />'); }
if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): feed var args_array[]
DUMP:', $args_array); }
// Grab GPC vars, after we get an acctnum, we'll put
them in the appropriate account's "args" data
@@ -837,32 +837,32 @@
&&
((string)$this->get_arg_value('already_grab_class_args_gpc') != '') )
{
// somewhere, there's already been a call to
grab_class_args_gpc(), do NOT re-run
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
"already_grab_class_args_gpc" is set, do not re-grab<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
"already_grab_class_args_gpc" is set, do not re-grab<br />'); }
if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
"already_grab_class_args_gpc" pre-existing $this->get_all_args() DUMP:',
$this->get_all_args()); }
$got_args=array();
}
else
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
"already_grab_class_args_gpc" is NOT set, call grab_class_args_gpc() now<br>');
}
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
"already_grab_class_args_gpc" is NOT set, call grab_class_args_gpc() now<br
/>'); }
$got_args=array();
$got_args = $this->grab_class_args_gpc();
}
// FIND THE "BEST ACCTNUM" and set it
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
get_best_acctnum($args_array, $got_args) <br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
get_best_acctnum($args_array, $got_args) <br />'); }
$acctnum = $this->get_best_acctnum($args_array,
$got_args);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): "get_best_acctnum"
returns $acctnum ['.$acctnum.']<br>'); }
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): * * * *SETTING CLASS
ACCTNUM* * * * by calling $this->set_acctnum('.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): "get_best_acctnum"
returns $acctnum ['.$acctnum.']<br />'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): * * * *SETTING CLASS
ACCTNUM* * * * by calling $this->set_acctnum('.serialize($acctnum).')<br />'); }
$this->set_acctnum($acctnum);
// SET GOT_ARGS TO THAT ACCTNUM
// use that acctnum to set "got_args" to the appropiate
acctnum
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
$this->set_arg_array($got_args); <br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
$this->set_arg_array($got_args); <br />'); }
$this->set_arg_array($got_args, $acctnum);
if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): post set_arg_array
$this->get_all_args() DUMP:', $this->get_all_args()); }
// Initialize Internal Args
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
"init_internal_args_and_set_them('.$acctnum.')"<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
"init_internal_args_and_set_them('.$acctnum.')"<br />'); }
$this->init_internal_args_and_set_them($acctnum);
if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): POST
"grab_class_args_gpc", "get_best_acctnum", and
"init_internal_args_and_set_them" : this->get_all_args() DUMP:',
$this->get_all_args()); }
@@ -888,7 +888,7 @@
}
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to handle email
preferences and setup extra accounts<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to handle email
preferences and setup extra accounts<br />'); }
// ---- Obtain Preferences Data ----
/*
@@ -943,7 +943,7 @@
$my_location = '0;cached_prefs';
$cached_prefs =
$this->so->so_appsession_passthru($my_location);
if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): raw $cached_prefs as
returned from cache DUMP:', $cached_prefs); }
- if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): raw serialized
$cached_prefs is '.htmlspecialchars(serialize($cached_prefs)).'<br>'); }
+ if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): raw serialized
$cached_prefs is '.htmlspecialchars(serialize($cached_prefs)).'<br />'); }
}
// ok if we actually got cached_prefs then maybe we can
use them
@@ -952,7 +952,7 @@
&& (is_array($cached_prefs))
&& (isset($cached_prefs['extra_and_default_acounts'])))
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): raw $cached_prefs
deemed to actually have usable data, so process it<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): raw $cached_prefs
deemed to actually have usable data, so process it<br />'); }
// UN-defang the filters
// NO remember that filters are left in defang
(htmlquotes encoded) form
// UNTIL they are going to be used, then
bofilters defangs them
@@ -1007,22 +1007,22 @@
{
$this->set_pref_array($cached_prefs['a'][$i]['prefs'], $i);
}
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): successfully retrieved
and applied $cached_prefs<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): successfully retrieved
and applied $cached_prefs<br />'); }
}
//$allow_prefs_shortcut = True;
//$allow_prefs_shortcut = False;
//if
((is_array($GLOBALS['phpgw_info']['user']['preferences']['email']) == True)
//&& ($allow_prefs_shortcut == True))
//{
- // if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): prefs array already
created by the API, NOT calling "create_email_preferences"<br>'); }
+ // if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): prefs array already
created by the API, NOT calling "create_email_preferences"<br />'); }
// $this->unprocessed_prefs = array();
// $this->unprocessed_prefs['email'] = array();
// $this->unprocessed_prefs['email'] =
$GLOBALS['phpgw_info']['user']['preferences']['email'];
- // if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): did NOT call
create_email_preferences, prefs were already available in
$GLOBALS["phpgw_info"]["user"]["preferences"]["email"] <br>'); }
+ // if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): did NOT call
create_email_preferences, prefs were already available in
$GLOBALS["phpgw_info"]["user"]["preferences"]["email"] <br />'); }
//}
else
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $cached_prefs either
disabled or no data was cached<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $cached_prefs either
disabled or no data was cached<br />'); }
// make this empty without question, since
cached prefs were not recovered
$cached_prefs = array();
// IT SEEMS PREFS FOR ACCT 0 NEED TO RUN THRU
THIS TO FILL "Account Name" thingy
@@ -1031,7 +1031,7 @@
//$this->unprocessed_prefs =
$GLOBALS['phpgw']->preferences->create_email_preferences();
$tmp_email_only_prefs = array();
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): calling
create_email_preferences, may be time consuming<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): calling
create_email_preferences, may be time consuming<br />'); }
$tmp_email_only_prefs =
$GLOBALS['phpgw']->preferences->create_email_preferences();
// clean "unprocessed_prefs" so all prefs oher
than email are NOT included
$this->unprocessed_prefs = array();
@@ -1095,7 +1095,7 @@
// --- process pres for in multi account
enviornment ---
// for our use, put prefs in a class var to be
accessed thru OOP-style access calls in mail_msg_wrapper
// since we know these prefs to be the top
level prefs, for the default email account, force them into acctnum 0
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): putting top level,
default account, pref data in acct 0 with
$this->set_pref_array($acct0_prefs_cleaned[email], 0); <br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): putting top level,
default account, pref data in acct 0 with
$this->set_pref_array($acct0_prefs_cleaned[email], 0); <br />'); }
if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
$acct0_prefs_cleaned[email] DUMP:', $acct0_prefs_cleaned['email']); }
//$this->set_pref_array($this->unprocessed_prefs['email'], 0);
$this->set_pref_array($acct0_prefs_cleaned['email'], 0);
@@ -1111,9 +1111,9 @@
&&
(is_array($this->unprocessed_prefs['email']['ex_accounts'])))
{
$this->ex_accounts_count =
count($this->unprocessed_prefs['email']['ex_accounts']);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
$this->unprocessed_prefs[email][ex_accounts] is set and is_array, its count:
$this->ex_accounts_count: ['.$this->ex_accounts_count.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
$this->unprocessed_prefs[email][ex_accounts] is set and is_array, its count:
$this->ex_accounts_count: ['.$this->ex_accounts_count.']<br />'); }
if ($this->debug_logins > 2) {
$this->dbug->out('$this->unprocessed_prefs[email][ex_accounts] DUMP:',
$this->unprocessed_prefs['email']['ex_accounts']); }
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to process extra
account data ; $this->ex_accounts_count: ['.$this->ex_accounts_count.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to process extra
account data ; $this->ex_accounts_count: ['.$this->ex_accounts_count.']<br
/>'); }
// note: extra accounts lowest possible
value = 1, NOT 0
// also, $key, although numbered
integers, may not be conticuous lowest to highest (may be empty or missing
elements inbetween)
@@ -1135,7 +1135,7 @@
||
(!isset($this->unprocessed_prefs['email']['ex_accounts'][$key]['layout'])) )
{
// this account lacks
essential data needed to describe an account, it must be an "empty" element
- if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): inside loop:
account ['.$key.'] is *empty*:
$this->unprocessed_prefs[email][ex_accounts]['.$key.']:
['.serialize($this->unprocessed_prefs['email']['ex_accounts'][$key]).']<br>'); }
+ if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): inside loop:
account ['.$key.'] is *empty*:
$this->unprocessed_prefs[email][ex_accounts]['.$key.']:
['.serialize($this->unprocessed_prefs['email']['ex_accounts'][$key]).']<br
/>'); }
$this->extra_accounts[$next_pos]['status'] = 'empty';
}
// ... so the account is not
empty ...
@@ -1143,13 +1143,13 @@
&&
((string)$this->unprocessed_prefs['email']['ex_accounts'][$key]['ex_account_enabled']
!= ''))
{
// this account is
defined AND enabled,
- if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): inside loop:
account ['.$key.'] is *enabled*:
$this->unprocessed_prefs[email][ex_accounts]['.$key.'][ex_account_enabled]:
['.serialize($this->unprocessed_prefs['email']['ex_accounts'][$key]['ex_account_enabled']).']<br>');
}
+ if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): inside loop:
account ['.$key.'] is *enabled*:
$this->unprocessed_prefs[email][ex_accounts]['.$key.'][ex_account_enabled]:
['.serialize($this->unprocessed_prefs['email']['ex_accounts'][$key]['ex_account_enabled']).']<br
/>'); }
$this->extra_accounts[$next_pos]['status'] = 'enabled';
}
else
{
// this account is
defined BUT not enabled
- if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): inside loop:
account ['.$key.'] is *disabled*:
$this->unprocessed_prefs[email][ex_accounts]['.$key.'][ex_account_enabled]:
['.serialize($this->unprocessed_prefs['email']['ex_accounts'][$key]['ex_account_enabled']).']<br>');
}
+ if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): inside loop:
account ['.$key.'] is *disabled*:
$this->unprocessed_prefs[email][ex_accounts]['.$key.'][ex_account_enabled]:
['.serialize($this->unprocessed_prefs['email']['ex_accounts'][$key]['ex_account_enabled']).']<br
/>'); }
$this->extra_accounts[$next_pos]['status'] = 'disabled';
}
@@ -1163,7 +1163,7 @@
// we "fool"
create_email_preferences into processing extra account info as if it were top
level data
// by specifing the
secong function arg as the integer of this particular enabled account
$this_ex_acctnum =
$this->extra_accounts[$next_pos]['acctnum'];
- if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): CALLING
create_email_preferences("", $this_ex_acctnum) for specific account, where
$this_ex_acctnum: ['.serialize($this_ex_acctnum).'] <br>'); }
+ if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): CALLING
create_email_preferences("", $this_ex_acctnum) for specific account, where
$this_ex_acctnum: ['.serialize($this_ex_acctnum).'] <br />'); }
$sub_tmp_prefs =
$GLOBALS['phpgw']->preferences->create_email_preferences('', $this_ex_acctnum);
// now put these
processed prefs in the correct location in our prefs array
$this->set_pref_array($sub_tmp_prefs['email'], $this_ex_acctnum);
@@ -1187,7 +1187,7 @@
else
{
$this->ex_accounts_count = 0;
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
$this->unprocessed_prefs[email][ex_accounts] NOT set or NOT is_array,
$this->ex_accounts_count: ['.$this->ex_accounts_count.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
$this->unprocessed_prefs[email][ex_accounts] NOT set or NOT is_array,
$this->ex_accounts_count: ['.$this->ex_accounts_count.']<br />'); }
}
// if NO extra accounts axist, we STILL need to
put the default account inextra_and_default_acounts
// extra_and_default_acounts will not have been
handled whatsoever if no extra accounts exist
@@ -1297,7 +1297,7 @@
// and.or get some vars we will use later in this
function
$mailsvr_callstr =
$this->get_arg_value('mailsvr_callstr');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $mailsvr_callstr
'.$mailsvr_callstr.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $mailsvr_callstr
'.$mailsvr_callstr.'<br />'); }
// set class var "$this->cache_mailsvr_data" based on
prefs info
// FIXME: why have this in 2 places, just keep it in
prefs (todo)
@@ -1305,32 +1305,32 @@
if ((isset($this->cache_mailsvr_data_disabled))
&& ($this->cache_mailsvr_data_disabled == True))
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): OLD DEFUNCT OPTION
folder cache DISABLED, $this->cache_mailsvr_data_disabled =
'.serialize($this->cache_mailsvr_data_disabled).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): OLD DEFUNCT OPTION
folder cache DISABLED, $this->cache_mailsvr_data_disabled =
'.serialize($this->cache_mailsvr_data_disabled).'<br />'); }
$this->cache_mailsvr_data = False;
}
elseif (($this->get_isset_pref('cache_data'))
&& ($this->get_pref_value('cache_data') != ''))
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): OLD DEFUNCT OPTION
folder cache is enabled in user prefs'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): OLD DEFUNCT OPTION
folder cache is enabled in user prefs'.'<br />'); }
$this->cache_mailsvr_data = True;
}
else
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): OLD DEFUNCT OPTION
folder cache is NOT enabled in user prefs'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): OLD DEFUNCT OPTION
folder cache is NOT enabled in user prefs'.'<br />'); }
$this->cache_mailsvr_data = False;
}
// ---- Should We Login -----
if (!isset($args_array['do_login']))
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $args_array[do_login]
was NOT set, so we set it to default value "FALSE"'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $args_array[do_login]
was NOT set, so we set it to default value "FALSE"'.'<br />'); }
$args_array['do_login'] = False;
}
// ---- newer 3 way do_login_ex value from the
bootstrap class
if ( (!defined(BS_LOGIN_NOT_SPECIFIED))
|| (!isset($args_array['do_login_ex'])) )
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
$args_array[do_login_ex] not set, getting default from a temp local bootstrap
object'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
$args_array[do_login_ex] not set, getting default from a temp local bootstrap
object'.'<br />'); }
// that means somewhere the bootstrap class has
been run
$local_bootstrap =
CreateObject('email.msg_bootstrap');
$local_bootstrap->set_do_login($args_array['do_login'], 'begin_request');
@@ -1338,7 +1338,7 @@
$local_bootstrap = '';
unset($local_bootstrap);
}
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $args_array[] DUMP
['.serialize($args_array).']'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $args_array[] DUMP
['.serialize($args_array).']'.'<br />'); }
/*
// ---- Are We In Newsmode Or Not -----
@@ -1407,7 +1407,7 @@
if
(isset($appsession_cached_folder_list[0]['folder_short']))
{
// cache the result in "Level 1
cache" class object var
- if (($this->debug_logins > 1)
|| ($this->debug_args_special_handlers > 1)) { $this->dbug->out('begin_request:
LINE '.__LINE__.' while we are here, put folder_list into Level 1 class var
"cache" so no more queries to DB for this<br>'); }
+ if (($this->debug_logins > 1)
|| ($this->debug_args_special_handlers > 1)) { $this->dbug->out('begin_request:
LINE '.__LINE__.' while we are here, put folder_list into Level 1 class var
"cache" so no more queries to DB for this<br />'); }
$this->set_arg_value('folder_list', $appsession_cached_folder_list, $acctnum);
}
}
@@ -1420,25 +1420,25 @@
|| ($appsession_cached_folder_list))
{
// in this case, extreme caching is in
use, AND we already have cached data, so NO NEED TO LOGIN
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, AND we have a cached "folder_list", which means should also have all
necessary cached data, so NO LOGIN NEEDED<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, AND we have a cached "folder_list", which means should also have all
necessary cached data, so NO LOGIN NEEDED<br />'); }
$decision_to_login = False;
// get a few more things that we would
otherwise get during the login code (which we'll be skiping)
$processed_folder_arg =
$this->get_best_folder_arg($args_array, $got_args, $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, Login may NOT occur, so about to issue:
$this->set_arg_value("folder", '.$processed_folder_arg.',
'.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, Login may NOT occur, so about to issue:
$this->set_arg_value("folder", '.$processed_folder_arg.',
'.serialize($acctnum).')<br />'); }
$this->set_arg_value('folder',
$processed_folder_arg, $acctnum);
if ( $this->get_isset_pref('userid')
&& ($this->get_pref_value('userid') !=
''))
{
$user =
$this->get_pref_value('userid');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, Login may NOT occur, so about to issue:
$this->set_arg_value("mailsvr_account_username", '.$user.',
'.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, Login may NOT occur, so about to issue:
$this->set_arg_value("mailsvr_account_username", '.$user.',
'.serialize($acctnum).')<br />'); }
$this->set_arg_value('mailsvr_account_username', $user, $acctnum);
}
}
else
{
// in this case, extreme caching is in
use, HOWEVER we do not have necessary cached data, so WE NEED A LOGIN
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, but we do NOT have a cached "folder_list", meaning we probably do
NOT have any cached data, so we NEED A LOGIN, allow it if requested<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, but we do NOT have a cached "folder_list", meaning we probably do
NOT have any cached data, so we NEED A LOGIN, allow it if requested<br />'); }
$decision_to_login = True;
}
}
@@ -1449,13 +1449,13 @@
// get a few more things that we would
otherwise get during the login code (which we'll be skiping)
$processed_folder_arg =
$this->get_best_folder_arg($args_array, $got_args, $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("folder", '.$processed_folder_arg.',
'.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("folder", '.$processed_folder_arg.',
'.serialize($acctnum).')<br />'); }
$this->set_arg_value('folder',
$processed_folder_arg, $acctnum);
if ( $this->get_isset_pref('userid')
&& ($this->get_pref_value('userid') != ''))
{
$user = $this->get_pref_value('userid');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("mailsvr_account_username", '.$user.',
'.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("mailsvr_account_username", '.$user.',
'.serialize($acctnum).')<br />'); }
$this->set_arg_value('mailsvr_account_username', $user, $acctnum);
}
}
@@ -1472,13 +1472,13 @@
// get a few more things that we would
otherwise get during the login code (which we'll be skiping)
$processed_folder_arg =
$this->get_best_folder_arg($args_array, $got_args, $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("folder", '.$processed_folder_arg.',
'.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("folder", '.$processed_folder_arg.',
'.serialize($acctnum).')<br />'); }
$this->set_arg_value('folder',
$processed_folder_arg, $acctnum);
if ( $this->get_isset_pref('userid')
&& ($this->get_pref_value('userid') != ''))
{
$user = $this->get_pref_value('userid');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("mailsvr_account_username", '.$user.',
'.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("mailsvr_account_username", '.$user.',
'.serialize($acctnum).')<br />'); }
$this->set_arg_value('mailsvr_account_username', $user, $acctnum);
}
}
@@ -1487,40 +1487,40 @@
{
// extreme caching and logins handled above in
the first if .. then
// if we are here, generally we are allowed to
login
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
is NOT in use, any begin_request logins ARE allowed <br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
is NOT in use, any begin_request logins ARE allowed <br />'); }
$decision_to_login = True;
}
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): <u>maybe about to enter
login sequence</u>, $args_array[]: ['.serialize($args_array).'] ;
$decision_to_login ['.serialize($decision_to_login).'] <br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): <u>maybe about to enter
login sequence</u>, $args_array[]: ['.serialize($args_array).'] ;
$decision_to_login ['.serialize($decision_to_login).'] <br />'); }
// now actually use that test result
if ($decision_to_login == True)
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): entered and starting
login sequence <br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): entered and starting
login sequence <br />'); }
// ---- Get Email Password
if ($this->get_isset_pref('passwd') == False)
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
this->a[$this->acctnum][prefs][passwd] NOT set, fallback to
$GLOBALS[phpgw_info][user][passwd]'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
this->a[$this->acctnum][prefs][passwd] NOT set, fallback to
$GLOBALS[phpgw_info][user][passwd]'.'<br />'); }
// DO NOT alter the password and put
that altered password BACK into the preferences array
// why not? used to have a reason, but
that was obviated, no reason at the moment
//$this->set_pref_value('passwd',$GLOBALS['phpgw_info']['user']['passwd']);
//$this->a[$this->acctnum]['prefs']['passwd'] =
$GLOBALS['phpgw_info']['user']['passwd'];
$pass =
$GLOBALS['phpgw_info']['user']['passwd'];
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): pass grabbed from
GLOBALS[phpgw_info][user][passwd] =
'.htmlspecialchars(serialize($pass)).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): pass grabbed from
GLOBALS[phpgw_info][user][passwd] = '.htmlspecialchars(serialize($pass)).'<br
/>'); }
}
else
{
// DO NOT alter the password and do NOT
put that altered password BACK into the preferences array
// keep the one in GLOBALS in encrypted
form if possible ????
$pass = $this->get_pref_value('passwd');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): pass from prefs:
already defanged for us, but still encrypted <pre>'.$pass.'</pre><br>'."\r\n");
}
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): pass from prefs:
already defanged for us, but still encrypted <pre>'.$pass.'</pre><br
/>'."\r\n"); }
// IMPORTANT: (this note on "defanging"
still valid as of Jan 24, 2002
// the last thing you do before saving
to the DB is "de-fang"
// so the FIRST thing class prefs does
when reading from the db MUST be to "UN-defang", and that IS what happens there
// so by now phpgwapi/class.preferences
has ALREADY done the "de-fanging"
$pass =
$this->decrypt_email_passwd($pass);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): pass from prefs:
decrypted: <pre>'.$pass.'</pre><br>'."\r\n"); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): pass from prefs:
decrypted: <pre>'.$pass.'</pre><br />'."\r\n"); }
}
// ---- ISSET CHECK for userid and passwd to
avoid garbage logins ----
if ( $this->get_isset_pref('userid')
@@ -1535,13 +1535,13 @@
// FIXME make this use an official
error function
// problem - invalid or nonexistant
info for userid and/or passwd
//if ($this->debug_logins > 0) {
- echo
'mail_msg.begin_request('.__LINE__.'): ERROR: userid or passwd empty'."<br>\r\n"
+ echo
'mail_msg.begin_request('.__LINE__.'): ERROR: userid or passwd empty'."<br
/>\r\n"
.' * *
$this->get_pref_value(userid) = '
-
.$this->get_pref_value('userid')."<br>\r\n"
- .' * * if the userid is
filled, then it must be the password that is missing'."<br>\r\n"
- .' * * tell your admin
if a) you have a custom email password or not when reporting this
error'."<br>\r\n";
+
.$this->get_pref_value('userid')."<br />\r\n"
+ .' * * if the userid is
filled, then it must be the password that is missing'."<br />\r\n"
+ .' * * tell your admin
if a) you have a custom email password or not when reporting this error'."<br
/>\r\n";
//}
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING with ERROR:
userid or passwd empty<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING with ERROR:
userid or passwd empty<br />'); }
return False;
}
@@ -1559,7 +1559,7 @@
$this_server_type =
$this->get_pref_value('mail_server_type');
// ok, now put that object into the array
//$this_acctnum = $this->get_acctnum();
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): creating new
dcom_holder at $GLOBALS[phpgw_dcom_'.$acctnum.'] = new
mail_dcom_holder'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): creating new
dcom_holder at $GLOBALS[phpgw_dcom_'.$acctnum.'] = new mail_dcom_holder'.'<br
/>'); }
$GLOBALS['phpgw_dcom_'.$acctnum] = new
mail_dcom_holder;
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom =
CreateObject("email.mail_dcom", $this_server_type);
// initialize the dcom class variables
@@ -1581,13 +1581,13 @@
//@set_time_limit(60);
// login to INBOX because we know that
always(?) should exist on an imap server and pop server
// after we are logged in we can get additional
info that will lead us to the desired folder (if not INBOX)
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call
dcom->open:
$GLOBALS["phpgw_dcom_".$acctnum('.$acctnum.')]->dcom->open('.$mailsvr_callstr."INBOX".',
'.$user.', '.$pass.', )'.'<br>'); }
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): <font color="red">MAIL
SERVER COMMAND</font>'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call
dcom->open:
$GLOBALS["phpgw_dcom_".$acctnum('.$acctnum.')]->dcom->open('.$mailsvr_callstr."INBOX".',
'.$user.', '.$pass.', )'.'<br />'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): <font color="red">MAIL
SERVER COMMAND</font>'.'<br />'); }
$mailsvr_stream =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->open($mailsvr_callstr."INBOX", $user,
$pass, '');
$pass = '';
//@set_time_limit(0);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): open returns
$mailsvr_stream = ['.serialize($mailsvr_stream).']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): open returns
$mailsvr_stream = ['.serialize($mailsvr_stream).']<br />'); }
// Logged In Success or Faliure check
if ( (!isset($mailsvr_stream))
@@ -1595,7 +1595,7 @@
{
// set the "mailsvr_stream" to blank so
all will know the login failed
$this->set_arg_value('mailsvr_stream',
'');
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING with ERROR:
failed to open mailsvr_stream : '.$mailsvr_stream.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING with ERROR:
failed to open mailsvr_stream : '.$mailsvr_stream.'<br />'); }
// we return false, but SHOULD WE ERROR
EXIT HERE?
return False;
}
@@ -1608,48 +1608,48 @@
// ---- Get additional Data now that we are
logged in to the mail server ----
// namespace is often obtained by directly
querying the mailsvr
$mailsvr_namespace =
$this->get_arg_value('mailsvr_namespace');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $mailsvr_namespace:
'.serialize($mailsvr_namespace).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $mailsvr_namespace:
'.serialize($mailsvr_namespace).'<br />'); }
$mailsvr_delimiter =
$this->get_arg_value('mailsvr_delimiter');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $mailsvr_delimiter:
'.serialize($mailsvr_delimiter).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $mailsvr_delimiter:
'.serialize($mailsvr_delimiter).'<br />'); }
// FIND FOLDER VALUE
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): <b> *** FIND FOLDER
VALUE *** </b><br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): <b> *** FIND FOLDER
VALUE *** </b><br />'); }
// get best available, most legit, folder value
that we can find, and prep it in
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
"get_best_folder_arg($args_array, $got_args, $acctnum(='.$acctnum.'))"<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
"get_best_folder_arg($args_array, $got_args, $acctnum(='.$acctnum.'))"<br />');
}
$processed_folder_arg =
$this->get_best_folder_arg($args_array, $got_args, $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): "get_best_folder_arg"
returns $processed_folder_arg
['.htmlspecialchars(serialize($processed_folder_arg)).']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): "get_best_folder_arg"
returns $processed_folder_arg
['.htmlspecialchars(serialize($processed_folder_arg)).']<br />'); }
// ---- Switch To Desired Folder If Necessary
----
if ($processed_folder_arg == 'INBOX')
{
// NO need to switch to another folder
// put this $processed_folder_arg in
arg "folder", replacing any unprocessed value that may have been there
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): NO need to switch
folders, about to issue: $this->set_arg_value("folder",
'.$processed_folder_arg.', '.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): NO need to switch
folders, about to issue: $this->set_arg_value("folder",
'.$processed_folder_arg.', '.serialize($acctnum).')<br />'); }
$this->set_arg_value('folder',
$processed_folder_arg, $acctnum);
}
else
{
// switch to the desired folder now
that we are sure we have it's official name
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): need to switch folders
(reopen) from INBOX to $processed_folder_arg: '.$processed_folder_arg.'<br>'); }
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to issue:
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->reopen('.$mailsvr_stream.',
'.$mailsvr_callstr.$processed_folder_arg,', )'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): need to switch folders
(reopen) from INBOX to $processed_folder_arg: '.$processed_folder_arg.'<br
/>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to issue:
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->reopen('.$mailsvr_stream.',
'.$mailsvr_callstr.$processed_folder_arg,', )'.'<br />'); }
//$did_reopen =
$tmp_a['dcom']->reopen($mailsvr_stream, $mailsvr_callstr.$processed_folder_arg,
'');
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: begin_request('.__LINE__.'): <font color="red">MAIL
SERVER COMMAND</font>'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: begin_request('.__LINE__.'): <font color="red">MAIL
SERVER COMMAND</font>'.'<br />'); }
$did_reopen =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->reopen($mailsvr_stream,
$mailsvr_callstr.$processed_folder_arg, '');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): reopen returns:
'.serialize($did_reopen).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): reopen returns:
'.serialize($did_reopen).'<br />'); }
// error check
if ($did_reopen == False)
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING with re-open
ERROR, closing stream, FAILED to reopen (change folders) $mailsvr_stream
['.$mailsvr_stream.'] INBOX to
['.$mailsvr_callstr.$processed_folder_arg.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING with re-open
ERROR, closing stream, FAILED to reopen (change folders) $mailsvr_stream
['.$mailsvr_stream.'] INBOX to ['.$mailsvr_callstr.$processed_folder_arg.'<br
/>'); }
// log out since we could not
reopen, something must have gone wrong
$this->end_request();
return False;
}
else
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): Successful switch
folders (reopen) from (default initial folder) INBOX to
['.$processed_folder_arg.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): Successful switch
folders (reopen) from (default initial folder) INBOX to
['.$processed_folder_arg.']<br />'); }
// put this
$processed_folder_arg in arg "folder", since we were able to successfully
switch folders
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): switched folders (via
reopen), about to issue: $this->set_arg_value("folder",
'.$processed_folder_arg.', $acctnum(='.$acctnum.'))<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): switched folders (via
reopen), about to issue: $this->set_arg_value("folder",
'.$processed_folder_arg.', $acctnum(='.$acctnum.'))<br />'); }
$this->set_arg_value('folder',
$processed_folder_arg, $acctnum);
}
}
@@ -1662,11 +1662,11 @@
.'&fldball[acctnum]='.$this->get_acctnum()
.'&sort='.$this->get_arg_value('sort')
.'&order='.$this->get_arg_value('order');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call
$this->set_arg_value(index_refresh_uri, $this_index_refresh_uri,
$acctnum(='.$acctnum.')); ; where $this_index_refresh_uri:
'.htmlspecialchars($this_index_refresh_uri).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call
$this->set_arg_value(index_refresh_uri, $this_index_refresh_uri,
$acctnum(='.$acctnum.')); ; where $this_index_refresh_uri:
'.htmlspecialchars($this_index_refresh_uri).'<br />'); }
$this->set_arg_value('index_refresh_uri',
$this_index_refresh_uri, $acctnum);
if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to leave, direct
access dump of $this->a DUMP:', $this->a); }
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING,
success'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING, success'.'<br
/>'); }
// returning this is vestigal, not really
necessary, but do it anyway
// it's importance is that it returns something
other then "False" on success
return $this->get_arg_value('mailsvr_stream',
$acctnum);
@@ -1682,12 +1682,12 @@
.'&fldball[acctnum]='.$this->get_acctnum()
.'&sort='.$this->get_arg_value('sort')
.'&order='.$this->get_arg_value('order');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call
$this->set_arg_value(index_refresh_uri, $this_index_refresh_uri,
$acctnum(='.$acctnum.')); ; where $this_index_refresh_uri:
'.htmlspecialchars($this_index_refresh_uri).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call
$this->set_arg_value(index_refresh_uri, $this_index_refresh_uri,
$acctnum(='.$acctnum.')); ; where $this_index_refresh_uri:
'.htmlspecialchars($this_index_refresh_uri).'<br />'); }
$this->set_arg_value('index_refresh_uri',
$this_index_refresh_uri, $acctnum);
- //if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): LEAVING, we were NOT
allowed to, $args_array[do_login]: ['.serialize($args_array['do_login']).'] if
TRUE, then we must return *something* so calling function does NOT think error,
so return $args_array[do_login] <br>'); }
+ //if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): LEAVING, we were NOT
allowed to, $args_array[do_login]: ['.serialize($args_array['do_login']).'] if
TRUE, then we must return *something* so calling function does NOT think error,
so return $args_array[do_login] <br />'); }
//return $args_array['do_login'];
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): LEAVING, we did NOT
login, see above debug output, $args_array[do_login]:
['.serialize($args_array['do_login']).'] if TRUE, then we must return
*something* so calling function does NOT think error, so return TRUE (what
impact does this have??) <br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): LEAVING, we did NOT
login, see above debug output, $args_array[do_login]:
['.serialize($args_array['do_login']).'] if TRUE, then we must return
*something* so calling function does NOT think error, so return TRUE (what
impact does this have??) <br />'); }
return True;
}
}
@@ -1705,7 +1705,7 @@
*/
function logout()
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: logout: ENTERING, about to call ->end_request with
no args'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: logout: ENTERING, about to call ->end_request with
no args'.'<br />'); }
$this->end_request(array());
}
@@ -1722,7 +1722,7 @@
*/
function end_request($args_array='')
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request: ENTERING'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request: ENTERING'.'<br />'); }
if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg: end_request: $args_array DUMP', $args_array); }
$check_streams = array();
if ((isset($args_array['acctnum']))
@@ -1750,22 +1750,22 @@
for ($i=0; $i < count($check_streams); $i++)
{
$this_acctnum = $check_streams[$i]['acctnum'];
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: end_request: stream check, will examine
$this_acctnum = $check_streams['.$i.'][acctnum] =
['.$check_streams[$i]['acctnum'].']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: end_request: stream check, will examine
$this_acctnum = $check_streams['.$i.'][acctnum] =
['.$check_streams[$i]['acctnum'].']<br />'); }
if (($this->get_isset_arg('mailsvr_stream',
$this_acctnum) == True)
&&
((string)$this->get_arg_value('mailsvr_stream', $this_acctnum) != ''))
{
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $this_acctnum);
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request: stream exists, for $this_acctnum
['.$this_acctnum.'] , $mailsvr_stream : ['.$mailsvr_stream.'] ; logging
out'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request: stream exists, for $this_acctnum
['.$this_acctnum.'] , $mailsvr_stream : ['.$mailsvr_stream.'] ; logging
out'.'<br />'); }
// SLEEP seems to give the server time
to send its OK response, used tcpdump to confirm this
//sleep(1);
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request('.__LINE__.'): <font color="red">MAIL
SERVER COMMAND</font>'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request('.__LINE__.'): <font color="red">MAIL
SERVER COMMAND</font>'.'<br />'); }
$GLOBALS['phpgw_dcom_'.$this_acctnum]->dcom->close($mailsvr_stream);
// sleep here does not have any effect
//sleep(1);
$this->set_arg_value('mailsvr_stream',
'', $this_acctnum);
}
}
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request: LEAVING'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request: LEAVING'.'<br />'); }
}
/*!
@@ -1784,7 +1784,7 @@
*/
function ensure_stream_and_folder($fldball='', $called_from='')
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: ENTERING, $fldball:
['.serialize($fldball).'] ; $called_from: ['.$called_from.']<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: ENTERING, $fldball:
['.serialize($fldball).'] ; $called_from: ['.$called_from.']<br />'); }
if ((isset($fldball['acctnum']))
&& ((string)$fldball['acctnum'] != ''))
@@ -1831,40 +1831,40 @@
&& ($fldball['no_switch_away']))
{
// "no_switch_away" means folder is NOT
important, such as with "listmailbox"
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: there may be NO need to
switch folders: setting $ctrl_info[no_switch_away] because
$fldball[no_switch_away] is ['.serialize($fldball['no_switch_away']).'],
$called_from: ['.$called_from.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: there may be NO need to
switch folders: setting $ctrl_info[no_switch_away] because
$fldball[no_switch_away] is ['.serialize($fldball['no_switch_away']).'],
$called_from: ['.$called_from.']<br />'); }
$ctrl_info['no_switch_away'] = True;
}
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: $acctnum:
['.serialize($acctnum).'] ; $input_folder_arg:
['.serialize($input_folder_arg).']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: $acctnum:
['.serialize($acctnum).'] ; $input_folder_arg:
['.serialize($input_folder_arg).']<br />'); }
// get mailsvr_callstr now, it does not require a login
stream
$mailsvr_callstr =
$this->get_arg_value('mailsvr_callstr', $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: $mailsvr_callstr:
'.serialize($mailsvr_callstr).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: $mailsvr_callstr:
'.serialize($mailsvr_callstr).'<br />'); }
if (($this->get_isset_arg('mailsvr_stream', $acctnum))
&& ((string)$this->get_arg_value('mailsvr_stream',
$acctnum) != ''))
{
$ctrl_info['first_open'] = False;
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: PRE-EXISTING stream, do
not re-login, $mailsvr_stream ['.serialize($mailsvr_stream).'] <br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: PRE-EXISTING stream, do
not re-login, $mailsvr_stream ['.serialize($mailsvr_stream).'] <br />'); }
}
else
{
$ctrl_info['first_open'] = True;
$mailsvr_stream = '';
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: stream for this account
needs to be opened, login to $acctnum ['.$acctnum.']'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: stream for this account
needs to be opened, login to $acctnum ['.$acctnum.']'.'<br />'); }
if ($this->get_isset_pref('passwd', $acctnum)
== False)
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder:
this->a[$this->acctnum][prefs][passwd] NOT set, fallback to
$GLOBALS[phpgw_info][user][passwd]'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder:
this->a[$this->acctnum][prefs][passwd] NOT set, fallback to
$GLOBALS[phpgw_info][user][passwd]'.'<br />'); }
$pass =
$GLOBALS['phpgw_info']['user']['passwd'];
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: pass grabbed from
GLOBALS[phpgw_info][user][passwd] =
'.htmlspecialchars(serialize($pass)).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: pass grabbed from
GLOBALS[phpgw_info][user][passwd] = '.htmlspecialchars(serialize($pass)).'<br
/>'); }
}
else
{
$pass = $this->get_pref_value('passwd',
$acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: pass from prefs: already
"defanged" for us, but still ancrypted
'.htmlspecialchars(serialize($pass)).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: pass from prefs: already
"defanged" for us, but still ancrypted
'.htmlspecialchars(serialize($pass)).'<br />'); }
$pass =
$this->decrypt_email_passwd($pass);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: pass from prefs:
decrypted: '.htmlspecialchars(serialize($pass)).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: pass from prefs:
decrypted: '.htmlspecialchars(serialize($pass)).'<br />'); }
}
if ( $this->get_isset_pref('userid', $acctnum)
&& ($this->get_pref_value('userid', $acctnum)
!= '')
@@ -1875,18 +1875,18 @@
}
else
{
- echo 'mail_msg:
ensure_stream_and_folder: ERROR: userid or passwd empty'."<br>\r\n"
+ echo 'mail_msg:
ensure_stream_and_folder: ERROR: userid or passwd empty'."<br />\r\n"
.' * *
$this->get_pref_value(userid, '.$acctnum.') = '
-
.$this->get_pref_value('userid', $acctnum)."<br>\r\n"
- .' * * if the userid is
filled, then it must be the password that is missing'."<br>\r\n"
- .' * * tell your admin
if a) you have a custom email password or not when reporting this
error'."<br>\r\n";
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: LEAVING with ERROR:
userid or passwd empty<br>'); }
+
.$this->get_pref_value('userid', $acctnum)."<br />\r\n"
+ .' * * if the userid is
filled, then it must be the password that is missing'."<br />\r\n"
+ .' * * tell your admin
if a) you have a custom email password or not when reporting this error'."<br
/>\r\n";
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: LEAVING with ERROR:
userid or passwd empty<br />'); }
return False;
}
// ---- Create email server Data Communication
Class ----
$this_server_type =
$this->get_pref_value('mail_server_type', $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: creating new dcom_holder
at $GLOBALS["phpgw_dcom_'.$acctnum.'] = new mail_dcom_holder'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: creating new dcom_holder
at $GLOBALS["phpgw_dcom_'.$acctnum.'] = new mail_dcom_holder'.'<br />'); }
$GLOBALS['phpgw_dcom_'.$acctnum] = new
mail_dcom_holder;
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom =
CreateObject("email.mail_dcom", $this_server_type);
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->mail_dcom_base();
@@ -1902,16 +1902,16 @@
}
// log in to INBOX because we know INBOX should
exist on every mail server, "reopen" to desired folder (if different) later
//@set_time_limit(60);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: about to call dcom->open:
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->open('.$mailsvr_callstr."INBOX".',
'.$user.', '.$pass.', )'.'<br>'); }
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): <font
color="red">MAIL SERVER COMMAND</font>'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: about to call dcom->open:
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->open('.$mailsvr_callstr."INBOX".',
'.$user.', '.$pass.', )'.'<br />'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): <font
color="red">MAIL SERVER COMMAND</font>'.'<br />'); }
$mailsvr_stream =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->open($mailsvr_callstr."INBOX", $user,
$pass, '');
$pass = '';
//@set_time_limit(0);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: open returns
$mailsvr_stream = ['.serialize($mailsvr_stream).']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: open returns
$mailsvr_stream = ['.serialize($mailsvr_stream).']<br />'); }
if ( (!isset($mailsvr_stream)) ||
($mailsvr_stream == '') )
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'):
$mailsvr_stream FAILS ['.serialize($mailsvr_stream).']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'):
$mailsvr_stream FAILS ['.serialize($mailsvr_stream).']<br />'); }
//$this->set_arg_value('mailsvr_stream', '', $acctnum);
// this error function will try to call
this function again to attempt RedHat bug recovery
// the
"ensure_stream_and_folder_already_tried_again" lets us try again before exiting
@@ -1923,9 +1923,9 @@
// oops, that means we just skipped
possible showing the right login error message
$this->login_error($GLOBALS['PHP_SELF'].', mail_msg:
ensure_stream_and_folder(), called_from: '.$called_from, $acctnum);
- //if ($this->debug_logins > 0) { echo
'mail_msg: ensure_stream_and_folder: LEAVING with ERROR: failed to open
mailsvr_stream : '.$mailsvr_stream.'<br>';}
+ //if ($this->debug_logins > 0) { echo
'mail_msg: ensure_stream_and_folder: LEAVING with ERROR: failed to open
mailsvr_stream : '.$mailsvr_stream.'<br />';}
//return False;
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'): code just
called the "login_error" function, did we get to here?<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'): code just
called the "login_error" function, did we get to here?<br />'); }
}
// if we get here either
@@ -1935,29 +1935,29 @@
// if the failure was not recoverable or if
already tried, the above error function would have exited the script by now
if ( (!isset($mailsvr_stream)) ||
($mailsvr_stream == '') )
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'): 2nd test,
$mailsvr_stream fails ['.serialize($mailsvr_stream).'] as expected, but the
recursive call may have left behind a a sign this has been fixed ...<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'): 2nd test,
$mailsvr_stream fails ['.serialize($mailsvr_stream).'] as expected, but the
recursive call may have left behind a a sign this has been fixed ...<br />'); }
// try to obtain the mailsvr_stream
that the recursive call to here may have left for us
$mailsvr_stream_test2 =
$this->get_arg_value('mailsvr_stream', $acctnum);
if ( (isset($mailsvr_stream_test2))
&& ((string)$mailsvr_stream_test2 !=
'') )
{
// recursive call to this
function has done the job for us
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: LEAVING, apparently a
recursive call to this function fixed the RH bug for us, returning
$this->get_arg_value(mailsvr_stream, '.$acctnum.')
['.$mailsvr_stream_test2.']<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: LEAVING, apparently a
recursive call to this function fixed the RH bug for us, returning
$this->get_arg_value(mailsvr_stream, '.$acctnum.')
['.$mailsvr_stream_test2.']<br />'); }
// IF THE RECURSIVE FUNCION DID
THE JOB, I GUESS WE JUST EXIT NOW
return $mailsvr_stream_test2;
}
else
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: LEAVING, 2nd test using
$mailsvr_stream_test2 looked for recursive fix but not found, now calling
this->login_error which will exit the script probably<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: LEAVING, 2nd test using
$mailsvr_stream_test2 looked for recursive fix but not found, now calling
this->login_error which will exit the script probably<br />'); }
//$GLOBALS['phpgw']->msg->login_error($GLOBALS['PHP_SELF'].', mail_msg
('.__LINE__.'): ensure_mail_msg_exists(), called_by: '.$called_by);
$this->login_error($GLOBALS['PHP_SELF'].', mail_msg ('.__LINE__.'):
ensure_stream_and_folder(), called_by: '.$called_by);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'): 2nd test,
code just called the "login_error" function, did we get to here?<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'): 2nd test,
code just called the "login_error" function, did we get to here?<br />'); }
}
}
else
{
// if login_error is able to recover,
it will set "mailsvr_stream", we do not want to over write the recovered
mailsvr_stream
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'):
$mailsvr_stream is GOOD<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'):
$mailsvr_stream is GOOD<br />'); }
$this->set_arg_value('mailsvr_stream',
$mailsvr_stream, $acctnum);
}
$this->set_arg_value('mailsvr_account_username', $user, $acctnum);
@@ -1966,9 +1966,9 @@
// as a practice we ALWAYS open the inbox and
then LATER switch to the desired folder
// unless fldball["no_select_away"] is set
$this->set_arg_value('folder', 'INBOX',
$acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: ... we just opened stream
for $acctnum: ['.serialize($acctnum).'] continue ...<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: ... we just opened stream
for $acctnum: ['.serialize($acctnum).'] continue ...<br />'); }
}
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: we have a stream for
$acctnum: ['.serialize($acctnum).'] continue ...<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: we have a stream for
$acctnum: ['.serialize($acctnum).'] continue ...<br />'); }
$current_folder_arg = '';
if (($this->get_isset_arg('folder', $acctnum))
@@ -1997,13 +1997,13 @@
&& ($ctrl_info['pre_existing_folder_arg'])
&& ($ctrl_info['no_switch_away']))
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): already had
a folder arg, first open of stream, calling func does not care about reopen, so
we MUST open to the preexisting folder arg
['.htmlspecialchars($ctrl_info['pre_existing_folder_arg']).'], $called_from:
['.$called_from.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): already had
a folder arg, first open of stream, calling func does not care about reopen, so
we MUST open to the preexisting folder arg
['.htmlspecialchars($ctrl_info['pre_existing_folder_arg']).'], $called_from:
['.$called_from.']<br />'); }
$ctrl_info['do_reopen_to_folder'] =
$ctrl_info['pre_existing_folder_arg'];
}
elseif (($ctrl_info['no_switch_away'])
&& ($ctrl_info['first_open']) == False)
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): stream was
already open, calling func does not care about reopen, so NO NEED to switch
folder, $called_from: ['.$called_from.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): stream was
already open, calling func does not care about reopen, so NO NEED to switch
folder, $called_from: ['.$called_from.']<br />'); }
}
elseif (($input_folder_arg == 'INBOX')
&& ($current_folder_arg == 'INBOX' ))
@@ -2011,52 +2011,52 @@
// no need to do anything because
// 1) "INBOX" does not need to be passed thru
$this->prep_folder_in(), so we directly can test against $input_folder_arg
// 2) if we're here then it's because we (a)
had an existing stream opened to INBOX or (b) we just opened a stream to INBOX
just above here
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): NO need to
switch folders: both $input_folder_arg and $current_folder_arg == INBOX<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): NO need to
switch folders: both $input_folder_arg and $current_folder_arg == INBOX<br
/>'); }
}
elseif ($input_folder_arg == $current_folder_arg)
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): NO need to
switch folders: both $input_folder_arg == $current_folder_arg
['.htmlspecialchars($input_folder_arg).'] ==
['.htmlspecialchars($current_folder_arg).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): NO need to
switch folders: both $input_folder_arg == $current_folder_arg
['.htmlspecialchars($input_folder_arg).'] ==
['.htmlspecialchars($current_folder_arg).'<br />'); }
}
else
{
// unless we missed something, we WILL SWITCH
FOLDERS
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): no "skip
folder change" conditions match, so WE WILL CHANGE FOLDERS to $input_folder_arg
['.htmlspecialchars($input_folder_arg).'], $called_from:
['.$called_from.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): no "skip
folder change" conditions match, so WE WILL CHANGE FOLDERS to $input_folder_arg
['.htmlspecialchars($input_folder_arg).'], $called_from: ['.$called_from.']<br
/>'); }
$ctrl_info['do_reopen_to_folder'] =
$input_folder_arg;
}
// PROCEED ...
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): after
logic, if $ctrl_info[do_reopen_to_folder] is filled we WILL REOPEN folder, it
is ['.htmlspecialchars($ctrl_info['do_reopen_to_folder']).']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): after
logic, if $ctrl_info[do_reopen_to_folder] is filled we WILL REOPEN folder, it
is ['.htmlspecialchars($ctrl_info['do_reopen_to_folder']).']<br />'); }
if ($ctrl_info['do_reopen_to_folder'])
{
// class will get this data on its own to do
the lookup in prep_folder_in anyway, so might as well get it for us here at the
same time
$mailsvr_namespace =
$this->get_arg_value('mailsvr_namespace', $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$mailsvr_namespace: '.serialize($mailsvr_namespace).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$mailsvr_namespace: '.serialize($mailsvr_namespace).'<br />'); }
$mailsvr_delimiter =
$this->get_arg_value('mailsvr_delimiter', $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$mailsvr_delimiter: '.serialize($mailsvr_delimiter).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$mailsvr_delimiter: '.serialize($mailsvr_delimiter).'<br />'); }
// do this now so we can check against it in
the elseif block without having to call it several different times
$preped_folder =
$this->prep_folder_in($ctrl_info['do_reopen_to_folder']);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$preped_folder: '.serialize($preped_folder).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$preped_folder: '.serialize($preped_folder).'<br />'); }
// one last check (maybe redundant now)
$preped_current_folder_arg =
$this->prep_folder_in($current_folder_arg);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$preped_current_folder_arg: '.serialize($preped_current_folder_arg).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$preped_current_folder_arg: '.serialize($preped_current_folder_arg).'<br />'); }
if (($current_folder_arg != '')
&& ($preped_current_folder_arg ==
$preped_folder))
{
// the desired folder is already
opened, note this could simply be INBOX
// because we did set "folder" arg
during the initial open just above
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): NO need to
switch folders: $preped_current_folder_arg ['.$processed_folder_arg.'] ==
$preped_folder ['.$preped_folder.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): NO need to
switch folders: $preped_current_folder_arg ['.$processed_folder_arg.'] ==
$preped_folder ['.$preped_folder.']<br />'); }
}
else
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): need to
switch folders (reopen) from $preped_current_folder_arg
['.$preped_current_folder_arg.'] to $preped_folder: '.$preped_folder.'<br>'); }
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): about to
issue: $GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->reopen('.$mailsvr_stream.',
'.$mailsvr_callstr.$preped_folder,', )'.'<br>'); }
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): <font
color="red">MAIL SERVER COMMAND</font>'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): need to
switch folders (reopen) from $preped_current_folder_arg
['.$preped_current_folder_arg.'] to $preped_folder: '.$preped_folder.'<br />');
}
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): about to
issue: $GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->reopen('.$mailsvr_stream.',
'.$mailsvr_callstr.$preped_folder,', )'.'<br />'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): <font
color="red">MAIL SERVER COMMAND</font>'.'<br />'); }
$did_reopen =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->reopen($mailsvr_stream,
$mailsvr_callstr.$preped_folder, '');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): reopen
returns: '.serialize($did_reopen).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): reopen
returns: '.serialize($did_reopen).'<br />'); }
if ($did_reopen == False)
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): LEAVING
with re-open ERROR, closing stream, FAILED to reopen (change folders)
$mailsvr_stream ['.$mailsvr_stream.'] $pre_opened_folder
['.$pre_opened_folder.'] to ['.$mailsvr_callstr.$processed_folder_arg.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): LEAVING
with re-open ERROR, closing stream, FAILED to reopen (change folders)
$mailsvr_stream ['.$mailsvr_stream.'] $pre_opened_folder
['.$pre_opened_folder.'] to ['.$mailsvr_callstr.$processed_folder_arg.'<br
/>'); }
$end_request_args = array();
$end_request_args['acctnum'] =
$acctnum;
// only need to close this
specific stream, leave other streams (if any) alone
@@ -2065,14 +2065,14 @@
}
else
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): Successful
switch folders (reopen) from (default initial folder) INBOX to
['.$preped_folder.']<br>'); }
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): switched
folders (via reopen), about to issue: $this->set_arg_value("folder",
'.$preped_folder.')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): Successful
switch folders (reopen) from (default initial folder) INBOX to
['.$preped_folder.']<br />'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): switched
folders (via reopen), about to issue: $this->set_arg_value("folder",
'.$preped_folder.')<br />'); }
$this->set_arg_value('folder',
$preped_folder, $acctnum);
}
}
}
$return_mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): LEAVING,
returning $this->get_arg_value(mailsvr_stream, '.$acctnum.')
['.$return_mailsvr_stream.']<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): LEAVING,
returning $this->get_arg_value(mailsvr_stream, '.$acctnum.')
['.$return_mailsvr_stream.']<br />'); }
return $return_mailsvr_stream;
}
@@ -2085,7 +2085,7 @@
*/
function login_error($called_from='', $acctnum='')
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): ENTERING, $called_from
['.$called_from.'], $acctnum: ['.$acctnum.']<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): ENTERING, $called_from
['.$called_from.'], $acctnum: ['.$acctnum.']<br />'); }
// usually acctnum is only supplied by
"ensure_stream_and_folder"
// because it is there that streams other then the
current account may be opened on demand
if ((!isset($acctnum))
@@ -2119,14 +2119,14 @@
{
$error_report = $imap_err;
}
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): $error_report
['.$error_report.']<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): $error_report
['.$error_report.']<br />'); }
// ATTEMPT TO RECOVER FROM KNOWS PHP BUG even if
"Certificate failure" is not obvious
$always_try_recover = True;
if
($this->get_isset_arg('beenthere_loginerr_tryagain_buggy_cert', $acctnum))
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): ALREADY TRIED THIS: this
arg is set: "beenthere_loginerr_tryagain_buggy_cert"<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): ALREADY TRIED THIS: this
arg is set: "beenthere_loginerr_tryagain_buggy_cert"<br />'); }
}
elseif ((stristr($imap_err,'Certificate failure'))
|| ($always_try_recover == True))
@@ -2136,31 +2136,31 @@
if (($mail_server_type == 'pop3')
|| ($mail_server_type == 'imap'))
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): LEAVING, with call to:
$this->loginerr_tryagain_buggy_cert('.$called_from.', '.$error_report.',
'.$mail_server_type.', '.$acctnum.');<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): LEAVING, with call to:
$this->loginerr_tryagain_buggy_cert('.$called_from.', '.$error_report.',
'.$mail_server_type.', '.$acctnum.');<br />'); }
$this->loginerr_tryagain_buggy_cert($called_from, $error_report,
$mail_server_type, $acctnum);
return;
}
// not recoverable, continue with error report
}
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): this is not an error
related to RH Cert issue because server string is already (apparently) correct
in that respect.<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): this is not an error
related to RH Cert issue because server string is already (apparently) correct
in that respect.<br />'); }
/*
// this should be templated
echo "<p><center><b>"
- . lang("There was an error trying to connect to your
mail server.<br>Please, check your username and password, or contact your
admin.")."<br> \r\n"
- ."source: email class.mail_msg_base.inc.php"."<br>
\r\n"
- ."called from: ".$called_from."<br> \r\n"
- ."imap_last_error: [".$error_report."]<br> \r\n"
- ."tried RH bug recovery?:
[".$this->get_isset_arg('beenthere_loginerr_tryagain_buggy_cert', $acctnum)."]
<br> \r\n"
- ."if there is no obvious error, then check your
username and password first.<br> \r\n"
+ . lang("There was an error trying to connect to your
mail server.<br />Please, check your username and password, or contact your
admin.")."<br /> \r\n"
+ ."source: email class.mail_msg_base.inc.php"."<br />
\r\n"
+ ."called from: ".$called_from."<br /> \r\n"
+ ."imap_last_error: [".$error_report."]<br /> \r\n"
+ ."tried RH bug recovery?:
[".$this->get_isset_arg('beenthere_loginerr_tryagain_buggy_cert', $acctnum)."]
<br /> \r\n"
+ ."if there is no obvious error, then check your
username and password first.<br /> \r\n"
. "</b></center></p>"
.'<p><center>'
.'<a
href="'.$GLOBALS['phpgw']->link('/index.php').'">Click here to continue.</a>'
- .'</center></p>'."<br> \r\n";
+ .'</center></p>'."<br /> \r\n";
*/
// we could just return this text
$error_text_plain =
- lang("There was an error trying to connect to your
mail server.<br>Please, check your username and password, or contact your
admin.")."\r\n"
+ lang("There was an error trying to connect to your
mail server.<br />Please, check your username and password, or contact your
admin.")."\r\n"
."source: email class.mail_msg_base.inc.php"."\r\n"
."called from: ".$called_from."\r\n"
."imap_last_error: [".$error_report."]\r\n"
@@ -2168,18 +2168,18 @@
.lang('if there is no obvious error, check your
username and password first.')."\r\n";
// or use this text in an html error report
$error_text_formatted =
- lang("There was an error trying to connect to your
mail server.<br>Please, check your username and password, or contact your
admin.")."<br> \r\n"
- ."<br> \r\n"
- ."<br> \r\n"
- ."source: email class.mail_msg_base.inc.php"."<br>
\r\n"
- ."<br> \r\n"
- ."called from: ".$called_from."<br> \r\n"
- ."<br> \r\n"
- ."imap_last_error: [".$error_report."]<br> \r\n"
- ."tried RH bug recovery?:
[".$this->get_isset_arg('beenthere_loginerr_tryagain_buggy_cert', $acctnum)."]
<br> \r\n"
- ."<br> \r\n"
- ."<br> \r\n"
- .lang('if there is no obvious error, check your
username and password first.')."<br> \r\n";
+ lang("There was an error trying to connect to your
mail server.<br />Please, check your username and password, or contact your
admin.")."<br /> \r\n"
+ ."<br /> \r\n"
+ ."<br /> \r\n"
+ ."source: email class.mail_msg_base.inc.php"."<br />
\r\n"
+ ."<br /> \r\n"
+ ."called from: ".$called_from."<br /> \r\n"
+ ."<br /> \r\n"
+ ."imap_last_error: [".$error_report."]<br /> \r\n"
+ ."tried RH bug recovery?:
[".$this->get_isset_arg('beenthere_loginerr_tryagain_buggy_cert', $acctnum)."]
<br /> \r\n"
+ ."<br /> \r\n"
+ ."<br /> \r\n"
+ .lang('if there is no obvious error, check your
username and password first.')."<br /> \r\n";
// HOW we were called determines HOW we display the
error
if (stristr($this->ref_SERVER['REQUEST_URI']
,'index.php?menuaction=email'))
{
@@ -2206,7 +2206,7 @@
$go_somewhere_text = lang('click here to edit
the settings for this email account.');
$widgets->prop_go_somewhere_link($go_somewhere_url, $go_somewhere_text);
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): LEAVING, called from
within the email app, so use out own error page and exit.<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): LEAVING, called from
within the email app, so use out own error page and exit.<br />'); }
// by putting anything (or TRUE) in the param
of this function, it will shutdown the script for us.
$widgets->display_error_report_page('do_exit');
// we should not get here if the error widget
exits for us
@@ -2215,9 +2215,9 @@
else
{
// we were called by another app, maybe the
home page, do not monopolize the page, but DO EXIT the script so we don't loop
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): LEAVING, we were called
by another app, the home page perhaps, so simple output the message and common
EXIT (return causes a loop).<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): LEAVING, we were called
by another app, the home page perhaps, so simple output the message and common
EXIT (return causes a loop).<br />'); }
//echo
'<center><b>'.$error_text_plain.'</b></center>';
- echo
'<center><b>'.$error_text_formatted.'</b></center>'."<br> \r\n";
+ echo
'<center><b>'.$error_text_formatted.'</b></center>'."<br /> \r\n";
$GLOBALS['phpgw']->common->phpgw_exit();
}
// we should not get here
@@ -2241,15 +2241,15 @@
*/
function loginerr_tryagain_buggy_cert($called_from='',
$error_report='', $mail_server_type='', $acctnum='')
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
ENTERING<br>'); }
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
$called_from ['.$called_from.'], $error_report: ['.$error_report.'],
$mail_server_type: ['.$mail_server_type.'], $acctnum: ['.$acctnum.']<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
ENTERING<br />'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
$called_from ['.$called_from.'], $error_report: ['.$error_report.'],
$mail_server_type: ['.$mail_server_type.'], $acctnum: ['.$acctnum.']<br />'); }
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
$acctnum = $this->get_acctnum();
}
// avoid infinite RECURSION by setting this flag, says
we've alreasy been here
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): setting
flag "beenthere_loginerr_tryagain_buggy_cert" to "beenthere" so we know we have
been here.<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): setting
flag "beenthere_loginerr_tryagain_buggy_cert" to "beenthere" so we know we have
been here.<br />'); }
$this->set_arg_value('beenthere_loginerr_tryagain_buggy_cert', 'beenthere',
$acctnum);
/*!
@capability "show_recover_msg" during
loginerr_tryagain_buggy_cert
@@ -2266,7 +2266,7 @@
// this should be templated
//echo "<br /><center><b>"
// .'You have encountered a <u>KNOWN PHP -
UWASH bug</u>, called the "<u>non-ssl no validate cert bug</u>"'
- // .' attempting to recover ...'.'<br>'."\r\n"
+ // .' attempting to recover ...'.'<br
/>'."\r\n"
// . "</b></center><br />";
echo '<small><i>'
.'Please ignore this message,
you will only see this once on login'
@@ -2282,10 +2282,10 @@
&& ($mail_server_type != 'imap'))
{
echo "<p><center><b>"
- .'detected that this is a different
situation, unable to recover'.'<br>'."\r\n"
+ .'detected that this is a different
situation, unable to recover'.'<br />'."\r\n"
.'exiting...'
. "</b></center></p>";
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING, calling $this->login_error because it will show the error msg to the
user.<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING, calling $this->login_error because it will show the error msg to the
user.<br />'); }
//$GLOBALS['phpgw']->common->phpgw_exit(False);
$this->login_error('mail_msg:
loginerr_tryagain_buggy_cert(LINE '.__LINE__.'), called_from: '.$called_from,
$acctnum);
}
@@ -2293,10 +2293,10 @@
elseif(stristr($old_mailsvr_callstr,'notls'))
{
echo "<p><center><b>"
- .'detected that there has already been an
attempting to recover that failed'.'<br>'."\r\n"
+ .'detected that there has already been an
attempting to recover that failed'.'<br />'."\r\n"
.'exiting...'
. "</b></center></p>";
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING, calling $this->login_error because it will show the error msg to the
user.<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING, calling $this->login_error because it will show the error msg to the
user.<br />'); }
//$GLOBALS['phpgw']->common->phpgw_exit(False);
$this->login_error('mail_msg:
loginerr_tryagain_buggy_cert(LINE '.__LINE__.'), called_from: '.$called_from,
$acctnum);
}
@@ -2319,10 +2319,10 @@
// we are not certain yet this will work, we
need to set this in L1 cache so that "" will use this $new_mailsvr_callstr
instead of the old one
// if "ensure_stream_and_folder" returns
NON-False then we can cache the new_mailsvr_callstr to the appsession cache
$this->set_arg_value('mailsvr_callstr',
$new_mailsvr_callstr, $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): set
"level 1 cache, class var" arg $this->set_arg_value(mailsvr_callstr,
'.htmlspecialchars($new_mailsvr_callstr).', '.$acctnum.']) <br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): set
"level 1 cache, class var" arg $this->set_arg_value(mailsvr_callstr,
'.htmlspecialchars($new_mailsvr_callstr).', '.$acctnum.']) <br />'); }
//echo "<p><center><b>"
- // .'ADJUSTED mailsvr_callstr:
'.$new_mailsvr_callstr.'<br>'."\r\n"
+ // .'ADJUSTED mailsvr_callstr:
'.$new_mailsvr_callstr.'<br />'."\r\n"
// .'now attempting recovery...'
// . "</b></center></p>";
@@ -2354,13 +2354,13 @@
//$fldball['folder'] =
$this->get_arg_value('folder', $acctnum);
//$fldball['acctnum'] = $acctnum;
// function
ensure_stream_and_folder($fldball='', $called_from='')
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): try
RECOVERY ATTEMPT: calling
$this->ensure_stream_and_folder('.htmlspecialchars(serialize($fldball)).'];
NOTE that under certain circumstances we just in fact EXITED this function
here, because we do not alsays return.<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): try
RECOVERY ATTEMPT: calling
$this->ensure_stream_and_folder('.htmlspecialchars(serialize($fldball)).'];
NOTE that under certain circumstances we just in fact EXITED this function
here, because we do not alsays return.<br />'); }
$did_recover =
$this->ensure_stream_and_folder($fldball, 'from mail_msg_base:
loginerr_tryagain_buggy_cert FOR '.$called_from);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): just
returned from call to $this->ensure_stream_and_folder, $did_recover
['.serialize($did_recover).']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): just
returned from call to $this->ensure_stream_and_folder, $did_recover
['.serialize($did_recover).']<br />'); }
if ((is_bool($did_recover)) && ($did_recover ==
False))
{
echo 'mail_msg:
loginerr_tryagain_buggy_cert: UNABLE to recover from this bug, exiting ...';
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING<br />'); }
$GLOBALS['phpgw']->common->phpgw_exit(False);
}
else
@@ -2370,16 +2370,16 @@
// SAVE DATA TO APPSESSION CACHE
// -----------
// save "mailsvr_callstr" to appsession
data store
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert: set appsession
cache $this->save_session_cache_item(mailsvr_callstr, '.$new_mailsvr_callstr.',
'.$acctnum.']) <br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert: set appsession
cache $this->save_session_cache_item(mailsvr_callstr, '.$new_mailsvr_callstr.',
'.$acctnum.']) <br />'); }
$this->save_session_cache_item('mailsvr_callstr', $new_mailsvr_callstr,
$acctnum);
// back to index page
// NOTE: by NOT calling "phpgw_exit" we
can simply fix the problem and continue...
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): LEAVING
quietly, we succeeded in fixing the RH Cert problem, by NOT calling
"phpgw_exit" we can simply fix the problem and continue.<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): LEAVING
quietly, we succeeded in fixing the RH Cert problem, by NOT calling
"phpgw_exit" we can simply fix the problem and continue.<br />'); }
return;
}
}
echo 'mail_msg_base: loginerr_tryagain_buggy_cert:
unhandled if .. then situation, returning to script';
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING, we should not get here, UNHANDLED if .. then scenario.<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING, we should not get here, UNHANDLED if .. then scenario.<br />'); }
return;
}
@@ -2402,7 +2402,7 @@
*/
function prep_folder_in($feed_folder, $acctnum='')
{
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: prep_folder_in: ENTERING , feed $feed_folder:
['.htmlspecialchars($feed_folder).'], feed (optional) $acctnum:
['.$acctnum.']<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: prep_folder_in: ENTERING , feed $feed_folder:
['.htmlspecialchars($feed_folder).'], feed (optional) $acctnum:
['.$acctnum.']<br />'); }
// ---- Ensure a Folder Variable exists, if not, set
to INBOX (typical practice) -----
if (!$feed_folder)
{
@@ -2437,7 +2437,7 @@
// particularly if the folder has spaces and is
included in the URI, then a + will be where the speces are
$feed_folder = urldecode($feed_folder);
$prepped_folder_in = $this->folder_lookup('',
$feed_folder, $acctnum);
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: prep_folder_in: LEAVING , returning
$prepped_folder_in: ['.$prepped_folder_in.'] again with htmlspecialchars():
['.htmlspecialchars($prepped_folder_in).']<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: prep_folder_in: LEAVING , returning
$prepped_folder_in: ['.$prepped_folder_in.'] again with htmlspecialchars():
['.htmlspecialchars($prepped_folder_in).']<br />'); }
return $prepped_folder_in;
}
@@ -2463,7 +2463,7 @@
//echo 'prep_folder_out: param $feed_folder
['.$feed_folder.'], :: ';
$preped_folder =
$this->ensure_one_urlencoding($feed_folder);
$preped_folder = str_replace('&', '%26',
$preped_folder);
- //echo ' $preped_folder ['.$preped_folder.']<br>';
+ //echo ' $preped_folder ['.$preped_folder.']<br />';
return $preped_folder;
}
@@ -2519,25 +2519,25 @@
if (stristr($this->skip_args_special_handlers,
'get_mailsvr_callstr'))
{
$fake_return = '{brick.earthlink.net:143}';
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: debug SKIP, $fake_return:
'.serialize($fake_return).' <br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: debug SKIP, $fake_return:
'.serialize($fake_return).' <br />'); }
return $fake_return;
}
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: ENTERING , feed $acctnum:
['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: ENTERING , feed $acctnum:
['.$acctnum.']<br />'); }
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
$acctnum = $this->get_acctnum();
}
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: after testing feed arg, using
$acctnum: ['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: after testing feed arg, using
$acctnum: ['.$acctnum.']<br />'); }
// do we have "level one cache" class var data that we
can use?
$class_cached_mailsvr_callstr =
$this->_direct_access_arg_value('mailsvr_callstr', $acctnum);
if ($class_cached_mailsvr_callstr != '')
{
// return the "level one cache" class var data
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: LEAVING, returned class var
cached data: '.serialize($class_cached_mailsvr_callstr).'<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: LEAVING, returned class var
cached data: '.serialize($class_cached_mailsvr_callstr).'<br />'); }
return $class_cached_mailsvr_callstr;
}
@@ -2546,15 +2546,15 @@
// -----------
// try to restore "mailsvr_callstr" from saved
appsession data store
$appsession_cached_mailsvr_callstr =
$this->read_session_cache_item('mailsvr_callstr', $acctnum);
- if ($this->debug_args_special_handlers > 2) {
$this->dbug->out('mail_msg: get_mailsvr_callstr:
$appsession_cached_mailsvr_callstr is
['.serialize($appsession_cached_mailsvr_callstr).']<br>'); }
+ if ($this->debug_args_special_handlers > 2) {
$this->dbug->out('mail_msg: get_mailsvr_callstr:
$appsession_cached_mailsvr_callstr is
['.serialize($appsession_cached_mailsvr_callstr).']<br />'); }
if ($appsession_cached_mailsvr_callstr)
{
// cache the result in "level one cache" class
var holder
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: recovered "mailsvr_callstr"
data from appsession <br>'); }
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: put appsession retored data
into "level 1 cache, class var" arg $this->set_arg_value(mailsvr_namespace,
'.$appsession_cached_mailsvr_callstr['mailsvr_callstr'].', '.$acctnum.'])
<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: recovered "mailsvr_callstr"
data from appsession <br />'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: put appsession retored data
into "level 1 cache, class var" arg $this->set_arg_value(mailsvr_namespace,
'.$appsession_cached_mailsvr_callstr['mailsvr_callstr'].', '.$acctnum.']) <br
/>'); }
$this->set_arg_value('mailsvr_callstr',
$appsession_cached_mailsvr_callstr, $acctnum);
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: LEAVING, returned appsession
cached data:
'.serialize($appsession_cached_mailsvr_callstr['mailsvr_callstr']).'<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: LEAVING, returned appsession
cached data:
'.serialize($appsession_cached_mailsvr_callstr['mailsvr_callstr']).'<br />'); }
return $appsession_cached_mailsvr_callstr;
}
@@ -2602,13 +2602,13 @@
elseif ($mail_server_type == 'pop3')
{
// POP3 normal connection, No SSL
- $callstr_extra = '/pop3';
+ $callstr_extra = '/pop3/notls';
$mail_port = 110;
}
elseif ($mail_server_type == 'imap')
{
// IMAP normal connection, No SSL
- $callstr_extra = '';
+ $callstr_extra = '/imap/notls';
$mail_port = 143;
}
elseif ($mail_server_type == 'nntp')
@@ -2632,17 +2632,17 @@
$mailsvr_callstr =
'{'.$mail_server.':'.$mail_port.$callstr_extra .'}';
// cache the result in "level one cache" class var
holder
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: set "level 1 cache, class var"
arg $this->set_arg_value(mailsvr_callstr,
'.htmlspecialchars($mailsvr_callstr).', '.$acctnum.']) <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: set "level 1 cache, class var"
arg $this->set_arg_value(mailsvr_callstr,
'.htmlspecialchars($mailsvr_callstr).', '.$acctnum.']) <br />'); }
$this->set_arg_value('mailsvr_callstr',
$mailsvr_callstr, $acctnum);
// -----------
// SAVE DATA TO APPSESSION CACHE
// -----------
// save "mailsvr_callstr" to appsession data store
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: set appsession cache (will
base64_encode) $this->save_session_cache_item(mailsvr_callstr,
'.$mailsvr_callstr.', '.$acctnum.']) <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: set appsession cache (will
base64_encode) $this->save_session_cache_item(mailsvr_callstr,
'.$mailsvr_callstr.', '.$acctnum.']) <br />'); }
$this->save_session_cache_item('mailsvr_callstr',
$mailsvr_callstr, $acctnum);
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: LEAVING, returning
$mailsvr_callstr: '.serialize($mailsvr_callstr).' for $acctnum
['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: LEAVING, returning
$mailsvr_callstr: '.serialize($mailsvr_callstr).' for $acctnum
['.$acctnum.']<br />'); }
return $mailsvr_callstr;
}
@@ -2661,18 +2661,18 @@
if (stristr($this->skip_args_special_handlers,
'get_mailsvr_namespace'))
{
$fake_return = '';
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: debug SKIP, $fake_return:
'.serialize($fake_return).' <br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: debug SKIP, $fake_return:
'.serialize($fake_return).' <br />'); }
return $fake_return;
}
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: ENTERING , feed $acctnum:
['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: ENTERING , feed $acctnum:
['.$acctnum.']<br />'); }
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
$acctnum = $this->get_acctnum();
}
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: after testing feed arg,
using $acctnum: ['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: after testing feed arg,
using $acctnum: ['.$acctnum.']<br />'); }
// UWash patched for Maildir style: $Maildir.Junque
?????
// Cyrus and Courier style =" INBOX"
@@ -2680,11 +2680,11 @@
// do we have cached data that we can use?
$class_cached_mailsvr_namespace =
$this->_direct_access_arg_value('mailsvr_namespace', $acctnum);
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: check for L1 class var
cached data: $this->_direct_access_arg_value(mailsvr_namespace, '.$acctnum.');
returns: '.serialize($class_cached_mailsvr_namespace).'<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: check for L1 class var
cached data: $this->_direct_access_arg_value(mailsvr_namespace, '.$acctnum.');
returns: '.serialize($class_cached_mailsvr_namespace).'<br />'); }
if ($class_cached_mailsvr_namespace != '')
{
// return the cached data
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: LEAVING, returned class var
cached data: '.serialize($class_cached_mailsvr_namespace).'<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: LEAVING, returned class var
cached data: '.serialize($class_cached_mailsvr_namespace).'<br />'); }
return $class_cached_mailsvr_namespace;
}
@@ -2696,10 +2696,10 @@
if ($appsession_cached_mailsvr_namespace)
{
// cache the result in "level one cache" class
var holder
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: put appsession retored data
into "level 1 cache, class var" arg $this->set_arg_value(mailsvr_namespace,
'.$appsession_cached_mailsvr_namespace['mailsvr_namespace'].', '.$acctnum.'])
<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: put appsession retored data
into "level 1 cache, class var" arg $this->set_arg_value(mailsvr_namespace,
'.$appsession_cached_mailsvr_namespace['mailsvr_namespace'].', '.$acctnum.'])
<br />'); }
$this->set_arg_value('mailsvr_namespace',
$appsession_cached_mailsvr_namespace, $acctnum);
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: LEAVING, returned appsession
cached data:
'.serialize($appsession_cached_mailsvr_namespace['mailsvr_namespace']).'<br>');
}
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: LEAVING, returned appsession
cached data:
'.serialize($appsession_cached_mailsvr_namespace['mailsvr_namespace']).'<br
/>'); }
return $appsession_cached_mailsvr_namespace;
}
@@ -2709,7 +2709,7 @@
// we *may* need this data later
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
$mailsvr_callstr =
$this->get_arg_value('mailsvr_callstr', $acctnum);
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: got these for later use:
$mailsvr_stream: ['.$mailsvr_stream.'] ; $mailsvr_callstr:
['.$mailsvr_callstr.']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: got these for later use:
$mailsvr_stream: ['.$mailsvr_stream.'] ; $mailsvr_callstr:
['.$mailsvr_callstr.']<br />'); }
if (($this->get_pref_value('imap_server_type',
$acctnum) == 'UW-Maildir')
|| ($this->get_pref_value('imap_server_type', $acctnum)
== 'UWash'))
@@ -2722,16 +2722,16 @@
// appropriate $HOME variable (I THINK)
...
// DO I NEED to add the "~" here too?
$name_space =
trim($this->get_pref_value('mail_folder', $acctnum));
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: user supplied UWash
namespace is $name_space ['.$name_space.'] ; needs testing!<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: user supplied UWash
namespace is $name_space ['.$name_space.'] ; needs testing!<br />'); }
$test_result =
$this->uwash_string_ok($name_space);
if (!$test_result)
{
- if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_mailsvr_namespace: user supplied UWash namespace returns $test_result
['.serialize($test_result).'] FAILS OK TEST, use "~" instead<br>'); }
+ if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_mailsvr_namespace: user supplied UWash namespace returns $test_result
['.serialize($test_result).'] FAILS OK TEST, use "~" instead<br />'); }
$name_space = '~';
}
else
{
- if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_mailsvr_namespace: user supplied UWash namespace returns $test_result
['.serialize($test_result).'] passed OK test, we use that retuen<br>'); }
+ if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_mailsvr_namespace: user supplied UWash namespace returns $test_result
['.serialize($test_result).'] passed OK test, we use that retuen<br />'); }
$name_space = $test_result;
}
}
@@ -2750,7 +2750,7 @@
// ALSO works for Courier IMAP
{
$name_space = 'INBOX';
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: Assume,GUESSING: $name_space
= INBOX <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: Assume,GUESSING: $name_space
= INBOX <br />'); }
}
// TEMP DO NOT USE THIS, MAY BE MORE TROUBLE THAN IT'S
WORTH
// JUST ASSUME INBOX, the below code is "by the book"
but may be causeing problems with window based installs
@@ -2765,8 +2765,8 @@
// however this is less useful if the IMAP
server makes available shared folders and/or usenet groups
// in addition to the users private mailboxes
// see http://www.faqs.org/rfcs/rfc2060.html
section 6.3.8 (which is not entirely clear on this)
- //if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: issuing:
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->listmailbox('.$mailsvr_stream.',
'.$mailsvr_callstr.', %)'.'<br>'); }
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: issuing:
$this->phpgw_listmailbox('.$mailsvr_callstr.', \'%\', '.$acctnum.')<br>'); }
+ //if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: issuing:
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->listmailbox('.$mailsvr_stream.',
'.$mailsvr_callstr.', %)'.'<br />'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: issuing:
$this->phpgw_listmailbox('.$mailsvr_callstr.', \'%\', '.$acctnum.')<br />'); }
//$name_space =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->listmailbox($mailsvr_stream,
$mailsvr_callstr, '%');
$name_space =
$this->phpgw_listmailbox($mailsvr_callstr, '%', $acctnum);
@@ -2790,7 +2790,7 @@
// note: do not use php function
"is_array()" because php3 does not have it
// later note: i think php3 does have
"is_array()"
$processed_name_space =
$this->ensure_no_brackets($name_space[0]);
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: ($name_space
is_array) $processed_name_space = $this->ensure_no_brackets($name_space[0])
[that arg='.$name_space[0].'] returns
'.serialize($processed_name_space).'<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: ($name_space
is_array) $processed_name_space = $this->ensure_no_brackets($name_space[0])
[that arg='.$name_space[0].'] returns '.serialize($processed_name_space).'<br
/>'); }
// put that back in name_space var
$name_space = $processed_name_space;
}
@@ -2799,7 +2799,7 @@
// if the server returns a string (not
likely) just get rid of the brackets
// note: do not use is_string() because
php3 does not have it ???
$processed_name_space =
$this->ensure_no_brackets($name_space);
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: ($name_space is
string) $processed_name_space = $this->ensure_no_brackets($name_space) [that
arg='.$name_space.'] returns '.serialize($processed_name_space).'<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: ($name_space is
string) $processed_name_space = $this->ensure_no_brackets($name_space) [that
arg='.$name_space.'] returns '.serialize($processed_name_space).'<br />'); }
// put that back in name_space var
$name_space = $processed_name_space;
}
@@ -2808,7 +2808,7 @@
// something really screwed up,
EDUCATED GUESS
// note: "INBOX" is NOT case sensitive
according to rfc2060
$name_space = 'INBOX';
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: ($name_space is NOT
string nor array) GUESSING: $name_space = '.serialize($name_space).'<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: ($name_space is NOT
string nor array) GUESSING: $name_space = '.serialize($name_space).'<br />'); }
}
}
*/
@@ -2820,21 +2820,21 @@
// see http://www.rfc-editor.org/rfc/rfc2342.txt
// however as of PHP 4.0 this is not
implemented, and some IMAP servers do not cooperate with it anyway
$name_space = 'INBOX';
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: GUESSING: $name_space =
'.serialize($name_space).'<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: GUESSING: $name_space =
'.serialize($name_space).'<br />'); }
}
// cache the result in "level one cache" class var
holder
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: set "level 1 cache, class
var" arg $this->set_arg_value(mailsvr_namespace, '.$name_space.',
'.$acctnum.']) <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: set "level 1 cache, class
var" arg $this->set_arg_value(mailsvr_namespace, '.$name_space.',
'.$acctnum.']) <br />'); }
$this->set_arg_value('mailsvr_namespace', $name_space,
$acctnum);
// -----------
// SAVE DATA TO APPSESSION CACHE
// -----------
// save "mailsvr_namespace" to appsession data store
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: set appsession cache
$this->save_session_cache_item(mailsvr_namespace, '.$name_space.',
'.$acctnum.']) <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: set appsession cache
$this->save_session_cache_item(mailsvr_namespace, '.$name_space.',
'.$acctnum.']) <br />'); }
$this->save_session_cache_item('mailsvr_namespace',
$name_space, $acctnum);
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: LEAVING, returning
$name_space: '.serialize($name_space).'<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: LEAVING, returning
$name_space: '.serialize($name_space).'<br />'); }
return $name_space;
}
@@ -2891,18 +2891,18 @@
if (stristr($this->skip_args_special_handlers,
'get_mailsvr_delimiter'))
{
$fake_return = '/';
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: debug SKIP, $fake_return:
'.serialize($fake_return).' <br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: debug SKIP, $fake_return:
'.serialize($fake_return).' <br />'); }
return $fake_return;
}
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: ENTERING , feed $acctnum:
['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: ENTERING , feed $acctnum:
['.$acctnum.']<br />'); }
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
$acctnum = $this->get_acctnum();
}
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: after testing feed arg,
using $acctnum: ['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: after testing feed arg,
using $acctnum: ['.$acctnum.']<br />'); }
// UWash style: "/"
// all other imap servers *should* be "."
@@ -2912,11 +2912,11 @@
if ($class_cached_mailsvr_delimiter != '')
{
// return the cached data
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: LEAVING, returned class var
cached data: '.serialize($class_cached_mailsvr_delimiter).'<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: LEAVING, returned class var
cached data: '.serialize($class_cached_mailsvr_delimiter).'<br />'); }
return $class_cached_mailsvr_delimiter;
}
- //if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter:
$this->get_pref_value(imap_server_type, '.$acctnum.') returns:
['.$this->get_pref_value('imap_server_type', $acctnum).'] ; api var SEP:
['.serialize(SEP).']<br>'); }
+ //if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter:
$this->get_pref_value(imap_server_type, '.$acctnum.') returns:
['.$this->get_pref_value('imap_server_type', $acctnum).'] ; api var SEP:
['.serialize(SEP).']<br />'); }
if ($this->get_pref_value('imap_server_type', $acctnum)
== 'UWash')
{
//$delimiter = '/';
@@ -2925,7 +2925,7 @@
// UWASH is a filesystem based thing, so the
delimiter is whatever the system SEP is
// unix = / and win = \ (win maybe even "\\"
because the backslash needs escaping???
// currently the filesystem seterator is
provided by phpgw api as constant "SEP"
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: imap_server_type is
UWash<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: imap_server_type is UWash<br
/>'); }
if (!SEP)
{
$delimiter = '/';
@@ -2942,14 +2942,14 @@
// this is supposed to be discoverable with the
NAMESPACE command
// see http://www.rfc-editor.org/rfc/rfc2342.txt
// however as of PHP 4.0 this is not implemented
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: imap_server_type is OTHER
than UWash<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: imap_server_type is OTHER
than UWash<br />'); }
$delimiter = '.';
}
// cache the result to "level 1 cache" class arg holder
var
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: set "level 1 cache, class
var" arg $this->set_arg_value(mailsvr_delimiter, '.$delimiter.', '.$acctnum.'])
<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: set "level 1 cache, class
var" arg $this->set_arg_value(mailsvr_delimiter, '.$delimiter.', '.$acctnum.'])
<br />'); }
$this->set_arg_value('mailsvr_delimiter', $delimiter,
$acctnum);
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: LEAVING, returning:
'.serialize($delimiter).' for $acctnum ['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: LEAVING, returning:
'.serialize($delimiter).' for $acctnum ['.$acctnum.']<br />'); }
return $delimiter;
}
@@ -3030,7 +3030,7 @@
$folder_long = $folder;
}
}
- //echo
'get_folder_long('.$folder.')='.$folder_long.'<br>';
+ //echo
'get_folder_long('.$folder.')='.$folder_long.'<br />';
return trim($folder_long);
}
@@ -3095,22 +3095,22 @@
*/
function folder_list_change_callback($acctnum='')
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'):
ENTERING, param $acctnum ['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'):
ENTERING, param $acctnum ['.$acctnum.']<br />'); }
// what acctnum is operative here, we can only get a
folder list for one account at a time (obviously)
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
$acctnum = $this->get_acctnum();
}
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'): willo
use $acctnum ['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'): willo
use $acctnum ['.$acctnum.']<br />'); }
// class dcom recorded a change in the folder list
// supposed to happen when create or delete or rename
mailbox is called
// dcom class will callback to this function to handle
cleanup of stale folder_list data
// expire cached data
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'): calling
$this->expire_session_cache_item(folder_list, '.$acctnum.') <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'): calling
$this->expire_session_cache_item(folder_list, '.$acctnum.') <br />'); }
$sucess =
$this->expire_session_cache_item('folder_list', $acctnum);
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'): LEAVING,
returning $sucess ['.$sucess.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'): LEAVING,
returning $sucess ['.$sucess.']<br />'); }
return $sucess;
}
@@ -3134,14 +3134,14 @@
*/
function get_folder_list($acctnum='', $force_refresh=False)
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: ENTERING<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: ENTERING<br />'); }
// what acctnum is operative here, we can only get a
folder list for one account at a time (obviously)
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
$acctnum = $this->get_acctnum();
}
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: for the rest of this function we
will use $acctnum: ['.$acctnum.'] <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: for the rest of this function we
will use $acctnum: ['.$acctnum.'] <br />'); }
// hardcore debug
if (stristr($this->skip_args_special_handlers,
'get_folder_list'))
{
@@ -3150,7 +3150,7 @@
$fake_return[0]['folder_long'] = 'INBOX';
$fake_return[0]['folder_short'] = 'INBOX';
$fake_return[0]['acctnum'] = $acctnum;
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, debug SKIP, $fake_return:
'.serialize($fake_return).' <br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, debug SKIP, $fake_return:
'.serialize($fake_return).' <br />'); }
return $fake_return;
}
@@ -3168,8 +3168,8 @@
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->folder_list_changed = False;
// set up for a force_refresh
$force_refresh = True;
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: class dcom report folder list
changed<br>'); }
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: make sure folder data is removed
from cache <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: class dcom report folder list
changed<br />'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: make sure folder data is removed
from cache <br />'); }
// expire appsession cache
$this->expire_session_cache_item('folder_list',
$acctnum);
}
@@ -3182,7 +3182,7 @@
{
// use the cached data
if ($this->debug_args_special_handlers > 2) {
$this->dbug->out(' * * $class_cached_folder_list DUMP:',
$class_cached_folder_list); }
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, using object cached
folder list data<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, using object cached
folder list data<br />'); }
return $class_cached_folder_list;
}
elseif (($this->get_pref_value('mail_server_type',
$acctnum) == 'pop3')
@@ -3197,7 +3197,7 @@
$my_folder_list[0]['acctnum'] = $acctnum;
// save result to "Level 1 cache" class arg
holder var
$this->set_arg_value('folder_list',
$my_folder_list, $acctnum);
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, pop3 servers only have
one folder: INBOX<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, pop3 servers only have
one folder: INBOX<br />'); }
return $my_folder_list;
}
elseif ($force_refresh == False)
@@ -3209,7 +3209,7 @@
$appsession_cached_folder_list =
$this->read_session_cache_item('folder_list', $acctnum);
if ($appsession_cached_folder_list)
{
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: got appsession cached
data<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: got appsession cached
data<br />'); }
$cached_data =
$appsession_cached_folder_list;
if ($this->debug_args_special_handlers
> 2) { $this->dbug->out('mail_msg: get_folder_list: appsession cached data
DUMP:', $cached_data); }
// we no longer need this var
@@ -3218,30 +3218,30 @@
}
else
{
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: NO appsession cached data
was available<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: NO appsession cached data
was available<br />'); }
$cached_data = False;
}
// if there's no data we'll get back a FALSE
if ($cached_data)
{
- //if
($this->debug_args_special_handlers > 1) { echo 'mail_msg: get_folder_list:
using *Prefs DB* cached folder list data<br>';}
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: using appsession cached
folder list data<br>'); }
+ //if
($this->debug_args_special_handlers > 1) { echo 'mail_msg: get_folder_list:
using *Prefs DB* cached folder list data<br />';}
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: using appsession cached
folder list data<br />'); }
if
(!isset($cached_data[0]['folder_short']))
{
// OLD cached folder list does
NOT contain "folder_short" data
// that cuts cached data in
1/2, no need to cache something this easy to deduce
// therefor... add FOLDER SHORT
element to cached_data array structure
- if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_folder_list: (L1) adding [folder_short] element to $cached_data
array<br>'); }
+ if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_folder_list: (L1) adding [folder_short] element to $cached_data array<br
/>'); }
for ($i=0;
$i<count($cached_data);$i++)
{
$my_folder_long =
$cached_data[$i]['folder_long'];
$my_folder_acctnum =
$cached_data[$i]['acctnum'];
$my_folder_short =
$this->get_folder_short($my_folder_long, $my_folder_acctnum);
- if
($this->debug_args_special_handlers > 1) { $this->dbug->out('* * mail_msg:
get_folder_list: add folder_short loop (L1) ['.$i.']: $my_folder_long
['.$my_folder_long.'] ; $my_folder_acctnum ['.$my_folder_acctnum.'] ;
$my_folder_short ['.$my_folder_short.']<br>'); }
+ if
($this->debug_args_special_handlers > 1) { $this->dbug->out('* * mail_msg:
get_folder_list: add folder_short loop (L1) ['.$i.']: $my_folder_long
['.$my_folder_long.'] ; $my_folder_acctnum ['.$my_folder_acctnum.'] ;
$my_folder_short ['.$my_folder_short.']<br />'); }
$cached_data[$i]['folder_short'] = $my_folder_short;
//$cached_data[$i]['folder_short'] =
$this->get_folder_short($cached_data[$i]['folder_long']);
- if
($this->debug_args_special_handlers > 2) { $this->dbug->out(' * *
$cached_data['.$i.'][folder_long]='.htmlspecialchars($cached_data[$i]['folder_long']).'
;
$cached_data['.$i.'][folder_short]='.htmlspecialchars($cached_data[$i]['folder_short']).'<br>');
}
+ if
($this->debug_args_special_handlers > 2) { $this->dbug->out(' * *
$cached_data['.$i.'][folder_long]='.htmlspecialchars($cached_data[$i]['folder_long']).'
;
$cached_data['.$i.'][folder_short]='.htmlspecialchars($cached_data[$i]['folder_short']).'<br
/>'); }
}
if
($this->debug_args_special_handlers > 2) { $this->dbug->out('mail_msg:
get_folder_list: $cached_data *after* adding "folder_short" data DUMP:',
$cached_data); }
// -----------
@@ -3249,18 +3249,18 @@
// -----------
// save "folder_list" (WITH
ADDED folder short data) to appsession data store
// new style folder_list is
stored FULL, has all elements
- if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_folder_list: added folder short, now resave in DB as new style, complete
folder list, set appsession cache $this->save_session_cache_item(folder_list,
$cached_data, '.$acctnum.']) <br>'); }
+ if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_folder_list: added folder short, now resave in DB as new style, complete
folder list, set appsession cache $this->save_session_cache_item(folder_list,
$cached_data, '.$acctnum.']) <br />'); }
$this->save_session_cache_item('folder_list', $cached_data, $acctnum);
}
// cache the result in "Level 1 cache"
class object var
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: put folder_list into Level
1 class var "cache" $this->set_arg_value(folder_list, $cached_data,
'.$acctnum.');<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: put folder_list into Level
1 class var "cache" $this->set_arg_value(folder_list, $cached_data,
'.$acctnum.');<br />'); }
$this->set_arg_value('folder_list',
$cached_data, $acctnum);
- if ($this->debug_args_special_handlers
> 0) { $this->dbug->out('mail_msg: get_folder_list: LEAVING, got data from
cache<br>'); }
+ if ($this->debug_args_special_handlers
> 0) { $this->dbug->out('mail_msg: get_folder_list: LEAVING, got data from
cache<br />'); }
return $cached_data;
}
else
{
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: NO cached folder list data,
fallback to get data from mailserver<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: NO cached folder list data,
fallback to get data from mailserver<br />'); }
}
}
@@ -3268,7 +3268,7 @@
// otherwise we would have return/broke out of this
function
// only IF statement above that allows code to reach
here is if we are allowed to use
// cached data, BUT none exists
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: need to get data from
mailserver<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: need to get data from
mailserver<br />'); }
// Establish Email Server Connectivity Information
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
@@ -3279,7 +3279,7 @@
// get a list of available folders from the server
if ($this->get_pref_value('imap_server_type', $acctnum)
== 'UWash')
{
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: mailserver is of type UWash<br>');
}
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: mailserver is of type UWash<br
/>'); }
/*!
@concept UWash IMAP Namespace
@discussion uwash is file system based, so it
requires a filesystem slash after the namespace.
@@ -3313,7 +3313,7 @@
}
else
{
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: mailserver is other than UWash
type<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: mailserver is other than UWash
type<br />'); }
/*!
@concept non-UWash IMAP Server Namespace
@discussion when handling handle non-UWash IMAP
servers,
@@ -3339,7 +3339,7 @@
// {some.server.com:143}INBOX.Trash
}
if ($this->debug_args_special_handlers > 2) {
$this->dbug->out('mail_msg: get_folder_list: server returned $mailboxes DUMP:',
$mailboxes); }
- //echo 'raw mailbox
list:<br>'.htmlspecialchars(serialize($mailboxes)).'<br>';
+ //echo 'raw mailbox list:<br
/>'.htmlspecialchars(serialize($mailboxes)).'<br />';
// ERROR DETECTION
if (!$mailboxes)
@@ -3354,8 +3354,8 @@
$my_folder_list[0]['acctnum'] = $acctnum;
// save result to "Level 1 cache" class arg
holder var
$this->set_arg_value('folder_list',
$my_folder_list, $acctnum);
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: error, no mailboxes returned from
server, fallback to "INBOX" as only folder, $this->set_arg_value(folder_list,
$my_folder_list) to hold that value<br>'); }
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, with error, no mailboxes
returned from server, return list with only INBOX<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: error, no mailboxes returned from
server, fallback to "INBOX" as only folder, $this->set_arg_value(folder_list,
$my_folder_list) to hold that value<br />'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, with error, no mailboxes
returned from server, return list with only INBOX<br />'); }
return $my_folder_list;
}
@@ -3376,7 +3376,7 @@
// ADD INBOX if necessary
if ($has_inbox == False)
{
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: adding INBOX to mailboxes
data<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: adding INBOX to mailboxes data<br
/>'); }
// use the same "fully qualified" folder name
format that "phpgw_listmailbox" returns, includes the {serverName:port}
$add_inbox = $mailsvr_callstr.'INBOX';
$next_available = count($mailboxes);
@@ -3420,7 +3420,7 @@
//// SAVE DATA TO APPSESSION DB CACHE (without the
[folder_short] data)
//// -----------
//// save "folder_list" (without folder short data) to
appsession data store
- //if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: set appsession cache
$this->save_session_cache_item(folder_list, $my_folder_list, '.$acctnum.'])
<br>'); }
+ //if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: set appsession cache
$this->save_session_cache_item(folder_list, $my_folder_list, '.$acctnum.']) <br
/>'); }
//$this->save_session_cache_item('folder_list',
$my_folder_list, $acctnum);
// add FOLDER SHORT element to folder_list array
structure
@@ -3431,7 +3431,7 @@
$my_folder_long =
$my_folder_list[$i]['folder_long'];
$my_folder_acctnum =
$my_folder_list[$i]['acctnum'];
$my_folder_short =
$this->get_folder_short($my_folder_long, $my_folder_acctnum);
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: add folder_short loop['.$i.']:
$my_folder_long ['.$my_folder_long.'] ; $my_folder_acctnum
['.$my_folder_acctnum.'] ; $my_folder_short ['.$my_folder_short.']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: add folder_short loop['.$i.']:
$my_folder_long ['.$my_folder_long.'] ; $my_folder_acctnum
['.$my_folder_acctnum.'] ; $my_folder_short ['.$my_folder_short.']<br />'); }
$my_folder_list[$i]['folder_short'] =
$my_folder_short;
}
@@ -3440,16 +3440,16 @@
// -----------
// save "folder_list" (WITH ADDED folder short data)
to appsession data store
// new style folder_list is stored FULL, has all
elements
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: set appsession cache
$this->save_session_cache_item(folder_list, $my_folder_list, '.$acctnum.'])
<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: set appsession cache
$this->save_session_cache_item(folder_list, $my_folder_list, '.$acctnum.']) <br
/>'); }
$this->save_session_cache_item('folder_list',
$my_folder_list, $acctnum);
// cache the result to "level 1 cache" class arg holder
var
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: set Level 1 class var "cache"
$this->set_arg_value(folder_list, $my_folder_list, '.$acctnum.') <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: set Level 1 class var "cache"
$this->set_arg_value(folder_list, $my_folder_list, '.$acctnum.') <br />'); }
$this->set_arg_value('folder_list', $my_folder_list,
$acctnum);
// finished, return the folder_list array atructure
if ($this->debug_args_special_handlers > 2) {
$this->dbug->out('mail_msg: get_folder_list: finished, $my_folder_list DUMP:',
$my_folder_list); }
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, got folder data from
server<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, got folder data from
server<br />'); }
return $my_folder_list;
}
@@ -3468,7 +3468,7 @@
*/
function folder_lookup($mailsvr_stream, $folder_needle='INBOX',
$acctnum='')
{
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: folder_lookup: ENTERING , feed $folder_needle:
['.htmlspecialchars($folder_needle).'], feed (optional) $acctnum:
['.$acctnum.']<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: folder_lookup: ENTERING , feed $folder_needle:
['.htmlspecialchars($folder_needle).'], feed (optional) $acctnum:
['.$acctnum.']<br />'); }
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
@@ -3494,22 +3494,22 @@
{
// folder_haystack is the official folder long
name returned from the server during "get_folder_list"
$folder_haystack =
$folder_list[$i]['folder_long'];
- if ($debug_folder_lookup) {
$this->dbug->out(' _ ['.$i.'] [folder_needle] '.$folder_needle.'
len='.strlen($folder_needle).' [folder_haystack] '.$folder_haystack.'
len='.strlen($folder_haystack).'<br>' ); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ ['.$i.'] [folder_needle] '.$folder_needle.'
len='.strlen($folder_needle).' [folder_haystack] '.$folder_haystack.'
len='.strlen($folder_haystack).'<br />' ); }
// first try to match the whole name, i.e.
needle is already a folder long type name
// the NAMESPACE should NOT be case sensitive
// mostly, this means "INBOX" must not be
matched case sensitively
if (stristr($folder_haystack, $folder_needle))
{
- if ($debug_folder_lookup) {
$this->dbug->out(' _ entered stristr statement<br>'); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ entered stristr statement<br />'); }
if (strlen($folder_haystack) ==
strlen($folder_needle))
{
// exact match - needle is
already a fully legit folder_long name
- if ($debug_folder_lookup) {
$this->dbug->out(' _ folder exists, exact match, already legit long name:
'.$needle_official_long.'<br>'); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ folder exists, exact match, already legit long name:
'.$needle_official_long.'<br />'); }
$needle_official_long =
$folder_haystack;
break;
}
- if ($debug_folder_lookup) {
$this->dbug->out(' _ exact match failed<br>'); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ exact match failed<br />'); }
// if the needle is smaller than the
haystack, then it is possible that the
// needle is a partial folder name that
will match a portion of the haystack
// look for pattern
[delimiter][folder_needle] in the last portion of string haystack
@@ -3521,7 +3521,7 @@
// haystack must be larger then
needle+1 (needle + a delimiter) for this to work
if (strlen($folder_haystack) >
strlen($folder_needle))
{
- if ($debug_folder_lookup) {
$this->dbug->out(' _ entered partial match logic<br>'); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ entered partial match logic<br />'); }
// at least the needle is
somewhere in the haystack
// 1) get the length of the
needle
$needle_len =
strlen($folder_needle);
@@ -3529,25 +3529,25 @@
$needle_len_negative =
($needle_len * (-1));
// go back one more char in
haystack to get the delimiter
$needle_len_negative =
$needle_len_negative - 1;
- if ($debug_folder_lookup) {
$this->dbug->out(' _ needle_len: '.$needle_len.' and needle_len_negative-1:
'.$needle_len_negative.'<br>' ); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ needle_len: '.$needle_len.' and needle_len_negative-1:
'.$needle_len_negative.'<br />' ); }
// get the last part of
haystack that is that length
$haystack_end =
substr($folder_haystack, $needle_len_negative);
// look for pattern
[delimiter][folder_needle]
// because we do NOT want to
match a partial word, folder_needle should be a whole folder name
- if ($debug_folder_lookup) {
$this->dbug->out(' _ haystack_end: '.$haystack_end.'<br>' ); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ haystack_end: '.$haystack_end.'<br />' ); }
if
((stristr('/'.$folder_needle, $haystack_end))
|| (stristr('.'.$folder_needle,
$haystack_end))
||
(stristr('\\'.$folder_needle, $haystack_end)))
{
$needle_official_long =
$folder_haystack;
- if
($debug_folder_lookup) { $this->dbug->out(' _ folder exists, lookup found
partial match, official long name: '.$needle_official_long.'<br>'); }
+ if
($debug_folder_lookup) { $this->dbug->out(' _ folder exists, lookup found
partial match, official long name: '.$needle_official_long.'<br />'); }
break;
}
- if ($debug_folder_lookup) {
$this->dbug->out(' _ partial match failed<br>'); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ partial match failed<br />'); }
}
}
}
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: folder_lookup: LEAVING, returning
$needle_official_long: ['.htmlspecialchars($needle_official_long).']<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: folder_lookup: LEAVING, returning
$needle_official_long: ['.htmlspecialchars($needle_official_long).']<br />'); }
return $needle_official_long;
}
@@ -3564,7 +3564,7 @@
// UWash is the only (?) imap server where there is any
question whether a folder is legit or not
if ($this->get_pref_value('imap_server_type') !=
'UWash')
{
- //echo 'is_imap_folder TRUE 1<br>';
+ //echo 'is_imap_folder TRUE 1<br />';
return True;
}
@@ -3576,7 +3576,7 @@
if ((stristr($folder_long, 'INBOX'))
&& (strlen($folder_long) == strlen('INBOX')))
{
- //echo 'is_imap_folder TRUE 2<br>';
+ //echo 'is_imap_folder TRUE 2<br />';
return True;
}
@@ -3587,7 +3587,7 @@
// any pattern matching "/." for UWash is NOT
an MBOX
// because the delimiter for UWash is "/" and
the immediately following "." indicates a hidden file
// not an MBOX file, at least on Linux type
system
- //echo 'is_imap_folder FALSE 3<br>';
+ //echo 'is_imap_folder FALSE 3<br />';
return False;
}
@@ -3613,12 +3613,12 @@
&& ($num_slashes >= 4))
{
// this folder name indicates we are too deeply
recursed, we don't care beyond here
- //echo 'is_imap_folder FALSE 4<br>';
+ //echo 'is_imap_folder FALSE 4<br />';
return False;
}
// if you get all the way to here then this must be a
valid folder name
- //echo 'is_imap_folder TRUE 5<br>';
+ //echo 'is_imap_folder TRUE 5<br />';
return True;
}
@@ -3773,7 +3773,7 @@
if ($loop_num == $failure)
{
// screw it and continue as
normal, user will need to reenter password
- echo 'ERROR:
decrypt_email_passwd: custom pass upgrade procedure failed to restore passwd to
useable state<br>';
+ echo 'ERROR:
decrypt_email_passwd: custom pass upgrade procedure failed to restore passwd to
useable state<br />';
$passwd = $pre_upgrade_passwd;
}
else
@@ -3813,7 +3813,7 @@
*/
function make_rfc2822_address($addy_data, $html_encode=True)
{
- //echo
'<br>'.$this->htmlspecialchars_encode(serialize($addy_data)).'<br>'.'<br>';
+ //echo '<br
/>'.$this->htmlspecialchars_encode(serialize($addy_data)).'<br />'.'<br />';
if ((!isset($addy_data->mailbox)) &&
(!$addy_data->mailbox)
&& (!isset($addy_data->host)) && (!$addy_data->host))
@@ -3870,9 +3870,9 @@
array[3]['personal'] = "joe john"
array[3]['plain'] =
"jj@example.com"
@syntax ASCII example, inline docs will not show correctly
- address@hidden,"Php Group"
<address@hidden>,address@hidden,"joe john" <address@hidden> <br>
- which will be decomposed into an array of individual email
addresses <br>
- where each numbered item will be like this this: <br>
+ address@hidden,"Php Group"
<address@hidden>,address@hidden,"joe john" <address@hidden> <br />
+ which will be decomposed into an array of individual email
addresses <br />
+ where each numbered item will be like this this: <br />
array[x]['personal']
array[x]['plain']
the above example would return this structure:
@@ -3915,7 +3915,7 @@
/*// === ATTEMPT 1 ====
// replace any comma(s) INSIDE the "personal"
part with this: "C-O-M-M-A"
- echo 'PRE replace:
'.$this->htmlspecialchars_encode($data).'<br>';
+ echo 'PRE replace:
'.$this->htmlspecialchars_encode($data).'<br />';
$comma_replacement = "C_O_M_M_A";
do
{
@@ -3924,7 +3924,7 @@
$data =
preg_replace('/("(.(?!@))*?)[,]((.(?!@))*?")/',"$1"."$comma_replacement"."$3",
$data);
}
while
(preg_match('/("(.(?!@))*?)[,]((.(?!@))*?")/',$data));
- echo 'POST replace:
'.$this->htmlspecialchars_encode($data).'<br>';
+ echo 'POST replace:
'.$this->htmlspecialchars_encode($data).'<br />';
//DEBUG
return " ";
// explode into an array of email addys
@@ -3937,19 +3937,19 @@
// " < (doublequote_space_lessThan)
// so replace that with a known temp string
- if ($debug_explode) { $this->dbug->out('[known
sep] PRE replace: '.$this->htmlspecialchars_encode($data).'<br>'.'<br>'); }
+ if ($debug_explode) { $this->dbug->out('[known
sep] PRE replace: '.$this->htmlspecialchars_encode($data).'<br />'.'<br />'); }
//$known_sep_item = "_SEP_COMPLEX_SEP_";
// introduce some randomness to make accidental
replacements less likely
$sep_rand =
$GLOBALS['phpgw']->common->randomstring(3);
$known_sep_item =
"_SEP_COMPLEX_".$sep_rand."_SEP_";
$data = str_replace('"
<',$known_sep_item,$data);
- if ($debug_explode) { $this->dbug->out('[known
sep] POST replace: '.$this->htmlspecialchars_encode($data).'<br>'.'<br>'); }
+ if ($debug_explode) { $this->dbug->out('[known
sep] POST replace: '.$this->htmlspecialchars_encode($data).'<br />'.'<br />'); }
// === Explode Prep: STEP 2 ====
// now we know more
// the area BETWEEN a " (doubleQuote) and the
$known_sep_item is the "personal" part of the addy
// replace any comma(s) in there with another
known temp string
- if ($debug_explode) { $this->dbug->out('PRE
replace: '.$this->htmlspecialchars_encode($data).'<br>'.'<br>'); }
+ if ($debug_explode) { $this->dbug->out('PRE
replace: '.$this->htmlspecialchars_encode($data).'<br />'.'<br />'); }
//$comma_replacement = "_C_O_M_M_A_";
// introduce some randomness to make accidental
replacements less likely
$comma_rand =
$GLOBALS['phpgw']->common->randomstring(3);
@@ -3961,7 +3961,7 @@
$data =
preg_replace('/("(.(?<!'.$known_sep_item.'))*?)[,](.*?'.$known_sep_item.')/',"$1"."$comma_replacement"."$3",
$data);
}
while
(preg_match('/("(.(?<!'.$known_sep_item.'))*?)[,](.*?'.$known_sep_item.')/',$data));
- if ($debug_explode) { $this->dbug->out('POST
replace: '.$this->htmlspecialchars_encode($data).'<br>'.'<br>'); }
+ if ($debug_explode) { $this->dbug->out('POST
replace: '.$this->htmlspecialchars_encode($data).'<br />'.'<br />'); }
// Regex Pattern Explanation:
//
openQuote_anythingExcept$known_sep_item_repeated0+times_NOT GREEDY
@@ -3983,7 +3983,7 @@
// === Explode Prep: STEP 3 ====
// UNDO the str_replace from STEP 1
$data = str_replace($known_sep_item, '" <',
$data);
- if ($debug_explode) { $this->dbug->out('UNDO
Step 1: '.$this->htmlspecialchars_encode($data).'<br>'.'<br>'); }
+ if ($debug_explode) { $this->dbug->out('UNDO
Step 1: '.$this->htmlspecialchars_encode($data).'<br />'.'<br />'); }
// === ACTUAL EXPLODE ====
// now the only comma(s) (if any) existing in
$data *should* be the
@@ -3991,7 +3991,7 @@
// with this as a (hopefully) KNOWN FACTOR - we
can now EXPLODE by comma
// thus: Explode into an array of email addys
$data = explode(",", $data);
- if ($debug_explode) {
$this->dbug->out('EXPLODED:
'.$this->htmlspecialchars_encode(serialize($data)).'<br>'.'<br>'); }
+ if ($debug_explode) {
$this->dbug->out('EXPLODED:
'.$this->htmlspecialchars_encode(serialize($data)).'<br />'.'<br />'); }
// === POST EXPLODE CLEANING====
// explode occasionally produces empty elements
in the resulting array, so
@@ -4010,7 +4010,7 @@
$data_clean[$next_empty] =
$data[$i];
}
}
- if ($debug_explode) { $this->dbug->out('Cleaned
Exploded Data:
'.$this->htmlspecialchars_encode(serialize($data_clean)).'<br>'.'<br>'); }
+ if ($debug_explode) { $this->dbug->out('Cleaned
Exploded Data: '.$this->htmlspecialchars_encode(serialize($data_clean)).'<br
/>'.'<br />'); }
// --- Create Compund Array Structure To Hold
Decomposed Addresses -----
@@ -4059,10 +4059,10 @@
$addy_array[$i]['plain'] =
$data_clean[$i];
}
- //echo 'addy_array['.$i.'][personal]:
'.$this->htmlspecialchars_encode($addy_array[$i]['personal']).'<br>';
- //echo 'addy_array['.$i.'][plain]:
'.$this->htmlspecialchars_encode($addy_array[$i]['plain']).'<br>';
+ //echo 'addy_array['.$i.'][personal]:
'.$this->htmlspecialchars_encode($addy_array[$i]['personal']).'<br />';
+ //echo 'addy_array['.$i.'][plain]:
'.$this->htmlspecialchars_encode($addy_array[$i]['plain']).'<br />';
}
- if ($debug_explode) { $this->dbug->out('FINAL
processed
addy_array:<br>'.$this->htmlspecialchars_encode(serialize($addy_array)).'<br>'.'<br>');
}
+ if ($debug_explode) { $this->dbug->out('FINAL
processed addy_array:<br
/>'.$this->htmlspecialchars_encode(serialize($addy_array)).'<br />'.'<br />'); }
return $addy_array;
}
}
@@ -4148,8 +4148,8 @@
{
$would_be_str =
$header_lines[$line_num] .','.$this_address;
}
- //echo 'would_be_str:
'.$this->htmlspecialchars_encode($would_be_str).'<br>';
- //echo 'strlen(would_be_str):
'.strlen($would_be_str).'<br>';
+ //echo 'would_be_str:
'.$this->htmlspecialchars_encode($would_be_str).'<br />';
+ //echo 'strlen(would_be_str):
'.strlen($would_be_str).'<br />';
if ((strlen($would_be_str) >
$rfc_max_length)
&& ($cur_len > 1))
{
@@ -4421,12 +4421,12 @@
//$debug_me = 2;
$debug_me = 0;
- if ($debug_me > 0) { $this->dbug->out('mail_msg_base:
decode_rfc_header_glob: ENTERING <br>'); }
+ if ($debug_me > 0) { $this->dbug->out('mail_msg_base:
decode_rfc_header_glob: ENTERING <br />'); }
if ($debug_me > 2) { $this->dbug->out('mail_msg_base:
decode_rfc_header_glob: ENTERING $data DUMP:', $data); }
// multiline glob needs to be an array
if (!is_array($data))
{
- if ($debug_me > 1) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: $data is NOT an array,
strlen = ['.strlen($data).'] <br>'); }
+ if ($debug_me > 1) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: $data is NOT an array,
strlen = ['.strlen($data).'] <br />'); }
$data_was_array = False;
if (stristr($data, "\r\n"))
{
@@ -4442,7 +4442,7 @@
}
else
{
- if ($debug_me > 1) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: $data is array, count
= ['.count($data).'] <br>'); }
+ if ($debug_me > 1) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: $data is array, count
= ['.count($data).'] <br />'); }
$data_was_array = True;
}
@@ -4459,7 +4459,7 @@
if ($data_was_array == True)
{
if ($debug_me > 2) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: $return_data DUMP:',
$return_data); }
- if ($debug_me > 0) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: LEAVING,
$data_was_array was ['.serialize($data_was_array).'] <br>'); }
+ if ($debug_me > 0) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: LEAVING,
$data_was_array was ['.serialize($data_was_array).'] <br />'); }
return $return_data;
}
else
@@ -4467,7 +4467,7 @@
$my_glob = '';
$my_glob = implode("\r\n", $return_data);
if ($debug_me > 2) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: $my_glob DUMP:',
$my_glob); }
- if ($debug_me > 0) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: LEAVING,
$data_was_array was ['.serialize($data_was_array).'] <br>'); }
+ if ($debug_me > 0) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: LEAVING,
$data_was_array was ['.serialize($data_was_array).'] <br />'); }
return $my_glob;
}
}
@@ -4619,11 +4619,11 @@
|| ($val >= 123))
{
$did_encode = True;
- //echo 'val needs encode: '.$val.'<br>';
+ //echo 'val needs encode: '.$val.'<br
/>';
$val = dechex($val);
// rfc2045 requires quote printable HEX
letters to be uppercase
$val = strtoupper($val);
- //echo 'val AFTER encode: '.$val.'<br>';
+ //echo 'val AFTER encode: '.$val.'<br
/>';
//$text .= '='.$val;
$new_str = $new_str .'='.$val;
}
@@ -4685,7 +4685,7 @@
for($i=0; $i<count($words); $i++)
{
- //echo 'words['.$i.'] in loop:
'.$words[$i].'<br>';
+ //echo 'words['.$i.'] in loop:
'.$words[$i].'<br />';
// my interpetation of what to encode from
RFC2045, RFC2047, and RFC2822
// all these chars seem to cause trouble, so
encode them
@@ -4705,9 +4705,9 @@
/*
// qprint this word, and add rfc2047
header special words
$len_before = strlen($words[$i]);
- echo 'words['.$i.'] needs encode:
'.$words[$i].'<br>';
+ echo 'words['.$i.'] needs encode:
'.$words[$i].'<br />';
$words[$i] = imap_8bit($words[$i]);
- echo 'words['.$i.'] AFTER encode:
'.$words[$i].'<br>';
+ echo 'words['.$i.'] AFTER encode:
'.$words[$i].'<br />';
// php may not encode everything that I
expect, so check to see if encoding happened
$len_after = strlen($words[$i]);
if ($len_before != $len_after)
@@ -4718,9 +4718,9 @@
*/
// qprint this word, and add rfc2047
header special words
- //echo 'words['.$i.'] needs encode:
'.$words[$i].'<br>';
+ //echo 'words['.$i.'] needs encode:
'.$words[$i].'<br />';
$words[$i] =
$this->encode_iso88591_word($words[$i]);
- //echo 'words['.$i.'] AFTER encode:
'.$words[$i].'<br>';
+ //echo 'words['.$i.'] AFTER encode:
'.$words[$i].'<br />';
}
}
@@ -5157,8 +5157,8 @@
/* FUTURE: detect a serialized data that had
addslashes appplied AFTER it was serialized
you can NOT unserialize that data until those
post-serialization slashes are REMOVED */
- //echo 'is_serialized initial input [' .$data .']<br>';
- //echo 'is_serialized unserialized input ['
.unserialize($data) .']<br>';
+ //echo 'is_serialized initial input [' .$data .']<br
/>';
+ //echo 'is_serialized unserialized input ['
.unserialize($data) .']<br />';
if (is_array($data))
{
@@ -5285,9 +5285,9 @@
// the diff in length between orig haystack and
haystack_new diveded by len of needle = the number of occurances of needle
$crtl_struct['substr_count'] =
($crtl_struct['haystack_orig_len'] - $crtl_struct['haystack_new_len']) /
$crtl_struct['needle_len'];
- //echo '<br>';
+ //echo '<br />';
//var_dump($crtl_struct);
- //echo '<br>';
+ //echo '<br />';
// return the finding
return $crtl_struct['substr_count'];
@@ -5423,7 +5423,7 @@
*/
function event_begin_big_move($fldball='',
$called_by='not_specified')
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_move: ('.__LINE__.') ENTERING,
called by ['.$called_by.'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_move: ('.__LINE__.') ENTERING,
called by ['.$called_by.'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br />'); }
// remember the *initial* session_cache_extreme value,
we will return that
$initial_session_cache_extreme =
$this->session_cache_extreme;
$this->set_arg_value('initial_session_cache_extreme',
0, $initial_session_cache_extreme);
@@ -5433,19 +5433,19 @@
&& ($this->session_cache_extreme == True))
{
// EXTREME MODE
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_move: ('.__LINE__.') (extreme
mode) pre-expire cached items before a big delete or move operation, so we do
not directly alter cached items for each single move or delete<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_move: ('.__LINE__.') (extreme
mode) pre-expire cached items before a big delete or move operation, so we do
not directly alter cached items for each single move or delete<br />'); }
$this->batch_expire_cached_items('mail_msg_base: event_begin_big_move: LINE
'.__LINE__);
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_move: ('.__LINE__.') (extreme
mode) now that we expired stuff, we can TURN OFF extreme caching for the rest
of this operation, this puts "folder_status_info" in L1 cache only<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_move: ('.__LINE__.') (extreme
mode) now that we expired stuff, we can TURN OFF extreme caching for the rest
of this operation, this puts "folder_status_info" in L1 cache only<br />'); }
// TURN OFF "session_cache_extreme"for the
remainder of this script run
$this->session_cache_extreme = False;
}
else
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_move('.__LINE__.'): eventhough
$this->session_cache_extreme is off, WE STILL NEED TO EXPIRE MSGBALL_LIST,
because it is cached in non-extreme mode too<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_move('.__LINE__.'): eventhough
$this->session_cache_extreme is off, WE STILL NEED TO EXPIRE MSGBALL_LIST,
because it is cached in non-extreme mode too<br />'); }
$this->batch_expire_cached_items('mail_msg_base: event_begin_big_move: LINE
'.__LINE__.' but only for msgball_list', True);
}
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_move: LEAVING, ('.__LINE__.')
exiting $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).'], returning the
$initial_session_cache_extreme
['.serialize($initial_session_cache_extreme).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_move: LEAVING, ('.__LINE__.')
exiting $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).'], returning the
$initial_session_cache_extreme
['.serialize($initial_session_cache_extreme).']<br />'); }
return $initial_session_cache_extreme;
}
@@ -5461,7 +5461,7 @@
*/
function event_begin_big_end($called_by='not_specified')
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_end: ('.__LINE__.') ENTERING,
called by ['.$called_by.'], at this moment $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_end: ('.__LINE__.') ENTERING,
called by ['.$called_by.'], at this moment $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br />'); }
// remember the *initial* session_cache_extreme value,
we will return that
$temp_session_cache_extreme =
$this->session_cache_extreme;
if (
($this->get_isset_arg('initial_session_cache_extreme', 0))
@@ -5471,13 +5471,13 @@
&& ($temp_session_cache_extreme != True))
{
// restore EXTREME MODE setting
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_end: ('.__LINE__.')
session_cache_extreme WAS True before disabling for the big move, now restoring
value to True, so caching may begin again<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_end: ('.__LINE__.')
session_cache_extreme WAS True before disabling for the big move, now restoring
value to True, so caching may begin again<br />'); }
$this->session_cache_extreme = True;
// unset these temporary flags
$this->unset_arg('initial_session_cache_extreme', 0);
$this->unset_arg('big_move_in_progress', 0);
}
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_end: LEAVING, ('.__LINE__.')
returning now current $this->session_cache_extreme
['.serialize($this->session_cache_extreme).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_end: LEAVING, ('.__LINE__.')
returning now current $this->session_cache_extreme
['.serialize($this->session_cache_extreme).']<br />'); }
return $this->session_cache_extreme;
}
@@ -5500,17 +5500,17 @@
*/
function batch_expire_cached_items($called_by='not_specified',
$only_msgball_list=False)
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
ENTERING, called by ['.$called_by.'], $only_msgball_list:
['.serialize($only_msgball_list).'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
ENTERING, called by ['.$called_by.'], $only_msgball_list:
['.serialize($only_msgball_list).'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br />'); }
for ($i=0; $i <
count($this->extra_and_default_acounts); $i++)
{
if
($this->extra_and_default_acounts[$i]['status'] == 'enabled')
{
$this_acctnum =
$this->extra_and_default_acounts[$i]['acctnum'];
$this->expire_session_cache_item('msgball_list', $this_acctnum);
- if ($this->debug_events > 1) {
$this->dbug->out(' * mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
(extreme OR non-extreme mode) for acctnum ['.$this_acctnum.'] expire whatever
msgball_list is cached for this account<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out(' * mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
(extreme OR non-extreme mode) for acctnum ['.$this_acctnum.'] expire whatever
msgball_list is cached for this account<br />'); }
if ($only_msgball_list == False)
{
- if ($this->debug_events > 1) {
$this->dbug->out(' * mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
(extreme mode) for acctnum ['.$this_acctnum.'] expire extreme cached items NOTE
this will WIPE CLEAN most all cached items, pretty extreme<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out(' * mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
(extreme mode) for acctnum ['.$this_acctnum.'] expire extreme cached items NOTE
this will WIPE CLEAN most all cached items, pretty extreme<br />'); }
$this->expire_session_cache_item('phpgw_header', $this_acctnum);
$this->expire_session_cache_item('msg_structure', $this_acctnum);
$this->expire_session_cache_item('folder_status_info', $this_acctnum);
@@ -5526,10 +5526,10 @@
&& ($only_msgball_list == False))
{
// we already expired actual DB msgball data
above, this will erase all other data, that function may save a few important
things though
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
session_db IS in use, calling the appsession eraser function
$this->so->expire_db_session_bulk_data <br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
session_db IS in use, calling the appsession eraser function
$this->so->expire_db_session_bulk_data <br />'); }
$this->so->expire_db_session_bulk_data($called_by='batch_expire_cached_items
LINE '.__LINE__);
}
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
LEAVING, called by ['.$called_by.'], $only_msgball_list:
['.serialize($only_msgball_list).'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
LEAVING, called by ['.$called_by.'], $only_msgball_list:
['.serialize($only_msgball_list).'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br />'); }
}
@@ -5548,7 +5548,7 @@
*/
function event_msg_seen($msgball='', $called_by='not_specified')
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): ENTERING, called
by ['.$called_by.'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): ENTERING, called
by ['.$called_by.'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br />'); }
// CACHE NOTE: FLAGS: if this message we are about to
read has flags saying it is UNREAD
// (a) $this->session_cache_extreme == False - expire
that "phpgw_header" item
@@ -5558,24 +5558,24 @@
&& ($this->session_cache_extreme == False))
{
// NON-EXTREME MODE
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (non-extreme
mode) session_cache_extreme is ['.serialize($this->session_cache_extreme).']
(false) means "phpgw_header" is NOT cached and we DO NOTHING here.<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (non-extreme
mode) session_cache_extreme is ['.serialize($this->session_cache_extreme).']
(false) means "phpgw_header" is NOT cached and we DO NOTHING here.<br />'); }
// DO NOTHING, this data is not cached in
non-extreme mode
$did_expire = False;
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (non-extreme
mode) LEAVING, $did_expire is ['.serialize($did_expire).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (non-extreme
mode) LEAVING, $did_expire is ['.serialize($did_expire).']<br />'); }
return $did_expire;
}
elseif (($this->session_cache_enabled == True)
&& ($this->session_cache_extreme == True))
{
// EXTREME MODE
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
$this->session_cache_extreme is ['.serialize($this->session_cache_extreme).']
means we should directly alter a stale "phpgw_header" item and resave to cache
<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
$this->session_cache_extreme is ['.serialize($this->session_cache_extreme).']
means we should directly alter a stale "phpgw_header" item and resave to cache
<br />'); }
// we only care about doing this is caching is
enabled
// this should already be cached, if not, it
will be after this call
// this works OK for both php4 sessions AND
sessions_db
$msg_headers = $this->phpgw_header($msgball);
if ($this->debug_events > 2) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): SEEN-UNSEEN
"phpgw_header" examination for $msg_headers DUMP:', $msg_headers); }
- //if ($this->debug_events > 2) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
SEEN-UNSEEN "phpgw_header" examination for $msg_headers <br> *
'.serialize($msg_headers).'<br>'); }
+ //if ($this->debug_events > 2) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
SEEN-UNSEEN "phpgw_header" examination for $msg_headers <br /> *
'.serialize($msg_headers).'<br />'); }
$did_alter = False;
// SEEN OR UNSEEN/NEW test
if (($msg_headers->Unseen == 'U') ||
($msg_headers->Recent == 'N'))
@@ -5590,22 +5590,22 @@
{
$msg_headers->Recent = ' ';
}
- if ($this->debug_events > 2) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
SEEN-UNSEEN "phpgw_header" needed to be cleared, altered $msg_headers <br> *
'.serialize($msg_headers).'<br>'); }
+ if ($this->debug_events > 2) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
SEEN-UNSEEN "phpgw_header" needed to be cleared, altered $msg_headers <br /> *
'.serialize($msg_headers).'<br />'); }
// this is the way we pass phpgw_header
data to the caching function
$meta_data = array();
$meta_data['msgball'] = array();
$meta_data['msgball'] = $msgball;
$meta_data['phpgw_header'] =
$msg_headers;
- if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
cached SEEN-UNSEEN "phpgw_header" flags cleared and saved back to cache, for
$msgball ['.serialize($msgball).']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
cached SEEN-UNSEEN "phpgw_header" flags cleared and saved back to cache, for
$msgball ['.serialize($msgball).']<br />'); }
// this works OK for both php4 sessions
AND sessions_db
$this->save_session_cache_item('phpgw_header', $meta_data,
$meta_data['msgball']['acctnum']);
$did_alter = True;
// FUTURE: PART TWO: ALTER FOLDER
STATUS INFO, REDUCE UNSEEN COUNT BY ONE
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
(step 2) code will adjust folder_status_info to REDUCE UNSEEN count by 1, and
resave that to cache <br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
(step 2) code will adjust folder_status_info to REDUCE UNSEEN count by 1, and
resave that to cache <br />'); }
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_seen('.__LINE__.'): (extreme mode) (step
2) grabbing folder_status_info DIRECTLY from appsession, <br> * can not call
"read_session_cache_item" because when moving multiple mails, we do not
"expunge" until the last one, so validity check will fail because we are
*ahead* of the mail server in "freshness"<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_seen('.__LINE__.'): (extreme mode) (step
2) grabbing folder_status_info DIRECTLY from appsession, <br /> * can not call
"read_session_cache_item" because when moving multiple mails, we do not
"expunge" until the last one, so validity check will fail because we are
*ahead* of the mail server in "freshness"<br />'); }
$acctnum = $msgball['acctnum'];
$extra_keys = $msgball['folder'];
$data_name = 'folder_status_info';
@@ -5620,7 +5620,7 @@
|| ($this->use_private_table == True))
{
$my_location =
(string)$acctnum.';'.$data_name.';'.$extra_keys;
- if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to read data from phpgw_app_sessions table,
$my_location ['.$my_location.']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to read data from phpgw_app_sessions table,
$my_location ['.$my_location.']<br />'); }
if ($this->use_private_table ==
True)
{
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$extra_keys]
@@ -5642,7 +5642,7 @@
if (!$folder_status_info)
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_seen('.__LINE__.'): (extreme mode) (step
2) no cached "folder_status_info" exists<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_seen('.__LINE__.'): (extreme mode) (step
2) no cached "folder_status_info" exists<br />'); }
}
else
{
@@ -5657,7 +5657,7 @@
// save altered data back into
the cache
if ($this->debug_events > 2) {
$this->dbug->out('mail_msg: event_msg_seen('.__LINE__.'): (extreme mode) (step
2) save ADJUSTED "folder_status_info" DUMP:', $folder_status_info); }
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_seen('.__LINE__.'): (extreme mode) (step
2) save ADJUSTED "folder_status_info" back to cache with
"save_session_cache_item", note the timestamp not changed<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_seen('.__LINE__.'): (extreme mode) (step
2) save ADJUSTED "folder_status_info" back to cache with
"save_session_cache_item", note the timestamp not changed<br />'); }
// thid call is OK, it will not
change the data, it just puts it in cache, no need for direct APPSESSION call
//$this->save_session_cache_item('folder_status_info', $folder_status_info,
$acctnum, $extra_keys);
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$extra_keys]
= $folder_status_info;
@@ -5666,7 +5666,7 @@
|| ($this->use_private_table ==
True))
{
$my_location =
(string)$acctnum.';'.$data_name.';'.$extra_keys;
- if ($this->debug_events
> 1) { $this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme
mode) sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].']
SO we have this additional step to save data to phpgw_app_sessions table,
$my_location ['.$my_location.']<br>'); }
+ if ($this->debug_events
> 1) { $this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme
mode) sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].']
SO we have this additional step to save data to phpgw_app_sessions table,
$my_location ['.$my_location.']<br />'); }
if
($this->use_private_table == True)
{
$this->so->so_set_data($my_location,
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$extra_keys]);
@@ -5679,11 +5679,11 @@
$did_alter = True;
}
}
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
LEAVING, $did_alter is ['.serialize($did_alter).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
LEAVING, $did_alter is ['.serialize($did_alter).']<br />'); }
return $did_alter;
}
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen: LEAVING, unhaandled situation,
or caching is turned off<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen: LEAVING, unhaandled situation,
or caching is turned off<br />'); }
return False;
}
@@ -5700,11 +5700,11 @@
*/
function event_msg_move_or_delete($msgball='',
$called_by='not_specified', $to_fldball='')
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') ENTERING,
called by ['.$called_by.']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') ENTERING,
called by ['.$called_by.']<br />'); }
if (($this->session_cache_enabled == False)
&& ($this->session_cache_extreme == False))
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
BOTH session_cache_enabled AND session_cache_extreme are FALSE, we have nothing
to do here, returning False<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
BOTH session_cache_enabled AND session_cache_extreme are FALSE, we have nothing
to do here, returning False<br />'); }
return False;
}
@@ -5712,9 +5712,9 @@
|| (!$msgball)
|| (is_array($msgball) == False) )
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') FALLBACK
BATCH EXPIRE because param $msgball ['.serialize($msgball).'] is not set or not
an array, we do not know what account nor folder we need to operate on, but we
still need to clean cache so it matches reality after the move or delete<br>');
}
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') FALLBACK
BATCH EXPIRE because param $msgball ['.serialize($msgball).'] is not set or not
an array, we do not know what account nor folder we need to operate on, but we
still need to clean cache so it matches reality after the move or delete<br
/>'); }
$this->batch_expire_cached_items('mail_msg:
event_msg_move_or_delete: ('.__LINE__.') (because we got erronious msgball
data) ');
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
returning True because we did expire stuff<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
returning True because we did expire stuff<br />'); }
return True;
}
$did_alter_or_expire = False;
@@ -5728,18 +5728,18 @@
*/
$clean_folder =
$this->prep_folder_in($msgball['folder']);
$urlencoded_folder =
$this->prep_folder_out($clean_folder);
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
$clean_folder ['.$clean_folder.'], $urlencoded_folder
['.$urlencoded_folder.']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
$clean_folder ['.$clean_folder.'], $urlencoded_folder
['.$urlencoded_folder.']<br />'); }
$msgball['folder'] = $urlencoded_folder;
$acctnum = $msgball['acctnum'];
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (pre step
1) $this->read_session_cache_item("msgball_list", $acctnum); to see if we have
a session cached folderlist (is that the right function to call?)<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (pre step
1) $this->read_session_cache_item("msgball_list", $acctnum); to see if we have
a session cached folderlist (is that the right function to call?)<br />'); }
// so we have data in the cache?
$data_name = 'msgball_list';
// currently we DO NOT use the $extra_keys param for
msgball_list data
// UPDATE YES NOW WE USE FOLDER NAME IN THE DATA KEYS
FOR MSGBALL_LIST
$ex_folder = $urlencoded_folder;
// get session data
- //if (($this->debug_events > 1) ||
($this->debug_session_caching > 1)) { echo 'mail_msg:
event_msg_move_or_delete('.__LINE__.'): DIRECT CALL to get appsession data for
$location ['.$location.'], $app ['.$app.']<br>'; }
+ //if (($this->debug_events > 1) ||
($this->debug_session_caching > 1)) { echo 'mail_msg:
event_msg_move_or_delete('.__LINE__.'): DIRECT CALL to get appsession data for
$location ['.$location.'], $app ['.$app.']<br />'; }
//$cached_msgball_data =
$GLOBALS['phpgw']->session->appsession($location,$app);
//$cached_msgball_data =
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name];
@@ -5764,8 +5764,8 @@
//$my_location =
(string)$acctnum.';msgball_list';
// NOW WE USE FOLDER TOO as a data key
for msgball_list
$my_location =
(string)$acctnum.';msgball_list;'.$ex_folder;
- if (($this->debug_events > 1) ||
($this->debug_session_caching > 1)) { echo 'mail_msg:
event_msg_move_or_delete('.__LINE__.'): DIRECT CALL to get appsession data for
$location ['.$location.'], $app ['.$app.']<br>'; }
- if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to read data from a database table, $my_location
['.$my_location.']<br>'); }
+ if (($this->debug_events > 1) ||
($this->debug_session_caching > 1)) { echo 'mail_msg:
event_msg_move_or_delete('.__LINE__.'): DIRECT CALL to get appsession data for
$location ['.$location.'], $app ['.$app.']<br />'; }
+ if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to read data from a database table, $my_location
['.$my_location.']<br />'); }
if ($this->use_private_table == True)
{
//$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum]['msgball_list'][$ex_folder]
@@ -5790,23 +5790,23 @@
if ((!$cached_msgball_data)
&& ($this->session_cache_extreme == False))
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
because NOTHING TO DO, IN NON-EXTREME MODE, and we have NO CACHED MSGBALL_LIST,
there is no action we need to take, return False<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
because NOTHING TO DO, IN NON-EXTREME MODE, and we have NO CACHED MSGBALL_LIST,
there is no action we need to take, return False<br />'); }
return False;
}
elseif ((!$cached_msgball_data)
&& ($this->session_cache_extreme == True))
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
because NOTHING TO DO, we are in EXTREME-MODE, BUT we have NO CACHED
MSGBALL_LIST, so skip down to the other stuff we do in extreme mode here<br>');
}
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
because NOTHING TO DO, we are in EXTREME-MODE, BUT we have NO CACHED
MSGBALL_LIST, so skip down to the other stuff we do in extreme mode here<br
/>'); }
}
elseif (($this->session_cache_extreme == False)
&& ($cached_msgball_data))
{
// NON-EXTREME MODE but session cache is on, so
expire msgball_list for this folder
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) session_cache_extreme is
['.serialize($this->session_cache_extreme).'] (false) means "msg_structure" and
"phpgw_header" is NOT cached BUT msgball_list IS cached in non-extreme mode, so
...<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) session_cache_extreme is
['.serialize($this->session_cache_extreme).'] (false) means "msg_structure" and
"phpgw_header" is NOT cached BUT msgball_list IS cached in non-extreme mode, so
...<br />'); }
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) session_cache_extreme is
['.serialize($this->session_cache_extreme).'] means we should simply expire the
entire "msgball_list" (and maybe the "folder_status_info" too? no
"folder_status_info" is not even cached in non extreme mode<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) session_cache_extreme is
['.serialize($this->session_cache_extreme).'] means we should simply expire the
entire "msgball_list" (and maybe the "folder_status_info" too? no
"folder_status_info" is not even cached in non extreme mode<br />'); }
// expire entire msgball_list and the
folder_status_info
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) calling $this->expire_session_cache_item("msgball_list",
'.$msgball['acctnum'].')<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) calling $this->expire_session_cache_item("msgball_list",
'.$msgball['acctnum'].')<br />'); }
// FUTURE: if each account ever saves
msgball_list for individual folders instead of just one folder per account,
then add extra_keys to this command
$this->expire_session_cache_item('msgball_list', $msgball['acctnum'],
$ex_folder);
@@ -5814,14 +5814,14 @@
// damn why are we doing this in non-extreme
mode?
////$specific_key =
(string)$msgball['msgnum'].'_'.$msgball['folder'];
//$specific_key =
$msgball['folder'].'_'.(string)$msgball['msgnum'];
- //if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) extreme or not, "msg_structure" and "phpgw_header" needs
expired this specific message leaving this folder, $specific_key
['.$specific_key.'] (but why would that data exist in non-extreme mode?)<br>');
}
+ //if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) extreme or not, "msg_structure" and "phpgw_header" needs
expired this specific message leaving this folder, $specific_key
['.$specific_key.'] (but why would that data exist in non-extreme mode?)<br
/>'); }
//$this->expire_session_cache_item('msg_structure', $msgball['acctnum'],
$specific_key);
//$this->expire_session_cache_item('phpgw_header', $msgball['acctnum'],
$specific_key);
// folder_status_info in "non-extreme" mode is
not saved to appsession, so it does not need expiring
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) in non-extreme mode we do NOT alter the
"folder_status_info", in fact "folder_status_info" is not even appsession
cached in non-extreme mode <br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) in non-extreme mode we do NOT alter the
"folder_status_info", in fact "folder_status_info" is not even appsession
cached in non-extreme mode <br />'); }
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) LEAVING, expiring entire msgball list<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) LEAVING, expiring entire msgball list<br />'); }
return True;
}
// IF EXTREME MODE IS OFF, WE SIMPLY EXPIRE THE WHOLE
MSGBALL_LIST
@@ -5833,7 +5833,7 @@
{
// EXTREME MODE
// directloy manipulate existing cached items
to make them "fresh" and resave to cache
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) pop out a single msgball from the msgball_list and resave to
cache<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) pop out a single msgball from the msgball_list and resave to
cache<br />'); }
if ($this->debug_events > 2) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) search msgball_list looking for this $msgball DUMP:', $msgball);
}
$did_alter = False;
// STEP ONE:
@@ -5862,7 +5862,7 @@
break;
}
}
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) searched for msgball from the msgball_list, $found_msgball_idx
['.serialize($found_msgball_idx).'] <br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) searched for msgball from the msgball_list, $found_msgball_idx
['.serialize($found_msgball_idx).'] <br />'); }
*/
// get the array index if the msgball we want
to delete
if ((!isset($msgball['uri']))
@@ -5875,7 +5875,7 @@
}
// get the idx of the msgball if it is in the
msgball_list
$found_msgball_idx =
array_search($msgball['uri'],$cached_msgball_data['msgball_list']);
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) searched for msgball from the msgball_list, $found_msgball_idx
['.serialize($found_msgball_idx).'] <br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) searched for msgball from the msgball_list, $found_msgball_idx
['.serialize($found_msgball_idx).'] <br />'); }
// if we have an idx, we can delete it
//if ((string)$found_msgball_idx !=
$this->not_set)
@@ -5885,18 +5885,18 @@
}
else
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) searched SUCCESS, $found_msgball_idx
['.serialize($found_msgball_idx).'] , now doing an ARRAY_SPLICE<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) searched SUCCESS, $found_msgball_idx
['.serialize($found_msgball_idx).'] , now doing an ARRAY_SPLICE<br />'); }
array_splice($cached_msgball_data['msgball_list'], $found_msgball_idx, 1);
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) now msgball_list has 1 less item, update msgball_list "vality"
data to match this deletion,
$cached_msgball_data[validity][folder_status_info][number_all] before
'.serialize($cached_msgball_data['validity']['folder_status_info']['number_all']).'<br>');
}
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) now msgball_list has 1 less item, update msgball_list "vality"
data to match this deletion,
$cached_msgball_data[validity][folder_status_info][number_all] before
'.serialize($cached_msgball_data['validity']['folder_status_info']['number_all']).'<br
/>'); }
$old_count =
(int)$cached_msgball_data['validity']['folder_status_info']['number_all'];
$new_count = ($old_count - 1);
$cached_msgball_data['validity']['folder_status_info']['number_all'] =
$new_count;
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) $cached_msgball_data[validity][folder_status_info][number_all]
AFTER reduction
'.serialize($cached_msgball_data['validity']['folder_status_info']['number_all']).'<br>');
}
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) $cached_msgball_data[validity][folder_status_info][number_all]
AFTER reduction
'.serialize($cached_msgball_data['validity']['folder_status_info']['number_all']).'<br
/>'); }
if (($this->debug_events > 2) &&
($this->debug_allow_magball_list_dumps)) { $this->dbug->out('mail_msg:
event_msg_move_or_delete('.__LINE__.'): (extreme mode) (step 1) array_splice of
$cached_msgball_data[msgball_list] results in this $cached_msgball_data DUMP:',
$cached_msgball_data); }
// save altered data back into the cache
// NOT needed if using a REFERENCE and
only using regular appsession (i.e. NOT the anglemail table)
- //if (($this->debug_session_caching >
1) || ($this->debug_events > 1)) { $this->dbug->out('mail_msg:
event_msg_move_or_delete: ('.__LINE__.') saving altered msgball_list directly
to appsession, location: ['.$location.'] $app ['.$app.']<br>'); }
+ //if (($this->debug_session_caching >
1) || ($this->debug_events > 1)) { $this->dbug->out('mail_msg:
event_msg_move_or_delete: ('.__LINE__.') saving altered msgball_list directly
to appsession, location: ['.$location.'] $app ['.$app.']<br />'); }
// COMMENT IF USING REF, UNCOMMENT IF
NOT USING REFERENCES
//$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum]['msgball_list']
= $cached_msgball_data;
@@ -5907,7 +5907,7 @@
//$my_location =
(string)$acctnum.';msgball_list';
// NOW WE USE FOLDER TOO as a
data key for msgball_list
$my_location =
(string)$acctnum.';msgball_list;'.$ex_folder;
- if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to save data to a database table, $my_location
['.$my_location.'], if using anglemail table this step is always
necessary<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to save data to a database table, $my_location
['.$my_location.'], if using anglemail table this step is always necessary<br
/>'); }
if ($this->use_private_table ==
True)
{
//$this->so->so_set_data($my_location,
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum]['msgball_list']);
@@ -5931,7 +5931,7 @@
{
// PART TWO, alter folder status info.
// reduct TOTAL by one, reduce UNDEEN by one if
moving an UNSEEN mail
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) (step 2)
alter and resave the "folder_status_info" appsession cache<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) (step 2)
alter and resave the "folder_status_info" appsession cache<br />'); }
// this grabs from MAILSERVER if required, do
we really want this?
//$msg_headers =
$GLOBALS['phpgw']->msg->phpgw_header($msgball);
@@ -5940,30 +5940,30 @@
// BUT if this requires is to grab these
headers, WE DO NOT GAIN ANY SPEED advantage,
// ONLY do this is the $msg_headers are ALREADY
in cache
// this call is OK because it only returns data
if it exists, false if not, $extra_keys is FOLDERNAME_MSGNUM
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) check if mail leaving folder was UNSEEN, possible only IF "phpgw_header"
is cached, else we loose speed to obtain ot from mailserver<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) check if mail leaving folder was UNSEEN, possible only IF "phpgw_header"
is cached, else we loose speed to obtain ot from mailserver<br />'); }
//$extra_keys =
$msgball['folder'].'_'.(string)$msgball['msgnum'];
//$msg_headers =
$this->read_session_cache_item('phpgw_header', $msgball['acctnum'],
$extra_keys);
$msg_headers =
$this->read_session_cache_item('phpgw_header', $msgball['acctnum'],
$msgball['folder'], $msgball['msgnum']);
if (!$msg_headers)
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) NO $msg_headers data was cached, THIS IS NOT ACCURATE but just assume
mail leaving folder was NOT recent, NOT unseen, we do not want to contact
mailserver that is slow <br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) NO $msg_headers data was cached, THIS IS NOT ACCURATE but just assume
mail leaving folder was NOT recent, NOT unseen, we do not want to contact
mailserver that is slow <br />'); }
$reduce_unseen = False;
}
// SEEN OR UNSEEN/NEW test
elseif (($msg_headers->Unseen == 'U') ||
($msg_headers->Recent == 'N'))
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) msg_headers indicate mail leaving folder was UNSEEN <br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) msg_headers indicate mail leaving folder was UNSEEN <br />'); }
$reduce_unseen = True;
}
else
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) msg_headers indicate mail leaving folder was NOT recent, NOT unseen
<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) msg_headers indicate mail leaving folder was NOT recent, NOT unseen <br
/>'); }
$reduce_unseen = False;
}
//$did_alter = False;
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) (step 2) grabbing folder_status_info DIRECTLY from appsession, <br> * can
not call "read_session_cache_item" because when moving multiple mails, we do
not "expunge" until the last one, so validity check will fail because we are
*ahead* of the mail server in "freshness"<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) (step 2) grabbing folder_status_info DIRECTLY from appsession, <br /> *
can not call "read_session_cache_item" because when moving multiple mails, we
do not "expunge" until the last one, so validity check will fail because we are
*ahead* of the mail server in "freshness"<br />'); }
$acctnum = $msgball['acctnum'];
$ex_folder = $msgball['folder'];
$ex_msgnum = $msgball['msgnum'];
@@ -5976,7 +5976,7 @@
|| ($this->use_private_table == True))
{
$my_location =
(string)$acctnum.';folder_status_info;'.$ex_folder;
- if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to read data from phpgw_app_sessions table, $my_location
['.$my_location.']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to read data from phpgw_app_sessions table, $my_location
['.$my_location.']<br />'); }
if ($this->use_private_table == True)
{
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum]['folder_status_info'][$ex_folder]
@@ -5997,13 +5997,13 @@
if (!$folder_status_info)
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) (step 2)
no cached "folder_status_info" exists<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) (step 2)
no cached "folder_status_info" exists<br />'); }
}
else
{
if ($this->debug_events > 2) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) (step 2)
unaltered cached msgball_list $meta_data DUMP:', $meta_data); }
// reducr NUMBER ALL - obviously if
mail is leaving a folder, number_all must be reduced
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) reducing
"folder_status_info" number_all count<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) reducing
"folder_status_info" number_all count<br />'); }
$prev_total_count =
$folder_status_info['number_all'];
$adjusted_total_count =
($prev_total_count - 1);
$folder_status_info['number_all'] =
$adjusted_total_count;
@@ -6011,7 +6011,7 @@
// reduce UNSEEN if necessary
if ($reduce_unseen == True)
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) reducing
"folder_status_info" UNSEEN count<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) reducing
"folder_status_info" UNSEEN count<br />'); }
$prev_new_count =
$folder_status_info['number_new'];
$adjusted_new_count =
($prev_new_count - 1);
$folder_status_info['number_new'] = $adjusted_new_count;
@@ -6023,7 +6023,7 @@
// save altered data back into the cache
if ($this->debug_events > 2) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) (step 2)
ADJUSTED $folder_status_info DUMP:', $folder_status_info); }
// the $location we used above is still
usable
- if (($this->debug_session_caching > 1)
|| ($this->debug_events > 1)) { $this->dbug->out('mail_msg:
event_msg_move_or_delete: saving altered folder_status_info **directly** to
appsession, $location: ['.$location.'] $app['.$app.']<br>'); }
+ if (($this->debug_session_caching > 1)
|| ($this->debug_events > 1)) { $this->dbug->out('mail_msg:
event_msg_move_or_delete: saving altered folder_status_info **directly** to
appsession, $location: ['.$location.'] $app['.$app.']<br />'); }
//$GLOBALS['phpgw']->session->appsession($location,$app,$folder_status_info);
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum]['folder_status_info'][$ex_folder]
= $folder_status_info;
// for DB sessions_db ONLY
@@ -6031,7 +6031,7 @@
|| ($this->use_private_table == True))
{
$my_location =
(string)$acctnum.';folder_status_info;'.$ex_folder;
- if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to save data to phpgw_app_sessions table, $my_location
['.$my_location.']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to save data to phpgw_app_sessions table, $my_location
['.$my_location.']<br />'); }
if ($this->use_private_table ==
True)
{
$this->so->so_set_data($my_location,
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum]['folder_status_info'][$ex_folder]);
@@ -6048,7 +6048,7 @@
// ANYTIME a message is moved out of a folder,
we need to remove any cached "msg_structure" and "phpgw_header" data
$ex_folder = $msgball['folder'];
$ex_msgnum = $msgball['msgnum'];
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3a)
(extreme mode) extreme or not, "msg_structure" and "phpgw_header" needs expired
this specific message leaving this folder, $extra_keys ['.$extra_keys.']<br>');
}
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3a)
(extreme mode) extreme or not, "msg_structure" and "phpgw_header" needs expired
this specific message leaving this folder, $extra_keys ['.$extra_keys.']<br
/>'); }
// we got this above, so since we have it, we
test if it existed before we try to expire it
if ($msg_headers)
{
@@ -6058,8 +6058,8 @@
$this->expire_session_cache_item('msg_structure', $msgball['acctnum'],
$ex_folder, $ex_msgnum);
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) IF a target folder is provided and is a valid folder name,
EXPIRE the "folder_status_info" for that TARGET folder, $to_fldball
['.serialize($to_fldball).']<br>'); }
- //if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (step 3) (extreme mode)
<b>DISABLED, problem expiring current status info</b> "folder_status_info" for
the TARGET folder (if known) needs expired, I will not go to the brain-damaging
extent of adjusting Target folder stats, $to_fldball
['.serialize($to_fldball).']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) IF a target folder is provided and is a valid folder name,
EXPIRE the "folder_status_info" for that TARGET folder, $to_fldball
['.serialize($to_fldball).']<br />'); }
+ //if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (step 3) (extreme mode)
<b>DISABLED, problem expiring current status info</b> "folder_status_info" for
the TARGET folder (if known) needs expired, I will not go to the brain-damaging
extent of adjusting Target folder stats, $to_fldball
['.serialize($to_fldball).']<br />'); }
if ((isset($to_fldball['folder']))
&& (isset($to_fldball['acctnum']))
&& ($to_fldball['folder'] !=
$this->del_pseudo_folder))
@@ -6068,29 +6068,29 @@
$urlencoded_target =
$this->prep_folder_out($target_clean);
// make sure that $to_fldball['folder']
is in PREPPED_OUT encoded
$to_fldball['folder'] =
$urlencoded_target;
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (step 3b)
(extreme mode) prepped $target_clean ['.$target_clean.'], $urlencoded_target
['.$urlencoded_target.']; $to_fldball ['.serialize($to_fldball).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (step 3b)
(extreme mode) prepped $target_clean ['.$target_clean.'], $urlencoded_target
['.$urlencoded_target.']; $to_fldball ['.serialize($to_fldball).']<br />'); }
if ((isset($target_clean))
|| (trim($target_clean) != ''))
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) <b>expiring current status info</b> "folder_status_info" for the
TARGET folder (was provided and it exists) needs expired, I will not go to the
brain-damaging extent of adjusting Target folder stats, $to_fldball
['.serialize($to_fldball).']<br>'); }
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (step 3b)
(extreme mode) TARGET folder data was provided, MUST expire target folders
"folder_status_info", $to_fldball[acctnum] is ['.$acctnum.'], $ex_folder is
urlencoded target folder name ['.$urlencoded_target.']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) <b>expiring current status info</b> "folder_status_info" for the
TARGET folder (was provided and it exists) needs expired, I will not go to the
brain-damaging extent of adjusting Target folder stats, $to_fldball
['.serialize($to_fldball).']<br />'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (step 3b)
(extreme mode) TARGET folder data was provided, MUST expire target folders
"folder_status_info", $to_fldball[acctnum] is ['.$acctnum.'], $ex_folder is
urlencoded target folder name ['.$urlencoded_target.']<br />'); }
$this->expire_session_cache_item('folder_status_info', $to_fldball['acctnum'],
$urlencoded_target);
}
else
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) can not do this step3b because TARGET FOLDER data was provided
BUT empty $target_clean ['.$target_clean.'] indicates we could not verify it is
a known valid folder, $to_fldball ['.serialize($to_fldball).']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) can not do this step3b because TARGET FOLDER data was provided
BUT empty $target_clean ['.$target_clean.'] indicates we could not verify it is
a known valid folder, $to_fldball ['.serialize($to_fldball).']<br />'); }
}
}
else
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) can not do this step3 because TARGET FOLDER data was NOT
provided OR the folder is $this->del_pseudo_folder:
['.$this->del_pseudo_folder.'], note data for $to_fldball was
['.serialize($to_fldball).']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) can not do this step3 because TARGET FOLDER data was NOT
provided OR the folder is $this->del_pseudo_folder:
['.$this->del_pseudo_folder.'], note data for $to_fldball was
['.serialize($to_fldball).']<br />'); }
}
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) LEAVING, $did_alter ['.serialize($did_alter).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) LEAVING, $did_alter ['.serialize($did_alter).']<br />'); }
return $did_alter;
}
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): LEAVING,
unhandled situation or caching not enabled<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): LEAVING,
unhandled situation or caching not enabled<br />'); }
return False;
}
@@ -6102,8 +6102,8 @@
*/
function event_msg_append($target_fldball='',
$called_by='not_specified')
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_append: ENTERING<br>'); }
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_append: DISABLED UNTIL I FIGURE OUT HOW
NOT TO EXPIRE CURRENT FOLDER STATS WHEN PASSED NOT ENOUGH INFO<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_append: ENTERING<br />'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_append: DISABLED UNTIL I FIGURE OUT HOW
NOT TO EXPIRE CURRENT FOLDER STATS WHEN PASSED NOT ENOUGH INFO<br />'); }
$did_expire = False;
/*
@@ -6111,16 +6111,16 @@
$current_fldball['folder'] =
$this->get_arg_value('folder');
$current_fldball['acctnum'] = $this->get_acctnum();
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_append: we expire ONLY if
$current_fldball ['.serialize($current_fldball).'] == $target_fldball
['.serialize($target_fldball).']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_append: we expire ONLY if
$current_fldball ['.serialize($current_fldball).'] == $target_fldball
['.serialize($target_fldball).']<br />'); }
if (($target_fldball['folder'] ==
$current_fldball['folder'])
&& ($target_fldball['acctnum'] ==
$current_fldball['acctnum']))
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_append: we MUST expire "msgball_list"
because $current_fldball == $target_fldball<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_append: we MUST expire "msgball_list"
because $current_fldball == $target_fldball<br />'); }
$this->expire_session_cache_item('msgball_list', $target_fldball['acctnum']);
$did_expire = True;
}
*/
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_append: LEAVING, returning $did_expire
['.serialize($did_expire).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_append: LEAVING, returning $did_expire
['.serialize($did_expire).']<br />'); }
return $did_expire;
}
====================================================
Index: email/inc/class.mail_filters.inc.php
diff -u email/inc/class.mail_filters.inc.php:1.8
email/inc/class.mail_filters.inc.php:1.9
--- email/inc/class.mail_filters.inc.php:1.8 Thu Dec 30 23:13:50 2004
+++ email/inc/class.mail_filters.inc.php Sun Mar 13 23:22:44 2005
@@ -66,7 +66,7 @@
// do we have data
if
(!isset($GLOBALS['HTTP_POST_VARS'][$this->submit_flag]))
{
- if ($this->debug_level > 0) { echo
'mail_filters: distill_filter_args: NO data submitted<br>'."\r\n"; }
+ if ($this->debug_level > 0) { echo
'mail_filters: distill_filter_args: NO data submitted<br />'."\r\n"; }
return Array();
}
@@ -115,11 +115,11 @@
{
// now we grab the
index value from the key string
$match_this_idx =
(int)$filter_X_key[6];
- if ($this->debug_level
> 1) { echo 'mail_filters: distill_filter_args: match_this_idx grabbed value:
['.$match_this_idx.']<br>'; }
+ if ($this->debug_level
> 1) { echo 'mail_filters: distill_filter_args: match_this_idx grabbed value:
['.$match_this_idx.']<br />'; }
// grab "key" that
comes after that match_this_idx we just got
// remember "substr"
uses 1 as the first letter in a string, not 0, AND starts returning the letter
AFTER the specified location
$match_grabbed_key =
substr($filter_X_key, 8);
- if ($this->debug_level
> 1) { echo 'mail_filters: distill_filter_args: match_grabbed_key value:
['.$match_grabbed_key.']<br>'; }
+ if ($this->debug_level
> 1) { echo 'mail_filters: distill_filter_args: match_grabbed_key value:
['.$match_grabbed_key.']<br />'; }
$this->filters[$this_idx]['matches'][$match_this_idx][$match_grabbed_key] =
$filter_X[$filter_X_key];
}
/*!
@@ -141,11 +141,11 @@
{
// now we grab the
index value from the key string
$action_this_idx =
(int)$filter_X_key[7];
- if ($this->debug_level
> 1) { echo 'mail_filters: distill_filter_args: action_this_idx grabbed value:
['.$action_this_idx.']<br>'; }
+ if ($this->debug_level
> 1) { echo 'mail_filters: distill_filter_args: action_this_idx grabbed value:
['.$action_this_idx.']<br />'; }
// grab "key" that
comes after that match_this_idx we just got
// remember "substr"
uses 1 as the first letter in a string, not 0, AND starts returning the letter
AFTER the specified location
$action_grabbed_key =
substr($filter_X_key, 9);
- if ($this->debug_level
> 1) { echo 'mail_filters: distill_filter_args: action_grabbed_key value:
['.$action_grabbed_key.']<br>'; }
+ if ($this->debug_level
> 1) { echo 'mail_filters: distill_filter_args: action_grabbed_key value:
['.$action_grabbed_key.']<br />'; }
$this->filters[$this_idx]['actions'][$action_this_idx][$action_grabbed_key] =
$filter_X[$filter_X_key];
}
}
@@ -172,19 +172,19 @@
|| ($look_here_imap == ''))
{
$conv_error = 'invalid or no examine data';
- if ($this->debug_level > 0) { echo '<b> ***
error</b>: mail_filters: sieve_to_imap_string: error: '.$conv_error."<br>
\r\n"; }
+ if ($this->debug_level > 0) { echo '<b> ***
error</b>: mail_filters: sieve_to_imap_string: error: '.$conv_error."<br />
\r\n"; }
return '';
}
elseif ((!isset($for_this))
|| (trim($for_this) == ''))
{
$conv_error = 'invalid or no search string
data';
- if ($this->debug_level > 0) { echo '<b> ***
error</b>: mail_filters: sieve_to_imap_string: error: '.$conv_error."<br>
\r\n"; }
+ if ($this->debug_level > 0) { echo '<b> ***
error</b>: mail_filters: sieve_to_imap_string: error: '.$conv_error."<br />
\r\n"; }
return '';
}
$imap_str = $look_here_imap.' "'.$for_this.'"';
- if ($this->debug_level > 0) { echo 'mail_filters:
sieve_to_imap_string: string is: '.$imap_str."<br>\r\n"; }
+ if ($this->debug_level > 0) { echo 'mail_filters:
sieve_to_imap_string: string is: '.$imap_str."<br />\r\n"; }
return $imap_str;
}
@@ -199,7 +199,7 @@
$imap_search_str = $this->sieve_to_imap_string();
if (!$imap_search_str)
{
- if ($this->debug_level > 0) { echo '<b> ***
error</b>: mail_filters: do_imap_search: sieve_to_imap_string returned
empty<br>'."\r\n"; }
+ if ($this->debug_level > 0) { echo '<b> ***
error</b>: mail_filters: do_imap_search: sieve_to_imap_string returned empty<br
/>'."\r\n"; }
return array();
}
@@ -220,7 +220,7 @@
&& ($attempt_reuse == True))
{
// no not create, we will reuse existing
- echo 'mail_filters: do_imap_search: reusing
existing mail_msg object'.'<br>';
+ echo 'mail_filters: do_imap_search: reusing
existing mail_msg object'.'<br />';
// we need to feed the existing object some
params begin_request uses to re-fill the msg->args[] data
$reuse_feed_args =
$GLOBALS['phpgw']->msg->get_all_args();
$args_array = Array();
@@ -228,7 +228,7 @@
if ((isset($this->filters[0]['source_folder']))
&& ($this->filters[0]['source_folder'] != ''))
{
- if ($this->debug_level > 0) { echo
'mail_filters: do_imap_search: this->filters[0][source_folder] = '
.$this->filters[0]['source_folder'].'<br>'."\r\n"; }
+ if ($this->debug_level > 0) { echo
'mail_filters: do_imap_search: this->filters[0][source_folder] = '
.$this->filters[0]['source_folder'].'<br />'."\r\n"; }
$args_array['folder'] =
$this->filters[0]['source_folder'];
}
else
@@ -240,14 +240,14 @@
}
else
{
- if ($this->debug_index_data == True) { echo
'mail_filters: do_imap_search: creating new login email.mail_msg, cannot or not
trying to reusing existing'.'<br>'; }
+ if ($this->debug_index_data == True) { echo
'mail_filters: do_imap_search: creating new login email.mail_msg, cannot or not
trying to reusing existing'.'<br />'; }
// new login
// (1) folder (if specified) - can be left
empty or unset, mail_msg will then assume INBOX
$args_array = Array();
if ((isset($this->filters[0]['source_folder']))
&& ($this->filters[0]['source_folder'] != ''))
{
- if ($this->debug_level > 0) { echo
'mail_filters: do_imap_search: this->filters[0][source_folder] = '
.$this->filters[0]['source_folder'].'<br>'."\r\n"; }
+ if ($this->debug_level > 0) { echo
'mail_filters: do_imap_search: this->filters[0][source_folder] = '
.$this->filters[0]['source_folder'].'<br />'."\r\n"; }
$args_array['folder'] =
$this->filters[0]['source_folder'];
}
else
@@ -265,7 +265,7 @@
if ((isset($this->filters[0]['source_folder']))
&& ($this->filters[0]['source_folder'] != ''))
{
- if ($this->debug_level > 0) { echo
'mail_filters: do_imap_search: this->filters[0][source_folder] = '
.$this->filters[0]['source_folder'].'<br>'."\r\n"; }
+ if ($this->debug_level > 0) { echo
'mail_filters: do_imap_search: this->filters[0][source_folder] = '
.$this->filters[0]['source_folder'].'<br />'."\r\n"; }
$args_array['folder'] =
$this->filters[0]['source_folder'];
}
else
@@ -284,14 +284,14 @@
if (($initial_result_set == False)
|| (count($initial_result_set) == 0))
{
- echo 'mail_filters: do_imap_search: no hits or
possible search error<br>'."\r\n";
+ echo 'mail_filters: do_imap_search: no hits or
possible search error<br />'."\r\n";
echo 'mail_filters: do_imap_search:
server_last_error (if any) was:
"'.$GLOBALS['phpgw']->msg->phpgw_server_last_error().'"'."\r\n";
// we leave this->result_set_mlist an an empty
array, as it was initialized on class creation
}
else
{
$this->result_set = $initial_result_set;
- if ($this->debug_level > 0) { echo
'mail_filters: do_imap_search: number of matches = '
.count($this->result_set).'<br>'."\r\n"; }
+ if ($this->debug_level > 0) { echo
'mail_filters: do_imap_search: number of matches = '
.count($this->result_set).'<br />'."\r\n"; }
// make a "fake" folder_info array to make
things simple for get_msg_list_display
$this->fake_folder_info['is_imap'] = True;
$this->fake_folder_info['folder_checked'] =
$GLOBALS['phpgw']->msg->get_arg_value('folder');
@@ -302,7 +302,7 @@
$this->result_set_mlist =
$GLOBALS['phpgw']->msg->get_msg_list_display($this->fake_folder_info,$this->result_set);
}
$GLOBALS['phpgw']->msg->end_request();
- //echo 'mail_filters: do_imap_search: returned:<br>';
var_dump($this->result_set); echo "<br>\r\n";
+ //echo 'mail_filters: do_imap_search: returned:<br />';
var_dump($this->result_set); echo "<br />\r\n";
}
/*!
====================================================
====================================================
Index: email/inc/class.msg_bootstrap.inc.php
diff -u email/inc/class.msg_bootstrap.inc.php:1.3
email/inc/class.msg_bootstrap.inc.php:1.4
--- email/inc/class.msg_bootstrap.inc.php:1.3 Thu Dec 30 23:13:50 2004
+++ email/inc/class.msg_bootstrap.inc.php Sun Mar 13 23:22:44 2005
@@ -125,7 +125,7 @@
*/
function set_do_login($do_login='##NOTHING##',
$called_by='not_provided')
{
- if ($this->debug_level > 0) { echo 'ENTERING:
msg_bootstrap: set_do_login: (called_by: '.$called_by.') param $do_login:
['.serialize($do_login).']'.'<br>'; }
+ if ($this->debug_level > 0) { echo 'ENTERING:
msg_bootstrap: set_do_login: (called_by: '.$called_by.') param $do_login:
['.serialize($do_login).']'.'<br />'; }
// backward compat, when this was only true or false
if (is_bool($do_login))
{
@@ -140,7 +140,7 @@
$this->do_login_ex = BS_LOGIN_NEVER;
}
// LEAVING HERE
- if ($this->debug_level > 0) { echo 'LEAVING:
msg_bootstrap: set_do_login: (bool input) (called_by: '.$called_by.')
$this->do_login: ['.$this->do_login.'] $this->do_login_ex:
['.$this->do_login_ex.'] '.'<br>'; }
+ if ($this->debug_level > 0) { echo 'LEAVING:
msg_bootstrap: set_do_login: (bool input) (called_by: '.$called_by.')
$this->do_login: ['.$this->do_login.'] $this->do_login_ex:
['.$this->do_login_ex.'] '.'<br />'; }
return $this->do_login;
}
elseif (is_int($do_login))
@@ -178,7 +178,7 @@
$this->do_login = True;
$this->do_login_ex = BS_LOGIN_ONLY_IF_NEEDED;
}
- if ($this->debug_level > 0) { echo 'LEAVING:
msg_bootstrap: set_do_login: (not bool input) (called_by: '.$called_by.')
$this->do_login: ['.$this->do_login.'] $this->do_login_ex:
['.$this->do_login_ex.'] '.'<br>'; }
+ if ($this->debug_level > 0) { echo 'LEAVING:
msg_bootstrap: set_do_login: (not bool input) (called_by: '.$called_by.')
$this->do_login: ['.$this->do_login.'] $this->do_login_ex:
['.$this->do_login_ex.'] '.'<br />'; }
return $this->do_login_ex;
}
@@ -240,7 +240,7 @@
{
$this->debug_level = $debug_level;
}
- if ($this->debug_level > 0) { echo 'ENTERING:
msg_bootstrap: ensure_mail_msg_exists: (called_by: '.$called_by.')'.'<br>'; }
+ if ($this->debug_level > 0) { echo 'ENTERING:
msg_bootstrap: ensure_mail_msg_exists: (called_by: '.$called_by.')'.'<br />'; }
// make sure do_login has been set
if ($this->get_do_login_ex() == BS_LOGIN_NOT_SPECIFIED)
@@ -259,33 +259,33 @@
//&& ($GLOBALS['phpgw']->msg->been_constructed == True)
//)
{
- if ($this->debug_level > 1) { echo
'msg_bootstrap: ensure_mail_msg_exists('.__LINE__.'): (called_by:
'.$called_by.'): is_object test: $GLOBALS[phpgw]->msg is already set, do not
create again<br>'; }
+ if ($this->debug_level > 1) { echo
'msg_bootstrap: ensure_mail_msg_exists('.__LINE__.'): (called_by:
'.$called_by.'): is_object test: $GLOBALS[phpgw]->msg is already set, do not
create again<br />'; }
}
else
{
- if ($this->debug_level > 1) { echo
'msg_bootstrap: ensure_mail_msg_exists('.__LINE__.'): (called_by:
'.$called_by.'): $GLOBALS[phpgw]->msg is NOT set, creating mail_msg
object<br>'; }
+ if ($this->debug_level > 1) { echo
'msg_bootstrap: ensure_mail_msg_exists('.__LINE__.'): (called_by:
'.$called_by.'): $GLOBALS[phpgw]->msg is NOT set, creating mail_msg object<br
/>'; }
$GLOBALS['phpgw']->msg =
CreateObject("email.mail_msg");
//$GLOBALS['phpgw']->msg =&
CreateObject("email.mail_msg");
//include_once(PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_msg_base.inc.php');
//include_once(PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_msg_wrappers.inc.php');
//include_once(PHPGW_INCLUDE_ROOT.'/email/inc/class.mail_msg_display.inc.php');
//$GLOBALS['phpgw']->msg =& new mail_msg;
- if ($this->debug_level > 1) { echo
'msg_bootstrap: ensure_mail_msg_exists('.__LINE__.'): $GLOBALS[phpgw]->msg
created mail_msg object, now calling needed initialization function aka manual
constructor function, "initialize_mail_msg"<br>'; }
+ if ($this->debug_level > 1) { echo
'msg_bootstrap: ensure_mail_msg_exists('.__LINE__.'): $GLOBALS[phpgw]->msg
created mail_msg object, now calling needed initialization function aka manual
constructor function, "initialize_mail_msg"<br />'; }
$GLOBALS['phpgw']->msg->initialize_mail_msg();
}
if
($GLOBALS['phpgw']->msg->get_isset_arg('already_grab_class_args_gpc'))
{
// mail_msg had already run thru
"begin_request", do not call it again
- if ($this->debug_level > 0) { echo
'msg_bootstrap: ensure_mail_msg_exists('.__LINE__.'): (called_by:
'.$called_by.'): LEAVING , msg object already initialized<br>'; }
+ if ($this->debug_level > 0) { echo
'msg_bootstrap: ensure_mail_msg_exists('.__LINE__.'): (called_by:
'.$called_by.'): LEAVING , msg object already initialized<br />'; }
return True;
}
$args_array = Array();
// should we log in or not
- if ($this->debug_level > 1) { echo 'msg_bootstrap:
ensure_mail_msg_exists: (called_by: '.$called_by.'): $this->do_login:
['.serialize($this->do_login).']<br>'; }
+ if ($this->debug_level > 1) { echo 'msg_bootstrap:
ensure_mail_msg_exists: (called_by: '.$called_by.'): $this->do_login:
['.serialize($this->do_login).']<br />'; }
$args_array['do_login'] = $this->do_login;
- if ($this->debug_level > 1) { echo 'msg_bootstrap:
ensure_mail_msg_exists: (called_by: '.$called_by.'): $this->do_login_ex:
['.serialize($this->do_login_ex).']<br>'; }
+ if ($this->debug_level > 1) { echo 'msg_bootstrap:
ensure_mail_msg_exists: (called_by: '.$called_by.'): $this->do_login_ex:
['.serialize($this->do_login_ex).']<br />'; }
$args_array['do_login_ex'] = $this->do_login_ex;
// "start your engines"
@@ -300,7 +300,7 @@
// login error will halt this script execution
// else all is good to go and script continues...
if ($this->debug_level > 2) { echo 'msg_bootstrap:
about to leave ensure_mail_msg_exists, $GLOBALS[] DUMP:<pre>';
print_r($GLOBALS); echo '</pre>'; }
- if ($this->debug_level > 0) { echo 'EXIT:
msg_bootstrap: ensure_mail_msg_exists: (called_by: '.$called_by.')'.'<br>'; }
+ if ($this->debug_level > 0) { echo 'EXIT:
msg_bootstrap: ensure_mail_msg_exists: (called_by: '.$called_by.')'.'<br />'; }
}
/*!
@@ -319,21 +319,21 @@
// DEBUG - override debug_level param
//$debug_level = 3;
- if ($this->debug_level > 0) { echo 'ENTERING:
msg_bootstrap: ensure_utility_classes: <br>'; }
+ if ($this->debug_level > 0) { echo 'ENTERING:
msg_bootstrap: ensure_utility_classes: <br />'; }
if (is_object($GLOBALS['phpgw']->widgets))
{
- if ($this->debug_level > 1) { echo
'msg_bootstrap: ensure_utility_classes: is_object test:
$GLOBALS[phpgw]->widgets is already set, do not create again<br>'; }
+ if ($this->debug_level > 1) { echo
'msg_bootstrap: ensure_utility_classes: is_object test:
$GLOBALS[phpgw]->widgets is already set, do not create again<br />'; }
}
else
{
- if ($this->debug_level > 1) { echo
'msg_bootstrap: ensure_utility_classes: $GLOBALS[phpgw]->widgets is NOT set,
creating html_widgets object<br>'; }
+ if ($this->debug_level > 1) { echo
'msg_bootstrap: ensure_utility_classes: $GLOBALS[phpgw]->widgets is NOT set,
creating html_widgets object<br />'; }
$my_widgets =
CreateObject("email.html_widgets");
$GLOBALS['phpgw']->widgets = $my_widgets;
}
- if ($this->debug_level > 0) { echo 'EXIT:
msg_bootstrap: ensure_utility_classes: <br>'; }
+ if ($this->debug_level > 0) { echo 'EXIT:
msg_bootstrap: ensure_utility_classes: <br />'; }
}
}
====================================================
Index: email/inc/class.so_mail_msg.inc.php
diff -u email/inc/class.so_mail_msg.inc.php:1.2
email/inc/class.so_mail_msg.inc.php:1.3
--- email/inc/class.so_mail_msg.inc.php:1.2 Thu Dec 30 23:13:50 2004
+++ email/inc/class.so_mail_msg.inc.php Sun Mar 13 23:22:44 2005
@@ -53,7 +53,7 @@
*/
function so_mail_msg()
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: ('.__LINE__.'):
*constructor*<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: ('.__LINE__.'):
*constructor*<br />'); }
return;
}
@@ -126,9 +126,9 @@
*/
function
so_save_session_cache_item($data_name='misc',$data,$acctnum='',$extra_keys='')
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_save_session_cache_item('.__LINE__.'): ENTERED,
$this->PARENT->session_cache_enabled='.serialize($GLOBALS['phpgw']->msg->session_cache_enabled).',
$data_name: ['.$data_name.'], $acctnum (optional): ['.$acctnum.'],
$extra_keys: ['.$extra_keys.']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_save_session_cache_item('.__LINE__.'): ENTERED,
$this->PARENT->session_cache_enabled='.serialize($GLOBALS['phpgw']->msg->session_cache_enabled).',
$data_name: ['.$data_name.'], $acctnum (optional): ['.$acctnum.'],
$extra_keys: ['.$extra_keys.']<br />'); }
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_save_session_cache_item('.__LINE__.'): LEAVING <br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_save_session_cache_item('.__LINE__.'): LEAVING <br />'); }
}
@@ -140,9 +140,9 @@
*/
function so_read_session_cache_item($data_name='misc',
$acctnum='', $ex_folder='', $ex_msgnum='')
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_read_session_cache_item('.__LINE__.'): ENTERED, $data_name:
['.$data_name.']; optional: $acctnum: ['.$acctnum.'], $ex_folder:
['.$ex_folder.'], $ex_msgnum: ['.$ex_msgnum.'] '.'<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_read_session_cache_item('.__LINE__.'): ENTERED, $data_name:
['.$data_name.']; optional: $acctnum: ['.$acctnum.'], $ex_folder:
['.$ex_folder.'], $ex_msgnum: ['.$ex_msgnum.'] '.'<br />'); }
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_read_session_cache_item('.__LINE__.'): LEAVING <br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_read_session_cache_item('.__LINE__.'): LEAVING <br />'); }
}
/*!
@@ -154,9 +154,9 @@
*/
function
so_expire_session_cache_item($data_name='misc',$acctnum='', $ex_folder='',
$ex_msgnum='')
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_expire_session_cache_item('.__LINE__.'): ENTERED,
$this->PARENT->session_cache_enabled='.serialize($GLOBALS['phpgw']->msg->session_cache_enabled).',
$data_name: ['.$data_name.'], $acctnum (optional): ['.$acctnum.'],
$extra_keys: ['.$extra_keys.']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_expire_session_cache_item('.__LINE__.'): ENTERED,
$this->PARENT->session_cache_enabled='.serialize($GLOBALS['phpgw']->msg->session_cache_enabled).',
$data_name: ['.$data_name.'], $acctnum (optional): ['.$acctnum.'],
$extra_keys: ['.$extra_keys.']<br />'); }
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_expire_session_cache_item('.__LINE__.'): LEAVING <br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_expire_session_cache_item('.__LINE__.'): LEAVING <br />'); }
}
@@ -191,7 +191,7 @@
*/
function prep_db_session_compat($called_by='not_specified')
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
prep_db_session_compat('.__LINE__.'): ENTERING, $called_by
['.$called_by.']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
prep_db_session_compat('.__LINE__.'): ENTERING, $called_by ['.$called_by.']<br
/>'); }
// UNDER DEVELOPMEMT - backwards_compat with
sessions_db where php4 sessions are not being used
if (($GLOBALS['phpgw_info']['server']['sessions_type']
== 'db')
|| ($GLOBALS['phpgw']->msg->use_private_table == True))
@@ -218,11 +218,11 @@
}
// recreate the REF_SESSION to point to this,
since it may not have existed earlier
$GLOBALS['phpgw']->msg->ref_SESSION =&
$GLOBALS['email_dbsession_compat'];
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
prep_db_session_compat('.__LINE__.'): LEAVING, session_db IS in use, so we
created
$GLOBALS[email_dbsession_compat][phpgw_session][phpgw_app_sessions][email]<br>');
}
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
prep_db_session_compat('.__LINE__.'): LEAVING, session_db IS in use, so we
created
$GLOBALS[email_dbsession_compat][phpgw_session][phpgw_app_sessions][email]<br
/>'); }
}
else
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
prep_db_session_compat('.__LINE__.'): LEAVING, session_db is NOT in use, took
no action, nothing needed.<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
prep_db_session_compat('.__LINE__.'): LEAVING, session_db is NOT in use, took
no action, nothing needed.<br />'); }
}
}
@@ -245,7 +245,7 @@
if (($GLOBALS['phpgw_info']['server']['sessions_type']
== 'db')
|| ($GLOBALS['phpgw']->msg->use_private_table == True))
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
expire_db_session_bulk_data('.__LINE__.'): ENTERING, session_db IS in use,
$called_by ['.$called_by.']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
expire_db_session_bulk_data('.__LINE__.'): ENTERING, session_db IS in use,
$called_by ['.$called_by.']<br />'); }
// RETAIN IMPORTANT DATA
$retained_data=array();
for ($i=0; $i <
count($GLOBALS['phpgw']->msg->extra_and_default_acounts); $i++)
@@ -326,7 +326,7 @@
}
}
}
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
expire_db_session_bulk_data('.__LINE__.'): LEAVING, session_db IS in use, did
erase all email appsession data<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
expire_db_session_bulk_data('.__LINE__.'): LEAVING, session_db IS in use, did
erase all email appsession data<br />'); }
}
}
@@ -347,12 +347,12 @@
$appsession_returns =
$this->so_appsession_passthru($appsession_key);
if ($appsession_returns == $affirmative_value)
{
- //echo 'so_am_table_exists: result: Actual
APPSESSION reports stored info saying table ['.$look_for_me.'] DOES exist<br>';
+ //echo 'so_am_table_exists: result: Actual
APPSESSION reports stored info saying table ['.$look_for_me.'] DOES exist<br
/>';
return True;
}
elseif ($appsession_returns == $negative_value)
{
- //echo 'so_am_table_exists: result: Actual
APPSESSION reports stored info saying table ['.$look_for_me.'] does NOT
exist<br>';
+ //echo 'so_am_table_exists: result: Actual
APPSESSION reports stored info saying table ['.$look_for_me.'] does NOT
exist<br />';
return False;
}
@@ -363,14 +363,14 @@
{
// STORE THE POSITIVE ANSWER
$this->so_appsession_passthru($appsession_key,
$affirmative_value);
- //echo 'so_am_table_exists: result: table
['.$look_for_me.'] DOES exist<br>';
+ //echo 'so_am_table_exists: result: table
['.$look_for_me.'] DOES exist<br />';
return True;
}
else
{
// STORE THE NEGATIVE ANSWER
$this->so_appsession_passthru($appsession_key,
$negative_value);
- //echo 'so_am_table_exists: result: table
['.$look_for_me.'] does NOT exist<br>';
+ //echo 'so_am_table_exists: result: table
['.$look_for_me.'] does NOT exist<br />';
return False;
}
//echo '$table_names dump:<pre>';
@@ -385,7 +385,7 @@
*/
function so_set_data($data_key, $content, $compression=False)
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_set_data('.__LINE__.'):
ENTERING, $data_key ['.$data_key.'], $compression
['.serialize($compression).']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_set_data('.__LINE__.'):
ENTERING, $data_key ['.$data_key.'], $compression
['.serialize($compression).']<br />'); }
$account_id =
get_account_id($accountid,$GLOBALS['phpgw']->session->account_id);
$data_key =
$GLOBALS['phpgw']->db->db_addslashes($data_key);
// for compression, first choice is BZ2, second choice
is GZ
@@ -395,7 +395,7 @@
// $content_preped =
base64_encode(bzcompress(serialize($content)));
// $content = '';
// unset($content);
- // if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_set_data('.__LINE__.'):
$compression is ['.serialize($compression).'] AND we did serialize and <font
color="green">did BZ2 compress</font>, no addslashes for compressed
content<br>'); }
+ // if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_set_data('.__LINE__.'):
$compression is ['.serialize($compression).'] AND we did serialize and <font
color="green">did BZ2 compress</font>, no addslashes for compressed content<br
/>'); }
//}
//else
if (($compression)
@@ -404,7 +404,7 @@
$content_preped =
base64_encode(gzcompress(serialize($content)));
$content = '';
unset($content);
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_set_data('.__LINE__.'):
$compression is ['.serialize($compression).'] AND we did serialize and <font
color="green">did GZ compress</font>, no addslashes for compressed
content<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_set_data('.__LINE__.'):
$compression is ['.serialize($compression).'] AND we did serialize and <font
color="green">did GZ compress</font>, no addslashes for compressed content<br
/>'); }
}
else
{
@@ -420,7 +420,7 @@
}
$content = '';
unset($content);
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_set_data('.__LINE__.'):
$compress is ['.serialize($compress).'] AND we did serialize with NO
compression<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_set_data('.__LINE__.'):
$compress is ['.serialize($compress).'] AND we did serialize with NO
compression<br />'); }
}
$GLOBALS['phpgw']->db->query("SELECT content FROM
phpgw_anglemail WHERE "
@@ -436,7 +436,7 @@
$GLOBALS['phpgw']->db->query("UPDATE
phpgw_anglemail set content='" . $content_preped
. "' WHERE account_id='" . $account_id
. "' AND data_key='" . $data_key . "'",__LINE__,__FILE__);
}
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_set_data('.__LINE__.'):
LEAVING <br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_set_data('.__LINE__.'):
LEAVING <br />'); }
}
/*!
@@ -445,7 +445,7 @@
*/
function so_get_data($data_key, $compression=False)
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
ENTERING, $data_key ['.$data_key.'], $compression
['.serialize($compression).']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
ENTERING, $data_key ['.$data_key.'], $compression
['.serialize($compression).']<br />'); }
// initialize vars to blank
$my_content = '';
@@ -455,10 +455,10 @@
&& ($this->so_have_data_group() == False)
&& ($this->data_group_done_filled < 3))
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
requesting to fill group data<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
requesting to fill group data<br />'); }
// TRUE = make this into a generic LIKE match
string
$func_returns =
$this->so_fill_data_group($data_key, True);
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
fill group data function returns $func_returns
['.serialize($func_returns).']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
fill group data function returns $func_returns
['.serialize($func_returns).']<br />'); }
}
elseif (
($this->use_group_data == True)
@@ -473,28 +473,28 @@
// i.e. the first thing to come in here with a
folder element in it,
// then we are allowed one more try for the
next item that is requested
// after that that is NOT folder_status_info
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
folder_ststus_info retry block, first trigger was folder_status_info, so now
wipe existing group data and retry<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
folder_ststus_info retry block, first trigger was folder_status_info, so now
wipe existing group data and retry<br />'); }
$this->so_clear_data_group();
// TRUE = make this into a generic LIKE match
string
$func_returns =
$this->so_fill_data_group($data_key, True);
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
retry of fill group data function returns $func_returns
['.serialize($func_returns).']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
retry of fill group data function returns $func_returns
['.serialize($func_returns).']<br />'); }
}
if (($this->use_group_data == False)
|| ($this->so_have_data_group() == False))
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
group data either disabled or nothing returned, requesting individual data
record<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
group data either disabled or nothing returned, requesting individual data
record<br />'); }
$account_id =
get_account_id($accountid,$GLOBALS['phpgw']->session->account_id);
$data_key =
$GLOBALS['phpgw']->db->db_addslashes($data_key);
$GLOBALS['phpgw']->db->query("SELECT content
FROM phpgw_anglemail WHERE "
. "account_id = '".$account_id."' AND
data_key = '".$data_key."'",__LINE__,__FILE__);
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
$GLOBALS[phpgw]->db->num_rows() = ['.$GLOBALS['phpgw']->db->num_rows().']
<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
$GLOBALS[phpgw]->db->num_rows() = ['.$GLOBALS['phpgw']->db->num_rows().'] <br
/>'); }
if ($GLOBALS['phpgw']->db->num_rows()==0)
{
- if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
LEAVING, returning False<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
LEAVING, returning False<br />'); }
return False;
}
}
@@ -508,7 +508,7 @@
{
// no stripslashes for compressed data
(False)
$my_content =
$this->so_lookup_data_group($data_key, False);
- if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
using SO_LOOKUP_DATA_GROUP <br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
using SO_LOOKUP_DATA_GROUP <br />'); }
if
($GLOBALS['phpgw']->msg->debug_so_class > 2) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
so_lookup_data_group $my_content DUMP:', $my_content); }
}
else
@@ -516,7 +516,7 @@
$GLOBALS['phpgw']->db->next_record();
// no stripslashes for compressed data
$my_content =
$GLOBALS['phpgw']->db->f('content');
- if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
query for individual record, NOT using group data<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
query for individual record, NOT using group data<br />'); }
}
$comp_desc = array();
$comp_desc['before_decomp'] = 'NA';
@@ -524,11 +524,11 @@
$comp_desc['ratio_txt'] = 'NA';
$comp_desc['ratio_math'] = 'NA';
if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $comp_desc['before_decomp'] = strlen($my_content); }
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
strlen($my_content) is ['.$comp_desc['before_decomp'].'], BEFORE decompress,
$compression is ['.serialize($compression).']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
strlen($my_content) is ['.$comp_desc['before_decomp'].'], BEFORE decompress,
$compression is ['.serialize($compression).']<br />'); }
//if ($GLOBALS['phpgw']->msg->debug_so_class >
2) { $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
$GLOBALS[phpgw]->db->next_record() yields $my_content DUMP:', $my_content); }
if (!$my_content)
{
- if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
LEAVING, returning False<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
LEAVING, returning False<br />'); }
return False;
}
// for compression, first choice is BZ2, second
choice is GZ
@@ -537,32 +537,32 @@
//{
// $my_content_preped =
unserialize(bzdecompress(base64_decode($my_content)));
// if
($GLOBALS['phpgw']->msg->debug_so_class > 1) { $comp_desc['after_decomp'] =
strlen(serialize($my_content_preped)); $comp_desc['ratio_math'] =
(string)(round(($comp_desc['after_decomp']/$comp_desc['before_decomp']), 1) *
1).'X'; $comp_desc['ratio_txt'] = 'pre/post is ['.$comp_desc['before_decomp'].'
to '.$comp_desc['after_decomp']; }
- // if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
$compression: ['.serialize($compression).'] using <font color="brown">BZ2
decompress</font> pre/post is ['.$comp_desc['ratio_txt'].']; ratio:
['.$comp_desc['ratio_math'].'] <br>'); }
+ // if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
$compression: ['.serialize($compression).'] using <font color="brown">BZ2
decompress</font> pre/post is ['.$comp_desc['ratio_txt'].']; ratio:
['.$comp_desc['ratio_math'].'] <br />'); }
//}
//else
if (function_exists('gzuncompress'))
{
$my_content_preped =
unserialize(gzuncompress(base64_decode($my_content)));
if
($GLOBALS['phpgw']->msg->debug_so_class > 1) { $comp_desc['after_decomp'] =
strlen(serialize($my_content_preped)); $comp_desc['ratio_math'] =
(string)(round(($comp_desc['after_decomp']/$comp_desc['before_decomp']), 1) *
1).'X'; $comp_desc['ratio_txt'] = 'pre/post is ['.$comp_desc['before_decomp'].'
to '.$comp_desc['after_decomp']; }
- if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
$compression: ['.serialize($compression).'] using <font color="brown">GZ
uncompress</font> pre/post is ['.$comp_desc['ratio_txt'].']; ratio:
['.$comp_desc['ratio_math'].'] <br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
$compression: ['.serialize($compression).'] using <font color="brown">GZ
uncompress</font> pre/post is ['.$comp_desc['ratio_txt'].']; ratio:
['.$comp_desc['ratio_math'].'] <br />'); }
}
else
{
$my_content_preped = '';
- if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
ERROR: $compression: ['.serialize($compression).'] <font
color="brown">decompression ERROR</font> neither "bzdecompress" (first choice)
nor "gzuncompress" (second choice) is available<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
ERROR: $compression: ['.serialize($compression).'] <font
color="brown">decompression ERROR</font> neither "bzdecompress" (first choice)
nor "gzuncompress" (second choice) is available<br />'); }
}
$my_content = '';
unset($my_content);
if (!$my_content_preped)
{
if
($GLOBALS['phpgw']->msg->debug_so_class > 2) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
AFTER DECOMPRESS and UNserialization $my_content_preped is GONE!'); }
- if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
LEAVING, returning False, <font color="red">content did not unserialize,
compression was in use </font> <br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
LEAVING, returning False, <font color="red">content did not unserialize,
compression was in use </font> <br />'); }
return False;
}
else
{
if
($GLOBALS['phpgw']->msg->debug_so_class > 2) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
AFTER DECOMPRESS and UNserialization $my_content_preped DUMP:',
$my_content_preped); }
- if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
LEAVING, got content, <font color="brown"> did decompress </font> , returning
that content<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
LEAVING, got content, <font color="brown"> did decompress </font> , returning
that content<br />'); }
return $my_content_preped;
}
}
@@ -573,7 +573,7 @@
{
// not using compression so we will
stripslashes
$my_content =
$this->so_lookup_data_group($data_key, True);
- if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
using SO_LOOKUP_DATA_GROUP <br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
using SO_LOOKUP_DATA_GROUP <br />'); }
if
($GLOBALS['phpgw']->msg->debug_so_class > 2) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
so_lookup_data_group $my_content DUMP:', $my_content); }
}
else
@@ -581,13 +581,13 @@
$GLOBALS['phpgw']->db->next_record();
// NOTE: we only stripslashes when NOT
using compression
$my_content =
$GLOBALS['phpgw']->db->f('content', 'stripslashes');
- if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
query for individual record, NOT using group data<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
query for individual record, NOT using group data<br />'); }
}
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
strlen($my_content) is ['.strlen($my_content).']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{ $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
strlen($my_content) is ['.strlen($my_content).']<br />'); }
//if ($GLOBALS['phpgw']->msg->debug_so_class >
2) { $GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
$GLOBALS[phpgw]->db->next_record() yields $my_content DUMP:', $my_content); }
if (!$my_content)
{
- if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
LEAVING, returning False<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
LEAVING, returning False<br />'); }
return False;
}
// we serialize only NON-strings,
@@ -595,14 +595,14 @@
//if
($GLOBALS['phpgw']->msg->is_serialized_str($my_content) == True)
if
($GLOBALS['phpgw']->msg->is_serialized_smarter($my_content) == True)
{
- if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'): we
need to unserialize this <br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'): we
need to unserialize this <br />'); }
$my_content_preped =
unserialize($my_content);
// DID IT WORK
//$try_recover = True;
$try_recover = False;
if (!$my_content_preped)
{
- if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'): <b>
<font color="red">ERROR unserializing </font> </b> , probably a slashes
problem<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'): <b>
<font color="red">ERROR unserializing </font> </b> , probably a slashes
problem<br />'); }
if ($try_recover == True)
{
// try some recovery
methods
@@ -624,7 +624,7 @@
$my_content_preped =
unserialize($my_content_recover);
if (!$my_content_preped)
{
- if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'): <b>
<font color="red">2nd ERROR unserializing </font> </b> , recovery did not work,
probably a slashes problem<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'): <b>
<font color="red">2nd ERROR unserializing </font> </b> , recovery did not work,
probably a slashes problem<br />'); }
}
}
}
@@ -638,13 +638,13 @@
if (!$my_content_preped)
{
if
($GLOBALS['phpgw']->msg->debug_so_class > 2) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
AFTER UNserialization $my_content_preped is GONE!'); }
- if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
LEAVING, returning False, <font color="red">content did not unserialize </font>
<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
LEAVING, returning False, <font color="red">content did not unserialize </font>
<br />'); }
return False;
}
else
{
if
($GLOBALS['phpgw']->msg->debug_so_class > 2) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
AFTER UNserialization $my_content_preped DUMP:', $my_content_preped); }
- if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
LEAVING, got content, returning that content<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg: so_get_data('.__LINE__.'):
LEAVING, got content, returning that content<br />'); }
return $my_content_preped;
}
}
@@ -686,18 +686,18 @@
*/
function so_prop_use_group_data($feed_value='##NOTHING##')
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
ENTERING, current $this->use_group_data
['.serialize($this->use_group_data).'], $feed_value
['.serialize($feed_value).']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
ENTERING, current $this->use_group_data
['.serialize($this->use_group_data).'], $feed_value
['.serialize($feed_value).']<br />'); }
if ((string)$feed_value == '##NOTHING##')
{
// do nothing skip down to the return statement
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
do nothing, $feed_value ['.serialize($feed_value).'] == "##NOTHING##" means
only return current property<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
do nothing, $feed_value ['.serialize($feed_value).'] == "##NOTHING##" means
only return current property<br />'); }
//return $this->use_group_data;
}
elseif ($feed_value)
{
if ($this->use_group_data != True)
{
- if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
toggle $this->use_group_data to True, and thus call "so_clear_data_group" and
set "data_group_done_filled" to 0 and then set to True<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
toggle $this->use_group_data to True, and thus call "so_clear_data_group" and
set "data_group_done_filled" to 0 and then set to True<br />'); }
// maybe we should clear any stored
data, huh?
$this->so_clear_data_group();
// and maybe we should reset this
excess query counter too, huh?
@@ -706,28 +706,28 @@
}
else
{
- if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
do nothing, use_group_data is already TRUE<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
do nothing, use_group_data is already TRUE<br />'); }
}
}
elseif (!$feed_value)
{
if ($this->use_group_data != False)
{
- if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
toggle $this->use_group_data to False, and thus call "so_clear_data_group" and
then set to False<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
toggle $this->use_group_data to False, and thus call "so_clear_data_group" and
then set to False<br />'); }
// maybe we should clear any stored
data, huh?
$this->so_clear_data_group();
$this->use_group_data = False;
}
else
{
- if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
do nothing, use_group_data is already FALSE<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
do nothing, use_group_data is already FALSE<br />'); }
}
}
else
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
ERROR why am I here?<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
ERROR why am I here?<br />'); }
}
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
LEAVING, returning $this->use_group_data
['.serialize($this->use_group_data).']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_prop_use_group_data('.__LINE__.'):
LEAVING, returning $this->use_group_data
['.serialize($this->use_group_data).']<br />'); }
return $this->use_group_data;
}
@@ -737,17 +737,17 @@
*/
function so_fill_data_group($data_key_partial='',
$make_like=True)
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_fill_data_group('.__LINE__.'):
ENTERING, $data_key_partial ['.$data_key_partial.'] $make_like
['.serialize($make_like).']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_fill_data_group('.__LINE__.'):
ENTERING, $data_key_partial ['.$data_key_partial.'] $make_like
['.serialize($make_like).']<br />'); }
if ($this->use_group_data == False)
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_fill_data_group('.__LINE__.'):
LEAVING returning False<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_fill_data_group('.__LINE__.'):
LEAVING returning False<br />'); }
return False;
}
$this->data_group_array = array();
if (!$data_key_partial)
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_fill_data_group('.__LINE__.'):
LEAVING returning False<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_fill_data_group('.__LINE__.'):
LEAVING returning False<br />'); }
return False;
}
@@ -767,7 +767,7 @@
// since cached folder stats may be
simply to fill the combobox and not related
// to the folder we really need the
group data for
$this->data_group_last_trigger =
$data_key_partial;
- if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_fill_data_group('.__LINE__.'):
setting $this->data_group_last_trigger
['.$this->data_group_last_trigger.']<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_fill_data_group('.__LINE__.'):
setting $this->data_group_last_trigger
['.$this->data_group_last_trigger.']<br />'); }
// prep for group data query
$data_key =
$data_key_exploded[0].';%;'.$data_key_exploded[2].';%';
//$data_key =
$data_key_exploded[0].'\;%\;'.$data_key_exploded[2].'\;%';
@@ -811,7 +811,7 @@
{
// Data Key does NOT have a folder name
// means the way we get mass group data
will not be worth it
- if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_fill_data_group('.__LINE__.'):
LEAVING returning False<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_fill_data_group('.__LINE__.'):
LEAVING returning False<br />'); }
return False;
}
}
@@ -886,13 +886,13 @@
$GLOBALS['phpgw']->db->query("SELECT * FROM
phpgw_anglemail WHERE "
. "account_id = '".$account_id."' AND
data_key LIKE '".$data_key."'",__LINE__,__FILE__);
}
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_fill_data_group('.__LINE__.'): $data_key ['.htmlspecialchars($data_key).']
$data_key_msgball ['.htmlspecialchars($data_key_msgball).']
$data_key_folder_status_info
['.htmlspecialchars($data_key_folder_status_info).']<br>'); }
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_fill_data_group('.__LINE__.'): $data_key_folder_list
['.htmlspecialchars($data_key_folder_list).'] $data_key_mailsvr_callstr
['.htmlspecialchars($data_key_mailsvr_callstr).'] $data_key_mailsvr_namespace
['.htmlspecialchars($data_key_mailsvr_namespace).']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_fill_data_group('.__LINE__.'): $data_key ['.htmlspecialchars($data_key).']
$data_key_msgball ['.htmlspecialchars($data_key_msgball).']
$data_key_folder_status_info
['.htmlspecialchars($data_key_folder_status_info).']<br />'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_fill_data_group('.__LINE__.'): $data_key_folder_list
['.htmlspecialchars($data_key_folder_list).'] $data_key_mailsvr_callstr
['.htmlspecialchars($data_key_mailsvr_callstr).'] $data_key_mailsvr_namespace
['.htmlspecialchars($data_key_mailsvr_namespace).']<br />'); }
$num_rows = $GLOBALS['phpgw']->db->num_rows();
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_fill_data_group('.__LINE__.'): $num_rows ['.$num_rows.']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_fill_data_group('.__LINE__.'): $num_rows ['.$num_rows.']<br />'); }
if ($num_rows == 0)
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_fill_data_group('.__LINE__.'):
LEAVING returning False<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_fill_data_group('.__LINE__.'):
LEAVING returning False<br />'); }
return False;
}
// increment counter how many times we have filled
group data
@@ -909,7 +909,7 @@
$this->data_group_array[$my_data_key] =
$my_content;
}
if ($GLOBALS['phpgw']->msg->debug_so_class > 2) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg:
so_fill_data_group('.__LINE__.'): $this->data_group_array DUMP:',
$this->data_group_array); }
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_fill_data_group('.__LINE__.'):
LEAVING returning TRUE, did fill group data<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_fill_data_group('.__LINE__.'):
LEAVING returning TRUE, did fill group data<br />'); }
return True;
}
@@ -1003,11 +1003,11 @@
*/
function
so_appsession_passthru($location='',$data='##NOTHING##', $compression=False)
{
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
ENTERING: $location ['.$location.'], $compression
['.serialize($compression).']<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
ENTERING: $location ['.$location.'], $compression
['.serialize($compression).']<br />'); }
if ($GLOBALS['phpgw']->msg->session_cache_enabled ==
False)
{
// flag means we do not use any session caching
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
LEAVING, msg->session_cache_enabled False, so disabled session caching,
returning False<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
LEAVING, msg->session_cache_enabled False, so disabled session caching,
returning False<br />'); }
return False;
}
// ok we are allowed to do session caching ...
@@ -1016,7 +1016,7 @@
if ((string)$data == '##NOTHING##')
{
// means we are GETTING data from appsession
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
request to get data<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
request to get data<br />'); }
if (($compression)
&& (function_exists('gzuncompress')))
{
@@ -1024,35 +1024,35 @@
$content_preped =
base64_encode(gzuncompress(serialize($content)));
$content = '';
unset($content);
- if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
LEAVING, returning passthru data hopefully<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
LEAVING, returning passthru data hopefully<br />'); }
return $content_preped;
}
else
{
- if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
LEAVING, returning passthru data<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
LEAVING, returning passthru data<br />'); }
return
$GLOBALS['phpgw']->session->appsession($location, 'email');
}
}
else
{
// means we are SETTING data to appsession
- if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
request to SET data<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 1)
{
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
request to SET data<br />'); }
if (($compression)
&& (function_exists('gzcompress')))
{
$content_preped =
base64_encode(gzcompress(serialize($data)));
$data = '';
unset($data);
- if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
LEAVING, returning passthru value<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
LEAVING, returning passthru value<br />'); }
return
$GLOBALS['phpgw']->session->appsession($location, 'email', $content_preped);
}
else
{
- if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
LEAVING, returning passthru value<br>'); }
+ if
($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
LEAVING, returning passthru value<br />'); }
return
$GLOBALS['phpgw']->session->appsession($location, 'email', $data);
}
}
- if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
ERROR: we should have returned by now<br>'); }
+ if ($GLOBALS['phpgw']->msg->debug_so_class > 0) {
$GLOBALS['phpgw']->msg->dbug->out('so_mail_msg.so_appsession_passthru('.__LINE__.'):
ERROR: we should have returned by now<br />'); }
}
}
?>
====================================================
Index: email/inc/class.svc_debug.inc.php
diff -u email/inc/class.svc_debug.inc.php:1.2
email/inc/class.svc_debug.inc.php:1.3
--- email/inc/class.svc_debug.inc.php:1.2 Thu Dec 30 23:13:50 2004
+++ email/inc/class.svc_debug.inc.php Sun Mar 13 23:22:44 2005
@@ -219,7 +219,7 @@
{
echo '<pre>'; print_r($dump_obj); echo
'</pre>';
// EXPIREMENTAL
- //echo
'<br><small>'.$this->fake_print_r($dump_obj).'</small></br>';
+ //echo '<br
/><small>'.$this->fake_print_r($dump_obj).'</small></br>';
}
}
elseif (($output_to == 'fill_array')
@@ -247,7 +247,7 @@
}
else
{
- echo 'mail_msg_display: out: unknown value for
param $output_to ['.serialize($output_to).'] <br>';
+ echo 'mail_msg_display: out: unknown value for
param $output_to ['.serialize($output_to).'] <br />';
}
}
@@ -300,7 +300,7 @@
for ($i = 0; $i < $loops; $i++)
{
$this_line = $this->debugdata[$i];
- $this_line = str_replace("<br>", '
__LINEBREAK_BR__ ', $this_line);
+ $this_line = str_replace("<br />", '
__LINEBREAK_BR__ ', $this_line);
$this_line = str_replace("<br />", '
__LINEBREAK_BR__ ', $this_line);
$this_line = str_replace("\r\n", '
__LINEBREAK__ ', $this_line);
$this_line = str_replace("\r", '
__LINEBREAK__ ', $this_line);
====================================================
Index: email/inc/class.svc_nextmatches.inc.php
diff -u email/inc/class.svc_nextmatches.inc.php:1.3
email/inc/class.svc_nextmatches.inc.php:1.4
--- email/inc/class.svc_nextmatches.inc.php:1.3 Thu Dec 30 23:13:50 2004
+++ email/inc/class.svc_nextmatches.inc.php Sun Mar 13 23:22:44 2005
@@ -175,19 +175,19 @@
// add it back
*/
- //echo 'show_sort_order_mail: $program
['.serialize($program).'] <br>';
- //echo 'show_sort_order_mail: $extra
['.serialize($extra).'] <br>';
+ //echo 'show_sort_order_mail: $program
['.serialize($program).'] <br />';
+ //echo 'show_sort_order_mail: $extra
['.serialize($extra).'] <br />';
$prog = explode('?',$program);
- //echo 'show_sort_order_mail: $prog
['.serialize($prog).'] <br>';
+ //echo 'show_sort_order_mail: $prog
['.serialize($prog).'] <br />';
$extravar =
$prog[1].'&order='.$our_order.'&sort='.$new_sort.$extra;
- //echo 'show_sort_order_mail: $extravar
['.serialize($extravar).'] <br>';
+ //echo 'show_sort_order_mail: $extravar
['.serialize($extravar).'] <br />';
// this was b0rking menuaction when NOT using redirect,
instead using direct object calls to goto the next page
// in thise cases the menuaction that appears in the
url remains from the PREVIOUS action, not the object call produced next page
//$link =
($this->action?$this->page($extravar):$GLOBALS['phpgw']->link($program,$extravar));
//$link =
$GLOBALS['phpgw']->link($program,'email.index.uiindex'.$extravar);
$link = $GLOBALS['phpgw']->link($prog[0],$extravar);
- //echo 'show_sort_order_mail: $link
['.serialize($link).'] <br>';
+ //echo 'show_sort_order_mail: $link
['.serialize($link).'] <br />';
return '<a href="' .$link .'">' .$text .'</a>';
}
@@ -216,7 +216,7 @@
$this->icon_theme =
$GLOBALS['phpgw']->msg->get_pref_value('icon_theme');
$this->icon_size =
$GLOBALS['phpgw']->msg->get_pref_value('icon_size');
}
- //echo "icon size is ".$this->icon_size."<br>\r\n";
+ //echo "icon size is ".$this->icon_size."<br />\r\n";
$return_array = Array(
'first_page' => '',
@@ -241,14 +241,14 @@
($feed_vars['start'] > $this->maxmatches))
{
$out_vars['start'] = 0;
- //$return_array['first_page'] =
$this->set_link_mail('left',$this->icon_theme.'-arrow-2left-'.$this->icon_size.'.gif',lang('First
page'),$out_vars);
- //$return_array['first_page'] =
$this->set_link_mail('left',$this->icon_theme.'-arrow-2left-'.$this->icon_size.'.gif',$alt_text_first_page,$out_vars);
+ //$return_array['first_page'] =
$this->set_link_mail('left',$this->icon_theme.'-arrow-2left-'.$this->icon_size.'.png',lang('First
page'),$out_vars);
+ //$return_array['first_page'] =
$this->set_link_mail('left',$this->icon_theme.'-arrow-2left-'.$this->icon_size.'.png',$alt_text_first_page,$out_vars);
$return_array['first_page'] =
$this->set_link_mail('left',$this->icon_theme.'/arrow-2left-'.$this->icon_size,$alt_text_first_page,$out_vars);
}
else
{
- //$return_array['first_page'] =
$this->set_icon_mail('left',$this->icon_theme.'-arrow-2left-no-'.$this->icon_size.'.gif',lang('First
page'));
- //$return_array['first_page'] =
$this->set_icon_mail('left',$this->icon_theme.'-arrow-2left-no-'.$this->icon_size.'.gif',$alt_text_first_page);
+ //$return_array['first_page'] =
$this->set_icon_mail('left',$this->icon_theme.'-arrow-2left-no-'.$this->icon_size.'.png',lang('First
page'));
+ //$return_array['first_page'] =
$this->set_icon_mail('left',$this->icon_theme.'-arrow-2left-no-'.$this->icon_size.'.png',$alt_text_first_page);
$return_array['first_page'] =
$this->set_icon_mail('left',$this->icon_theme.'/arrow-2left-no-'.$this->icon_size,$alt_text_first_page);
}
// previous page
@@ -263,14 +263,14 @@
{
$out_vars['start'] =
($feed_vars['start'] - $this->maxmatches);
}
- //$return_array['prev_page'] =
$this->set_link_mail('left',$this->icon_theme.'-arrow-left-'.$this->icon_size.'.gif',lang('Previous
page'),$out_vars);
- //$return_array['prev_page'] =
$this->set_link_mail('left',$this->icon_theme.'-arrow-left-'.$this->icon_size.'.gif',$alt_text_prev_page,$out_vars);
+ //$return_array['prev_page'] =
$this->set_link_mail('left',$this->icon_theme.'-arrow-left-'.$this->icon_size.'.png',lang('Previous
page'),$out_vars);
+ //$return_array['prev_page'] =
$this->set_link_mail('left',$this->icon_theme.'-arrow-left-'.$this->icon_size.'.png',$alt_text_prev_page,$out_vars);
$return_array['prev_page'] =
$this->set_link_mail('left',$this->icon_theme.'/arrow-left-'.$this->icon_size,$alt_text_prev_page,$out_vars);
}
else
{
- //$return_array['prev_page'] =
$this->set_icon_mail('left',$this->icon_theme.'-arrow-left-no-'.$this->icon_size.'.gif',lang('Previous
page'));
- //$return_array['prev_page'] =
$this->set_icon_mail('left',$this->icon_theme.'-arrow-left-no-'.$this->icon_size.'.gif',$alt_text_prev_page);
+ //$return_array['prev_page'] =
$this->set_icon_mail('left',$this->icon_theme.'-arrow-left-no-'.$this->icon_size.'.png',lang('Previous
page'));
+ //$return_array['prev_page'] =
$this->set_icon_mail('left',$this->icon_theme.'-arrow-left-no-'.$this->icon_size.'.png',$alt_text_prev_page);
$return_array['prev_page'] =
$this->set_icon_mail('left',$this->icon_theme.'/arrow-left-no-'.$this->icon_size,$alt_text_prev_page);
}
@@ -282,12 +282,12 @@
($feed_vars['total'] > $feed_vars['start'] +
$this->maxmatches))
{
$out_vars['start'] = ($feed_vars['start'] +
$this->maxmatches);
- //$return_array['next_page'] =
$this->set_link_mail('right',$this->icon_theme.'-arrow-right-'.$this->icon_size.'.gif',$alt_text_next_page,$out_vars);
+ //$return_array['next_page'] =
$this->set_link_mail('right',$this->icon_theme.'-arrow-right-'.$this->icon_size.'.png',$alt_text_next_page,$out_vars);
$return_array['next_page'] =
$this->set_link_mail('right',$this->icon_theme.'/arrow-right-'.$this->icon_size,$alt_text_next_page,$out_vars);
}
else
{
- //$return_array['next_page'] =
$this->set_icon_mail('right',$this->icon_theme.'-arrow-right-no-'.$this->icon_size.'.gif',$alt_text_next_page);
+ //$return_array['next_page'] =
$this->set_icon_mail('right',$this->icon_theme.'-arrow-right-no-'.$this->icon_size.'.png',$alt_text_next_page);
$return_array['next_page'] =
$this->set_icon_mail('right',$this->icon_theme.'/arrow-right-no-'.$this->icon_size,$alt_text_next_page);
}
// last page
@@ -295,12 +295,12 @@
(($feed_vars['total'] - $this->maxmatches) >
($feed_vars['start'] + $this->maxmatches)))
{
$out_vars['start'] = ($feed_vars['total'] -
$this->maxmatches);
- //$return_array['last_page'] =
$this->set_link_mail('right',$this->icon_theme.'-arrow-2right-'.$this->icon_size.'.gif',$alt_text_last_page,$out_vars);
+ //$return_array['last_page'] =
$this->set_link_mail('right',$this->icon_theme.'-arrow-2right-'.$this->icon_size.'.png',$alt_text_last_page,$out_vars);
$return_array['last_page'] =
$this->set_link_mail('right',$this->icon_theme.'/arrow-2right-'.$this->icon_size,$alt_text_last_page,$out_vars);
}
else
{
- //$return_array['last_page'] =
$this->set_icon_mail('right',$this->icon_theme.'-arrow-2right-no-'.$this->icon_size.'.gif',$alt_text_last_page);
+ //$return_array['last_page'] =
$this->set_icon_mail('right',$this->icon_theme.'-arrow-2right-no-'.$this->icon_size.'.png',$alt_text_last_page);
$return_array['last_page'] =
$this->set_icon_mail('right',$this->icon_theme.'/arrow-2right-no-'.$this->icon_size,$alt_text_last_page);
}
return $return_array;
====================================================
====================================================
====================================================
Index: email/inc/class.spell.inc.php
diff -u email/inc/class.spell.inc.php:1.3 email/inc/class.spell.inc.php:1.4
--- email/inc/class.spell.inc.php:1.3 Thu Dec 30 23:13:50 2004
+++ email/inc/class.spell.inc.php Sun Mar 13 23:22:44 2005
@@ -114,7 +114,7 @@
\**************************************************************************/
function spell()
{
- if ($this->debug_init > 0) { echo 'ENTERING:
email.spell.CONSTRUCTOR'.'<br>'."\r\n"; }
+ if ($this->debug_init > 0) { echo 'ENTERING:
email.spell.CONSTRUCTOR'.'<br />'."\r\n"; }
/*!
@class requires including header utility file
spell_struct
@@ -172,7 +172,7 @@
//if ('one' == 'two')
if (function_exists('pspell_new') &&
function_exists('pspell_check'))
{
- if ($this->debug_init > 0) { echo
'email.spell.CONSTRUCTOR: loading real spell service
"spell_svc_php"'.'<br>'."\r\n"; }
+ if ($this->debug_init > 0) { echo
'email.spell.CONSTRUCTOR: loading real spell service "spell_svc_php"'.'<br
/>'."\r\n"; }
// load the spell service class for php builtin
pspell extension
$this->spell_svc =
CreateObject("email.spell_svc_php");
// open connection to dictionary backend
@@ -180,7 +180,7 @@
}
else
{
- if ($this->debug_init > 0) { echo
'email.spell.CONSTRUCTOR: loading DUMMY spell service'.'<br>'."\r\n"; }
+ if ($this->debug_init > 0) { echo
'email.spell.CONSTRUCTOR: loading DUMMY spell service'.'<br />'."\r\n"; }
// load the DUMMY spell service class so php
does not complain about undefined functions.
$this->spell_svc =
CreateObject("email.spell_svc_none");
@@ -193,9 +193,9 @@
// ask this service how it wants its input, single
words or lines of text
// This spell class is required to discover that and
make it public
$this->set_sp_feed_type($this->spell_svc->get_sp_feed_type());
- if ($this->debug_init > 0) { echo
'email.spell.CONSTRUCTOR: $this->get_can_spell() returns:
['.serialize($this->get_can_spell()).']<br>'."\r\n"; }
+ if ($this->debug_init > 0) { echo
'email.spell.CONSTRUCTOR: $this->get_can_spell() returns:
['.serialize($this->get_can_spell()).']<br />'."\r\n"; }
- if ($this->debug_init > 0) { echo 'EXIT:
email.spell.CONSTRUCTOR'.'<br>'."\r\n"; }
+ if ($this->debug_init > 0) { echo 'EXIT:
email.spell.CONSTRUCTOR'.'<br />'."\r\n"; }
return;
}
@@ -428,9 +428,9 @@
// to make the body DISPLAYABLE to the user, do 2 things
// 1) enc ode any offensive ASCII (&, ", ', <, >) into
their html specialchars equivalents
$body_display =
$GLOBALS['phpgw']->msg->htmlspecialchars_encode($body_display);
- // 2) convert linebreaks to <br> tags
+ // 2) convert linebreaks to <br /> tags
//$body_display =
ereg_replace("\r\n","_CRLF_",$body_display);
- $body_display =
ereg_replace("\r\n","<br>",$body_display);
+ $body_display = ereg_replace("\r\n","<br
/>",$body_display);
return $body_display;
}
@@ -592,7 +592,7 @@
$this_bad_word_element = $this->bad_words[$x];
if ($this_bad_word_element->line_num ==
$line_num)
{
- if ($this->debug_spellcheck > 0) { echo
'bad word ['.$this_bad_word_element->orig_word.'] exists on this line num
['.$this_bad_word_element->line_num.'], it is word num
['.$this_bad_word_element->word_num.']<br>'; }
+ if ($this->debug_spellcheck > 0) { echo
'bad word ['.$this_bad_word_element->orig_word.'] exists on this line num
['.$this_bad_word_element->line_num.'], it is word num
['.$this_bad_word_element->word_num.']<br />'; }
// make this particular bad word bolded
$word_in_question =
$line_array[$this_bad_word_element->word_num];
// is there any punctuation we need to
consider seperate from this word?
@@ -683,7 +683,7 @@
$this_bad_word_element = $this->bad_words[$x];
if ($this_bad_word_element->line_num ==
$line_num)
{
- if ($this->debug_spellcheck > 0) { echo
'bad word ['.$this_bad_word_element->orig_word.'] exists on this line num
['.$this_bad_word_element->line_num.'], it is word num
['.$this_bad_word_element->word_num.']<br>'; }
+ if ($this->debug_spellcheck > 0) { echo
'bad word ['.$this_bad_word_element->orig_word.'] exists on this line num
['.$this_bad_word_element->line_num.'], it is word num
['.$this_bad_word_element->word_num.']<br />'; }
// make this particular bad word bolded
// update: we don;t care about this
unclean version, we want the word that the spellchecker got, stripped of
punctuation
// however the punctuation around it
must be preserved for the email message
@@ -817,8 +817,8 @@
$this_bad_word_element = $this->bad_words[$x];
if ($this_bad_word_element->line_num ==
$line_num)
{
- //if ($this->debug_spell_finished > 1)
{ echo 'email.spell.replace_badwords_this_line: bad word
['.$this_bad_word_element->orig_word_clean.'] exists on this line num
['.$this_bad_word_element->line_num.'], it is word num
['.$this_bad_word_element->word_num.']<br>'; }
- //if ($this->debug_spell_finished > 2)
{ echo 'email.spell.replace_badwords_this_line: bad word:
['.$this_bad_word_element->orig_word_clean.'] :: user wants this replacement:
['.$this_bad_word_element->suggestions[0].'], if it is "K_E_E_P", do not
replace<br>'; }
+ //if ($this->debug_spell_finished > 1)
{ echo 'email.spell.replace_badwords_this_line: bad word
['.$this_bad_word_element->orig_word_clean.'] exists on this line num
['.$this_bad_word_element->line_num.'], it is word num
['.$this_bad_word_element->word_num.']<br />'; }
+ //if ($this->debug_spell_finished > 2)
{ echo 'email.spell.replace_badwords_this_line: bad word:
['.$this_bad_word_element->orig_word_clean.'] :: user wants this replacement:
['.$this_bad_word_element->suggestions[0].'], if it is "K_E_E_P", do not
replace<br />'; }
if
($this_bad_word_element->suggestions[0] == "K_E_E_P")
{
if ($this->debug_spell_finished
> 1) { echo 'email.spell.replace_badwords_this_line: bad word:
['.$this_bad_word_element->orig_word_clean.'] :: user wants NO CHANGE, found
"K_E_E_P" as suggextion[0], skipping to next bad_word loop via "continue"'; }
@@ -826,7 +826,7 @@
}
// ... replace the word ...
- if ($this->debug_spell_finished > 1) {
echo 'email.spell.replace_badwords_this_line: bad word:
['.$this_bad_word_element->orig_word_clean.'] :: user wants it replaced with
['.$this_bad_word_element->suggestions[0].']<br>'; }
+ if ($this->debug_spell_finished > 1) {
echo 'email.spell.replace_badwords_this_line: bad word:
['.$this_bad_word_element->orig_word_clean.'] :: user wants it replaced with
['.$this_bad_word_element->suggestions[0].']<br />'; }
$word_in_quesion_raw =
$line_array[$this_bad_word_element->word_num];
$processed_word =
str_replace($this_bad_word_element->orig_word_clean,
$this_bad_word_element->suggestions[0], $word_in_quesion_raw);
$line_array[$this_bad_word_element->word_num] = $processed_word;
@@ -841,11 +841,11 @@
// DEPRECIATED
function basic_spcheck()
{
- if ($this->debug_spellcheck > 0) { echo 'ENTERING:
email.spell.basic_spcheck'.'<br>'; }
+ if ($this->debug_spellcheck > 0) { echo 'ENTERING:
email.spell.basic_spcheck'.'<br />'; }
// DEPRECIATED
- if ($this->debug_spellcheck > 0) { echo 'LEAVING:
email.spell.basic_spcheck'.'<br>'; }
+ if ($this->debug_spellcheck > 0) { echo 'LEAVING:
email.spell.basic_spcheck'.'<br />'; }
}
/*!
@@ -857,9 +857,9 @@
function spell_review()
{
- if ($this->debug_spellcheck > 0) { echo 'ENTERING:
email.spell.spell_review'.'<br>'; }
- if ($this->debug_spellcheck > 0) { echo 'spell_review
lang(charset): ['.lang('charset').']<br>'; }
- if ($this->debug_spellcheck > 0) { echo 'spell_review
$this->user_lang: ['.$this->user_lang.']<br>'; }
+ if ($this->debug_spellcheck > 0) { echo 'ENTERING:
email.spell.spell_review'.'<br />'; }
+ if ($this->debug_spellcheck > 0) { echo 'spell_review
lang(charset): ['.lang('charset').']<br />'; }
+ if ($this->debug_spellcheck > 0) { echo 'spell_review
$this->user_lang: ['.$this->user_lang.']<br />'; }
unset($GLOBALS['phpgw_info']['flags']['noheader']);
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
@@ -901,23 +901,23 @@
for ($i=0; $i < $loops; $i++)
{
$this_line_str = $this->body_array[$i];
- if ($this->debug_spellcheck > 0) { echo
'<br>spell_review: this_line: ['.$this_line_str.']<br>'; }
+ if ($this->debug_spellcheck > 0) { echo '<br
/>spell_review: this_line: ['.$this_line_str.']<br />'; }
if (strlen($this_line_str) == 0)
{
// is this a blank line
- if ($this->debug_spellcheck > 0) { echo
'spell_review: skipping this line, it\'s blank'.'<br>'; }
+ if ($this->debug_spellcheck > 0) { echo
'spell_review: skipping this line, it\'s blank'.'<br />'; }
}
elseif ((stristr($this_line_str, ">"))
&& ($this_line_str[0] == '>'))
{
// does the line begin with a repoly
quoting char
- if ($this->debug_spellcheck > 0) { echo
'spell_review: skipping this line, it starts with a reply quote >
char'.'<br>'; }
+ if ($this->debug_spellcheck > 0) { echo
'spell_review: skipping this line, it starts with a reply quote > char'.'<br
/>'; }
}
else
{
// Line OK to check
- if ($this->debug_spellcheck > 0) { echo
'spell_review: we will examine this line... '.'<br>'; }
+ if ($this->debug_spellcheck > 0) { echo
'spell_review: we will examine this line... '.'<br />'; }
$word_for_word = array();
$word_for_word = explode(' ',
$this_line_str);
//echo 'spell_review: $word_for_word
DUMP <pre>'; print_r($word_for_word); echo '</pre>';
@@ -925,28 +925,28 @@
for ($x=0; $x < $words; $x++)
{
$this_word = $word_for_word[$x];
- if ($this->debug_spellcheck >
0) { echo ' spell_review: $this_word: ['.$this_word.'] ;
htmlspecialchars($this_word) ['.htmlspecialchars($this_word).']<br>'; }
+ if ($this->debug_spellcheck >
0) { echo ' spell_review: $this_word: ['.$this_word.'] ;
htmlspecialchars($this_word) ['.htmlspecialchars($this_word).']<br />'; }
if
($this->care_about_word($this_word) == False)
{
- if
($this->debug_spellcheck > 0) { echo ' spell_review: 1st test
$this->care_about_word advises to IGNORE this word, skipping to next word via
"continue"'.'<br> ... reject_reason: '.$this->reject_reason.'<br> . . . <br>'; }
+ if
($this->debug_spellcheck > 0) { echo ' spell_review: 1st test
$this->care_about_word advises to IGNORE this word, skipping to next word via
"continue"'.'<br /> ... reject_reason: '.$this->reject_reason.'<br /> . . . <br
/>'; }
continue;
}
//strip punctuation
$this_word_clean =
$this->strip_punctuation($this_word);
- if ($this->debug_spellcheck >
0) { echo ' spell_review: $this->strip_punctuation('.$this_word.')
returns ['.$this_word_clean.']<br>'; }
+ if ($this->debug_spellcheck >
0) { echo ' spell_review: $this->strip_punctuation('.$this_word.')
returns ['.$this_word_clean.']<br />'; }
if
($this->care_about_word($this_word_clean) == False)
{
- if
($this->debug_spellcheck > 0) { echo ' spell_review: 2nd test
$this->care_about_word advises to IGNORE this word, skipping to next word via
"continue"'.'<br> ... reject_reason: '.$this->reject_reason.'<br> . . . <br>'; }
+ if
($this->debug_spellcheck > 0) { echo ' spell_review: 2nd test
$this->care_about_word advises to IGNORE this word, skipping to next word via
"continue"'.'<br /> ... reject_reason: '.$this->reject_reason.'<br /> . . . <br
/>'; }
continue;
}
- if ($this->debug_spellcheck >
0) { echo ' spell_review: Spell Check OK to proceed on word:
['.$this_word_clean.']<br>'; }
+ if ($this->debug_spellcheck >
0) { echo ' spell_review: Spell Check OK to proceed on word:
['.$this_word_clean.']<br />'; }
// DO THE SPELL CHECK
if
($this->spell_svc->pgw_pspell_check ($this->pspell_link, $this_word_clean))
{
- if
($this->debug_spellcheck > 0) { echo ' spell_review: spelling OK
for ['.$this_word_clean.']<br>'; }
+ if
($this->debug_spellcheck > 0) { echo ' spell_review: spelling OK
for ['.$this_word_clean.']<br />'; }
}
else
{
@@ -963,7 +963,7 @@
$suggestions =
$this->spell_svc->pgw_pspell_suggest ($this->pspell_link, $this_word_clean);
if (
count($suggestions) == 0)
{
- if
($this->debug_spellcheck > 0) { echo ' spell_review:
['.$this_word_clean.'] has spelling problems, got '.count($suggestions).'
suggestions, sorry'.'<br>'; }
+ if
($this->debug_spellcheck > 0) { echo ' spell_review:
['.$this_word_clean.'] has spelling problems, got '.count($suggestions).'
suggestions, sorry'.'<br />'; }
}
else
{
@@ -974,22 +974,22 @@
{
break;
}
- //echo
' * for ['.$this_word.'] Possible spelling: ['.$suggestion.']'.'<br>'."\r\n";
- if
($this->debug_spellcheck > 0) { echo ' * '.$suggestion.'<br>'."\r\n"; }
+ //echo
' * for ['.$this_word.'] Possible spelling: ['.$suggestion.']'.'<br />'."\r\n";
+ if
($this->debug_spellcheck > 0) { echo ' * '.$suggestion.'<br />'."\r\n"; }
$this->bad_words[$idx]->suggestions[$cur_suggest] = $suggestion;
$cur_suggest++;
}
- //echo 'done
suggesting'.'<br><br>'."\r\n";
+ //echo 'done
suggesting'.'<br /><br />'."\r\n";
if
($this->debug_spellcheck > 0) { echo '</pre>'."\r\n"; }
}
}
// debug out a spacer before we
go to the next word
- if ($this->debug_spellcheck >
0) { echo ' . . . <br>'."\r\n"; }
+ if ($this->debug_spellcheck >
0) { echo ' . . . <br />'."\r\n"; }
}
}
}
- if ($this->debug_spellcheck > 0) { echo 'spell_review:
done with body array spell check loop'.'<br>'; }
+ if ($this->debug_spellcheck > 0) { echo 'spell_review:
done with body array spell check loop'.'<br />'; }
if ($this->debug_spellcheck > 0) { echo 'spell_review:
$this->bad_words DUMP<pre>'; print_r($this->bad_words); echo '</pre>'; }
@@ -1001,7 +1001,7 @@
// first, we can encode the html specialchars
that exist in the orig line
// this *should* not add any spaces, so word
number data should still be valid
$this_line_str =
$GLOBALS['phpgw']->msg->htmlspecialchars_encode($this_line_str);
- if ($this->debug_spellcheck > 0) { echo
'spell_review: RECONSTRUCT BODY this_line: ['.$this_line_str.']<br>'; }
+ if ($this->debug_spellcheck > 0) { echo
'spell_review: RECONSTRUCT BODY this_line: ['.$this_line_str.']<br />'; }
// any and all bad words in this line of text
are flagged now
//$this_line_str =
$this->html_mark_entire_line($this_line_str, $i);
@@ -1010,7 +1010,7 @@
$this->body_with_suggest .=
$this_line_str."\r\n";
}
- $this->body_with_suggest =
ereg_replace("\r\n","<br>",$this->body_with_suggest);
+ $this->body_with_suggest = ereg_replace("\r\n","<br
/>",$this->body_with_suggest);
$GLOBALS['phpgw']->template->set_var('body_with_suggestions',
$this->body_with_suggest);
// BUTTONS
@@ -1021,7 +1021,7 @@
$GLOBALS['phpgw']->template->set_var('btn_cancel',
$btn_cancel);
$GLOBALS['phpgw']->template->pfp('out','T_spell_main');
- if ($this->debug_spellcheck > 0) { echo 'EXITT:
email.spell.spell_review'.'<br>'; }
+ if ($this->debug_spellcheck > 0) { echo 'EXITT:
email.spell.spell_review'.'<br />'; }
}
@@ -1038,7 +1038,7 @@
*/
function spell_finished()
{
- if ($this->debug_spell_finished > 0) { echo 'ENTERING:
email.spell.spell_finished'.'<br>'; }
+ if ($this->debug_spell_finished > 0) { echo 'ENTERING:
email.spell.spell_finished'.'<br />'; }
// this function is in class.msgl_bootstrap.inc.php, we
created in the constructor for this class.
$this->msg_bootstrap->ensure_mail_msg_exists('email.spell.spell_finished',
$this->debug_spell_finished);
@@ -1054,14 +1054,14 @@
if
((isset($GLOBALS['phpgw']->msg->ref_POST['btn_apply']))
&& ($GLOBALS['phpgw']->msg->ref_POST['btn_apply'] !=
''))
{
- if ($this->debug_spell_finished > 1) { echo
'email.spell.spell_finished: btn_apply was pressed<br>'; }
+ if ($this->debug_spell_finished > 1) { echo
'email.spell.spell_finished: btn_apply was pressed<br />'; }
// recover the spellcheck data which was
encooded as a URI get string in the spelling comboboxes
$all_badwords = array();
// ---- extract any "fake_uri" embedded data
from HTTP_POST_VARS ----
// note: this happens automatically for
HTTP_GET_VARS
if (is_array($GLOBALS['phpgw']->msg->ref_POST))
{
- if ($this->debug_spell_finished > 1) {
echo '$GLOBALS[HTTP_POST_VARS] is array<br>'; }
+ if ($this->debug_spell_finished > 1) {
echo '$GLOBALS[HTTP_POST_VARS] is array<br />'; }
@reset($GLOBALS['phpgw']->msg->ref_POST);
while(list($key,$value) =
each($GLOBALS['phpgw']->msg->ref_POST))
{
@@ -1089,7 +1089,7 @@
if ($this->debug_spell_finished > 1) { echo
'email.spell.spell_finished:
$this->make_correction_struct_from_array($all_badwords) Fills
$this->bad_words[] DUMP:<pre>'; print_r($this->bad_words); echo '</pre>'; }
// REPLACE WORDS
- if ($this->debug_spell_finished > 1) { echo
'email.spell.spell_finished: btn_apply was pressed, fix misspelled words if
necessary <br>'; }
+ if ($this->debug_spell_finished > 1) { echo
'email.spell.spell_finished: btn_apply was pressed, fix misspelled words if
necessary <br />'; }
$this->body_array = array();
$this->body_array =
$GLOBALS['phpgw']->msg->explode_linebreaks($this->body_orig);
@@ -1102,7 +1102,7 @@
for ($i=0; $i < $loops; $i++)
{
$this_line_str = $this->body_array[$i];
- if ($this->debug_spell_finished > 0) {
echo '<br>email.spell.spell_finished: this_line: ['.$this_line_str.']<br>'; }
+ if ($this->debug_spell_finished > 0) {
echo '<br />email.spell.spell_finished: this_line: ['.$this_line_str.']<br />';
}
// any and all replacable bad words in
this line of text are replaced now, the entire line os processed at the same
time
$this_line_str =
$this->replace_badwords_this_line($this_line_str, $i);
$this->body_with_suggest .=
$this_line_str."\r\n";
@@ -1111,13 +1111,13 @@
}
else
{
- if ($this->debug_spell_finished > 1) { echo
'email.spell.spell_finished: btn_cancel was pressed (or at lease, btn_apply was
not pressed ...)<br>'; }
+ if ($this->debug_spell_finished > 1) { echo
'email.spell.spell_finished: btn_cancel was pressed (or at lease, btn_apply was
not pressed ...)<br />'; }
// CANCEL was pressed, user wants no word
substitutions
// simply fill $this->body_with_suggest with
$this->body_orig, then the rest of the code is the same
$this->body_with_suggest = $this->body_orig;
}
- //$this->body_with_suggest =
ereg_replace("\r\n","<br>",$this->body_with_suggest);
+ //$this->body_with_suggest = ereg_replace("\r\n","<br
/>",$this->body_with_suggest);
if ($this->debug_spell_finished > 1) { echo
'email.spell.spell_finished: FINAL PROCESSED BODY:
$this->body_with_suggest:<pre>'.$this->body_with_suggest.'</pre>'; }
// TELL BOCOMPOSE TO DO ITS THING WITH THIS SPELL FIXED
BODY
@@ -1127,7 +1127,7 @@
- if ($this->debug_spell_finished > 0) { echo 'EXIT:
email.spell.spell_finished'.'<br>'; }
+ if ($this->debug_spell_finished > 0) { echo 'EXIT:
email.spell.spell_finished'.'<br />'; }
}
====================================================
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] email/inc new_nav.js, 1.2 selectboxes.js, 1.3 hook_settings.inc.php, 1.5 hook_preferences.inc.php, 1.16 class.bomessage.inc.php, 1.16 class.bopreferences.inc.php, 1.25 class.bosend.inc.php, 1.13 class.bojsaddressbook.inc.php, 1.3 class.boindex.inc.php, 1.32 class.bofilters.inc.php, 1.16 class.bofolder.inc.php, 1.10 class.html_widgets.inc.php, 1.5 class.mail_dcom.inc.php, 1.12 class.mail_dcom_nntp.inc.php, 1.6 class.mail_dcom_nntp_sock.inc.php, 1.6 class.mail_dcom_imap_sock.inc.php, 1.17 class.mail_dcom_imap.inc.php, 1.23 class.mail_dcom_base.inc.php, 1.11 class.mail_dcom_base_sock.inc.php, 1.26 class.bocompose.inc.php, 1.10 class.boattach_file.inc.php, 1.6 class.boaction.inc.php, 1.19 class.mail_dcom_pop3.inc.php, 1.13 class.mail_dcom_pop3_sock.inc.php, 1.21 class.uijsaddressbook.inc.php, 1.5 class.uimessage.inc.php, 1.13 class.uiindex.inc.php, 1.24 class.uifolder.inc.php, 1.7 class.uicompose.inc.php, 1.7 class.uifilters.inc.php, 1.16 class.uipreferences.inc.php, 1.19 class.uisearch.inc.php, 1.3 ho ok_notifywindow.inc.php, 1.13 hook_notifywindow_simple.inc.php, 1.11 hook_manual.inc.php, 1.10 hook_home.inc.php, 1.58 functions.inc.php, 1.119 hook_admin.inc.php, 1.9 class.uiattach_file.inc.php, 1.4 class.ui_mail_debug.inc.php, 1.4 class.mail_msg_wrappers.inc.php, 1.40 class.mail_send.inc.php, 1.13 class.mail_msg_display.inc.php, 1.43 class.mail_msg_base.inc.php, 1.81 class.mail_filters.inc.php, 1.9 class.mail_msg.inc.php, 1.6 class.msg_bootstrap.inc.php, 1.4 class.so_mail_msg.inc.php, 1.3 class.svc_debug.inc.php, 1.3 class.svc_nextmatches.inc.php, 1.4 class.spell_svc_php.inc.php, 1.4 class.spell_svc_none.inc.php, 1.4 class.spell.inc.php, 1.4 class.spell_struct.inc.php, 1.4,
skwashd <=
- Prev by Date:
[Phpgroupware-cvs] email/templates/base/images/evo save-16.png,1.1
- Next by Date:
[Phpgroupware-cvs] email/templates/base index_main_b0_l2.tpl, 1.3 search_results.tpl, 1.2 index_main_b0_l1.tpl, 1.3 compose.tpl, 1.3 addressbook.tpl, 1.3 message_main.tpl, 1.3
- Previous by thread:
[Phpgroupware-cvs] email/templates/base/images/evo save-16.png,1.1
- Next by thread:
[Phpgroupware-cvs] email/templates/base index_main_b0_l2.tpl, 1.3 search_results.tpl, 1.2 index_main_b0_l1.tpl, 1.3 compose.tpl, 1.3 addressbook.tpl, 1.3 message_main.tpl, 1.3
- Index(es):