Changeset 1115 for trunk/common
- Timestamp:
- 03/20/10 16:49:35 (2 years ago)
- File:
-
- 1 edited
-
trunk/common/attachment.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/common/attachment.php
r1018 r1115 118 118 } 119 119 120 function is_grader_testfile($file_name) { 121 $pattern = '/^grader_test(\d)*\.(ok|in)$/'; 122 if (preg_match($pattern, $file_name) == false) { 123 return false; 124 } else { 125 return true; 126 } 127 } 128 129 function is_problem_page($page_name) { 130 $pattern = '/^problema\/' . IA_RE_TASK_ID . '$/'; 131 if (preg_match($pattern, $page_name) == false) { 132 return false; 133 } else { 134 return true; 135 } 136 } 137 138 function add_ending_newline($file_path) { 139 $content = file_get_contents($file_path); 140 if ($content[strlen($content) - 1] != "\n") { 141 $content .= "\n"; 142 file_put_contents($file_path, $content); 143 return true; 144 } 145 return false; 146 } 147 120 148 ?>
Note: See TracChangeset
for help on using the changeset viewer.
![[infoarena] development](/chrome/site/logo.png)