Check-in [bfb37e7d77]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Introduce $renamed_proj[] aliasing. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
bfb37e7d770152f2e0e5d1901ad754bb |
User & Date: | mario 2016-03-08 22:58:48 |
Context
2016-03-09
| ||
23:12 | Introduce &offset= parameter for xfer.json feed, as memory gets depleted too quickly from assembling the JSON structure (and json_encode uses twice as much afterwards). check-in: 23c16a1441 user: mario tags: trunk | |
2016-03-08
| ||
22:58 | Introduce $renamed_proj[] aliasing. check-in: bfb37e7d77 user: mario tags: trunk | |
22:57 | Archive screenshots to ALL.txz for mirrors. check-in: d3b762bc93 user: mario tags: trunk | |
Changes
Changes to config.php.
1 2 3 4 5 | <?php /** * api: freshcode * title: Freshcode.club config * description: initialization code | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | <?php /** * api: freshcode * title: Freshcode.club config * description: initialization code * version: 0.8.2 * plugin-register: include_once("$FN"); * * * Automatic and manual dependencies. * Base configuration. * */ |
︙ | ︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | include_once("lib/deferred_openid_session.php"); // utility functions include_once("aux.php"); define("FRESHCODE_USER_AGENT", "freshcode/0.7.9.3 (Linux x86-64; HHVM/3.6.x) projects-autoupdate/0.7.9 (img,news,regex,xpath) github-poll/0.7 launchpad-poll/0.3 +http://freshcode.club/"); curl::$defaults["useragent"] = FRESHCODE_USER_AGENT; ini_set("user_agent", FRESHCODE_USER_AGENT); // List of administrative OpenID handles $moderator_ids = array(); include("config.local.php"); // stats define("IS_ADMIN", in_array($_SESSION["openid"], $moderator_ids)); ?> | > > > > > > > > > > > > | 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 | include_once("lib/deferred_openid_session.php"); // utility functions include_once("aux.php"); define("FRESHCODE_USER_AGENT", "freshcode/0.7.9.3 (Linux x86-64; HHVM/3.6.x) projects-autoupdate/0.7.9 (img,news,regex,xpath) github-poll/0.7 launchpad-poll/0.3 +http://freshcode.club/"); curl::$defaults["useragent"] = FRESHCODE_USER_AGENT; ini_set("user_agent", FRESHCODE_USER_AGENT); // Renamed projects $renamed_proj = [ "mlock" => "mikrolock", ]; // Alias page/action names $page_alias = [ "name" => "names", "project" => "projects", "p" => "projects", ]; // List of administrative OpenID handles $moderator_ids = array(); include("config.local.php"); // stats define("IS_ADMIN", in_array($_SESSION["openid"], $moderator_ids)); ?> |
Changes to page_projects.php.
︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * Adds: * → RSS/Atom links to header template * */ // Current project id $name = $_REQUEST->proj_name["name"]; #-- Fetch project/release entries $releases = db(" SELECT *, MAX(t_changed) FROM release WHERE name = ? AND flag < 5 | > > > > > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | * Adds: * → RSS/Atom links to header template * */ // Current project id $name = $_REQUEST->proj_name["name"]; // Redirect to new name? if (isset($renamed_proj[$name])) { exit(header("Location: /projects/$renamed_proj[name]", 303)); } #-- Fetch project/release entries $releases = db(" SELECT *, MAX(t_changed) FROM release WHERE name = ? AND flag < 5 |
︙ | ︙ |