Merged in release/3.2.2 (pull request #6026)

Release/3.2.2

Approved-by: Paula Quispe <paula.quispe@processmaker.com>
This commit is contained in:
Paula Quispe
2017-08-29 17:08:32 +00:00
116 changed files with 1085 additions and 313 deletions

2
.gitignore vendored
View File

@@ -39,3 +39,5 @@ build-prod.zip
node_modules
/workflow/engine/config/system-tables.ini
test_shared/
**/cache/
storage/

148
bootstrap/classaliasmap.php Normal file
View File

@@ -0,0 +1,148 @@
<?php
/**
* Class alias map to ensures backwards compatibility.
*/
return array(
'actionsByEmailCoreClass' => ActionsByEmailCoreClass::class,
'AppDocumentDrive' => AppDocumentDrive::class,
'ApplicationAPP_DATAUnserializeException' => ApplicationAppDataUnserializeException::class,
'Applications' => Applications::class,
'ApplicationWithCorruptDynaformException' => ApplicationWithCorruptDynaformException::class,
'ApplicationWithoutDelegationRecordsException' => ApplicationWithoutDelegationRecordsException::class,
'AppSolr' => AppSolr::class,
'archive' => Archive::class,
'ArrayBasePeer' => ArrayBasePeer::class,
'BpmnEngine_SearchIndexAccess_Solr' => BpmnEngineSearchIndexAccessSolr::class,
'BpmnEngine_Services_SearchIndex' => BpmnEngineServicesSearchIndex::class,
'calendar' => Calendar::class,
'Cases' => Cases::class,
'CLI' => CLI::class,
'Configurations' => Configurations::class,
'ConsolidatedCases' => ConsolidatedCases::class,
'Dashboards' => Dashboards::class,
'dashletOpenVSCompleted' => DashletOpenVsCompleted::class,
'dashletProcessMakerCommunity' => DashletProcessMakerCommunity::class,
'dashletProcessMakerEnterprise' => DashletProcessMakerEnterprise::class,
'dashletRssReader' => DashletRssReader::class,
'dates' => Dates::class,
'dbConnections' => DbConnections::class,
'Derivation' => Derivation::class,
'dynaformEditor' => DynaformEditor::class,
'dynaformEditorAjax' => DynaformEditorAjax::class,
'DynaFormField' => DynaFormField::class,
'enterpriseClass' => EnterpriseClass::class,
'EnterpriseUtils' => EnterpriseUtils::class,
'featuresDetail' => FeaturesDetail::class,
'FieldValidator' => FieldValidator::class,
'FileCache' => FileCache::class,
'FormBatchRouting' => FormBatchRouting::class,
'Groups' => Groups::class,
'GulliverBasePeer' => GulliverBasePeer::class,
'indicatorsCalculator' => IndicatorsCalculator::class,
'Installer' => \ProcessMaker\Core\Installer::class,
'installer' => \ProcessMaker\Core\Installer::class,
'InvalidIndexSearchTextException' => InvalidIndexSearchTextException::class,
'JavaBridgePM' => JavaBridgePM::class,
'labelsGmail' => labelsGmail::class,
'ldapAdvanced' => LdapAdvanced::class,
'License_Application' => license_application::class,
'multipleFilesBackup' => MultipleFilesBackup::class,
'NET' => Net::class,
'p11835' => P11835::class,
'padl' => Padl::class,
'pluginDetail' => PluginDetail::class,
'PMDashlet' => PmDashlet::class,
'PMDrive' => PmDrive::class,
'pmDynaform' => PmDynaform::class,
'pmGauge' => PmGauge::class,
'PMGoogleApi' => PmGoogleApi::class,
'pmLicenseManager' => PmLicenseManager::class,
'PMmemcached' => PMmemcached::class,
'pmPhing' => PmPhing::class,
'PMPlugin' => PMPlugin::class,
'pmSsoClass' => PmSsoClass::class,
'PmTable' => PmTable::class,
'popupMenu' => PopupMenu::class,
'Processes' => Processes::class,
'ProcessMakerWebDav' => ProcessMakerWebDav::class,
'processMap' => ProcessMap::class,
'propelTable' => PropelTable::class,
'replacementLogo' => ReplacementLogo::class,
'Report' => Report::class,
'ReportTables' => ReportTables::class,
'serverConf' => ServerConf::class,
'Sessions' => Sessions::class,
'spoolRun' => SpoolRun::class,
'System' => \ProcessMaker\Core\System::class,
'Tasks' => Tasks::class,
'ToolBar' => ToolBar::class,
'Tree' => PmTree::class,
'triggerLibrary' => TriggerLibrary::class,
'Upgrade' => Upgrade::class,
'workspaceTools' => WorkspaceTools::class,
'wsBase' => WsBase::class,
'wsResponse' => WsResponse::class,
'XMLConnection' => XMLConnection::class,
'XMLDB' => XMLDB::class,
'XmlForm_Field' => XmlFormField::class,
'XmlForm_Field_Button' => XmlFormFieldButton::class,
'XmlForm_Field_Caption' => XmlFormFieldCaption::class,
'XmlForm_Field_CaptionCurrency' => XmlFormFieldCaptionCurrency::class,
'XmlForm_Field_CaptionPercentage' => XmlFormFieldCaptionPercentage::class,
'XmlForm_Field_CellMark' => XmlFormFieldCellMark::class,
'XmlForm_Field_Checkbox' => XmlFormFieldCheckbox::class,
'XmlForm_Field_Checkbox2' => XmlFormFieldCheckbox2::class,
'XmlForm_Field_Checkboxpt' => XmlFormFieldCheckboxpt::class,
'XmlForm_Field_CheckBoxTable' => XmlFormFieldCheckBoxTable::class,
'XmlForm_Field_CheckBoxTable' => XmlFormFieldCheckBoxTable::class,
'XmlForm_Field_CheckGroup' => XmlFormFieldCheckGroup::class,
'XmlForm_Field_CheckGroupView' => XmlFormFieldCheckGroupView::class,
'XmlForm_Field_Currency' => XmlFormFieldCurrency::class,
'XmlForm_Field_Date' => XmlFormFieldDate::class,
'XmlForm_Field_Date2' => XmlFormFieldDate2::class,
'XmlForm_Field_Date5' => XmlFormFieldDate5::class,
'XmlForm_Field_DateView' => XmlFormFieldDateView::class,
'XmlForm_Field_Dropdown' => XmlFormFieldDropdown::class,
'XmlForm_Field_Dropdownpt' => XmlFormFieldDropdownpt::class,
'XmlForm_Field_DVEditor' => XmlFormFieldDVEditor::class,
'XmlForm_Field_FastSearch' => XmlFormFieldFastSearch::class,
'XmlForm_Field_File' => XmlFormFieldFile::class,
'XmlForm_Field_Grid' => XmlFormFieldGrid::class,
'XmlForm_Field_Hidden' => XmlFormFieldHidden::class,
'XmlForm_Field_hours' => XmlFormFieldHours::class,
'XmlForm_Field_Hours' => XmlFormFieldHours::class,
'XmlForm_Field_HTML' => XmlFormFieldHTML::class,
'XmlForm_Field_Image' => XmlFormFieldImage::class,
'XmlForm_Field_Image' => XmlFormFieldImage::class,
'XmlForm_Field_JavaScript' => XmlFormFieldJavaScript::class,
'XmlForm_Field_Label' => XmlFormFieldLabel::class,
'XmlForm_Field_Link' => XmlFormFieldLink::class,
'XmlForm_Field_Listbox' => XmlFormFieldListbox::class,
'XmlForm_Field_Password' => XmlFormFieldPassword::class,
'XmlForm_Field_Percentage' => XmlFormFieldPercentage::class,
'XmlForm_Field_PopupOption' => XmlFormFieldPopupOption::class,
'XmlForm_Field_Print' => XmlFormFieldPrint::class,
'XmlForm_Field_RadioGroup' => XmlFormFieldRadioGroup::class,
'XmlForm_Field_RadioGroupView' => XmlFormFieldRadioGroupView::class,
'XmlForm_Field_Reset' => XmlFormFieldReset::class,
'XmlForm_Field_SimpleText' => XmlFormFieldSimpleText::class,
'XmlForm_Field_Submit' => XmlFormFieldSubmit::class,
'XmlForm_Field_Subtitle' => XmlFormFieldSubtitle::class,
'XmlForm_Field_Suggest' => XmlFormFieldSuggest::class,
'XmlForm_Field_Text' => XmlFormFieldText::class,
'XmlForm_Field_Textarea' => XmlFormFieldTextarea::class,
'XmlForm_Field_TextareaPM' => XmlFormFieldTextareaPm::class,
'XmlForm_Field_TextareaPm' => XmlFormFieldTextareaPm::class,
'XmlForm_Field_TextPM' => XmlFormFieldTextPm::class,
'XmlForm_Field_TextPm' => XmlFormFieldTextPm::class,
'XmlForm_Field_Title' => XmlFormFieldTitle::class,
'XmlForm_Field_ToolBar' => XmlFormFieldToolBar::class,
'XmlForm_Field_ToolBar' => XmlFormFieldToolBar::class,
'XmlForm_Field_toolButton' => XmlFormFieldToolButton::class,
'XmlForm_Field_ToolButton' => XmlFormFieldToolButton::class,
'XmlForm_Field_WYSIWYGEditor' => XmlFormFieldWYSIWYGEditor::class,
'XmlForm_Field_Xmlform' => XmlFormFieldXmlform::class,
'XmlForm_Field_XmlMenu' => XmlFormFieldXmlMenu::class,
'XmlForm_Field_YesNo' => XmlFormFieldYesNo::class,
'XMLResult' => XMLResult::class,
);

View File

@@ -41,9 +41,9 @@
"libchart/libchart": "1.4.0",
"indeyets/pake": "1.99.*",
"phpmailer/phpmailer": "5.2.*",
"tecnickcom/tcpdf": "6.2.*",
"pear/archive_tar": "1.4.*",
"pear/console_getopt": "1.4.*"
"pear/console_getopt": "1.4.*",
"TYPO3/class-alias-loader": "^1.0"
},
"require-dev": {
"guzzle/guzzle": "~3.1.1",
@@ -93,5 +93,12 @@
"scripts": {
"post-install-cmd": "\"vendor/bin/phpcs\" --config-set installed_paths vendor/wimg/php-compatibility",
"post-update-cmd" : "\"vendor/bin/phpcs\" --config-set installed_paths vendor/wimg/php-compatibility"
},
"extra": {
"typo3/class-alias-loader": {
"class-alias-maps": [
"bootstrap/classaliasmap.php"
]
}
}
}

