Commit 294e2812272f51fdb7c060a9bcf045f18dc11391
1 parent
e11c2c47
KTS-1687
"Double quote to single quote conversion" Fixed. Reviewed by: Kevin Fourie git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@6214 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
12 additions
and
12 deletions
bin/cleanup.php
| ... | ... | @@ -66,14 +66,14 @@ function checkFile($path, $first = true) { |
| 66 | 66 | } |
| 67 | 67 | $fod = KTBrowseUtil::folderOrDocument($path); |
| 68 | 68 | if ($fod === false) { |
| 69 | - $GLOBALS["aFilesToRemove"][] = $path; | |
| 69 | + $GLOBALS['aFilesToRemove'][] = $path; | |
| 70 | 70 | return; |
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | function checkDirectory($path) { |
| 75 | 75 | global $fsPath, $aIgnore; |
| 76 | - $fullpath = sprintf("%s/%s", $fsPath, $path); | |
| 76 | + $fullpath = sprintf('%s/%s', $fsPath, $path); | |
| 77 | 77 | |
| 78 | 78 | if (!is_dir($fullpath)) { |
| 79 | 79 | print "Not a directory: $fullpath\n"; |
| ... | ... | @@ -87,7 +87,7 @@ function checkDirectory($path) { |
| 87 | 87 | if (!empty($path)) { |
| 88 | 88 | $fod = KTBrowseUtil::folderOrDocument($path); |
| 89 | 89 | if ($fod === false) { |
| 90 | - $GLOBALS["aFoldersToRemove"][] = $path; | |
| 90 | + $GLOBALS['aFoldersToRemove'][] = $path; | |
| 91 | 91 | return; |
| 92 | 92 | } |
| 93 | 93 | } |
| ... | ... | @@ -98,8 +98,8 @@ function checkDirectory($path) { |
| 98 | 98 | } |
| 99 | 99 | while (($filename = readdir($dh)) !== false) { |
| 100 | 100 | if (in_array($filename, $aIgnore)) { continue; } |
| 101 | - $subrelpath = sprintf("%s/%s", $path, $filename); | |
| 102 | - $subfullpath = sprintf("%s/%s", $fsPath, $subrelpath); | |
| 101 | + $subrelpath = sprintf('%s/%s', $path, $filename); | |
| 102 | + $subfullpath = sprintf('%s/%s', $fsPath, $subrelpath); | |
| 103 | 103 | if (is_dir($subfullpath)) { |
| 104 | 104 | checkDirectory($subrelpath); |
| 105 | 105 | } |
| ... | ... | @@ -111,8 +111,8 @@ function checkDirectory($path) { |
| 111 | 111 | |
| 112 | 112 | function checkRepoFolder($oFolder) { |
| 113 | 113 | global $fsPath, $aRepoFolderProblems; |
| 114 | - $sFolderPath = sprintf("%s/%s", $oFolder->getFullPath(), $oFolder->getName()); | |
| 115 | - $sFullPath = sprintf("%s/%s", $fsPath, $sFolderPath); | |
| 114 | + $sFolderPath = sprintf('%s/%s', $oFolder->getFullPath(), $oFolder->getName()); | |
| 115 | + $sFullPath = sprintf('%s/%s', $fsPath, $sFolderPath); | |
| 116 | 116 | if (!is_dir($sFullPath)) { |
| 117 | 117 | $aRepoFolderProblems[] = $sFolderPath; |
| 118 | 118 | } |
| ... | ... | @@ -121,7 +121,7 @@ function checkRepoFolder($oFolder) { |
| 121 | 121 | function checkRepoDocument($oDocument) { |
| 122 | 122 | global $fsPath, $aRepoDocumentProblems; |
| 123 | 123 | $sDocumentPath = $oDocument->getStoragePath(); |
| 124 | - $sFullPath = sprintf("%s/%s", $fsPath, $sDocumentPath); | |
| 124 | + $sFullPath = sprintf('%s/%s', $fsPath, $sDocumentPath); | |
| 125 | 125 | if (!is_file($sFullPath)) { |
| 126 | 126 | $aRepoDocumentProblems[] = $sDocumentPath; |
| 127 | 127 | } |
| ... | ... | @@ -130,14 +130,14 @@ function checkRepoDocument($oDocument) { |
| 130 | 130 | |
| 131 | 131 | function checkRepoVersions($oDocument) { |
| 132 | 132 | global $fsPath, $aRepoVersionProblems; |
| 133 | - $table = "document_transactions"; | |
| 133 | + $table = 'document_transactions'; | |
| 134 | 134 | $aVersions = DBUtil::getResultArrayKey(array("SELECT DISTINCT version FROM $table WHERE document_id = ?", array($oDocument->getID())), "version"); |
| 135 | 135 | foreach($aVersions as $sVersion) { |
| 136 | 136 | if ($sVersion == $oDocument->getVersion()) { |
| 137 | 137 | continue; |
| 138 | 138 | } |
| 139 | 139 | $sDocumentPath = $oDocument->getStoragePath(); |
| 140 | - $sFullPath = sprintf("%s/%s-%s", $fsPath, $sDocumentPath, $sVersion); | |
| 140 | + $sFullPath = sprintf('%s/%s-%s', $fsPath, $sDocumentPath, $sVersion); | |
| 141 | 141 | if (!is_file($sFullPath)) { |
| 142 | 142 | $aRepoVersionProblems[] = array($sDocumentPath, $sVersion); |
| 143 | 143 | continue; |
| ... | ... | @@ -145,7 +145,7 @@ function checkRepoVersions($oDocument) { |
| 145 | 145 | } |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | -checkDirectory(""); | |
| 148 | +checkDirectory(''); | |
| 149 | 149 | |
| 150 | 150 | print "\n"; |
| 151 | 151 | print "Would remove these folders (and all their contents):\n"; |
| ... | ... | @@ -169,7 +169,7 @@ foreach ($aRepoFolderProblems as $path) { |
| 169 | 169 | print "\t$path\n"; |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | -$aDocuments =& Document::getList(array("status_id = ?", array(LIVE))); | |
| 172 | +$aDocuments =& Document::getList(array('status_id = ?', array(LIVE))); | |
| 173 | 173 | foreach ($aDocuments as $oDocument) { |
| 174 | 174 | checkRepoDocument($oDocument); |
| 175 | 175 | } | ... | ... |