aboutsummaryrefslogtreecommitdiffstats
BranchCommit messageAuthorAge
mainFix parentCommit invalid memory address or nil pointer dereference. (#33204)hiifong4 hours
release/v1.23Fix push message behavior (#33215) (#33317)wxiaoguang4 hours
release/v1.22bump x/net (#32896) (#32900)techknowlogick4 weeks
release/v1.21use existing oauth grant for public client (#31015) (#31041)Giteabot8 months
release/v1.22-legacyImprove job commit description (#30579) (#30709)Giteabot9 months
release/v1.20Fix missing check (#28406) (#28413)Lunny Xiao13 months
release/v1.19Fix docs links in v1.19 (#28431)yp0532713 months
release/v1.18Match api migration behavior to web behavior (#23552) (#23572)Giteabot22 months
release/v1.17fix: omit avatar_url in discord payload when empty (#22393) (#22395)John Olheiser2 years
release/v1.16Fix possible panic when repository is empty (#20509) (#20527)65432 years
release/v1.15Fix pushing to 1-x-dev docker tag (part 4)Andrew Thornton3 years
release/v1.14Fix database keyword quote problem on migration v161 (#17524)Lunny Xiao3 years
release/v1.13Fix orphaned objects deletion bug (#15657) (#15682)65434 years
release/v1.12Increment skip to avoid infini-loop (#13703) (#13728)John Olheiser4 years
release/v1.11Changelog for 1.11.8 (#12004)Lauris BH5 years
release/v1.10Changelog for v1.10.6 (#10699)Lunny Xiao5 years
release/v1.9Ensure Written is set in GZIP ProxyResponseWriter (#9018) (#9026)zeripath5 years
release/v1.8fix api route (#7346) (#7347)Lunny Xiao6 years
 
TagDownloadAuthorAge
v1.23.1gitea-1.23.1.tar.gz  gitea-1.23.1.zip  Lunny Xiao9 days
v1.23.0gitea-1.23.0.tar.gz  gitea-1.23.0.zip  Lunny Xiao10 days
v1.23.0-rc0gitea-1.23.0-rc0.tar.gz  gitea-1.23.0-rc0.zip  Lunny Xiao5 weeks
v1.24.0-devgitea-1.24.0-dev.tar.gz  gitea-1.24.0-dev.zip  wxiaoguang5 weeks
v1.22.6gitea-1.22.6.tar.gz  gitea-1.22.6.zip  Lunny Xiao5 weeks
v1.22.5gitea-1.22.5.tar.gz  gitea-1.22.5.zip  Lunny Xiao5 weeks
v1.22.4gitea-1.22.4.tar.gz  gitea-1.22.4.zip  Lunny Xiao8 weeks
v1.22.3gitea-1.22.3.tar.gz  gitea-1.22.3.zip  Lunny Xiao3 months
v1.22.2gitea-1.22.2.tar.gz  gitea-1.22.2.zip  Lunny Xiao4 months
v1.22.1gitea-1.22.1.tar.gz  gitea-1.22.1.zip  Lunny Xiao7 months
v1.22.0gitea-1.22.0.tar.gz  gitea-1.22.0.zip  Lunny Xiao8 months
v1.23.0-devgitea-1.23.0-dev.tar.gz  gitea-1.23.0-dev.zip  Chongyi Zheng9 months
v1.22.0-rc1gitea-1.22.0-rc1.tar.gz  gitea-1.22.0-rc1.zip  Lunny Xiao9 months
v1.21.11gitea-1.21.11.tar.gz  gitea-1.21.11.zip  Lunny Xiao9 months
v1.22.0-rc0gitea-1.22.0-rc0.tar.gz  gitea-1.22.0-rc0.zip  techknowlogick10 months
v1.21.10gitea-1.21.10.tar.gz  gitea-1.21.10.zip  654310 months
v1.21.9gitea-1.21.9.tar.gz  gitea-1.21.9.zip  Lunny Xiao10 months
v1.21.8gitea-1.21.8.tar.gz  gitea-1.21.8.zip  Lunny Xiao10 months
v1.21.7gitea-1.21.7.tar.gz  gitea-1.21.7.zip  Lunny Xiao11 months
v1.21.6gitea-1.21.6.tar.gz  gitea-1.21.6.zip  654311 months
v1.21.5gitea-1.21.5.tar.gz  gitea-1.21.5.zip  Lunny Xiao12 months
v1.21.4gitea-1.21.4.tar.gz  gitea-1.21.4.zip  Lunny Xiao12 months
v1.21.3gitea-1.21.3.tar.gz  gitea-1.21.3.zip  Lunny Xiao13 months
v1.21.2gitea-1.21.2.tar.gz  gitea-1.21.2.zip  Lunny Xiao13 months
v1.20.6gitea-1.20.6.tar.gz  gitea-1.20.6.zip  Lunny Xiao14 months
v1.21.1gitea-1.21.1.tar.gz  gitea-1.21.1.zip  Lunny Xiao14 months
v1.21.0gitea-1.21.0.tar.gz  gitea-1.21.0.zip  654314 months
v1.21.0-rc2gitea-1.21.0-rc2.tar.gz  gitea-1.21.0-rc2.zip  delvh15 months
v1.21.0-rc1gitea-1.21.0-rc1.tar.gz  gitea-1.21.0-rc1.zip  techknowlogick15 months
v1.20.5gitea-1.20.5.tar.gz  gitea-1.20.5.zip  Lunny Xiao16 months
v1.22.0-devgitea-1.22.0-dev.tar.gz  gitea-1.22.0-dev.zip  delvh16 months
v1.21.0-rc0gitea-1.21.0-rc0.tar.gz  gitea-1.21.0-rc0.zip  delvh16 months
v1.20.4gitea-1.20.4.tar.gz  gitea-1.20.4.zip  Lunny Xiao16 months
v1.20.3gitea-1.20.3.tar.gz  gitea-1.20.3.zip  delvh17 months
v1.20.2gitea-1.20.2.tar.gz  gitea-1.20.2.zip  delvh18 months
v1.20.1gitea-1.20.1.tar.gz  gitea-1.20.1.zip  delvh18 months
v1.20.0gitea-1.20.0.tar.gz  gitea-1.20.0.zip  delvh18 months
v1.19.4gitea-1.19.4.tar.gz  gitea-1.19.4.zip  654319 months
v1.21.0-devgitea-1.21.0-dev.tar.gz  gitea-1.21.0-dev.zip  techknowlogick19 months
v1.20.0-rc2gitea-1.20.0-rc2.tar.gz  gitea-1.20.0-rc2.zip  Jason Song19 months
v1.20.0-rc1gitea-1.20.0-rc1.tar.gz  gitea-1.20.0-rc1.zip  Giteabot19 months
v1.20.0-rc0gitea-1.20.0-rc0.tar.gz  gitea-1.20.0-rc0.zip  Denys Konovalov19 months
v1.19.3gitea-1.19.3.tar.gz  gitea-1.19.3.zip  jolheiser21 months
v1.19.2gitea-1.19.2.tar.gz  gitea-1.19.2.zip  jolheiser21 months
v1.19.1gitea-1.19.1.tar.gz  gitea-1.19.1.zip  654321 months
v1.19.0gitea-1.19.0.tar.gz  gitea-1.19.0.zip  Lunny Xiao22 months
v1.19.0-rc1gitea-1.19.0-rc1.tar.gz  gitea-1.19.0-rc1.zip  delvh23 months
v1.20.0-devgitea-1.20.0-dev.tar.gz  gitea-1.20.0-dev.zip  delvh23 months
v1.19.0-rc0gitea-1.19.0-rc0.tar.gz  gitea-1.19.0-rc0.zip  delvh23 months
v1.18.5gitea-1.18.5.tar.gz  gitea-1.18.5.zip  jolheiser23 months
v1.18.4gitea-1.18.4.tar.gz  gitea-1.18.4.zip  Lunny Xiao23 months
v1.18.3gitea-1.18.3.tar.gz  gitea-1.18.3.zip  jolheiser24 months
v1.18.2gitea-1.18.2.tar.gz  gitea-1.18.2.zip  jolheiser2 years
v1.18.1gitea-1.18.1.tar.gz  gitea-1.18.1.zip  jolheiser2 years
v1.18.0gitea-1.18.0.tar.gz  gitea-1.18.0.zip  jolheiser2 years
v1.17.4gitea-1.17.4.tar.gz  gitea-1.17.4.zip  jolheiser2 years
v1.18.0-rc1gitea-1.18.0-rc1.tar.gz  gitea-1.18.0-rc1.zip  Lunny Xiao2 years
v1.19.0-devgitea-1.19.0-dev.tar.gz  gitea-1.19.0-dev.zip  techknowlogick2 years
v1.18.0-rc0gitea-1.18.0-rc0.tar.gz  gitea-1.18.0-rc0.zip  techknowlogick2 years
v1.17.3gitea-1.17.3.tar.gz  gitea-1.17.3.zip  65432 years
v1.17.2gitea-1.17.2.tar.gz  gitea-1.17.2.zip  techknowlogick2 years
v1.17.1gitea-1.17.1.tar.gz  gitea-1.17.1.zip  techknowlogick2 years
v1.17.0gitea-1.17.0.tar.gz  gitea-1.17.0.zip  65432 years
v1.17.0-rc2gitea-1.17.0-rc2.tar.gz  gitea-1.17.0-rc2.zip  65433 years
v1.16.9gitea-1.16.9.tar.gz  gitea-1.16.9.zip  65433 years
v1.17.0-rc1gitea-1.17.0-rc1.tar.gz  gitea-1.17.0-rc1.zip  65433 years
v1.18.0-devgitea-1.18.0-dev.tar.gz  gitea-1.18.0-dev.zip  65433 years
v1.16.8gitea-1.16.8.tar.gz  gitea-1.16.8.zip  65433 years
v1.16.7gitea-1.16.7.tar.gz  gitea-1.16.7.zip  65433 years
v1.16.6gitea-1.16.6.tar.gz  gitea-1.16.6.zip  65433 years
v1.16.5gitea-1.16.5.tar.gz  gitea-1.16.5.zip  65433 years
v1.16.4gitea-1.16.4.tar.gz  gitea-1.16.4.zip  65433 years
v1.16.3gitea-1.16.3.tar.gz  gitea-1.16.3.zip  Lunny Xiao3 years
v1.16.2gitea-1.16.2.tar.gz  gitea-1.16.2.zip  65433 years
v1.16.1gitea-1.16.1.tar.gz  gitea-1.16.1.zip  Andrew Thornton3 years
v1.16.0gitea-1.16.0.tar.gz  gitea-1.16.0.zip  Lunny Xiao3 years
v1.15.11gitea-1.15.11.tar.gz  gitea-1.15.11.zip  65433 years
v1.17.0-devgitea-1.17.0-dev.tar.gz  gitea-1.17.0-dev.zip  Andrew Thornton3 years
v1.16.0-rc1gitea-1.16.0-rc1.tar.gz  gitea-1.16.0-rc1.zip  Andrew Thornton3 years
v1.15.10gitea-1.15.10.tar.gz  gitea-1.15.10.zip  Andrew Thornton3 years
v1.15.9gitea-1.15.9.tar.gz  gitea-1.15.9.zip  65433 years
v1.15.8gitea-1.15.8.tar.gz  gitea-1.15.8.zip  Matti R3 years
v1.15.7gitea-1.15.7.tar.gz  gitea-1.15.7.zip  65433 years
v1.15.6gitea-1.15.6.tar.gz  gitea-1.15.6.zip  Andrew Thornton3 years
v1.15.5gitea-1.15.5.tar.gz  gitea-1.15.5.zip  Lunny Xiao3 years
v1.15.4gitea-1.15.4.tar.gz  gitea-1.15.4.zip  Matti R3 years
v1.15.3gitea-1.15.3.tar.gz  gitea-1.15.3.zip  Matti R3 years
v1.15.2gitea-1.15.2.tar.gz  gitea-1.15.2.zip  Andrew Thornton3 years
v1.15.1gitea-1.15.1.tar.gz  gitea-1.15.1.zip  Matti R3 years
v1.14.7gitea-1.14.7.tar.gz  gitea-1.14.7.zip  Matti R3 years
v1.15.0gitea-1.15.0.tar.gz  gitea-1.15.0.zip  Matti R3 years
v1.15.0-rc3gitea-1.15.0-rc3.tar.gz  gitea-1.15.0-rc3.zip  Matti R3 years
v1.14.6gitea-1.14.6.tar.gz  gitea-1.14.6.zip  Andrew Thornton3 years
v1.15.0-rc2gitea-1.15.0-rc2.tar.gz  gitea-1.15.0-rc2.zip  Andrew Thornton3 years
v1.14.5gitea-1.14.5.tar.gz  gitea-1.14.5.zip  Andrew Thornton4 years
v1.16.0-devgitea-1.16.0-dev.tar.gz  gitea-1.16.0-dev.zip  Matti R4 years
v1.15.0-rc1gitea-1.15.0-rc1.tar.gz  gitea-1.15.0-rc1.zip  Matti R4 years
v1.14.4gitea-1.14.4.tar.gz  gitea-1.14.4.zip  Lauris BH4 years
v1.14.3gitea-1.14.3.tar.gz  gitea-1.14.3.zip  65434 years
v1.14.2gitea-1.14.2.tar.gz  gitea-1.14.2.zip  65434 years
v1.14.1gitea-1.14.1.tar.gz  gitea-1.14.1.zip  Matti R4 years
v1.14.0gitea-1.14.0.tar.gz  gitea-1.14.0.zip  65434 years
v1.13.7gitea-1.13.7.tar.gz  gitea-1.13.7.zip  65434 years
v1.14.0-rc2gitea-1.14.0-rc2.tar.gz  gitea-1.14.0-rc2.zip  65434 years
v1.13.6gitea-1.13.6.tar.gz  gitea-1.13.6.zip  65434 years
v1.13.5gitea-1.13.5.tar.gz  gitea-1.13.5.zip  65434 years
v1.14.0-rc1gitea-1.14.0-rc1.tar.gz  gitea-1.14.0-rc1.zip  Lauris BH4 years
v1.15.0-devgitea-1.15.0-dev.tar.gz  gitea-1.15.0-dev.zip  Matti R4 years
v1.13.4gitea-1.13.4.tar.gz  gitea-1.13.4.zip  Matti R4 years
v1.13.3gitea-1.13.3.tar.gz  gitea-1.13.3.zip  65434 years
v1.13.2gitea-1.13.2.tar.gz  gitea-1.13.2.zip  65434 years
v1.13.1gitea-1.13.1.tar.gz  gitea-1.13.1.zip  Matti R4 years
v1.13.0gitea-1.13.0.tar.gz  gitea-1.13.0.zip  Matti R4 years
v1.12.6gitea-1.12.6.tar.gz  gitea-1.12.6.zip  Lunny Xiao4 years
v1.13.0-rc2gitea-1.13.0-rc2.tar.gz  gitea-1.13.0-rc2.zip  Matti R4 years
v1.14.0-devgitea-1.14.0-dev.tar.gz  gitea-1.14.0-dev.zip  Matti R4 years
v1.13.0-rc1gitea-1.13.0-rc1.tar.gz  gitea-1.13.0-rc1.zip  Matti R4 years
v1.12.5gitea-1.12.5.tar.gz  gitea-1.12.5.zip  Matti R4 years
v1.12.4gitea-1.12.4.tar.gz  gitea-1.12.4.zip  Matti R4 years
v1.12.3gitea-1.12.3.tar.gz  gitea-1.12.3.zip  Matti R4 years
v1.12.2gitea-1.12.2.tar.gz  gitea-1.12.2.zip  Lauris BH5 years
v1.12.1gitea-1.12.1.tar.gz  gitea-1.12.1.zip  Lauris BH5 years
v1.11.8gitea-1.11.8.tar.gz  gitea-1.11.8.zip  Lauris BH5 years
v1.12.0gitea-1.12.0.tar.gz  gitea-1.12.0.zip  Matti R5 years
v1.11.7gitea-1.11.7.tar.gz  gitea-1.11.7.zip  Lauris BH5 years
v1.12.0-rc2gitea-1.12.0-rc2.tar.gz  gitea-1.12.0-rc2.zip  Lauris BH5 years
v1.11.6gitea-1.11.6.tar.gz  gitea-1.11.6.zip  Lauris BH5 years
v1.12.0-rc1gitea-1.12.0-rc1.tar.gz  gitea-1.12.0-rc1.zip  Lauris BH5 years
v1.13.0-devgitea-1.13.0-dev.tar.gz  gitea-1.13.0-dev.zip  Lauris BH5 years
v1.11.5gitea-1.11.5.tar.gz  gitea-1.11.5.zip  Matti R5 years
v1.11.4gitea-1.11.4.tar.gz  gitea-1.11.4.zip  Lauris BH5 years
v1.11.3gitea-1.11.3.tar.gz  gitea-1.11.3.zip  Lauris BH5 years
v1.10.6gitea-1.10.6.tar.gz  gitea-1.10.6.zip  Lauris BH5 years
v1.12.0-devgitea-1.12.0-dev.tar.gz  gitea-1.12.0-dev.zip  Matti R5 years
v1.11.2gitea-1.11.2.tar.gz  gitea-1.11.2.zip  Lunny Xiao5 years
v1.10.5gitea-1.10.5.tar.gz  gitea-1.10.5.zip  Andrew Thornton5 years
v1.11.1gitea-1.11.1.tar.gz  gitea-1.11.1.zip  Matti R5 years
v1.10.4gitea-1.10.4.tar.gz  gitea-1.10.4.zip  Andrew Thornton5 years
v1.11.0gitea-1.11.0.tar.gz  gitea-1.11.0.zip  Lunny Xiao5 years
v1.11.0-rc2gitea-1.11.0-rc2.tar.gz  gitea-1.11.0-rc2.zip  Matti R5 years
v1.10.3gitea-1.10.3.tar.gz  gitea-1.10.3.zip  Matti R5 years
v1.11.0-rc1gitea-1.11.0-rc1.tar.gz  gitea-1.11.0-rc1.zip  Matti R5 years
v1.10.2gitea-1.10.2.tar.gz  gitea-1.10.2.zip  Lunny Xiao5 years
v1.10.1gitea-1.10.1.tar.gz  gitea-1.10.1.zip  Matti R5 years
v1.10.0gitea-1.10.0.tar.gz  gitea-1.10.0.zip  Matti R5 years
v1.9.6gitea-1.9.6.tar.gz  gitea-1.9.6.zip  Matti R5 years
v1.9.5gitea-1.9.5.tar.gz  gitea-1.9.5.zip  Matti R5 years
v1.10.0-rc2gitea-1.10.0-rc2.tar.gz  gitea-1.10.0-rc2.zip  Matti R5 years
v1.11.0-devgitea-1.11.0-dev.tar.gz  gitea-1.11.0-dev.zip  Lauris BH5 years
v1.10.0-rc1gitea-1.10.0-rc1.tar.gz  gitea-1.10.0-rc1.zip  Lauris BH5 years
v1.9.4gitea-1.9.4.tar.gz  gitea-1.9.4.zip  Matti R5 years
v1.9.3gitea-1.9.3.tar.gz  gitea-1.9.3.zip  Matti R5 years
v1.9.2gitea-1.9.2.tar.gz  gitea-1.9.2.zip  Lunny Xiao5 years
v1.9.1gitea-1.9.1.tar.gz  gitea-1.9.1.zip  Lunny Xiao5 years
v1.9.0gitea-1.9.0.tar.gz  gitea-1.9.0.zip  Matti R5 years
v1.9.0-rc2gitea-1.9.0-rc2.tar.gz  gitea-1.9.0-rc2.zip  Matti R6 years
v1.10.0-devgitea-1.10.0-dev.tar.gz  gitea-1.10.0-dev.zip  Matti R6 years
v1.9.0-rc1gitea-1.9.0-rc1.tar.gz  gitea-1.9.0-rc1.zip  Matti R6 years
v1.8.3gitea-1.8.3.tar.gz  gitea-1.8.3.zip  Matti R6 years
v1.8.2gitea-1.8.2.tar.gz  gitea-1.8.2.zip  Matti R6 years
v1.8.1gitea-1.8.1.tar.gz  gitea-1.8.1.zip  Matti Ranta6 years
v1.8.0gitea-1.8.0.tar.gz  gitea-1.8.0.zip  Matti Ranta6 years
v1.8.0-rc3gitea-1.8.0-rc3.tar.gz  gitea-1.8.0-rc3.zip  Matti Ranta6 years
v1.7.6gitea-1.7.6.tar.gz  gitea-1.7.6.zip  Matti Ranta6 years
v1.8.0-rc2gitea-1.8.0-rc2.tar.gz  gitea-1.8.0-rc2.zip  Matti Ranta6 years
v1.7.5gitea-1.7.5.tar.gz  gitea-1.7.5.zip  Matti Ranta6 years
v1.8.0-rc1gitea-1.8.0-rc1.tar.gz  gitea-1.8.0-rc1.zip  Matti Ranta6 years
v1.9.0-devgitea-1.9.0-dev.tar.gz  gitea-1.9.0-dev.zip  Matti Ranta6 years
v1.7.4gitea-1.7.4.tar.gz  gitea-1.7.4.zip  Matti Ranta6 years
v1.7.3gitea-1.7.3.tar.gz  gitea-1.7.3.zip  Matti Ranta6 years
v1.7.2gitea-1.7.2.tar.gz  gitea-1.7.2.zip  Lauris Bukšis-Haberkorns6 years
v1.7.1gitea-1.7.1.tar.gz  gitea-1.7.1.zip  Matti Ranta6 years
v1.7.0gitea-1.7.0.tar.gz  gitea-1.7.0.zip  Matti Ranta6 years
v1.7.0-rc3gitea-1.7.0-rc3.tar.gz  gitea-1.7.0-rc3.zip  Matti Ranta6 years
v1.6.4gitea-1.6.4.tar.gz  gitea-1.6.4.zip  Matti Ranta6 years
v1.7.0-rc2gitea-1.7.0-rc2.tar.gz  gitea-1.7.0-rc2.zip  Jonas Franz6 years
v1.6.3gitea-1.6.3.tar.gz  gitea-1.6.3.zip  Jonas Franz6 years
v1.7.0-rc1gitea-1.7.0-rc1.tar.gz  gitea-1.7.0-rc1.zip  Jonas Franz6 years
v1.7.0-devgitea-1.7.0-dev.tar.gz  gitea-1.7.0-dev.zip  Jonas Franz6 years
v1.6.2gitea-1.6.2.tar.gz  gitea-1.6.2.zip  Matti Ranta6 years
v1.6.1gitea-1.6.1.tar.gz  gitea-1.6.1.zip  Matti Ranta6 years
v1.6.0gitea-1.6.0.tar.gz  gitea-1.6.0.zip  Matti Ranta6 years
v1.6.0-rc2gitea-1.6.0-rc2.tar.gz  gitea-1.6.0-rc2.zip  Matti Ranta6 years
v1.5.3gitea-1.5.3.tar.gz  gitea-1.5.3.zip  Matti Ranta6 years
v1.6.0-rc1gitea-1.6.0-rc1.tar.gz  gitea-1.6.0-rc1.zip  Matti Ranta6 years
v1.6.0-devgitea-1.6.0-dev.tar.gz  gitea-1.6.0-dev.zip  Matti Ranta6 years
v1.5.2gitea-1.5.2.tar.gz  gitea-1.5.2.zip  Matti Ranta6 years
v1.5.1gitea-1.5.1.tar.gz  gitea-1.5.1.zip  Matti Ranta6 years
v1.5.0gitea-1.5.0.tar.gz  gitea-1.5.0.zip  Matti Ranta6 years
v1.5.0-rc2gitea-1.5.0-rc2.tar.gz  gitea-1.5.0-rc2.zip  Lauris Bukšis-Haberkorns7 years
v1.5.0-rc1gitea-1.5.0-rc1.tar.gz  gitea-1.5.0-rc1.zip  Lauris Bukšis-Haberkorns7 years
v1.5.0-devgitea-1.5.0-dev.tar.gz  gitea-1.5.0-dev.zip  Lauris Bukšis-Haberkorns7 years
v1.4.3gitea-1.4.3.tar.gz  gitea-1.4.3.zip  Matti Ranta7 years
v1.4.2gitea-1.4.2.tar.gz  gitea-1.4.2.zip  techknowlogick7 years
v1.4.1gitea-1.4.1.tar.gz  gitea-1.4.1.zip  Lauris Bukšis-Haberkorns7 years
v1.4.0gitea-1.4.0.tar.gz  gitea-1.4.0.zip  Lauris Bukšis-Haberkorns7 years
v1.4.0-rc3gitea-1.4.0-rc3.tar.gz  gitea-1.4.0-rc3.zip  Lauris Bukšis-Haberkorns7 years
v1.4.0-rc2gitea-1.4.0-rc2.tar.gz  gitea-1.4.0-rc2.zip  Lauris Bukšis-Haberkorns7 years
v1.3.3gitea-1.3.3.tar.gz  gitea-1.3.3.zip  Lauris Bukšis-Haberkorns7 years
v1.4.0-rc1gitea-1.4.0-rc1.tar.gz  gitea-1.4.0-rc1.zip  Lauris Bukšis-Haberkorns7 years
v1.3.2gitea-1.3.2.tar.gz  gitea-1.3.2.zip  Lauris BH7 years
v1.3.1gitea-1.3.1.tar.gz  gitea-1.3.1.zip  Lunny Xiao7 years
v1.3.0gitea-1.3.0.tar.gz  gitea-1.3.0.zip  Lauris Bukšis-Haberkorns7 years
v1.3.0-rc2gitea-1.3.0-rc2.tar.gz  gitea-1.3.0-rc2.zip  Lauris BH7 years
v1.3.0-rc1gitea-1.3.0-rc1.tar.gz  gitea-1.3.0-rc1.zip  Lunny Xiao7 years
v1.2.3gitea-1.2.3.tar.gz  gitea-1.2.3.zip  Lauris BH7 years
v1.2.2gitea-1.2.2.tar.gz  gitea-1.2.2.zip  Lauris BH7 years
v1.2.1gitea-1.2.1.tar.gz  gitea-1.2.1.zip  Kim "BKC" Carlbäcker7 years
v1.2.0gitea-1.2.0.tar.gz  gitea-1.2.0.zip  Lunny Xiao7 years
v1.2.0-rc3gitea-1.2.0-rc3.tar.gz  gitea-1.2.0-rc3.zip  Lunny Xiao7 years
v1.2.0-rc2gitea-1.2.0-rc2.tar.gz  gitea-1.2.0-rc2.zip  Lauris BH7 years
v1.1.4gitea-1.1.4.tar.gz  gitea-1.1.4.zip  Lunny Xiao7 years
v1.2.0-rc1gitea-1.2.0-rc1.tar.gz  gitea-1.2.0-rc1.zip  Lunny Xiao7 years
v1.1.3gitea-1.1.3.tar.gz  gitea-1.1.3.zip  Lunny Xiao7 years
v1.1.2gitea-1.1.2.tar.gz  gitea-1.1.2.zip  Lunny Xiao8 years
v1.1.1gitea-1.1.1.tar.gz  gitea-1.1.1.zip  Kim "BKC" Carlbäcker8 years
v1.1.0gitea-1.1.0.tar.gz  gitea-1.1.0.zip  Thomas Boerger8 years
v1.0.2gitea-1.0.2.tar.gz  gitea-1.0.2.zip  Thomas Boerger8 years
v1.0.1gitea-1.0.1.tar.gz  gitea-1.0.1.zip  Thomas Boerger8 years
v1.0.0gitea-1.0.0.tar.gz  gitea-1.0.0.zip  Thomas Boerger8 years
v0.9.99gitea-0.9.99.tar.gz  gitea-0.9.99.zip  Rémy Boulanouar8 years
tion> Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/lib/private/Template/ResourceLocator.php
blob: 7761e115353a2b5764eda336d30726d1b3c5f85a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<?php
/**
 * @copyright Copyright (c) 2016, ownCloud, Inc.
 *
 * @author Bart Visscher <bartv@thisnet.nl>
 * @author Joas Schilling <coding@schilljs.com>
 * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
 * @author Jörn Friedrich Dreyer <jfd@butonic.de>
 * @author Morris Jobke <hey@morrisjobke.de>
 * @author Robin Appelman <robin@icewind.nl>
 * @author Robin McCorkell <robin@mccorkell.me.uk>
 * @author tux-rampage <tux-rampage@users.noreply.github.com>
 *
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program. If not, see <http://www.gnu.org/licenses/>
 *
 */

namespace OC\Template;

abstract class ResourceLocator {
	protected $theme;

	protected $mapping;
	protected $serverroot;
	protected $thirdpartyroot;
	protected $webroot;

	protected $resources = [];

	/** @var \OCP\ILogger */
	protected $logger;

	/**
	 * @param \OCP\ILogger $logger
	 * @param string $theme
	 * @param array $core_map
	 * @param array $party_map
	 */
	public function __construct(\OCP\ILogger $logger, $theme, $core_map, $party_map) {
		$this->logger = $logger;
		$this->theme = $theme;
		$this->mapping = $core_map + $party_map;
		$this->serverroot = key($core_map);
		$this->thirdpartyroot = key($party_map);
		$this->webroot = $this->mapping[$this->serverroot];
	}

	/**
	 * @param string $resource
	 */
	abstract public function doFind($resource);

	/**
	 * @param string $resource
	 */
	abstract public function doFindTheme($resource);

	/**
	 * Finds the resources and adds them to the list
	 *
	 * @param array $resources
	 */
	public function find($resources) {
		foreach ($resources as $resource) {
			try {
				$this->doFind($resource);
			} catch (ResourceNotFoundException $e) {
				$resourceApp = substr($resource, 0, strpos($resource, '/'));
				$this->logger->debug('Could not find resource file "' . $e->getResourcePath() . '"', ['app' => $resourceApp]);
			}
		}
		if (!empty($this->theme)) {
			foreach ($resources as $resource) {
				try {
					$this->doFindTheme($resource);
				} catch (ResourceNotFoundException $e) {
					$resourceApp = substr($resource, 0, strpos($resource, '/'));
					$this->logger->debug('Could not find resource file in theme "' . $e->getResourcePath() . '"', ['app' => $resourceApp]);
				}
			}
		}
	}

	/**
	 * append the $file resource if exist at $root
	 *
	 * @param string $root path to check
	 * @param string $file the filename
	 * @param string|null $webRoot base for path, default map $root to $webRoot
	 * @return bool True if the resource was found, false otherwise
	 */
	protected function appendIfExist($root, $file, $webRoot = null) {
		if (is_file($root.'/'.$file)) {
			$this->append($root, $file, $webRoot, false);
			return true;
		}
		return false;
	}

	/**
	 * Attempt to find the webRoot
	 *
	 * traverse the potential web roots upwards in the path
	 *
	 * example:
	 *   - root: /srv/www/apps/myapp
	 *   - available mappings: ['/srv/www']
	 *
	 * First we check if a mapping for /srv/www/apps/myapp is available,
	 * then /srv/www/apps, /srv/www/apps, /srv/www, ... until we find a
	 * valid web root
	 *
	 * @param string $root
	 * @return string|null The web root or null on failure
	 */
	protected function findWebRoot($root) {
		$webRoot = null;
		$tmpRoot = $root;

		while ($webRoot === null) {
			if (isset($this->mapping[$tmpRoot])) {
				$webRoot = $this->mapping[$tmpRoot];
				break;
			}

			if ($tmpRoot === '/') {
				break;
			}

			$tmpRoot = dirname($tmpRoot);
		}

		if ($webRoot === null) {
			$realpath = realpath($root);

			if ($realpath && ($realpath !== $root)) {
				return $this->findWebRoot($realpath);
			}
		}

		return $webRoot;
	}

	/**
	 * append the $file resource at $root
	 *
	 * @param string $root path to check
	 * @param string $file the filename
	 * @param string|null $webRoot base for path, default map $root to $webRoot
	 * @param bool $throw Throw an exception, when the route does not exist
	 * @throws ResourceNotFoundException Only thrown when $throw is true and the resource is missing
	 */
	protected function append($root, $file, $webRoot = null, $throw = true) {

		if (!is_string($root)) {
			if ($throw) {
				throw new ResourceNotFoundException($file, $webRoot);
			}
			return;
		}

		if (!$webRoot) {
			$webRoot = $this->findWebRoot($root);

			if ($webRoot === null) {
				$webRoot = '';
				$this->logger->error('ResourceLocator can not find a web root (root: {root}, file: {file}, webRoot: {webRoot}, throw: {throw})', [
					'app' => 'lib',
					'root' => $root,
					'file' => $file,
					'webRoot' => $webRoot,
					'throw' => $throw ? 'true' : 'false'
				]);
			}
		}
		$this->resources[] = [$root, $webRoot, $file];

		if ($throw && !is_file($root . '/' . $file)) {
			throw new ResourceNotFoundException($file, $webRoot);
		}
	}

	/**
	 * Returns the list of all resources that should be loaded
	 * @return array
	 */
	public function getResources() {
		return $this->resources;
	}
}