$decoder = new Mail_mimeDecode($mailtext);
$parts = $decoder->getSendArray();
- if (PEAR::isError($parts)) {
+ if (is_a($parts,'PEAR_Error')) {
return $parts;
//echo "PROBLEM: {$parts->message}";
//exit;
$u->whereAdd(' LENGTH(passwd) > 0');
$n = $u->count();
$_SESSION[get_class($this)][$sesPrefix .'-empty'] = $n;
- $error = PEAR::getStaticProperty('DB_DataObject','lastError');
- if ($error) {
- die($error->toString()); // not really a good thing to do...
+ if (class_exists('PEAR')) {
+ $error = PEAR::getStaticProperty('DB_DataObject','lastError');
+ if ($error) {
+ die($error->toString()); // not really a good thing to do...
+ }
}
if (!$n){ // authenticated as there are no users in the system...
return true;
}
//echo '<PRE>';print_r($ar);
header('Content-type: text/javascript');
+ echo "Roo.namespace('Pman.I18n');";
echo 'Pman.I18n.Data = ' . json_encode($ar);
exit;
"closable" : false,
"resizable" : false,
"haveProgress" : false,
- "height" : 200,
+ "height" : 140,
"$ uploadProgress" : "function()\n{\n var dlg = this;\n if (!dlg.haveProgress) {\n Roo.MessageBox.progress(\"Uploading\", \"Uploading\");\n }\n \n if (dlg.haveProgress == 2) {\n // it's been closed elsewhere..\n return;\n }\n if (dlg.uploadComplete) {\n Roo.MessageBox.hide();\n return;\n }\n \n dlg.haveProgress = 1;\n\n var uid = _this.form.findField('UPLOAD_IDENTIFIER').getValue();\n new Pman.Request({\n url : baseURL + '/Core/UploadProgress.php',\n params: {\n id : uid\n },\n method: 'GET',\n success : function(res){\n //console.log(data);\n var data = res.data;\n if (dlg.haveProgress == 2) {\n // it's been closed elsewhere..\n return;\n }\n \n if (dlg.uploadComplete) {\n Roo.MessageBox.hide();\n return;\n }\n \n if (data){\n Roo.MessageBox.updateProgress(data.bytes_uploaded/data.bytes_total,\n Math.floor((data.bytes_total - data.bytes_uploaded)/1000) + 'k remaining'\n );\n } else {\n Roo.MessageBox.updateProgress(1,\n \"Upload Complete - processing\"\n );\n return;\n }\n dlg.uploadProgress.defer(2000,dlg);\n },\n failure: function(data) {\n // console.log('fail');\n // console.log(data);\n }\n })\n \n}\n",
"items" : [
{