305
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -113,6 +113,32 @@ class Common
return $result;
}
/**
* Maintained for compatibility reasons with the plugin DataReportingTool
* @deprecated 3.2.2, by backward compatibility because it is used in plugins enterprise
*
*/
public static function getLastVersion($pattern, $flag = 0)
{
$files = glob($pattern, $flag);
$maxVersion = 0;
$pattern = str_replace("*", '([0-9\.]+)', basename($pattern));
foreach ($files as $file) {
$filename = basename($file);
if (preg_match('/'.$pattern.'/', $filename, $match)) {
if ($maxVersion < $match[1]) {
$maxVersion = $match[1];
}
}
}
return $maxVersion;
}
public static function mk_dir($strPath, $rights = 0777)
{
$folder_path = array($strPath);

View File

@@ -2,6 +2,7 @@
namespace Maveriks;
use Bootstrap;
use Maveriks\Util;
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
@@ -485,10 +486,11 @@ class WebApplication
// Change storage path
app()->useStoragePath(realpath(PATH_DATA));
app()->make(Kernel::class)->bootstrap();
error_reporting(error_reporting() & ~E_STRICT & ~E_DEPRECATED);
\Bootstrap::setLanguage();
Bootstrap::setLanguage();
\Bootstrap::LoadTranslationObject((defined("SYS_LANG")) ? SYS_LANG : "en");
Bootstrap::LoadTranslationObject((defined("SYS_LANG")) ? SYS_LANG : "en");
if (empty($workspace)) {
return true;
@@ -585,6 +587,11 @@ class WebApplication
define('TIME_ZONE', ini_get('date.timezone'));
$oPluginRegistry = PluginRegistry::loadSingleton();
$attributes = $oPluginRegistry->getAttributes();
Bootstrap::LoadTranslationPlugins(defined('SYS_LANG') ? SYS_LANG : "en", $attributes);
// Initialization functions plugins
$oPluginRegistry->init();
//Return
return true;
}

View File

@@ -694,7 +694,7 @@ class Bootstrap
// Include also the extendGulliverClass that could have some
// new definitions for fields
if (file_exists($possiblePath . 'classes' . PATH_SEP . 'class.extendGulliver.php')) {
include_once $possiblePath . 'classes' . PATH_SEP . 'class.extendGulliver.php';
}
}
}

