Include the repository in the file changeset links
[viewsvn.git] / includes / svnlib.php
1 <?php
2 /*=====================================================================*\
3 || ###################################################################
4 || # ViewSVN [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
6 || #
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
10 || #
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 || # more details.
15 || #
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
21
22 /**
23 * Command line interface with the SVN commands
24 *
25 * @package ViewSVN
26 */
27
28 /**
29 * Interacts with the command line subsystem to
30 * access SVN information
31 *
32 * @package ViewSVN
33 * @version $Id$
34 */
35 class SVNLib
36 {
37 /**
38 * Path to the SVN binary
39 * @var string
40 */
41 var $svnpath;
42
43 /**
44 * Common command system
45 * @var object
46 */
47 var $common;
48
49 /**
50 * Constructor: validate SVN path
51 *
52 * @param string Path to SVN binary
53 */
54 function SVNLib($svnpath)
55 {
56 global $viewsvn;
57
58 $this->svnpath = $viewsvn->shell->cmd($svnpath);
59
60 $this->common =& new SVNCommon();
61
62 $access = $viewsvn->shell->exec($this->svnpath . ' --version');
63
64 if (!$access)
65 {
66 $viewsvn->trigger->error('svn binary could not be found');
67 }
68
69 if (!preg_match('#^svn, version (.*?)\)$#i', trim($access[0])))
70 {
71 $viewsvn->trigger->error('svn binary does not pass test');
72 }
73 }
74
75 /**
76 * Prepares data for output
77 *
78 * @access public
79 *
80 * @param string Standard data
81 *
82 * @return string Output-ready data
83 */
84 function format($string)
85 {
86 // convert entities
87 $string = htmlspecialchars($string);
88
89 // tabs to 5 spaces
90 $string = str_replace("\t", ' ', $string);
91
92 // spaces to nbsp
93 if (true)
94 {
95 $string = preg_replace('#( +)#e', '$this->format_spaces("\1")', $string);
96 }
97 // no word wrap
98 else
99 {
100 $string = str_replace(' ', '&nbsp;', $string);
101 }
102
103 // convert advanced diff
104 $string = str_replace(array('{@+' . '+}', '{@-' . '-}'), array('<span class="diff_add_bit">', '<span class="diff_del_bit">'), $string);
105 $string = str_replace(array('{/@+' . '+}', '{/@-' . '-}'), '</span>', $string);
106
107 // nl2br
108 $string = nl2br($string);
109
110 return $string;
111 }
112
113 /**
114 * Counts the spaces and replaces two or more ones
115 *
116 * @access private
117 *
118 * @param string Spaced string
119 *
120 * @return string &nbsp;'d string
121 */
122 function format_spaces($thestring)
123 {
124 if (strlen($thestring) >= 2)
125 {
126 $thestring = str_replace(' ', '&nbsp;', $thestring);
127 }
128
129 return $thestring;
130 }
131
132 /**
133 * Executes the SVN binary
134 *
135 * @access private
136 *
137 * @param string Command
138 *
139 * @return array Output
140 */
141 function svn($command)
142 {
143 global $viewsvn;
144
145 $output = $viewsvn->shell->exec($this->svnpath . ' ' . $command . ' 2>&1');
146
147 // make sure that we keep escaped chars
148 //$output = str_replace(array('\t', '\n', '\r'), array('\\\t', '\\\n', '\\\r'), $output);
149 //$output = preg_replace('#\\\(.)#', '\\\\\\\\' . '\1', $output);
150 $output = str_replace('\\', '\\\\', $output);
151
152 $temp = implode("\n", $output);
153 if (strpos($temp, '(apr' . '_err=') !== false)
154 {
155 $viewsvn->trigger->error(nl2br($temp));
156 }
157 return $output;
158 }
159
160 /**
161 * SVN Wrapper: standard command system
162 *
163 * @access private
164 *
165 * @param string SVN command
166 * @param string Repository
167 * @param string Path
168 * @param integer Revision
169 *
170 * @return array Lines of output
171 */
172 function std($command, $repos, $path, $revision)
173 {
174 global $viewsvn;
175
176 $revision = $this->rev($revision);
177 $repospath = $viewsvn->repos->fetch_path($repos, false);
178
179 return $this->svn($command . ' -r' . $revision . ' ' . $repospath . $path);
180 }
181
182 /**
183 * SVN Wrapper: blame
184 *
185 * @access protected
186 *
187 * @param string Repository
188 * @param string Path
189 * @param integer Revision
190 *
191 * @return array Lines of blame output
192 */
193 function blame($repos, $path, $revision)
194 {
195 return $this->std('blame', $repos, $path, $revision);
196 }
197
198 /**
199 * SVN Wrapper: cat
200 *
201 * @access protected
202 *
203 * @param string Repository
204 * @param string Path
205 * @param integer Revision
206 *
207 * @return array Lines of cat output
208 */
209 function cat($repos, $path, $revision)
210 {
211 return $this->std('cat', $repos, $path, $revision);
212 }
213
214 /**
215 * SVN Wrapper: diff
216 *
217 * @access protected
218 *
219 * @param string Repository
220 * @param string Path
221 * @param integer Lower revision
222 * @param integer Higher revision
223 *
224 * @return array Lines of diff output
225 */
226 function diff($repos, $path, $lorev, $hirev)
227 {
228 global $viewsvn;
229
230 $hirev = $this->rev($hirev);
231 $lorev = $this->rev($lorev);
232 if ($lorev == 'HEAD')
233 {
234 $lorev = 1;
235 }
236
237 if (is_integer($hirev) AND is_integer($lorev))
238 {
239 if ($lorev > $hirev)
240 {
241 $lorev = $hirev - 1;
242 }
243 if ($lorev == $hirev)
244 {
245 $lorev = 0;
246 }
247 }
248
249 $repospath = $viewsvn->repos->fetch_path($repos, false);
250
251 return $this->svn('diff -r' . $lorev . ':' . $hirev . ' ' . $repospath . $path);
252 }
253
254 /**
255 * SVN Wrapper: log
256 *
257 * @access protected
258 *
259 * @param string Repository
260 * @param string Path
261 * @param integer Lower revision
262 * @param integer Higher revision
263 *
264 * @return array Lines of log output
265 */
266 function log($repos, $path, $lorev, $hirev)
267 {
268 global $viewsvn;
269
270 $hirev = $this->rev($hirev);
271 $lorev = $this->rev($hirev);
272 if ($lorev == 'HEAD')
273 {
274 $lorev = 0;
275 }
276
277 if (is_integer($hirev) AND is_integer($lorev))
278 {
279 if ($lorev > $hirev)
280 {
281 $lorev = $hirev - 1;
282 }
283 if ($lorev == $hirev)
284 {
285 $lorev = 0;
286 }
287 }
288
289 $repospath = $viewsvn->repos->fetch_path($repos, false);
290
291 return $this->svn('log -v -r' . $hirev . ':' . $lorev . ' ' . $repospath . $path);
292 }
293
294 /**
295 * SVN Wrapper: ls (list)
296 *
297 * @access protected
298 *
299 * @param string Repository
300 * @param string Path
301 * @param integer Revision
302 *
303 * @return array Lines of list output
304 */
305 function ls($repos, $path, $revision)
306 {
307 return $this->std('list', $repos, $path, $revision);
308 }
309
310 /**
311 * Generates a clean revision number
312 *
313 * @access public
314 *
315 * @param integer Revision number
316 *
317 * @return mixed Cleaned revision or HEAD
318 */
319 function rev($revision)
320 {
321 if (($revision = intval($revision)) < 1)
322 {
323 $revision = 'HEAD';
324 }
325 return $revision;
326 }
327 }
328
329 /**
330 * Commonly executed SVN commands that return data
331 * used in many parts of the system
332 *
333 * @package ViewSVN
334 * @version $Id$
335 */
336 class SVNCommon
337 {
338 /**
339 * Registry object
340 * @var object
341 */
342 var $registry;
343
344 /**
345 * List of revisions
346 * @var array
347 */
348 var $revisions;
349
350 /**
351 * List of logs
352 * @var array
353 */
354 var $logs;
355
356 /**
357 * Constructor: bind with registry
358 */
359 function SVNCommon()
360 {
361 global $viewsvn;
362
363 $this->registry =& $viewsvn;
364 }
365
366 /**
367 * Checks to see if the given universal path is
368 * a directory
369 *
370 * @access public
371 *
372 * @param string Universal path
373 *
374 * @return bool Directory or not
375 */
376 function isdir($path)
377 {
378 $output = $this->registry->svn->std('info', $this->registry->paths->fetch_repos($path), $this->registry->paths->fetch_path($path), 'HEAD');
379
380 foreach ($output AS $line)
381 {
382 if (preg_match('#^Node Kind: (.*)#', $line, $matches))
383 {
384 if (trim(strtolower($matches[1])) == 'directory')
385 {
386 return true;
387 }
388 }
389 }
390
391 return false;
392 }
393
394 /**
395 * Get a list of revisions for a path
396 *
397 * @access public
398 *
399 * @param string Universal path
400 *
401 * @return array Key revisions
402 */
403 function fetch_revs($path)
404 {
405 if (!isset($this->revisions["$path"]))
406 {
407 $log = $this->fetch_logs($path);
408
409 $revs = array_keys($log);
410
411 $this->revisions["$path"] = array(
412 'HEAD' => $revs[0],
413 'START' => $revs[ count($revs) - 1 ],
414 'revs' => $revs
415 );
416 }
417
418 return $this->revisions["$path"];
419 }
420
421 /**
422 * Gets the revision that is marked as HEAD
423 *
424 * @access public
425 *
426 * @param string Universal path
427 *
428 * @return integer Revision
429 */
430 function fetch_head_rev($path)
431 {
432 $revs = $this->fetch_revs($path);
433 return $revs['HEAD'];
434 }
435
436 /**
437 * Returns the previous revision to the one given
438 *
439 * @access public
440 *
441 * @param string Universal path
442 * @param integer Arbitrary revision
443 *
444 * @return integer Previous revision (-1 if none)
445 */
446 function fetch_prev_rev($path, $current)
447 {
448 $revs = $this->fetch_revs($path);
449
450 if ($current == 'HEAD')
451 {
452 $current = $this->fetch_head_rev($path);
453 }
454
455 $index = array_search($current, $revs['revs']);
456 if ($current === false)
457 {
458 $message->trigger->error('revision ' . $current . ' is not in ' . $path);
459 }
460
461 if (isset($revs['revs'][ $index + 1 ]))
462 {
463 return $revs['revs'][ $index + 1 ];
464 }
465 else
466 {
467 return -1;
468 }
469 }
470
471 /**
472 * Get a list of logs
473 *
474 * @access public
475 *
476 * @param string Universal path
477 *
478 * @return array Log data
479 */
480 function fetch_logs($path)
481 {
482 if (!isset($this->logs["$path"]))
483 {
484 $log = new SVNLog($this->registry->paths->fetch_repos($path), $this->registry->paths->fetch_path($path), 0, 0);
485
486 $this->logs["$path"] = $log->fetch();
487 }
488
489 return $this->logs["$path"];
490 }
491
492 /**
493 * Returns a given log entry for a path
494 * and revision
495 *
496 * @access public
497 *
498 * @param string Universal path
499 * @param integer Arbitrary revision
500 *
501 * @return array Log entry
502 */
503 function fetch_log($path, $rev)
504 {
505 $logs = $this->fetch_logs($path);
506
507 $rev = $this->registry->svn->rev($rev);
508 if ($rev == 'HEAD')
509 {
510 $rev = $this->fetch_head_rev($path);
511 }
512
513 if (isset($logs["$rev"]))
514 {
515 return $logs["$rev"];
516 }
517 else
518 {
519 return null;
520 }
521 }
522
523 /**
524 * Prints the file changed list
525 *
526 * @access public
527 *
528 * @public array List of file changes
529 * @public string The repository
530 * @public integer Current revision
531 *
532 * @return string Processed HTML
533 */
534 function construct_file_changes($changes, $repos, $revision)
535 {
536 global $viewsvn;
537
538 $files = '';
539
540 foreach ($changes AS $file)
541 {
542 switch ($file['action'])
543 {
544 case 'A':
545 $class = 'file_add';
546 $tooltip = 'Added';
547 break;
548 case 'D':
549 $class = 'file_delete';
550 $tooltip = 'Deleted';
551 break;
552 case 'M':
553 $class = 'file_modify';
554 $tooltip = 'Modified';
555 break;
556 case 'R':
557 $class = 'file_replace';
558 $tooltip = 'Replaced';
559 break;
560 }
561
562 $show['from'] = (bool)$file['from'];
563
564 if ($file['from'])
565 {
566 $class = 'file_move';
567 $tooltip = 'Moved/Copied';
568 preg_match('#(.*):([0-9]+)#', $file['from'], $matches);
569 $link['from'] = $viewsvn->paths->out('view.php' . $viewsvn->paths->fetch_rev_str(false, $matches[2]), $repos . $matches[1]);
570 }
571
572 $link['file'] = $viewsvn->paths->out('view.php' . $viewsvn->paths->fetch_rev_str(false, $revision), $repos . $file['file']);
573
574 eval('$files .= "' . $viewsvn->template->fetch('file_change') . '";');
575 }
576
577 return $files;
578 }
579 }
580
581 /**
582 * Annotation/blame system; constructs an array
583 * that is ready for output
584 *
585 * @package ViewSVN
586 * @version $Id$
587 */
588 class SVNBlame
589 {
590 /**
591 * Array of blame information
592 * @var array
593 */
594 var $blame = array();
595
596 /**
597 * Raw "svn blame" output
598 * @var array
599 */
600 var $rawoutput;
601
602 /**
603 * Constructor: create blame and store data
604 *
605 * @param string Repository
606 * @param string Path
607 * @param integer Revision
608 */
609 function SVNBlame($repos, $path, $revision)
610 {
611 global $viewsvn;
612
613 $this->rawoutput = $viewsvn->svn->blame($repos, $path, $revision);
614 $this->process();
615 }
616
617 /**
618 * Returns blame for display
619 *
620 * @access public
621 *
622 * @return array Blame data
623 */
624 function fetch()
625 {
626 return $this->blame;
627 }
628
629 /**
630 * Parses the blame data
631 *
632 * @access private
633 */
634 function process()
635 {
636 $lineno = 1;
637
638 foreach ($this->rawoutput AS $line)
639 {
640 if (preg_match('#^\s+([0-9]+)\s+([\w\.\-_]+)\s(.*)$#', $line, $matches))
641 {
642 $this->blame[] = array(
643 'rev' => $matches[1],
644 'author' => $matches[2],
645 'line' => $matches[3],
646 'lineno' => $lineno++
647 );
648 }
649 // a blank line
650 else if (preg_match('#^\s+([0-9]+)\s+([\w\.\-_]+)$#', $line, $matches))
651 {
652 $this->blame[] = array(
653 'rev' => $matches[1],
654 'author' => $matches[2],
655 'line' => '',
656 'lineno' => $lineno++
657 );
658 }
659 }
660 }
661 }
662
663 /**
664 * Log management system; creates a complex list
665 * of SVN log information
666 *
667 * @package ViewSVN
668 * @version $Id$
669 */
670 class SVNLog
671 {
672 /**
673 * Array of logs
674 * @var array
675 */
676 var $logs = array();
677
678 /**
679 * Raw "svn log" output
680 * @var array
681 */
682 var $rawoutput;
683
684 /**
685 * Constructor: create log store for the given file
686 *
687 * @param string Repository
688 * @param string Path
689 * @param integer Lower revision
690 * @param integer Higher revision
691 */
692 function SVNLog($repos, $path, $lorev, $hirev)
693 {
694 global $viewsvn;
695
696 $this->rawoutput = $viewsvn->svn->log($repos, $path, $lorev, $hirev);
697 $this->process();
698 }
699
700 /**
701 * Returns logs for display
702 *
703 * @access public
704 *
705 * @return array Log data
706 */
707 function fetch()
708 {
709 return $this->logs;
710 }
711
712 /**
713 * Splits up the raw output into a usable log
714 *
715 * @access private
716 */
717 function process()
718 {
719 $lastrev = 0;
720
721 for ($i = 1; $i <= count($this->rawoutput) - 1; $i++)
722 {
723 $line = $this->rawoutput["$i"];
724
725 if (preg_match('#^r([0-9]*) \| (.*?) \| (....-..-.. ..:..:..) ([0-9\-]*) \((.*?)\) \| ([0-9]*) lines?$#', $line, $matches))
726 {
727 if (isset($this->logs["$lastrev"]))
728 {
729 $this->logs["$lastrev"]['message'] = $this->strip_last_line($this->logs["$lastrev"]['message']);
730 }
731
732 $this->logs["$matches[1]"] = array(
733 'rev' => $matches[1],
734 'author' => $matches[2],
735 'date' => $matches[3],
736 'timezone' => $matches[4],
737 'lines' => $matches[6],
738 'message' => ''
739 );
740
741 $lastrev = $matches[1];
742 }
743 else if (preg_match('#^\s+([ADMR])\s(.*)#', $line, $matches))
744 {
745 if (preg_match('#(.*) \(from (.*?)\)$#', $matches[2], $amatches))
746 {
747 $matches[2] = $amatches[1];
748 }
749
750 $this->logs["$lastrev"]['files'][] = array(
751 'action' => $matches[1],
752 'file' => trim($matches[2]),
753 'from' => (isset($amatches[2]) ? $amatches[2] : '')
754 );
755 }
756 else
757 {
758 if (trim($line) != 'Changed paths:')
759 {
760 $this->logs["$lastrev"]['message'] .= $line . "\n";
761 }
762 }
763 }
764
765 if (isset($this->logs["$lastrev"]))
766 {
767 $this->logs["$lastrev"]['message'] = $this->strip_last_line($this->logs["$lastrev"]['message']);
768 }
769 }
770
771 /**
772 * Trims the last dash line off a message
773 *
774 * @access private
775 *
776 * @param string Message with annoying-ass line
777 *
778 * @return string Clean string
779 */
780 function strip_last_line($string)
781 {
782 return trim(preg_replace("#\n(.*?)\n$#", '', $string));
783 }
784 }
785
786 /**
787 * Diff system; constructs a diff array that
788 * is ready for output
789 *
790 * @package ViewSVN
791 */
792 class SVNDiff
793 {
794 /**
795 * Array of diff information
796 * @var array
797 */
798 var $diff = array();
799
800 /**
801 * Raw "svn diff" output
802 * @var array
803 */
804 var $rawoutput;
805
806 /**
807 * Constructor: create and store diff data
808 *
809 * @param string Repository
810 * @param string Path
811 * @param integer Lower revision
812 * @param integer Higher revision
813 */
814 function SVNDiff($repos, $path, $lorev, $hirev)
815 {
816 global $viewsvn;
817
818 $this->rawoutput = $viewsvn->svn->diff($repos, $path, $lorev, $hirev);
819 $this->process();
820 }
821
822 /**
823 * Returns diffs for display
824 *
825 * @access public
826 *
827 * @return array Diff data
828 */
829 function fetch()
830 {
831 return $this->diff;
832 }
833
834 /**
835 * Processes and prepares diff data
836 *
837 * @access private
838 */
839 function process()
840 {
841 $chunk = 0;
842 $indexcounter = null;
843
844 $delstack = array();
845
846 foreach ($this->rawoutput AS $line)
847 {
848 if (preg_match('#^@@ \-([0-9]*),([0-9]*) \+([0-9]*),([0-9]*) @@$#', $line, $bits))
849 {
850 $delstack = array();
851 $this->diff["$index"][ ++$chunk ]['hunk'] = array('old' => array('line' => $bits[1], 'count' => $bits[2]), 'new' => array('line' => $bits[3], 'count' => $bits[4]));
852 $lines['old'] = $this->diff["$index"]["$chunk"]['hunk']['old']['line'] - 1;
853 $lines['new'] = $this->diff["$index"]["$chunk"]['hunk']['new']['line'] - 1;
854 continue;
855 }
856
857 if ($indexcounter <= 3 AND $indexcounter !== null)
858 {
859 //echo $line . "\n";
860 $indexcounter++;
861 continue;
862 }
863 else if ($indexcounter == 3)
864 {
865 $indexcounter = null;
866 //echo "\n\n\n";
867 continue;
868 }
869
870 if (preg_match('#^([\+\- ])(.*)#', $line, $matches))
871 {
872 $act = $matches[1];
873 $content = $matches[2];
874
875 if ($act == ' ')
876 {
877 $this->diff["$index"]["$chunk"][] = array(
878 'line' => $content,
879 'act' => '',
880 'oldlineno' => ++$lines['old'],
881 'newlineno' => ++$lines['new']
882 );
883
884 $delstack = array();
885 }
886 else if ($act == '+')
887 {
888 // potential line delta
889 if (count($delstack) > 0)
890 {
891 $lastline = array_shift($delstack);
892
893 if ($delta = @$this->fetch_diff_extent($lastline['line'], $content))
894 {
895 // create two sets of ends for the two contents
896 $delta['endo'] = strlen($lastline['line']) - $delta['end'];
897 $delta['endn'] = strlen($content) - $delta['end'];
898
899 $diffo = $delta['endo'] - $delta['start'];
900 $diffn = $delta['endn'] - $delta['start'];
901
902 if (strlen($lastline['line']) > $delta['endo'] - $diffo)
903 {
904 $removed = substr($lastline['line'], $delta['start'], $diffo);
905 $this->diff["$index"]["$chunk"]["$lastline[INDEX]"]['line'] = substr_replace($lastline['line'], '{@-' . '-}' . $removed . '{/@-' . '-}', $delta['start'], $diffo);
906 }
907
908 if (strlen($content) > $delta['endn'] - $diffn)
909 {
910 $added = substr($content, $delta['start'], $diffn);
911 $content = substr_replace($content, '{@+' . '+}' . $added . '{/@+' . '+}', $delta['start'], $diffn);
912 }
913 }
914 }
915
916 $this->diff["$index"]["$chunk"][] = array(
917 'line' => $content,
918 'act' => '+',
919 'oldlineno' => '',
920 'newlineno' => ++$lines['new']
921 );
922 }
923 else if ($act == '-')
924 {
925 $this->diff["$index"]["$chunk"][] = $thearray = array(
926 'line' => $content,
927 'act' => '-',
928 'oldlineno' => ++$lines['old'],
929 'newlineno' => ''
930 );
931
932 $key = count($this->diff["$index"]["$chunk"]) - 2;
933 $thearray['INDEX'] = $key;
934
935 array_push($delstack, $thearray);
936 }
937 }
938 // whitespace lines
939 else
940 {
941 if (preg_match('#^Index: (.*?)$#', $line, $matches))
942 {
943 $index = $matches[1];
944 $indexcounter = 1;
945 $chunk = 0;
946 continue;
947 }
948
949 $this->diff["$index"]["$chunk"][] = array(
950 'line' => '',
951 'act' => '',
952 'oldlineno' => ++$lines['old'],
953 'newlineno' => ++$lines['new']
954 );
955
956 $delstack = array();
957 }
958 }
959 }
960
961 /**
962 * Returns the amount of change that occured
963 * between two lines
964 *
965 * @access private
966 *
967 * @param string Old line
968 * @param string New line
969 *
970 * @return array Difference of positions
971 */
972 function fetch_diff_extent($old, $new)
973 {
974 $start = 0;
975 $min = min(strlen($old), strlen($new));
976
977 for ($start = 0; $start < $min; $start++)
978 {
979 if ($old{"$start"} != $new{"$start"})
980 {
981 break;
982 }
983 }
984
985 $max = max(strlen($old), strlen($new));
986
987 for ($end = 0; $end < $min; $end++)
988 {
989 $oldpos = strlen($old) - $end;
990 $newpos = strlen($new) - $end;
991
992 if ($old{"$oldpos"} != $new{"$newpos"})
993 {
994 break;
995 }
996 }
997
998 $end--;
999
1000 if ($start == 0 AND $end == $max)
1001 {
1002 return false;
1003 }
1004
1005 return array('start' => $start, 'end' => $end);
1006 }
1007 }
1008
1009 /*=====================================================================*\
1010 || ###################################################################
1011 || # $HeadURL$
1012 || # $Id$
1013 || ###################################################################
1014 \*=====================================================================*/
1015 ?>