Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • vtiger/vtigercrm
  • varma/vtigercrm
  • alanbell/vtigercrm
  • mariusz.krzaczkowski/vtigercrm
  • manu.k/vtigercrm
  • adrgranado/vtigercrm
  • uma.s/vtigercrm
  • sardoj/vtigercrm
  • preexo/vtigercrm
  • david.valminos/vtigercrm
  • luca.saba/vtigercrm
  • dubwise/vtigercrm
  • valmir.ttcasolucoes/vtigercrm
  • lord_alan/vtigercrm
  • adrien.futschik/vtigercrm
  • edonit.rexhepi/vtigercrm
  • robert.heinze/vtigercrm
  • nrdimatteo/vtigercrm
  • sebastianzahan/vtigercrm
  • Miky/vtigercrm
  • germanf/vtigercrm
  • bernhardkau1/vtigercrm
  • olegtsoy/vtigercrm
  • grandel/vtigercrm
  • mario.thummler/vtigercrm
  • sutharsan/vtigercrm
  • james.douglas/vtigercrm
  • vikas/vtigercrm
  • jeffmchristensen/vtigercrm
  • lukasz.g/vtigercrm
  • nicolas.gasnier/vtigercrm
  • hamish.theitcompany/vtigercrm
  • engrbm87/vtigercrm
  • Quoc/vtigercrm
  • peter.maria.engeli/vtigercrm
  • kiranraju.j/vtigercrm
  • manuel.lozano/vtigercrm
  • dhaupin/vtigercrm
  • Ragupathyranesh/vtigercrm
  • Stefanbauer/vtigercrm
  • ruben.estrada/vtigercrm
  • sg_mwi1/vtigercrm
  • khaluk/vtigercrm
  • franzfroemel/vtigercrm
  • milan9615/vtigercrm
  • carlos.martin/vtigercrm
  • cmaggi/vtigercrm
  • Soltoon.theLeader/vtigercrm
  • alex.kaplun/vtigercrm
  • navid.hosseini/vtigercrm
  • maie/vtigercrm
  • simonetravaglini/vtigercrm
  • bertrand.wattel/vtigercrm
  • balaji.m/vtigercrm
  • mclarke4/vtigercrm
  • lajeeshk/vtigercrm
  • liam/vtigercrm
  • novikov.sergey/vtigercrm
  • johnwayne.williamson/vtigercrm
  • florian.strahberger-schramm/vtigercrm
  • daniel.schaefer/vtigercrm
  • christopher.gunther/vtigercrm
  • adrien.faveraux/vtigercrm
  • carsten.brandt/vtigercrm
  • stephane.molano/vtigercrm
  • krastan.petrov/vtigercrm
  • alfredo.bravo/vtigercrm
  • flipflop.Joe/vtigercrm
  • mirko.stagni/vtigercrm
  • remigio.ruberto/vtigercrm
  • gautam.dhudashiya/vtigercrm
  • manish.devitechnosolutions1/vtigercrm
  • matinbeigi/vtigercrm
  • devs/vtigercrm
  • happy.dev/vtigercrm
  • m.gigon/vtigercrm
  • manuelmigone/vtigercrm
  • eduardo.gqf/vtigercrm
  • elsayedEl-araby/vtigercrm
  • mirza.mehran/vtigercrm
  • maurice.courtois/vtigercrm
  • zuhri.utama/vtigercrm
  • shilpa.k/vtigercrm
  • Ignazio/vtigercrm
  • code80team/vtigercrm
  • code80/vtigercrm
  • nilay.automatesmb/cache
  • greeshma.kk/vtigercrm
  • vijay.tilak/vtigercrm
  • Paolo.Palamini/vtigercrm
  • estevan/vtigercrm
  • mobilcmcdk/vtigercrm
  • massimiliano.vessi/vtigercrm
  • daniel.voelskow/vtigercrm
  • james1/vtigercrm
  • lokesh.s/vtigercrm
  • rdb/vtigercrm
  • neftaliyagua/vtigercrm
  • angelo.paglialonga/vtigercrm
  • webmarka/vtigercrm
  • javanile/vtigercrm
  • akshath/vtigercrm
  • Hemanth/vtigercrm
  • opencrmitalia/vtigercrm
  • direzione/vtigercrm
  • umadas306/vtigercrm
  • jd-wraptec/vtigercrm
  • felipe.camacho/vtigercrm
  • Martin.allen/vtigercrm
  • amit.r/vtigercrm
  • vicus/vtigercrm
  • dev.osmi/vtigercrm
  • laurent.guillout/vtigercrm
  • christian.blaeul/vtigercrm
  • ap.js100/vtigercrm
  • yoann.mourot/vtigercrm-temp
  • christian.cruz/vtigercrm
  • zyli/vtigercrm
  • kaushik.p/vtigercrm
  • Madhuk/vtigercrm
  • cinakzm/vtigercrm
  • raquel.martinez/vtigercrm
  • tosajibadhi/vtigercrm
  • melvin.i/vtigercrm-melvin
  • ashashingadia/vtigercrm
  • stefanwarnat/vtigercrm
  • saran.s/vtigercrm
  • eduardomozart/vtigercrm
  • Daniel.Lennartz1/vtigercrm
  • juergen.fassmann/vtigercrm
  • Michel.Ram/vtigercrm
  • vincenzo.bruno/vtigercrm
