xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
Commit c211539a256253302b2e9dac7d7f0f07dcdc59be

Extract rg_repo_get_default_info() function
Produces a dictionary with default values for repository information.
Author: xaizek
Author date (UTC): 2018-12-08 22:44
Committer name: xaizek
Committer date (UTC): 2018-12-08 22:44
Parent(s): 1a679db73fe13a222937ed429a5f236e1f896caf
Signing key: 99DC5E4DB05F6BE2
Tree: 0be8c42b99d35bd237cfc4edbc436b2c044439de
File Lines added Lines deleted
inc/repo.inc.php 21 13
File inc/repo.inc.php changed (mode: 100644) (index 9d8052a..087edcb)
... ... function rg_repo_edit_high_level($db, &$rg)
1825 1825
1826 1826 if ($rg['doit'] != 1) { if ($rg['doit'] != 1) {
1827 1827 if (!$edit) { if (!$edit) {
1828 // Defaults
1829 $rg['ri'] = array();
1830 $rg['ri']['repo_id'] = '0';
1831 $rg['ri']['master'] = '0';
1832 $rg['ri']['name'] = '';
1833 $rg['ri']['max_commit_size'] = '0';
1834 $rg['ri']['description'] = '';
1835 $rg['ri']['public'] = '1';
1836 $rg['ri']['license'] = '';
1837 $rg['ri']['template'] =
1838 'OS type(s) and version(s)?' . "\n\n"
1839 . 'Application version(s) affected?' . "\n\n"
1840 . 'Steps to reproduce?';
1828 $rg['ri'] = rg_repo_get_default_info();
1841 1829 } }
1842 1830 break; break;
1843 1831 } }
 
... ... function rg_repo_api($db, $a)
2406 2394 return $ret; return $ret;
2407 2395 } }
2408 2396
2397 /*
2398 * Produces a dictionary with default values for repository information.
2399 */
2400 function rg_repo_get_default_info()
2401 {
2402 $ri = array();
2403 $ri['repo_id'] = '0';
2404 $ri['master'] = '0';
2405 $ri['name'] = '';
2406 $ri['max_commit_size'] = '0';
2407 $ri['description'] = '';
2408 $ri['public'] = '1';
2409 $ri['license'] = '';
2410 $ri['template'] =
2411 'OS type(s) and version(s)?' . "\n\n"
2412 . 'Application version(s) affected?' . "\n\n"
2413 . 'Steps to reproduce?';
2414 return $ri;
2415 }
2416
2409 2417 /* /*
2410 2418 * Helper for SSH/GIT/HTTP(S) fetch/push * Helper for SSH/GIT/HTTP(S) fetch/push
2411 2419 * @host - the host name accessed - may be different than the good one * @host - the host name accessed - may be different than the good one
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master