From 8a4341cbd28b58794ce1a9c0bf794bce1e72ef72 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Mon, 23 Aug 2021 10:40:00 +0800 Subject: [PATCH 1/4] fix : cant find lower readme.md in Aliyundrive --- common.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common.php b/common.php index 6a93acd..67e854a 100644 --- a/common.php +++ b/common.php @@ -2586,7 +2586,7 @@ function render_list($path = '', $files = []) $html = $tmp[0]; $tmp = splitfirst($tmp[1], ''); if (isset($files['list']['head.omf'])) { - $headomf = str_replace('', get_content(spurlencode(path_format($path . '/head.omf'), '/'))['content']['body'], $tmp[0]); + $headomf = str_replace('', get_content(spurlencode(path_format($path . '/' . $files['list']['head.omf']['name']), '/'))['content']['body'], $tmp[0]); } $html .= $headomf . $tmp[1]; @@ -2594,7 +2594,7 @@ function render_list($path = '', $files = []) $html = $tmp[0]; $tmp = splitfirst($tmp[1], ''); if (isset($files['list']['head.md'])) { - $headmd = str_replace('', get_content(spurlencode(path_format($path . '/head.md'), '/'))['content']['body'], $tmp[0]); + $headmd = str_replace('', get_content(spurlencode(path_format($path . '/' . $files['list']['head.md']['name']), '/'))['content']['body'], $tmp[0]); $html .= $headmd . $tmp[1]; while (strpos($html, '')) { $html = str_replace('', '', $html); @@ -2627,7 +2627,7 @@ function render_list($path = '', $files = []) $html = $tmp[0]; $tmp = splitfirst($tmp[1], ''); if (isset($files['list']['readme.md'])) { - $Readmemd = str_replace('', get_content(spurlencode(path_format($path . '/readme.md'),'/'))['content']['body'], $tmp[0]); + $Readmemd = str_replace('', get_content(spurlencode(path_format($path . '/' . $files['list']['readme.md']['name']),'/'))['content']['body'], $tmp[0]); $html .= $Readmemd . $tmp[1]; while (strpos($html, '')) { $html = str_replace('', '', $html); @@ -2649,7 +2649,7 @@ function render_list($path = '', $files = []) $html = $tmp[0]; $tmp = splitfirst($tmp[1], ''); if (isset($files['list']['foot.omf'])) { - $Footomf = str_replace('', get_content(spurlencode(path_format($path . '/foot.omf'),'/'))['content']['body'], $tmp[0]); + $Footomf = str_replace('', get_content(spurlencode(path_format($path . '/' . $files['list']['foot.omf']['name']),'/'))['content']['body'], $tmp[0]); } $html .= $Footomf . $tmp[1]; From f81284b3f9e3b8ca749778bed7a54109d2913fdf Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Mon, 23 Aug 2021 13:18:54 +0800 Subject: [PATCH 2/4] wait app build in heroku --- platform/Heroku.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/platform/Heroku.php b/platform/Heroku.php index a096efa..7d30fd6 100644 --- a/platform/Heroku.php +++ b/platform/Heroku.php @@ -313,7 +313,11 @@ function updateHerokuapp($HerokuappId, $apikey, $source) { $tmp['source_blob']['url'] = $source; $data = json_encode($tmp); - return HerokuAPI('POST', 'https://api.heroku.com/apps/' . $HerokuappId . '/builds', $data, $apikey); + $response = HerokuAPI('POST', 'https://api.heroku.com/apps/' . $HerokuappId . '/builds', $data, $apikey); + $result = json_decode( $response['body'], true ); + $result['status'] = $result['id']; + $response['body'] = json_encode($result); + return $response; } function api_error($response) @@ -341,6 +345,15 @@ function setConfigResponse($response) return json_decode( $response['body'], true ); } -function WaitFunction() { - return true; +function WaitFunction($buildId) { + // GET /apps/{app_id_or_name}/builds/{build_id} + $response = HerokuAPI('GET', 'https://api.heroku.com/apps/' . getConfig('HerokuappId') . '/builds/' . $buildId, '', getConfig('APIKey')); + if ($response['stat']==200) { + $result = json_decode($response['body'], true); + if ($result['status']=="succeeded") return true; + else return false; + } else { + $response['body'] .= $url; + return $response; + } } From b6860e373a1027c8be1bf390632f8d37b2eab205 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Tue, 24 Aug 2021 03:31:59 +0000 Subject: [PATCH 3/4] move BackHome up Title --- common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.php b/common.php index 67e854a..dd93a91 100644 --- a/common.php +++ b/common.php @@ -816,8 +816,8 @@ function message($message, $title = 'Message', $statusCode = 200, $wainstat = 0) -

' . $title . '

' . getconstStr('Back') . getconstStr('Home') . ' +

' . $title . '