<commit_before><?php

/**
	* This procedure is executed by cronjob every 5 minutes and it will check,
	* custom tasks set in the /application/modules/system/layout.xml file.
	*
	* CREATE A SYSTEM CRONJOB EACH 5 MINUTES
	*
	* @version 1.1
*/

class System_CronController extends Zend_Controller_Action {

	public function preDispatch() {
        $this->_helper->layout()->disableLayout();
        $this->_helper->viewRenderer->setNoRender(true);
	}
	
	/**
	  * Execute a manual cron process  
	 */
	public function executeAction(){
	  
    	$resources = Shineisp_Commons_Layout::getData ("system", null);
	    $class_called = $this->getRequest()->getParam('class');
	    $method_called = $this->getRequest()->getParam('method');
	    $email = $this->getRequest()->getParam('email');
	    $password = $this->getRequest()->getParam('password');
	    
	    $result = AdminUser::fastlogin($email, $password, false);
	   
	    if(Zend_Auth_Result::SUCCESS == $result->getCode()){
	    
            // Get the cron default configuration
            $xmlobject = $resources->xpath ( "cron/execute" ) ;
            if (count ( $xmlobject )) {
                foreach ( $xmlobject as $cron ) {
                    foreach ( $cron as $code ) {
                    
                        $class  = (string)$code['class'];
                        $method = (string)$code['method'];
                        $params = json_decode((string)$code['params']);
                        $log    = (string)$code;
                    
                        if(($class == $class_called) && ($method == $method_called)){
                       <commit_msg>manual execution of the cron task added fixed minor bugs<commit_after><?php

/**
	* This procedure is executed by cronjob every 5 minutes and it will check,
	* custom tasks set in the /application/modules/system/layout.xml file.
	*
	* CREATE A SYSTEM CRONJOB EACH 5 MINUTES
	*
	* @version 1.1
*/

class System_CronController extends Zend_Controller_Action {

	public function preDispatch() {
        $this->_helper->layout()->disableLayout();
        $this->_helper->viewRenderer->setNoRender(true);
	}
	
	/**
	  * Execute a manual cron process  
	 */
	public function executeAction(){
	  
    	$resources = Shineisp_Commons_Layout::getData ("system", null);
	    $class_called = $this->getRequest()->getParam('class');
	    $method_called = $this->getRequest()->getParam('method');
	    $email = $this->getRequest()->getParam('email');
	    $password = $this->getRequest()->getParam('password');
	    
	    if(empty($email) || empty($password)){
	        Shineisp_Commons_Utilities::log("Manual Start needs the administrator authentication", 'cron.log');
	    }
	    
	    $result = AdminUser::fastlogin($email, $password, false);
	   
	    if(Zend_Auth_Result::SUCCESS == $result->getCode()){
	    
            // Get the cron default configuration
            $xmlobject = $resources->xpath ( "cron/execute" ) ;
            if (count ( $xmlobject )) {
                foreach ( $xmlobject as $cron ) {
                    foreach ( $cron as $code ) {
                    
                        $class  = (string)$code['class'];
                        $method = (string)$code['method'];
                        $params = json_decode((string)$code['params']);
                        $log    = (string)$code;
                    
                        if(($class == $class_called) && ($method == $method_called)){
                       
{'fraction_non_alphanumeric': 0.14121368996261144, 'fraction_numerical': 0.0023008340523439745, 'mean_word_length': 2.182067703568161, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4226971', 'n_tokens_mistral': 1002, 'n_tokens_neox': 931, 'n_words': 210}