Редакция 629 | К новейшей редакции | Весь файл | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 629 | Редакция 630 | ||
---|---|---|---|
Строка 1915... | Строка 1915... | ||
1915 | * @param string $actor
|
1915 | * @param string $actor
|
1916 | * @param string $format
|
1916 | * @param string $format
|
1917 | * @return string
|
1917 | * @return string
|
1918 | */
|
1918 | */
|
1919 | public function showRepositoriesList($name, $actor, $format = 'list') { |
1919 | public function showRepositoriesList($name, $actor, $format = 'list') { |
1920 | $query = "SELECT r.*,rt.*,CONCAT(v.version,' ',v.vname) AS fullname FROM ".$this->prefix."repository r "; |
1920 | $query = "SELECT r.*,rt.*,v.version_id,CONCAT(v.version,' ',v.vname) AS fullname FROM ".$this->prefix."repository r "; |
1921 | $query .= "JOIN ".$this->prefix."rtype rt ON rt.rtype_id=r.rtype_id "; |
1921 | $query .= "JOIN ".$this->prefix."rtype rt ON rt.rtype_id=r.rtype_id "; |
1922 | $query .= "JOIN ".$this->prefix."version v ON v.version_id=r.version "; |
1922 | $query .= "JOIN ".$this->prefix."version v ON v.version_id=r.version "; |
1923 | $query .= "ORDER BY v.version_id,r.rep_id ASC"; |
1923 | $query .= "ORDER BY v.version_id,r.rep_id ASC"; |
1924 | $rq =& $this->db->query($query); |
1924 | $rq =& $this->db->query($query); |
1925 | $show = "<ul>"; |
1925 | $show = "<ul>"; |
- | 1926 | $splitter = 0; |
|
1926 | while ($rq->fetchInto($element)) { |
1927 | while ($rq->fetchInto($element)) { |
1927 | $show .= "<li>[<a href='".$actor."?mode=".$name."&action=edit&uuid=".$this->secure->checkInt($element["rep_id"])."' class='edit'>править</a>][<a href='".$actor."?mode=".$name."&action=delete&uuid=".$this->secure->checkInt($element["rep_id"])."' class='delete'>удалить</a>] ".$this->secure->checkStr($element["repname"],1)." (".$this->secure->checkStr($element["fullname"],1)." — ".$this->secure->checkStr($element["rtype"],1).")</li>\n"; |
1928 | $show .= "<li>[<a href='".$actor."?mode=".$name."&action=edit&uuid=".$this->secure->checkInt($element["rep_id"])."' class='edit'>править</a>][<a href='".$actor."?mode=".$name."&action=delete&uuid=".$this->secure->checkInt($element["rep_id"])."' class='delete'>удалить</a>] ".$this->secure->checkStr($element["repname"],1)." (".$this->secure->checkStr($element["fullname"],1)." — ".$this->secure->checkStr($element["rtype"],1).")</li>\n"; |
- | 1929 | if ($splitter != $this->secure->checkInt($element["version_id"])) { |
|
- | 1930 | $splitter = $this->secure->checkInt($element["version_id"]); |
|
- | 1931 | $show .= "</ul><ul>"; |
|
- | 1932 | }
|
|
1928 | }
|
1933 | }
|
1929 | $show .= "</ul>"; |
1934 | $show .= "</ul>"; |
1930 | return $show; |
1935 | return $show; |
1931 | }
|
1936 | }
|
1932 | 1937 |