Skip to content

Commit

Permalink
Applying improvements selected from IcehrmPro for release v21.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gamonoid committed Feb 3, 2018
1 parent e7792e7 commit f783163
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 23 deletions.
8 changes: 5 additions & 3 deletions admin/settings/index.php
Expand Up @@ -37,9 +37,11 @@
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'SystemSetting','Setting','System','SettingAdapter','{"name":["System:"]}','name',false,$options1
));
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'EmailSetting','Setting','Email','SettingAdapter','{"name":["Email:"]}','name',false,$options1
));
if (!defined('CLOUD_INSTALLATION')) {
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'EmailSetting', 'Setting', 'Email', 'SettingAdapter', '{"name":["Email:"]}', 'name', false, $options1
));
}
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'LeaveSetting','Setting','Leave / PTO','SettingAdapter','{"name":["Leave:"]}','name',false,$options1
));
Expand Down
3 changes: 2 additions & 1 deletion api/Base.js
Expand Up @@ -2461,9 +2461,10 @@ IceHRMBase.method('clearFileElement', function (elementName) {

IceHRMBase.method('fixJSON', function (json) {
if(this.noJSONRequests == "1"){
json = json.replace(/"/g,'|');
json = window.btoa(json);
}
return json;

});


Expand Down
2 changes: 1 addition & 1 deletion build.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="icehrm-opensource" default="build">
<project name="icehrm-pro" default="build">
<!-- By default, we assume all tools to be on the $PATH -->
<property name="toolsdir" value="${basedir}/tools/"/>
<property name="destination" value="${basedir}/build/app"/>
Expand Down
8 changes: 4 additions & 4 deletions config.base.php
Expand Up @@ -13,10 +13,10 @@
}

//Version
define('VERSION', '20.3.0.OS');
define('CACHE_VALUE', '20.3.0.OS');
define('VERSION_NUMBER', '2030');
define('VERSION_DATE', '26/11/2017');
define('VERSION', '21.0.0.PRO');
define('CACHE_VALUE', '21.0.0.OS');
define('VERSION_NUMBER', '2100');
define('VERSION_DATE', '02/02/2018');

if(!defined('CONTACT_EMAIL')){define('CONTACT_EMAIL','icehrm@gamonoid.com');}
if(!defined('KEY_PREFIX')){define('KEY_PREFIX','IceHrm');}
Expand Down
4 changes: 3 additions & 1 deletion header.php
Expand Up @@ -20,7 +20,9 @@
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
*/

if (!defined('MODULE_NAME')) {
define('MODULE_NAME', $moduleName);
}
include 'includes.inc.php';
if(empty($user)){
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
Expand Down
8 changes: 4 additions & 4 deletions lib/composer/composer.json
Expand Up @@ -5,12 +5,12 @@
"gettext/gettext": "4.0.0",
"consolidation/robo": "~1",
"filp/whoops": "~2.1",
"swiftmailer/swiftmailer": "^6",
"pear/net_smtp": "~1.7",
"pear/mail": "~1.4"
"swiftmailer/swiftmailer": "^6.0",
"pear/net_smtp": "^1.7",
"pear/mail": "^1.4"
},
"require-dev": {
"phpunit/phpunit": "~6.5.5"
"phpunit/phpunit": "~6"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions migrations/v20171126_200303_swift_mail.php
Expand Up @@ -10,11 +10,11 @@ public function up(){
$setting = new Setting();
$setting->Load("name = ?", array('Email: Mode'));
if(!empty($setting->id)){
$setting->description = 'Require submitting a photo using web cam when marking attendance';
$setting->description = 'Update email sender';
$setting->meta = '["value", {"label":"Value","type":"select","source":[["SMTP","SMTP"],["Swift SMTP","Swift SMTP"],["PHP Mailer","PHP Mailer"],["SES","Amazon SES"]]}]';
$setting->Save();
}

return true;
}

Expand Down
13 changes: 11 additions & 2 deletions release.md
@@ -1,5 +1,14 @@
Release note v20.3.0.OS
-----------------------
Release note v21.0.0.OS
------------------------
### Features
* Fully compatible with php 7.1
* Add Net_SMTP via composer (no pear installation needed)

### Fixes
* Fixes for web servers not supporting JSON in GET request

Release note v20.3.0.PRO
------------------------
### Features
* Employee and Attendance REST Api Released
* Import/Export for Payroll Configurations
Expand Down
2 changes: 1 addition & 1 deletion src/Classes/BaseService.php
Expand Up @@ -1407,7 +1407,7 @@ public function fixJSON($json)
{
$noJSONRequests = SettingsManager::getInstance()->getSetting("System: Do not pass JSON in request");
if ($noJSONRequests."" == "1") {
$json = str_replace("|", '"', $json);
$json = base64_decode($json);
}
return $json;
}
Expand Down
14 changes: 11 additions & 3 deletions src/Utils/CalendarTools.php
Expand Up @@ -49,11 +49,19 @@ public static function getDaysBetweenDates($start, $end)
return $days;
}

public static function addMinutesToDateTime($datetime, $minutes)
public static function addMinutesToDateTime($datetime, $minutes, $format = 'Y-m-d H:i:s')
{
$time = new \DateTime($datetime);
$time->add(new \DateInterval('PT' . $minutes . 'M'));
$time = $time->add(new \DateInterval('PT' . $minutes . 'M'));

return $time->format('Y-m-d H:i:s');
return $time->format($format);
}

public static function addMonthsToDateTime($datetime, $months, $format = 'Y-m-d H:i:s')
{
$time = new \DateTime($datetime);
$time = $time->add(new \DateInterval('P' . $months . 'M'));

return $time->format($format);
}
}
2 changes: 1 addition & 1 deletion src/Utils/SessionUtils.php
Expand Up @@ -23,7 +23,7 @@ public static function saveSessionObject($name, $obj)
session_write_close();
}

public function unsetClientSession()
public static function unsetClientSession()
{
$names = [
"user",
Expand Down

0 comments on commit f783163

Please sign in to comment.