View File

@@ -6,7 +6,6 @@ use Illuminate\Foundation\Console\Kernel;
require_once __DIR__ . '/gulliver/system/class.g.php';
require_once __DIR__ . '/bootstrap/autoload.php';
require_once __DIR__ . '/bootstrap/app.php';
$app->make(Kernel::class)->bootstrap();
$scriptDir = dirname(__FILE__).'/';

View File

@@ -215,7 +215,6 @@ class Roles extends BaseRoles {
function createRole($aData) {
$con = Propel::getConnection(RolesPeer::DATABASE_NAME);
try {
$con->begin();
$sRolCode = $aData['ROL_CODE'];
$sRolSystem = $aData['ROL_SYSTEM'];
$status = $fields['ROL_STATUS'] = 1 ? 'ACTIVE' : 'INACTIVE';
@@ -239,6 +238,7 @@ class Roles extends BaseRoles {
$obj = new Roles();
$obj->fromArray($aData, BasePeer::TYPE_FIELDNAME);
if ($obj->validate()) {
$con->begin();
$result = $obj->save();
$con->commit();
$obj->setRolName($rol_name);

View File

@@ -1,7 +1,6 @@
<?php
require_once "HTTP/WebDAV/Server.php";
require_once "System.php";
/**
* Filesystem access using WebDAV
@@ -479,7 +478,7 @@
if (is_dir($path)) {
$query = "DELETE FROM properties WHERE path LIKE '".$this->_slashify($options["path"])."%'";
mysql_query($query);
System::rm("-rf $path");
PearSystem::rm("-rf $path");
} else {
unlink ($path);
}
@@ -577,7 +576,7 @@
mysql_query($query);
} else {
if (is_dir($source)) {
$files = System::find($source);
$files = PearSystem::find($source);
$files = array_reverse($files);
} else {
$files = array($source);

View File

@@ -159,8 +159,8 @@ class OS_Guess
{
// Use glibc's <features.h> header file to
// get major and minor version number:
include_once "System.php";
$tmpfile = System::mktemp("glibctest");
include_once "PearSystem.php";
$tmpfile = PearSystem::mktemp("glibctest");
$fp = fopen($tmpfile, "w");
fwrite($fp, "#include <features.h>\n__GLIBC__ __GLIBC_MINOR__\n");
fclose($fp);

View File

@@ -245,9 +245,9 @@ class PEAR_Builder extends PEAR_Common
$build_dir = "$build_basedir/$info[package]-$info[version]";
$this->log(1, "building in $build_dir");
if (is_dir($build_dir)) {
System::rm("-rf $build_dir");
PearSystem::rm("-rf $build_dir");
}
if (!System::mkDir("-p $build_dir")) {
if (!PearSystem::mkDir("-p $build_dir")) {
return $this->raiseError("could not create build dir: $build_dir");
}
$this->addTempFile($build_dir);

View File

@@ -531,9 +531,9 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
return $this->raiseError($info);
}
include_once "Archive/Tar.php";
include_once "System.php";
include_once "PearSystem.php";
$tar = new Archive_Tar($params[0]);
$tmpdir = System::mktemp('-d pearsign');
$tmpdir = PearSystem::mktemp('-d pearsign');
if (!$tar->extractList('package.xml package.sig', $tmpdir)) {
return $this->raiseError("failed to extract tar file");
}
@@ -569,10 +569,10 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
}
include_once "Archive/Tar.php";
include_once "PEAR/Installer.php";
include_once "System.php";
include_once "PearSystem.php";
$tar = new Archive_Tar($params[0]);
$tmpdir = System::mktemp('-d pear2rpm');
$instroot = System::mktemp('-d pear2rpm');
$tmpdir = PearSystem::mktemp('-d pear2rpm');
$instroot = PearSystem::mktemp('-d pear2rpm');
$tmp = $this->config->get('verbose');
$this->config->set('verbose', 0);
$installer = new PEAR_Installer($this->ui);
@@ -592,10 +592,7 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
if (!file_exists("$tmpdir/package.xml")) {
return $this->raiseError("no package.xml found in $params[0]");
}
// System::mkdir("-p $instroot$info[rpm_xml_dir]");
// if (!@copy("$tmpdir/package.xml", "$instroot$info[rpm_xml_dir]/$info[package].xml")) {
// return $this->raiseError("could not copy package.xml file: $php_errormsg");
// }
if (isset($options['spec-template'])) {
$spec_template = $options['spec-template'];
} else {

View File

@@ -21,7 +21,6 @@
require_once 'PEAR.php';
require_once 'Archive/Tar.php';
require_once 'System.php';
require_once 'PEAR/Config.php';
// {{{ constants and globals
@@ -156,7 +155,7 @@ class PEAR_Common extends PEAR
$tempfiles =& $GLOBALS['_PEAR_Common_tempfiles'];
while ($file = array_shift($tempfiles)) {
if (@is_dir($file)) {
System::rm("-rf $file");
PearSystem::rm("-rf $file");
} elseif (file_exists($file)) {
unlink($file);
}
@@ -186,7 +185,7 @@ class PEAR_Common extends PEAR
// {{{ mkDirHier()
/**
* Wrapper to System::mkDir(), creates a directory as well as
* Wrapper to PearSystem::mkDir(), creates a directory as well as
* any necessary parent directories.
*
* @param string $dir directory name
@@ -198,7 +197,7 @@ class PEAR_Common extends PEAR
function mkDirHier($dir)
{
$this->log(2, "+ create dir $dir");
return System::mkDir("-p $dir");
return PearSystem::mkDir("-p $dir");
}
// }}}
@@ -246,7 +245,7 @@ class PEAR_Common extends PEAR
} else {
$topt = '';
}
if (!$tmpdir = System::mktemp($topt . '-d pear')) {
if (!$tmpdir = PearSystem::mktemp($topt . '-d pear')) {
return false;
}
$this->addTempFile($tmpdir);
@@ -686,7 +685,7 @@ class PEAR_Common extends PEAR
break;
}
}
$tmpdir = System::mkTemp('-d pear');
$tmpdir = PearSystem::mkTemp('-d pear');
$this->addTempFile($tmpdir);
if (!$xml || !$tar->extractList($xml, $tmpdir)) {
return $this->raiseError('could not extract the package.xml file');

View File

@@ -19,7 +19,6 @@
// $Id: Config.php,v 1.43 2003/03/18 12:06:06 ssb Exp $
require_once 'PEAR.php';
require_once 'System.php';
/**
* Last created PEAR_Config instance.
@@ -112,7 +111,7 @@ if (getenv('PHP_PEAR_CACHE_DIR')) {
define('PEAR_CONFIG_DEFAULT_CACHE_DIR', getenv('PHP_PEAR_CACHE_DIR'));
} else {
define('PEAR_CONFIG_DEFAULT_CACHE_DIR',
System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' .
PearSystem::tmpdir() . DIRECTORY_SEPARATOR . 'pear' .
DIRECTORY_SEPARATOR . 'cache');
}
@@ -164,7 +163,7 @@ if (getenv('PHP_PEAR_SIG_BIN')) {
define('PEAR_CONFIG_DEFAULT_SIG_BIN', getenv('PHP_PEAR_SIG_BIN'));
} else {
define('PEAR_CONFIG_DEFAULT_SIG_BIN',
System::which(
PearSystem::which(
'gpg', OS_WINDOWS ? 'c:\gnupg\gpg.exe' : '/usr/local/bin/gpg'));
}
@@ -564,7 +563,7 @@ class PEAR_Config extends PEAR
}
$data = $this->configuration[$layer];
$this->_encodeOutput($data);
if (!@System::mkDir("-p " . dirname($file))) {
if (!@PearSystem::mkDir("-p " . dirname($file))) {
return $this->raiseError("could not create directory: " . dirname($file));
}
if (@is_file($file) && !@is_writeable($file)) {

View File

@@ -22,7 +22,6 @@
require_once 'PEAR/Common.php';
require_once 'PEAR/Registry.php';
require_once 'PEAR/Dependency.php';
require_once 'System.php';
define('PEAR_INSTALLER_OK', 1);
define('PEAR_INSTALLER_FAILED', 0);
@@ -534,7 +533,7 @@ class PEAR_Installer extends PEAR_Common
if ($need_download) {
$downloaddir = $this->config->get('download_dir');
if (empty($downloaddir)) {
if (PEAR::isError($downloaddir = System::mktemp('-d'))) {
if (PEAR::isError($downloaddir = PearSystem::mktemp('-d'))) {
return $downloaddir;
}
$this->log(2, '+ tmp dir created at ' . $downloaddir);
@@ -559,7 +558,7 @@ class PEAR_Installer extends PEAR_Common
chdir($oldcwd);
}
if (PEAR::isError($tmpdir = System::mktemp('-d'))) {
if (PEAR::isError($tmpdir = PearSystem::mktemp('-d'))) {
return $tmpdir;
}
$this->log(2, '+ tmp dir created at ' . $tmpdir);

View File

@@ -20,7 +20,6 @@
// $Id: Packager.php,v 1.46 2003/03/18 12:06:06 ssb Exp $
require_once 'PEAR/Common.php';
require_once 'System.php';
/**
* Administration class used to make a PEAR release tarball.
@@ -116,7 +115,7 @@ class PEAR_Packager extends PEAR_Common
chdir($oldcwd);
return $this->raiseError($new_xml);
}
if (!($tmpdir = System::mktemp('-t '.getcwd().' -d'))) {
if (!($tmpdir = PearSystem::mktemp('-t '.getcwd().' -d'))) {
chdir($oldcwd);
return $this->raiseError("PEAR_Packager: mktemp failed");
}

View File

@@ -26,7 +26,6 @@ TODO:
- Add application level lock (avoid change the registry from the cmdline
while using the GTK interface, for ex.)
*/
require_once "System.php";
require_once "PEAR.php";
define('PEAR_REGISTRY_ERROR_LOCK', -2);

View File

@@ -56,7 +56,7 @@ class PEAR_Remote extends PEAR
$id = $this->encryptOld(serialize($args));
$cachedir = $this->config->get('cache_dir');
if (!file_exists($cachedir)) {
System::mkdir('-p '.$cachedir);
PearSystem::mkdir('-p '.$cachedir);
}
$filename = $cachedir . DIRECTORY_SEPARATOR . 'xmlrpc_cache_' . $id;
if (!file_exists($filename)) {
@@ -86,7 +86,7 @@ class PEAR_Remote extends PEAR
$id = $this->encryptOld(serialize($args));
$cachedir = $this->config->get('cache_dir');
if (!file_exists($cachedir)) {
System::mkdir('-p '.$cachedir);
PearSystem::mkdir('-p '.$cachedir);
}
$filename = $cachedir.'/xmlrpc_cache_'.$id;

View File

@@ -37,14 +37,14 @@ $GLOBALS['_System_temp_files'] = array();
* http://pear.php.net/manual/
*
* Example usage:
* if (!@System::rm('-r file1 dir1')) {
* if (!@PearSystem::rm('-r file1 dir1')) {
* print "could not delete file1 or dir1";
* }
*
* In case you need to to pass file names with spaces,
* pass the params as an array:
*
* System::rm(array('-r', $file1, $dir1));
* PearSystem::rm(array('-r', $file1, $dir1));
*
* @package System
* @author Tomas V.V.Cox <cox@idecnet.com>
@@ -52,7 +52,7 @@ $GLOBALS['_System_temp_files'] = array();
* @access public
* @see http://pear.php.net/manual/
*/
class System
class PearSystem
{
/**
* returns the commandline arguments of a function
@@ -73,7 +73,7 @@ class System
/**
* Output errors with PHP trigger_error(). You can silence the errors
* with prefixing a "@" sign to the function call: @System::mkdir(..);
* with prefixing a "@" sign to the function call: @PearSystem::mkdir(..);
*
* @param mixed $error a PEAR error or a string with the error message
* @return bool false
@@ -91,7 +91,7 @@ class System
/**
* Creates a nested array representing the structure of a directory
*
* System::_dirToStruct('dir1', 0) =>
* PearSystem::_dirToStruct('dir1', 0) =>
* Array
* (
* [dirs] => Array
@@ -116,7 +116,7 @@ class System
{
$struct = array('dirs' => array(), 'files' => array());
if (($dir = @opendir($sPath)) === false) {
System::raiseError("Could not open dir $sPath");
PearSystem::raiseError("Could not open dir $sPath");
return $struct; // XXX could not open error
}
$struct['dirs'][] = $sPath; // XXX don't add if '.' or '..' ?
@@ -132,7 +132,7 @@ class System
foreach($list as $val) {
$path = $sPath . DIRECTORY_SEPARATOR . $val;
if (is_dir($path)) {
$tmp = System::_dirToStruct($path, $maxinst, $aktinst+1);
$tmp = PearSystem::_dirToStruct($path, $maxinst, $aktinst+1);
$struct = array_merge_recursive($tmp, $struct);
} else {
$struct['files'][] = $path;
@@ -147,7 +147,7 @@ class System
*
* @param array $files Array listing files and dirs
* @return array
* @see System::_dirToStruct()
* @see PearSystem::_dirToStruct()
*/
function _multipleToStruct($files)
{
@@ -155,7 +155,7 @@ class System
settype($files, 'array');
foreach ($files as $file) {
if (is_dir($file)) {
$tmp = System::_dirToStruct($file, 0);
$tmp = PearSystem::_dirToStruct($file, 0);
$struct = array_merge_recursive($tmp, $struct);
} else {
$struct['files'][] = $file;
@@ -174,9 +174,9 @@ class System
*/
function rm($args)
{
$opts = System::_parseArgs($args, 'rf'); // "f" do nothing but like it :-)
$opts = PearSystem::_parseArgs($args, 'rf'); // "f" do nothing but like it :-)
if (PEAR::isError($opts)) {
return System::raiseError($opts);
return PearSystem::raiseError($opts);
}
foreach($opts[0] as $opt) {
if ($opt[0] == 'r') {
@@ -185,7 +185,7 @@ class System
}
$ret = true;
if (isset($do_recursive)) {
$struct = System::_multipleToStruct($opts[1]);
$struct = PearSystem::_multipleToStruct($opts[1]);
foreach($struct['files'] as $file) {
if (!@unlink($file)) {
$ret = false;
@@ -209,7 +209,7 @@ class System
/**
* Make directories. Note that we use call_user_func('mkdir') to avoid
* a problem with ZE2 calling System::mkDir instead of the native PHP func.
* a problem with ZE2 calling PearSystem::mkDir instead of the native PHP func.
*
* @param string $args the name of the director(y|ies) to create
* @return bool True for success
@@ -217,9 +217,9 @@ class System
*/
function mkDir($args)
{
$opts = System::_parseArgs($args, 'pm:');
$opts = PearSystem::_parseArgs($args, 'pm:');
if (PEAR::isError($opts)) {
return System::raiseError($opts);
return PearSystem::raiseError($opts);
}
$mode = 0777; // default mode
foreach($opts[0] as $opt) {
@@ -265,9 +265,9 @@ class System
* Concatenate files
*
* Usage:
* 1) $var = System::cat('sample.txt test.txt');
* 2) System::cat('sample.txt test.txt > final.txt');
* 3) System::cat('sample.txt test.txt >> final.txt');
* 1) $var = PearSystem::cat('sample.txt test.txt');
* 2) PearSystem::cat('sample.txt test.txt > final.txt');
* 3) PearSystem::cat('sample.txt test.txt >> final.txt');
*
* Note: as the class use fopen, urls should work also (test that)
*
@@ -297,14 +297,14 @@ class System
}
if (isset($mode)) {
if (!$outputfd = fopen($outputfile, $mode)) {
$err = System::raiseError("Could not open $outputfile");
$err = PearSystem::raiseError("Could not open $outputfile");
return $err;
}
$ret = true;
}
foreach ($files as $file) {
if (!$fd = fopen($file, 'r')) {
System::raiseError("Could not open $file");
PearSystem::raiseError("Could not open $file");
continue;
}
while ($cont = fread($fd, 2048)) {
@@ -327,10 +327,10 @@ class System
* the created files when the scripts finish its execution.
*
* Usage:
* 1) $tempfile = System::mktemp("prefix");
* 2) $tempdir = System::mktemp("-d prefix");
* 3) $tempfile = System::mktemp();
* 4) $tempfile = System::mktemp("-t /var/tmp prefix");
* 1) $tempfile = PearSystem::mktemp("prefix");
* 2) $tempdir = PearSystem::mktemp("-d prefix");
* 3) $tempfile = PearSystem::mktemp();
* 4) $tempfile = PearSystem::mktemp("-t /var/tmp prefix");
*
* prefix -> The string that will be prepended to the temp name
* (defaults to "tmp").
@@ -342,15 +342,15 @@ class System
*
* @param string $args The arguments
* @return mixed the full path of the created (file|dir) or false
* @see System::tmpdir()
* @see PearSystem::tmpdir()
* @access public
*/
function mktemp($args = null)
{
static $first_time = true;
$opts = System::_parseArgs($args, 't:d');
$opts = PearSystem::_parseArgs($args, 't:d');
if (PEAR::isError($opts)) {
return System::raiseError($opts);
return PearSystem::raiseError($opts);
}
foreach($opts[0] as $opt) {
if($opt[0] == 'd') {
@@ -361,16 +361,16 @@ class System
}
$prefix = (isset($opts[1][0])) ? $opts[1][0] : 'tmp';
if (!isset($tmpdir)) {
$tmpdir = System::tmpdir();
$tmpdir = PearSystem::tmpdir();
}
if (!System::mkDir("-p $tmpdir")) {
if (!PearSystem::mkDir("-p $tmpdir")) {
return false;
}
$tmp = tempnam($tmpdir, $prefix);
if (isset($tmp_is_dir)) {
unlink($tmp); // be careful possible race condition here
if (!call_user_func('mkdir', $tmp, 0700)) {
return System::raiseError("Unable to create temporary directory $tmpdir");
return PearSystem::raiseError("Unable to create temporary directory $tmpdir");
}
}
$GLOBALS['_System_temp_files'][] = $tmp;
@@ -392,7 +392,7 @@ class System
if (count($GLOBALS['_System_temp_files'])) {
$delete = $GLOBALS['_System_temp_files'];
array_unshift($delete, '-r');
System::rm($delete);
PearSystem::rm($delete);
}
}
@@ -465,12 +465,12 @@ class System
*
* Usage:
*
* System::find($dir);
* System::find("$dir -type d");
* System::find("$dir -type f");
* System::find("$dir -name *.php");
* System::find("$dir -name *.php -name *.htm*");
* System::find("$dir -maxdepth 1");
* PearSystem::find($dir);
* PearSystem::find("$dir -type d");
* PearSystem::find("$dir -type f");
* PearSystem::find("$dir -name *.php");
* PearSystem::find("$dir -name *.php -name *.htm*");
* PearSystem::find("$dir -maxdepth 1");
*
* Params implmented:
* $dir -> Start the search at this directory
@@ -516,7 +516,7 @@ class System
break;
}
}
$path = System::_dirToStruct($dir, $depth);
$path = PearSystem::_dirToStruct($dir, $depth);
if ($do_files && $do_dirs) {
$files = array_merge($path['files'], $path['dirs']);
} elseif ($do_dirs) {

View File

@@ -138,7 +138,7 @@ PEAR INSTALLER:
* PEAR_Config class uses getenv() rather than $_ENV
to read environment variables.
* System::which() Windows fix, now looks for
* PearSystem::which() Windows fix, now looks for
exe/bat/cmd/com suffixes rather than just exe
* Added "pear cvsdiff" command
@@ -237,7 +237,7 @@ Bugfixes, Installer:
New Features, PEAR Library:
* added PEAR::loadExtension($ext)
* added PEAR::delExpect()
* System::mkTemp() now cleans up at shutdown
* PearSystem::mkTemp() now cleans up at shutdown
* defined PEAR_ZE2 constant (boolean)
* added PEAR::throwError() with a simpler API
than raiseError()

View File

@@ -417,7 +417,7 @@ class PropelSQLExec extends TaskPhing {
$this->conn->rollback();
} catch (SQLException $ex) {
// do nothing.
System::println("Rollback failed.");
PearSystem::println("Rollback failed.");
}
}
if ($this->statement) $this->statement->close();
@@ -428,7 +428,7 @@ class PropelSQLExec extends TaskPhing {
$this->conn->rollback();
} catch (SQLException $ex) {
// do nothing.
System::println("Rollback failed");
PearSystem::println("Rollback failed");
}
}
if ($this->statement) $this->statement->close();
@@ -620,12 +620,12 @@ class PropelSQLExec extends TaskPhing {
$out->newLine();
}
System::println($line);
PearSystem::println($line);
$line = "";
} // while rs->next()
}
} while ($this->statement->getMoreResults());
System::println();
PearSystem::println();
if ($out !== null) $out->newLine();
}

