Remove require_once
This commit is contained in:
@@ -79,18 +79,6 @@ class G
|
||||
//For backward compatibilities
|
||||
}
|
||||
|
||||
/**
|
||||
* Include all model files
|
||||
* @access public
|
||||
* @param string $strClass
|
||||
* @return void
|
||||
* @deprecated 08-04-2017
|
||||
*/
|
||||
public static function LoadAllModelClasses($strClass)
|
||||
{
|
||||
//For backward compatibilities
|
||||
}
|
||||
|
||||
/**
|
||||
* public function LoadClassRBAC
|
||||
* @access public
|
||||
@@ -128,6 +116,24 @@ class G
|
||||
//For backward compatibilities
|
||||
}
|
||||
|
||||
/**
|
||||
* Include all model files
|
||||
* @access public
|
||||
* @param string $strClass
|
||||
* @return void
|
||||
*/
|
||||
public static function LoadAllModelClasses($strClass)
|
||||
{
|
||||
$baseDir = PATH_CORE . 'classes' . PATH_SEP . 'model';
|
||||
if ($handle = opendir( $baseDir )) {
|
||||
while (false !== ($file = readdir( $handle ))) {
|
||||
if (strpos( $file, '.php', 1 ) && ! strpos( $file, 'Peer.php', 1 )) {
|
||||
require_once ($baseDir . PATH_SEP . $file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* is_https
|
||||
* @return bool
|
||||
|
||||
@@ -829,7 +829,6 @@ function getPMFolderContent()
|
||||
$c->setDBArrayTable ('PM_FOLDER_DOC');
|
||||
$c->addAscendingOrderByColumn ('id');
|
||||
$G_PUBLISH = new Publisher ();
|
||||
require_once ('classes/class.xmlfield_InputPM.php');
|
||||
|
||||
$labelFolderAddFile = "";
|
||||
$labelFolderAddFolder = "";
|
||||
@@ -1157,7 +1156,6 @@ function findChilds($uidFolder, $path, $arrayPath)
|
||||
}
|
||||
function copyMoveAction($type)
|
||||
{
|
||||
require_once ("classes/model/AppFolder.php");
|
||||
$oPMFolder = new AppFolder ();
|
||||
|
||||
$dir=$_REQUEST['dir'];
|
||||
@@ -1327,7 +1325,6 @@ function documentVersionHistory()
|
||||
$c->setDBArrayTable ('PM_FOLDER_DOC_HISTORY');
|
||||
$c->addAscendingOrderByColumn ('id');
|
||||
$G_PUBLISH = new Publisher ();
|
||||
require_once ('classes/class.xmlfield_InputPM.php');
|
||||
|
||||
$G_PUBLISH->AddContent ('propeltable', 'paged-table', 'appFolder/appFolderDocumentListHistory', $c,
|
||||
array ('folderID' => $_POST ['folderID'] != '0' ? $_POST ['folderID'] == 'NA' ?
|
||||
@@ -1339,8 +1336,7 @@ function documentVersionHistory()
|
||||
function overwriteFile($node, $fileName)
|
||||
{
|
||||
global $RBAC;
|
||||
require_once ("classes/model/AppFolder.php");
|
||||
require_once ("classes/model/AppDocument.php");
|
||||
|
||||
$appDocument = new AppDocument();
|
||||
$pMFolder = new AppFolder();
|
||||
$user = ($RBAC->userCanAccess('PM_ALLCASES') == 1) ? '' : $_SESSION['USER_LOGGED'];
|
||||
@@ -1355,9 +1351,6 @@ function overwriteFile($node, $fileName)
|
||||
|
||||
function copyMoveExecuteTree($uidFolder, $newUidFolder)
|
||||
{
|
||||
require_once ("classes/model/AppDocument.php");
|
||||
require_once ('classes/model/AppFolder.php');
|
||||
|
||||
$appFoder = new AppFolder ();
|
||||
$folderContent = $appFoder->getFolderContent($uidFolder);
|
||||
$folderOrigin = $appFoder->getFolderStructure($uidFolder);
|
||||
@@ -1412,7 +1405,6 @@ function copyMoveExecuteTree($uidFolder, $newUidFolder)
|
||||
|
||||
function checkTree ($uidOriginFolder, $uidNewFolder)
|
||||
{
|
||||
require_once ('classes/model/AppFolder.php');
|
||||
$appFoder = new AppFolder ();
|
||||
$newFoldercontent = copyMoveExecuteTree($uidOriginFolder, $uidNewFolder);
|
||||
$listfolder = $appFoder->getFolderList($uidOriginFolder);
|
||||
@@ -1495,7 +1487,6 @@ function uploadExternalDocument()
|
||||
}
|
||||
$_POST['selitems'] = array();
|
||||
} else {
|
||||
require_once ("classes/model/AppDocument.php");
|
||||
$oAppDocument = new AppDocument();
|
||||
if (isset($_POST['selitems']) && is_array($_POST['selitems'])) {
|
||||
foreach ($_POST['selitems'] as $docId) {
|
||||
@@ -1533,10 +1524,6 @@ function uploadExternalDocument()
|
||||
$docType=isset($_POST['docType'])?$_GET['docType']:"INPUT";
|
||||
//save info
|
||||
|
||||
require_once ("classes/model/AppDocument.php");
|
||||
require_once ('classes/model/AppFolder.php');
|
||||
require_once ('classes/model/InputDocument.php');
|
||||
|
||||
$oInputDocument = new InputDocument();
|
||||
if ($docUid != -1) {
|
||||
$aID = $oInputDocument->load($docUid);
|
||||
@@ -1679,7 +1666,6 @@ function uploadExternalDocument()
|
||||
|
||||
function newFolder()
|
||||
{
|
||||
require_once ("classes/model/AppFolder.php");
|
||||
$oPMFolder = new AppFolder ();
|
||||
//G::pr($_POST);
|
||||
if ($_POST ['dir']=="") {
|
||||
@@ -1792,22 +1778,10 @@ function newFolder()
|
||||
$response=str_replace('"handlerCancel"',$handlerCancel,$response);
|
||||
print_r($response);
|
||||
|
||||
/*
|
||||
$oFolder = new AppFolder ();
|
||||
$folderStructure = $oPMFolder->getFolderStructure ($_POST ['folderID']);
|
||||
$Fields ['FOLDER_PATH'] = $folderStructure ['PATH'];
|
||||
$Fields ['FOLDER_PARENT_UID'] = $_POST ['folderID'];
|
||||
$Fields ['FOLDER_UID'] = G::GenerateUniqueID ();
|
||||
$G_PUBLISH = new Publisher ();
|
||||
|
||||
$G_PUBLISH->AddContent ('xmlform', 'xmlform', 'appFolder/appFolderEdit', '', $Fields, 'appFolderSave');
|
||||
G::RenderPage ('publish', 'raw');
|
||||
*/
|
||||
}
|
||||
|
||||
function appFolderSave()
|
||||
{
|
||||
require_once ("classes/model/AppFolder.php");
|
||||
$oPMFolder = new AppFolder ();
|
||||
$form = $_POST['form'];
|
||||
$FolderUid = $form['FOLDER_UID'];
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
$index=0;
|
||||
$FolderUid = str_replace ( '"', '', $aux[$index++] );
|
||||
|
||||
|
||||
require_once ( "classes/model/AppFolder.php" );
|
||||
//if exists the row in the database propel will update it, otherwise will insert.
|
||||
$tr = AppFolderPeer::retrieveByPK( $FolderUid );
|
||||
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
$form = $_POST['form'];
|
||||
$FolderUid = $form['FOLDER_UID'];
|
||||
|
||||
|
||||
require_once ( "classes/model/AppFolder.php" );
|
||||
|
||||
//if exists the row in the database propel will update it, otherwise will insert.
|
||||
$tr = AppFolderPeer::retrieveByPK( $FolderUid );
|
||||
if ( ( is_object ( $tr ) && get_class ($tr) == 'AppFolder' ) ) {
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
$aux = explode ( '|', isset($_GET['id']) ? $_GET['id'] : '' );
|
||||
$FolderUid = str_replace ( '"', '', $aux[0] );
|
||||
|
||||
|
||||
require_once ( "classes/model/AppFolder.php" );
|
||||
//if exists the row in the database propel will update it, otherwise will insert.
|
||||
$tr = AppFolderPeer::retrieveByPK( $FolderUid );
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ try {
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
if ((isset( $_POST['form']['FOLDER_UID'] )) && (isset( $_POST['form']['MOVE_FOLDER_PATH'] ))) {
|
||||
require_once ("classes/model/AppDocument.php");
|
||||
$oAppDocument = new AppDocument();
|
||||
|
||||
//Move files to another FOLDER_UID'
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<?php
|
||||
|
||||
|
||||
require_once ( "classes/model/AppFolder.php" );
|
||||
|
||||
|
||||
$fields['FOLDER_UID'] = G::GenerateUniqueID();;
|
||||
|
||||
$fields['FOLDER_PARENT_UID'] = '';
|
||||
|
||||
@@ -8,9 +8,6 @@ try {
|
||||
$FolderCreateDate = 'now';
|
||||
$FolderUpdateDate = 'now';
|
||||
|
||||
|
||||
require_once ( "classes/model/AppFolder.php" );
|
||||
|
||||
//if exists the row in the database propel will update it, otherwise will insert.
|
||||
$tr = AppFolderPeer::retrieveByPK($FolderUid);
|
||||
if (!( is_object($tr) && get_class($tr) == 'AppFolder' )) {
|
||||
|
||||
@@ -34,10 +34,6 @@ try {
|
||||
|
||||
//save info
|
||||
|
||||
require_once ("classes/model/AppDocument.php");
|
||||
require_once ('classes/model/AppFolder.php');
|
||||
require_once ('classes/model/InputDocument.php');
|
||||
|
||||
$oInputDocument = new InputDocument();
|
||||
if ($_GET['UID'] != -1) {
|
||||
$aID = $oInputDocument->load($_GET['UID']);
|
||||
|
||||
@@ -34,8 +34,6 @@ class treeNode extends stdclass
|
||||
}
|
||||
|
||||
try {
|
||||
require_once ("classes" . PATH_SEP . "model" . PATH_SEP . "Department.php");
|
||||
|
||||
|
||||
$json = new Services_JSON();
|
||||
header("Content-Type: application/json;");
|
||||
|
||||
@@ -31,7 +31,6 @@ try {
|
||||
|
||||
switch ($_REQUEST['action']) {
|
||||
case 'searchUsers':
|
||||
require_once 'classes/model/Users.php';
|
||||
$criteria = new Criteria( 'workflow' );
|
||||
$criteria->addSelectColumn( UsersPeer::USR_USERNAME );
|
||||
$criteria->add( UsersPeer::USR_STATUS, array ('CLOSED'
|
||||
|
||||
@@ -98,7 +98,7 @@ foreach ($_POST['aUsers'] as $sUser) {
|
||||
}
|
||||
}
|
||||
}
|
||||
require_once 'classes/model/Users.php';
|
||||
|
||||
$oUser = new Users();
|
||||
$oUser->create( $aData );
|
||||
}
|
||||
|
||||
@@ -312,7 +312,6 @@ switch ($function) {
|
||||
}
|
||||
}
|
||||
}
|
||||
require_once 'classes/model/Users.php';
|
||||
$oUser = new Users();
|
||||
$oUser->create( $aData );
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ function sendJsonResultGeneric ($response, $callback)
|
||||
function getNotesList ()
|
||||
{
|
||||
extract( getExtJSParams() );
|
||||
require_once ("classes/model/AppNotes.php");
|
||||
if ((isset( $_REQUEST['appUid'] )) && (trim( $_REQUEST['appUid'] ) != "")) {
|
||||
$appUid = $_REQUEST['appUid'];
|
||||
} else {
|
||||
@@ -64,7 +63,6 @@ function postNote ()
|
||||
$appUid = $_SESSION['APPLICATION'];
|
||||
}
|
||||
$usrUid = (isset( $_SESSION['USER_LOGGED'] )) ? $_SESSION['USER_LOGGED'] : "";
|
||||
require_once ("classes/model/AppNotes.php");
|
||||
|
||||
$noteContent = addslashes( $_POST['noteText'] );
|
||||
|
||||
|
||||
@@ -9,9 +9,6 @@ try {
|
||||
|
||||
$form = $_POST['form'];
|
||||
$CategoryUid = $form['CATEGORY_UID'];
|
||||
require_once ("classes/model/ProcessCategory.php");
|
||||
|
||||
require_once 'classes/model/Process.php';
|
||||
|
||||
//we'are looking for data into process with this CategoryUid
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
|
||||
@@ -9,7 +9,6 @@ if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_SETUP_A
|
||||
$aux = explode( '|', isset( $_GET['id'] ) ? $_GET['id'] : '' );
|
||||
$CategoryUid = str_replace( '"', '', $aux[0] );
|
||||
|
||||
require_once ("classes/model/ProcessCategory.php");
|
||||
//if exists the row in the database propel will update it, otherwise will insert.
|
||||
$tr = ProcessCategoryPeer::retrieveByPK( $CategoryUid );
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_SETUP_A
|
||||
die();
|
||||
}
|
||||
|
||||
require_once ("classes/model/ProcessCategory.php");
|
||||
|
||||
$fields['CATEGORY_UID'] = G::GenerateUniqueID();
|
||||
;
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ try {
|
||||
$CategoryName = $form['CATEGORY_NAME'];
|
||||
$CategoryIcon = $form['CATEGORY_ICON'];
|
||||
|
||||
require_once ("classes/model/ProcessCategory.php");
|
||||
|
||||
//if exists the row in the database propel will update it, otherwise will insert.
|
||||
$tr = ProcessCategoryPeer::retrieveByPK( $CategoryUid );
|
||||
$processCategory = new ProcessCategory();
|
||||
|
||||
Reference in New Issue
Block a user