Example #1
0
     $page_title = $language['title_file_check'];
     html_header();
     if ($error != '') {
         html_error(false);
     }
     //use versioncheck to check file versions
     $lang_versioncheck_php = $language['versioncheck'];
     require_once 'include/versioncheck.inc.php';
     // TODO: need to deal with connection failing and skip this step (and maybe allow a retry)
     // Connect to the repository and populate the array with data from the XML file
     $file_data_array = cpgVersioncheckConnectRepository($displayOption_array);
     $file_data_array = cpg_versioncheckPopulateArray($file_data_array);
     //$file_data_array = cpg_versioncheckPopulateArray($file_data_array, $displayOption_array, $textFileExtensions_array, $imageFileExtensions_array, $CONFIG, $maxLength_array, $lang_versioncheck_php);
     $file_data_count = count($file_data_array);
     // Print the results
     $outputResult = cpg_versioncheckCreateHTMLOutput($file_data_array, $textFileExtensions_array, $lang_versioncheck_php, $majorVersion, $displayOption_array);
     $versioncheck_output = sprintf($lang_versioncheck_php['files_folder_processed'], $outputResult['display'], $outputResult['total'], $outputResult['error']);
     // TODO: end
     html_content($versioncheck_output);
     html_footer();
     setTmpConfig('step', STEP_FOLDER_PERMISSIONS);
     break;
 case STEP_FOLDER_PERMISSIONS:
     // Check if the folder permissions are set up properly
     $page_title = $language['title_dir_check'];
     if (!checkPermissions()) {
         // not all permissions were set correctly, or folder doesn't exist
         html_header();
         html_error();
         html_content($language['perm_not_ok']);
         // show all checked folders?
    <tr>
        <td class="tableb">
EOT;
        print cpg_versioncheckCreateTextOnlyOutput($file_data_array);
        print <<<EOT
        </td>
    </tr>
EOT;
    } else {
        if ($displayOption_array['output'] == 'screen') {
            // display the output in HTML
            print <<<EOT
    <tr>
        <td class="tableb">
EOT;
            $outputResult = cpg_versioncheckCreateHTMLOutput($file_data_array);
            print <<<EOT
        </td>
    </tr>
EOT;
            print <<<EOT
    <tr>
        <td class="tablef">
EOT;
            printf($lang_versioncheck_php['files_folder_processed'], $outputResult['display'], $outputResult['total'], $outputResult['error']);
            print <<<EOT
        </td>
    </tr>
EOT;
        }
    }
Example #3
0
 function checkFiles()
 {
     // Set the parameters that normally get popualted by the option form
     $displayOption_array['errors_only'] = 1;
     $lang_versioncheck_php = $this->language['versioncheck'];
     require_once 'include/versioncheck.inc.php';
     // Connect to the repository and populate the array with data from the XML file
     $file_data_array = cpgVersioncheckConnectRepository($displayOption_array);
     // Populate the array additionally with local data
     //$CONFIG['full_path'] = '';
     //$CONFIG['user_pics'] = '';
     $file_data_array = cpg_versioncheckPopulateArray($file_data_array, $displayOption_array, $textFileExtensions_array, $imageFileExtensions_array, $CONFIG, $maxLength_array, $lang_versioncheck_php);
     $file_data_count = count($file_data_array);
     // Print the results
     $outputResult = cpg_versioncheckCreateHTMLOutput($file_data_array, $textFileExtensions_array, $lang_versioncheck_php, $majorVersion, $displayOption_array);
     return sprintf($lang_versioncheck_php['files_folder_processed'], $outputResult['display'], $outputResult['total'], $outputResult['error']);
 }