View File

@@ -284,6 +284,7 @@ function processWorkspace()
{
try {
$oPluginRegistry = PluginRegistry::loadSingleton();
$oPluginRegistry->init();
global $sObject;
global $sLastExecution;

View File

@@ -22,6 +22,10 @@
*
*/
require_once __DIR__ . '/../../../gulliver/system/class.g.php';
require_once __DIR__ . '/../../../bootstrap/autoload.php';
require_once __DIR__ . '/../../../bootstrap/app.php';
// check script parameters
// php reindex_solr.php workspacename [reindexall|reindexmissing|optimizeindex] [-skip 1005] [-reindextrunksize 1000]
// var_dump($argv);
@@ -117,7 +121,6 @@ if (! defined ('PATH_HOME')) {
define( 'PATH_CLASSES', PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP );
require_once (PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php');
spl_autoload_register(array('Bootstrap', 'autoloadClass'));
}
print "PATH_HOME: " . PATH_HOME . "\n";

View File

@@ -24,8 +24,7 @@ class BpmnEngineServicesSearchIndex
*/
public function isEnabled($workspace)
{
require_once('class.solr.php');
$solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost);
$solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost);
return $solr->isEnabled($workspace);
}
@@ -40,12 +39,6 @@ class BpmnEngineServicesSearchIndex
*/
public function getFacetsList($facetRequestEntity)
{
require_once('class.solr.php');
require_once('entities/FacetGroup.php');
require_once('entities/FacetItem.php');
require_once('entities/SelectedFacetGroupItem.php');
require_once('entities/FacetResult.php');
// get array of selected facet groups
$facetRequestEntity->selectedFacetsString = str_replace(',,', ',', $facetRequestEntity->selectedFacetsString);
// remove descriptions of selected facet groups
@@ -98,7 +91,7 @@ class BpmnEngineServicesSearchIndex
}
$facetRequestEntity->filters = $filters;
$solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost);
$solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost);
// create list of facets
$facetsList = $solr->getFacetsList($facetRequestEntity);
@@ -206,7 +199,7 @@ class BpmnEngineServicesSearchIndex
public function getNumberDocuments($workspace)
{
require_once('class.solr.php');
$solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost);
$solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost);
// create list of facets
$numberDocuments = $solr->getNumberDocuments($workspace);
@@ -220,7 +213,7 @@ class BpmnEngineServicesSearchIndex
*/
public function updateIndexDocument($solrUpdateDocumentEntity)
{
$solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost);
$solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost);
// create list of facets
$solr->updateDocument($solrUpdateDocumentEntity);
@@ -233,7 +226,7 @@ class BpmnEngineServicesSearchIndex
*/
public function deleteDocumentFromIndex($workspace, $idQuery)
{
$solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost);
$solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost);
// create list of facets
$solr->deleteDocument($workspace, $idQuery);
@@ -245,7 +238,7 @@ class BpmnEngineServicesSearchIndex
*/
public function commitIndexChanges($workspace)
{
$solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost);
$solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost);
// commit
$solr->commitChanges($workspace);
@@ -257,7 +250,7 @@ class BpmnEngineServicesSearchIndex
*/
public function optimizeIndexChanges($workspace)
{
$solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost);
$solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost);
// commit
$solr->optimizeChanges($workspace);
@@ -270,12 +263,8 @@ class BpmnEngineServicesSearchIndex
*/
public function getDataTablePaginatedList($solrRequestData)
{
require_once('class.solr.php');
require_once('entities/SolrRequestData.php');
require_once('entities/SolrQueryResult.php');
// execute query
$solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost);
$solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost);
$solrPaginatedResult = $solr->executeQuery($solrRequestData);
// get total number of documents in index
@@ -322,9 +311,7 @@ class BpmnEngineServicesSearchIndex
*/
public function getIndexFields($workspace)
{
require_once('class.solr.php');
$solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost);
$solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost);
$solrFieldsData = $solr->getListIndexedStoredFields($workspace);
// copy list of arrays

