Upgrade to v15.0.OS
This commit is contained in:
@@ -10,6 +10,11 @@ abstract class AbstractModuleManager{
|
||||
private $userClasses = array();
|
||||
private $errorMappings = array();
|
||||
private $modelClasses = array();
|
||||
|
||||
private $modulePath = null;
|
||||
private $moduleObject = null;
|
||||
private $moduleType = null;
|
||||
|
||||
|
||||
/**
|
||||
* Override this method in module manager class to define user classes.
|
||||
@@ -60,9 +65,82 @@ abstract class AbstractModuleManager{
|
||||
*/
|
||||
public abstract function setupModuleClassDefinitions();
|
||||
|
||||
public function initQuickAccessMenu(){
|
||||
|
||||
}
|
||||
|
||||
public function setModuleObject($obj){
|
||||
$this->moduleObject = $obj;
|
||||
}
|
||||
|
||||
public function getModuleObject(){
|
||||
return $this->moduleObject;
|
||||
}
|
||||
|
||||
public function setModuleType($type){
|
||||
$this->moduleType = $type;
|
||||
}
|
||||
|
||||
public function getModuleType(){
|
||||
return $this->moduleType;
|
||||
}
|
||||
|
||||
public function getModulePath(){
|
||||
$subClass = get_called_class();
|
||||
$reflector = new ReflectionClass($subClass);
|
||||
$fn = $reflector->getFileName();
|
||||
$this->modulePath = realpath(dirname($fn)."/..");
|
||||
LogManager::getInstance()->info("Module Path: [$subClass | $fn]".$this->modulePath);
|
||||
}
|
||||
|
||||
public function getDashboardItemData(){
|
||||
return array();
|
||||
}
|
||||
|
||||
public function getDashboardItem(){
|
||||
return null;
|
||||
$this->getModulePath();
|
||||
if(!file_exists($this->modulePath."/dashboard.html")){
|
||||
//LogManager::getInstance()->error("Dashboard file not found :".$this->modulePath."/dashboard.html");
|
||||
return null;
|
||||
}
|
||||
$dashboardItem = file_get_contents($this->modulePath."/dashboard.html");
|
||||
if(empty($dashboardItem)){
|
||||
//LogManager::getInstance()->error("Dashboard file is empty :".$this->modulePath."/dashboard.html");
|
||||
return null;
|
||||
}
|
||||
|
||||
$data = $this->getDashboardItemData();
|
||||
$data['moduleLink'] = $this->getModuleLink();
|
||||
LogManager::getInstance()->info("Module Link:".$data['moduleLink']);
|
||||
foreach($data as $k => $v){
|
||||
$dashboardItem = str_replace("#_".$k."_#", $v, $dashboardItem);
|
||||
}
|
||||
|
||||
return $dashboardItem;
|
||||
|
||||
}
|
||||
|
||||
public function getDashboardItemIndex(){
|
||||
$metaData = json_decode(file_get_contents($this->modulePath."/meta.json"),true);
|
||||
if(!isset($metaData['dashboardPosition'])){
|
||||
return 100;
|
||||
}else{
|
||||
return $metaData['dashboardPosition'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private function getModuleLink(){
|
||||
|
||||
$metaData = json_decode(file_get_contents($this->modulePath."/meta.json"),true);
|
||||
|
||||
$mod = basename($this->modulePath);
|
||||
$group = basename(realpath($this->modulePath."/.."));
|
||||
|
||||
//?g=admin&n=candidates&m=admin_Recruitment
|
||||
|
||||
return CLIENT_BASE_URL."?g=".$group."&n=".$mod."&m=".$group."_".str_replace(" ","_",$metaData['label']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,17 +23,25 @@ class CronUtils{
|
||||
$count = 0;
|
||||
foreach($ams as $am){
|
||||
if(is_dir($this->clientBasePath.$am) && $am != '.' && $am != '..'){
|
||||
//$command = "php ".$this->cronFile." -c".$this->clientBasePath.$am;
|
||||
$command = "php ".$this->clientBasePath.$am."/".$this->cronFile;
|
||||
echo "Run:".$command."\r\n";
|
||||
passthru($command, $res);
|
||||
echo "Result :".$res."\r\n";
|
||||
$command = "php ".$this->clientBasePath.$am."/".$this->cronFile;
|
||||
if(file_exists($this->clientBasePath.$am."/".$this->cronFile)){
|
||||
|
||||
$count++;
|
||||
if($count > 25){
|
||||
sleep(1);
|
||||
$count = 0;
|
||||
echo "Run:".$command."\r\n";
|
||||
error_log("Run:".$command);
|
||||
passthru($command, $res);
|
||||
echo "Result :".$res."\r\n";
|
||||
error_log("Result :".$res);
|
||||
|
||||
$count++;
|
||||
if($count > 25){
|
||||
sleep(1);
|
||||
$count = 0;
|
||||
}
|
||||
}else{
|
||||
echo "Error (File Not Found):".$command."\r\n";
|
||||
error_log("Error (File Not Found):".$command);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ abstract class EmailSender{
|
||||
|
||||
$emailBody = str_replace("#_emailBody_#", $body, $emailBody);
|
||||
$emailBody = str_replace("#_logourl_#",
|
||||
BASE_URL."images/logo.png"
|
||||
UIManager::getInstance()->getCompanyLogoUrl()
|
||||
, $emailBody);
|
||||
|
||||
$user = new User();
|
||||
@@ -113,7 +113,7 @@ abstract class EmailSender{
|
||||
//Convert to an html email
|
||||
$emailBody = $body;
|
||||
$emailBody = str_replace("#_logourl_#",
|
||||
BASE_URL."images/logo.png"
|
||||
UIManager::getInstance()->getCompanyLogoUrl()
|
||||
, $emailBody);
|
||||
|
||||
$user = new User();
|
||||
@@ -271,6 +271,14 @@ class SMTPEmailSender extends EmailSender{
|
||||
'Reply-To' => $replyToEmail,
|
||||
'Subject' => $subject);
|
||||
|
||||
if(!empty($ccList)){
|
||||
$headers['Cc'] = implode(",",$ccList);
|
||||
}
|
||||
|
||||
if(!empty($bccList)){
|
||||
$headers['Bcc'] = implode(",",$bccList);
|
||||
}
|
||||
|
||||
|
||||
$mail = $smtp->send($toEmail, $headers, $body);
|
||||
|
||||
@@ -297,6 +305,12 @@ class PHPMailer extends EmailSender{
|
||||
$headers = 'MIME-Version: 1.0' . "\r\n";
|
||||
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
|
||||
$headers .= 'From: '.$fromEmail. "\r\n";
|
||||
if(!empty($ccList)){
|
||||
$headers .= 'CC: '.implode(",",$ccList). "\r\n";
|
||||
}
|
||||
if(!empty($bccList)){
|
||||
$headers .= 'BCC: '.implode(",",$bccList). "\r\n";
|
||||
}
|
||||
$headers .= 'ReplyTo: '.$replyToEmail. "\r\n";
|
||||
$headers .= 'Ice-Mailer: PHP/' . phpversion();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user