Хранилища Subversion ant

Редакция

Редакция 672 | Весь файл | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS

Редакция 672 Редакция 675
Строка 621... Строка 621...
621
           $query .= "JOIN ".$this->prefix."version v ON r.version=v.version_id ";
621
           $query .= "JOIN ".$this->prefix."version v ON r.version=v.version_id ";
622
           $query .= "JOIN ".$this->prefix."rtype t ON r.rtype_id=t.rtype_id ";
622
           $query .= "JOIN ".$this->prefix."rtype t ON r.rtype_id=t.rtype_id ";
623
           $query .= "JOIN ".$this->prefix."repscheme s ON r.scheme_id=s.scheme_id ";
623
           $query .= "JOIN ".$this->prefix."repscheme s ON r.scheme_id=s.scheme_id ";
624
           $query .= "WHERE v.version_id='".$data["version_id"]."' AND r.rtype_id='1'";
624
           $query .= "WHERE v.version_id='".$data["version_id"]."' AND r.rtype_id='1'";
625
           $rq =& $this->db->query($query);
625
           $rq =& $this->db->query($query);
-
 
626
           if ($rq->numRows()>0) {
626
           $rq->fetchInto($base);
627
                $rq->fetchInto($base);
627
           // Формируем type proto://host/folder
628
                // Формируем type proto://host/folder
628
           $show .= "# ".$this->secure->checkStr($base["repinfo"],1)."\n";
629
                $show .= "# ".$this->secure->checkStr($base["repinfo"],1)."\n";
629
           if ($base["repkey"]!="") {
630
                if ($base["repkey"]!="") {
630
                $show .= "# Установка ключа: ".$this->secure->checkStr($base["repkey"],1)."\n";
631
                    $show .= "# Установка ключа: ".$this->secure->checkStr($base["repkey"],1)."\n";
Строка 647... Строка 648...
647
           $rq =& $this->db->query($query);
648
                $rq =& $this->db->query($query);
648
           while ($rq->fetchInto($sections)) {
649
                while ($rq->fetchInto($sections)) {
649
               $show .= $sections["secname"]." ";
650
                    $show .= $sections["secname"]." ";
650
           }
651
                }
651
           $show .= "\n\n";
652
                $show .= "\n\n";
-
 
653
           }
652
654
653
           // Репозитории обновлений и третьих лиц
655
           // Репозитории обновлений и третьих лиц
654
           $query  = "SELECT * FROM ".$this->prefix."repository r ";
656
           $query  = "SELECT * FROM ".$this->prefix."repository r ";
655
           $query .= "JOIN ".$this->prefix."protos p ON r.proto_id=p.proto_id ";
657
           $query .= "JOIN ".$this->prefix."protos p ON r.proto_id=p.proto_id ";
656
           $query .= "JOIN ".$this->prefix."rephost h ON r.rhost_id=h.rhost_id ";
658
           $query .= "JOIN ".$this->prefix."rephost h ON r.rhost_id=h.rhost_id ";
Строка 665... Строка 667...
665
                        $query .= " OR ";
667
                        $query .= " OR ";
666
                    }
668
                    }
667
                }
669
                }
668
           $query .= ") ORDER BY r.rtype_id ASC";          
670
           $query .= ") ORDER BY r.rtype_id ASC";          
669
           $req =& $this->db->query($query);
671
           $req =& $this->db->query($query);
-
 
672
           if ($req->numRows()>0) {
670
           while ($req->fetchInto($updates)) {
673
                while ($req->fetchInto($updates)) {
671
                // Формируем type proto://host/folder
674
                    // Формируем type proto://host/folder
672
                $show .= "# ".$this->secure->checkStr($updates["repinfo"],1)."\n";
675
                    $show .= "# ".$this->secure->checkStr($updates["repinfo"],1)."\n";
673
                if ($updates["repkey"]!="") {
676
                    if ($updates["repkey"]!="") {
674
                    $show .= "# Установка ключа: ".$this->secure->checkStr($updates["repkey"],1)."\n";
677
                        $show .= "# Установка ключа: ".$this->secure->checkStr($updates["repkey"],1)."\n";
Строка 686... Строка 689...
686
                    $show .= $sections["secname"]." ";
689
                        $show .= $sections["secname"]." ";
687
                }
690
                    }
688
                $show .= "\n\n";
691
                    $show .= "\n\n";
689
           }
692
                }
690
           $show .= "\n";
693
                $show .= "\n";
-
 
694
           }