132 results
Show changes
Showing
with 779 additions and 374 deletions
This diff is collapsed.
......@@ -44,14 +44,21 @@ class Tracker {
"item_id",
"item_summary"
);
function Tracker()
function __construct()
{
$this->log = LoggerManager::getLogger('Tracker');
// $this->db = PearDatabase::getInstance();
global $adb;
$this->log = Logger::getLogger('Tracker');
// $this->db = PearDatabase::getInstance();
global $adb;
$this->db = $adb;
}
function Tracker()
{
// PHP4-style constructor.
// This will NOT be invoked, unless a sub-class that extends `foo` calls it.
// In that case, call the new-style constructor to keep compatibility.
self::__construct();
}
/**
* Add this new item to the vtiger_tracker vtiger_table. If there are too many items (global config for now)
......@@ -84,7 +91,7 @@ $log->info("in track view method ".$current_module);
$fl = array();
foreach($fieldlists as $w => $c)
{
if (count($fl))
if (php7_count($fl))
$fl[] = "' '";
$fl[] = $c;
}
......@@ -137,7 +144,7 @@ $log->info("in track view method ".$current_module);
// If the module was not specified or the module matches the module of the row, add the row to the list
if($module_name == "" || $row[module_name] == $module_name)
if($module_name == "" || $row["module_name"] == $module_name)
{
//Adding Security check
require_once('include/utils/utils.php');
......
......@@ -75,8 +75,8 @@ class VTEntityDelta extends VTEventHandler {
$isModified = true;
}
if($isModified) {
$delta[$fieldName] = array('oldValue' => $oldData[$fieldName],
'currentValue' => $newData[$fieldName]);
$delta[$fieldName] = array('oldValue' => isset($oldData[$fieldName])? $oldData[$fieldName] : null,
'currentValue' => $newData[$fieldName] );
}
}
self::$entityDelta[$moduleName][$recordId] = $delta;
......@@ -92,12 +92,12 @@ class VTEntityDelta extends VTEventHandler {
function getOldValue($moduleName, $recordId, $fieldName) {
$entityDelta = self::$entityDelta[$moduleName][$recordId];
return $entityDelta[$fieldName]['oldValue'];
return isset($entityDelta[$fieldName]['oldValue']) ? $entityDelta[$fieldName]['oldValue'] : "";
}
function getCurrentValue($moduleName, $recordId, $fieldName) {
$entityDelta = self::$entityDelta[$moduleName][$recordId];
return $entityDelta[$fieldName]['currentValue'];
return isset($entityDelta[$fieldName]['currentValue']) ? $entityDelta[$fieldName]['currentValue'] : "";
}
function getOldEntity($moduleName, $recordId) {
......@@ -109,19 +109,25 @@ class VTEntityDelta extends VTEventHandler {
}
function hasChanged($moduleName, $recordId, $fieldName, $fieldValue = NULL) {
$result = false;
if(empty(self::$oldEntity[$moduleName][$recordId])) {
return false;
}
if (!array_key_exists($fieldName, self::$entityDelta[$moduleName][$recordId])) {
return false;
}
$fieldDelta = self::$entityDelta[$moduleName][$recordId][$fieldName];
if(is_array($fieldDelta)) {
$fieldDelta = array_map('decode_html', $fieldDelta);
}
$result = $fieldDelta['oldValue'] != $fieldDelta['currentValue'];
if(isset($fieldDelta['oldValue']) && isset($fieldDelta['currentValue'])) {
$result = $fieldDelta['oldValue'] != $fieldDelta['currentValue'];
}
if ($fieldValue !== NULL) {
$result = $result && ($fieldDelta['currentValue'] === $fieldValue);
}
return $result;
}
}
}
?>
\ No newline at end of file
?>
......@@ -11,9 +11,8 @@
require_once 'includes/main/WebUI.php';
require_once 'include/utils/utils.php';
require_once 'include/utils/VtlibUtils.php';
require_once 'modules/Emails/class.phpmailer.php';
require_once 'modules/Emails/mail.php';
require_once 'modules/Vtiger/helpers/ShortURL.php';
require_once 'vtlib/Vtiger/Mailer.php';
global $adb;
$adb = PearDatabase::getInstance();
......@@ -35,7 +34,7 @@ if (isset($_REQUEST['username']) && isset($_REQUEST['emailId'])) {
'username' => $username,
'email' => $email,
'time' => $time,
'hash' => md5($username.$time)
'hash' => hash('sha256',$username.$time)
)
);
$trackURL = Vtiger_ShortURL_Helper::generateURL($options);
......@@ -43,23 +42,29 @@ if (isset($_REQUEST['username']) && isset($_REQUEST['emailId'])) {
You recently requested a password reset for your VtigerCRM Open source Account.<br>
To create a new password, click on the link <a target="_blank" href='.$trackURL.'>here</a>.
<br><br>
This request was made on '.date("Y-m-d H:i:s").' and will expire in next 24 hours.<br><br>
This request was made on '.date("Y-m-d H:i:s").' and will expire in next 1 hour.<br><br>
Regards,<br>
VtigerCRM Open source Support Team.<br>';
$mail = new PHPMailer();
$query = "select from_email_field,server_username from vtiger_systems where server_type=?";
$params = array('email');
$result = $adb->pquery($query, $params);
$from = $adb->query_result($result, 0, 'from_email_field');
if ($from == '') {
$from = $adb->query_result($result, 0, 'server_username');
$subject = 'Vtiger CRM: Password Reset';
$mail = new Vtiger_Mailer();
$mail->IsHTML();
$mail->Body = $content;
$mail->Subject = $subject;
$mail->AddAddress($email);
// ensure default sender if not coming from outgoing server
if (!$mail->From) {
global $HELPDESK_SUPPORT_EMAIL_ID;
// use only when config val is valid
if (strpos($HELPDESK_SUPPORT_EMAIL_ID, "@") !== false) {
$mail->From = $HELPDESK_SUPPORT_EMAIL_ID;
}
}
$subject = 'Request : ForgotPassword - vtigercrm';
setMailerProperties($mail, $subject, $content, $from, $username, $email);
$status = MailSend($mail);
var_dump($status);
if ($status === 1) {
$status = $mail->Send(true);
if ($status === 1 || $status === true) {
header('Location: index.php?modules=Users&view=Login&mailStatus=success');
} else {
header('Location: index.php?modules=Users&view=Login&error=statusError');
......@@ -67,4 +72,4 @@ if (isset($_REQUEST['username']) && isset($_REQUEST['emailId'])) {
} else {
header('Location: index.php?modules=Users&view=Login&error=fpError');
}
}
\ No newline at end of file
}
......@@ -40,7 +40,7 @@ Class ChartUtils {
$alts = array();
$temp = array();
for ($i = 0; $i < count($xaxisData); $i++) {
for ($i = 0; $i < php7_count($xaxisData); $i++) {
$name = html_entity_decode($xaxisData[$i], ENT_QUOTES, $default_charset);
$pos = substr_count($name, " ");
$alts[] = $name;
......@@ -49,9 +49,9 @@ Class ChartUtils {
$name = substr($name, 0, 44);
if ($pos >= 2) {
$val = explode(" ", $name);
$n = count($val) - 1;
$n = php7_count($val) - 1;
$x = "";
for ($j = 0; $j < count($val); $j++) {
for ($j = 0; $j < php7_count($val); $j++) {
if ($j != $n) {
$x .=" " . $val[$j];
} else {
......@@ -97,7 +97,7 @@ Class ChartUtils {
$fill = & Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_HORIZONTAL_MIRRORED, $color, 'white'));
}
for ($i = 0; $i < count($yaxisData); $i++) {
for ($i = 0; $i < php7_count($yaxisData); $i++) {
$x = 1 + $i;
if ($yaxisData[$i] >= $max)
$max = $yaxisData[$i];
......@@ -125,7 +125,7 @@ Class ChartUtils {
//You can change the width of the bars if you like
if (!empty($xaxisData))
$bplot->setBarWidth($barwidth / count($xaxisData), "%");
$bplot->setBarWidth($barwidth / php7_count($xaxisData), "%");
//$bplot->setPadding(array('top'=>10));
$bplot->setBackground(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_HORIZONTAL, 'white', 'white')));
$xaxis = & $plotarea->getAxis(IMAGE_GRAPH_AXIS_X);
......@@ -165,7 +165,7 @@ Class ChartUtils {
// The fix the tick marks
$xaxis->setDataPreprocessor($array_data);
$xaxis->forceMinimum(0.5);
$xaxis->forceMaximum(0.5 + count($yaxisData));
$xaxis->forceMaximum(0.5 + php7_count($yaxisData));
if ($charttype == 'vertical')
$xaxis->setFontAngle('vertical');
$xaxis->setLabelInterval(1);
......@@ -226,7 +226,7 @@ Class ChartUtils {
$alts = array();
$temp = array();
for ($i = 0; $i < count($xaxisData); $i++) {
for ($i = 0; $i < php7_count($xaxisData); $i++) {
$name = html_entity_decode($xaxisData[$i], ENT_QUOTES, $default_charset);
$pos = substr_count($name, " ");
$alts[] = $name;
......@@ -235,9 +235,9 @@ Class ChartUtils {
$name = substr($name, 0, 34);
if ($pos >= 2) {
$val = explode(" ", $name);
$n = count($val) - 1;
$n = php7_count($val) - 1;
$x = "";
for ($j = 0; $j < count($val); $j++) {
for ($j = 0; $j < php7_count($val); $j++) {
if ($j != $n) {
$x .=" " . $val[$j];
} else {
......@@ -269,15 +269,15 @@ Class ChartUtils {
// To create unique lables we need to keep track of lable name and its count
$uniquex = array();
// Generate colours
$colors = color_generator(count($yaxisData), '#33DDFF', '#3322FF');
$colors = color_generator(php7_count($yaxisData), '#33DDFF', '#3322FF');
$dataset = & Image_Graph::factory('dataset');
$fills = & Image_Graph::factory('Image_Graph_Fill_Array');
$sum = 0;
$pcvalues = array();
for ($i = 0; $i < count($yaxisData); $i++) {
for ($i = 0; $i < php7_count($yaxisData); $i++) {
$sum += $yaxisData[$i];
}
for ($i = 0; $i < count($yaxisData); $i++) {
for ($i = 0; $i < php7_count($yaxisData); $i++) {
// To have unique names even in case of duplicates let us add the id
$datalabel = $xaxisData[$i];
$xaxisData_appearance = $uniquex[$xaxisData[$i]];
......@@ -363,14 +363,14 @@ Class ChartUtils {
}
}
if(is_array($restrictedModules) && count($restrictedModules) > 0) {
if(is_array($restrictedModules) && php7_count($restrictedModules) > 0) {
$ChartDataArray['error'] = "<h4>".getTranslatedString('LBL_NO_ACCESS', 'Reports').' - '.implode(',', $restrictedModules)."</h4>";
return $ChartDataArray;
}
if ($fieldDetails != '') {
list($tablename, $colname, $module_field, $fieldname, $single) = explode(":", $fieldDetails);
list($module, $field) = split("_", $module_field);
list($module, $field) = explode('_', $module_field);
$dateField = false;
if ($single == 'D') {
$dateField = true;
......@@ -411,7 +411,7 @@ Class ChartUtils {
$groupByFields[] = "Null";
}
else if (in_array($fieldname, array_keys($referenceFields))) {
if (count($referenceFields[$fieldname]) > 1) {
if (php7_count($referenceFields[$fieldname]) > 1) {
$refenceModule = CustomReportUtils::getEntityTypeFromName($decodedGroupFieldValue, $referenceFields[$fieldname]);
}
else {
......@@ -471,7 +471,7 @@ Class ChartUtils {
}
}
}
if(count($groupByFields) == 0) {
if(php7_count($groupByFields) == 0) {
$ChartDataArray['error'] = "<div class='componentName'>".getTranslatedString('LBL_NO_DATA', 'Reports')."</div";
}
$ChartDataArray['xaxisData'] = $groupByFields;
......
......@@ -355,8 +355,7 @@ $combo_strings = Array(
);
require_once('modules/Users/UserTimeZonesArray.php');
$usertimezonesClass = new UserTimeZones();
$arrayOfSupportedTimeZones = $usertimezonesClass->userTimeZones();
$arrayOfSupportedTimeZones = UserTimeZones::getAll();
$combo_strings['time_zone_dom'] = array_combine($arrayOfSupportedTimeZones,$arrayOfSupportedTimeZones);
?>
......
......@@ -31,7 +31,7 @@ function getComboArray($combofieldNames)
if(!is_admin($current_user))
{
$subrole = getRoleSubordinates($roleid);
if(count($subrole)> 0)
if(php7_count($subrole)> 0)
{
$roleids = $subrole;
array_push($roleids, $roleid);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -23,13 +23,20 @@ class RelatedListViewSession {
var $sorder = null;
var $sortby = null;
var $page_view = null;
function RelatedListViewSession() {
global $log,$currentModule;
function __construct()
{
global $log,$currentModule;
$log->debug("Entering RelatedListViewSession() method ...");
$this->module = $currentModule;
$this->start =1;
}
function RelatedListViewSession() {
// PHP4-style constructor.
// This will NOT be invoked, unless a sub-class that extends `foo` calls it.
// In that case, call the new-style constructor to keep compatibility.
self::__construct();
}
public static function addRelatedModuleToSession($relationId, $header) {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.