View File

@@ -19,13 +19,49 @@ class Net
public function __construct()
{
$a = func_get_args();
$f = "__construct" . func_num_args();
$f = "init" . func_num_args();
if (method_exists($this, $f)) {
call_user_func_array(array($this, $f), $a);
}
}
/**
* This function is the constructor of the class net
*
* return void
*/
protected function init0()
{
$this->errno = 0;
$this->error = "";
}
/**
* This function is the constructor of the class net
*
* @param string $pHost
* @return void
*/
protected function init1($pHost)
{
$this->errno = 0;
$this->errstr = "";
$this->db_instance = "";
unset($this->db_user);
unset($this->db_passwd);
unset($this->db_sourcename);
#verifing valid param
if ($pHost == "") {
$this->errno = 1000;
$this->errstr = "NET::You must specify a host";
//$this->showMsg();
}
$this->resolv($pHost);
}
/**
* This function puts a host
*

View File

@@ -0,0 +1,6 @@
<?php
/**
* Maintained for compatibility reasons.
* @deprecated 3.2.2, File maintained only for backward compatibility because it is used in plugins
*/

View File

@@ -0,0 +1,7 @@
<?php
/**
* Maintained for compatibility reasons.
* @deprecated 3.2.2, File maintained only for backward compatibility because it is used in plugins
*/

View File

@@ -0,0 +1,7 @@
<?php
/**
* Maintained for compatibility reasons.
* @deprecated 3.2.2, File maintained only for backward compatibility because it is used in plugins
*/

Some files were not shown because too many files have changed in this diff Show More