691
       } else {
695
       } else {
692
           // Базовый репозиторий
696
           // Базовый репозиторий
693
           $query  = "SELECT * FROM ".$this->prefix."repository r ";
697
           $query  = "SELECT * FROM ".$this->prefix."repository r ";
694
           $query .= "JOIN ".$this->prefix."protos p ON r.proto_id=p.proto_id ";
698
           $query .= "JOIN ".$this->prefix."protos p ON r.proto_id=p.proto_id ";
695
           $query .= "JOIN ".$this->prefix."rephost h ON r.rhost_id=h.rhost_id ";
699
           $query .= "JOIN ".$this->prefix."rephost h ON r.rhost_id=h.rhost_id ";
Строка 697... Строка 701...
697
           $query .= "JOIN ".$this->prefix."version v ON r.version=v.version_id ";
701
           $query .= "JOIN ".$this->prefix."version v ON r.version=v.version_id ";
698
           $query .= "JOIN ".$this->prefix."rtype t ON r.rtype_id=t.rtype_id ";
702
           $query .= "JOIN ".$this->prefix."rtype t ON r.rtype_id=t.rtype_id ";
699
           $query .= "JOIN ".$this->prefix."repscheme s ON r.scheme_id=s.scheme_id ";          
703
           $query .= "JOIN ".$this->prefix."repscheme s ON r.scheme_id=s.scheme_id ";          
700
           $query .= "WHERE v.version_id='".$data["version_id"]."' AND r.rtype_id='1'";
704
           $query .= "WHERE v.version_id='".$data["version_id"]."' AND r.rtype_id='1'";
701
           $rq =& $this->db->query($query);
705
           $rq =& $this->db->query($query);
-
 
706
           if ($rq->numRows()>0) {
702
           $rq->fetchInto($base);
707
                $rq->fetchInto($base);
703
           // Формируем type proto://host/folder
708
                // Формируем type proto://host/folder
704
           $show .= "# ".$this->secure->checkStr($base["repinfo"],1)."\n";
709
                $show .= "# ".$this->secure->checkStr($base["repinfo"],1)."\n";
705
           $show .= $this->secure->checkStr($dist["type"],1)." ";
710
                $show .= $this->secure->checkStr($dist["type"],1)." ";
706
           if ($base["sign_id"]!=0) {
711
                if ($base["sign_id"]!=0) {
Строка 726... Строка 731...
726
           $rq =& $this->db->query($query);
731
                $rq =& $this->db->query($query);
727
           while ($rq->fetchInto($sections)) {
732
                while ($rq->fetchInto($sections)) {
728
               $show .= $sections["secname"]." ";
733
                    $show .= $sections["secname"]." ";
729
           }
734
                }
730
           $show .= "\n\n";
735
                $show .= "\n\n";
-
 
736
           }
731
737
732
           // Репозитории обновлений и третьих лиц
738
           // Репозитории обновлений и третьих лиц
733
           $query  = "SELECT * FROM ".$this->prefix."repository r ";
739
           $query  = "SELECT * FROM ".$this->prefix."repository r ";
734
           $query .= "JOIN ".$this->prefix."protos p ON r.proto_id=p.proto_id ";
740
           $query .= "JOIN ".$this->prefix."protos p ON r.proto_id=p.proto_id ";
735
           $query .= "JOIN ".$this->prefix."rephost h ON r.rhost_id=h.rhost_id ";
741
           $query .= "JOIN ".$this->prefix."rephost h ON r.rhost_id=h.rhost_id ";
Строка 744... Строка 750...
744
                        $query .= " OR ";
750
                        $query .= " OR ";
745
                    }
751
                    }
746
                }
752
                }
747
           $query .= ") ORDER BY r.rtype_id ASC";
753
           $query .= ") ORDER BY r.rtype_id ASC";
748
           $req =& $this->db->query($query);
754
           $req =& $this->db->query($query);
-
 
755
           if ($req->numRows()>0) {
749
           while ($req->fetchInto($updates)) {
756
                while ($req->fetchInto($updates)) {
750
                // Формируем type proto://host/folder
757
                    // Формируем type proto://host/folder
751
                $show .= "# ".$this->secure->checkStr($updates["repinfo"],1)."\n";
758
                    $show .= "# ".$this->secure->checkStr($updates["repinfo"],1)."\n";
752
                $show .= $this->secure->checkStr($dist["type"],1)." ";
759
                    $show .= $this->secure->checkStr($dist["type"],1)." ";
753
                if ($updates["sign_id"]!=0) {
760
                    if ($updates["sign_id"]!=0) {
Строка 768... Строка 775...
768
                }
775
                    }
769
                $show .= "\n\n";
776
                    $show .= "\n\n";
770
           }
777
                }
771
           $show .= "\n";
778
                $show .= "\n";
772
       }
779
           }
-
 
780
       }
773
781
774
       $HTTPHeader1 = "Content-length: ".strlen($show);
782
       $HTTPHeader1 = "Content-length: ".strlen($show);
775
       $HTTPHeader2 = "Content-disposition: attachment; filename=sources.list\n\n";
783
       $HTTPHeader2 = "Content-disposition: attachment; filename=sources.list\n\n";
776
784
777
       header($HTTPHeader1);
785
       header($HTTPHeader1);