diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4fd0b722..88eacf309 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,3 +43,32 @@ jobs: with: name: TorrentPier-master path: ${{ steps.create-zip.outputs.ZIP_NAME }} + + deploy: + name: 🎉 Deploy + runs-on: ubuntu-22.04 + steps: + - name: 🚚 Get latest code + uses: actions/checkout@v4 + + - name: 🔩 Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + + - name: 🖇 Install Composer dependencies + run: composer install --no-dev --no-progress --prefer-dist --optimize-autoloader + + - name: 📂 Sync files + uses: SamKirkland/FTP-Deploy-Action@v4.3.5 + with: + server: ${{ secrets.FTP_SERVER }} + username: ${{ secrets.FTP_USERNAME }} + password: ${{ secrets.FTP_PASSWORD }} + server-dir: ${{ secrets.FTP_DIR }} + protocol: ${{ secrets.FTP_PROTOCOL }} + port: ${{ secrets.FTP_PORT }} + exclude: | + **/.git* + **/.git*/** + .env diff --git a/library/includes/ucp/register.php b/library/includes/ucp/register.php index 62f1f7ed0..53d5bae2b 100644 --- a/library/includes/ucp/register.php +++ b/library/includes/ucp/register.php @@ -142,7 +142,6 @@ switch ($mode) { if (!$pr_data = DB()->fetch_row($sql)) { bb_die($lang['PROFILE_NOT_FOUND']); } - $pr_data['user_birthday'] = $pr_data['user_birthday']->format('Y-m-d'); if (IN_DEMO_MODE && isset($_COOKIE['user_lang'])) { $pr_data['user_lang'] = $_COOKIE['user_lang']; } diff --git a/library/includes/ucp/viewprofile.php b/library/includes/ucp/viewprofile.php index e9f8903a7..3d4605e68 100644 --- a/library/includes/ucp/viewprofile.php +++ b/library/includes/ucp/viewprofile.php @@ -30,8 +30,6 @@ if (!$profiledata = get_userdata($_GET[POST_USERS_URL], profile_view: true)) { bb_die($lang['NO_USER_ID_SPECIFIED']); } -$profiledata['user_birthday'] = $profiledata['user_birthday']->format('Y-m-d'); - if (!$ranks = $datastore->get('ranks')) { $datastore->update('ranks'); $ranks = $datastore->get('ranks'); diff --git a/src/Legacy/Common/User.php b/src/Legacy/Common/User.php index 77e844004..52bfafc01 100644 --- a/src/Legacy/Common/User.php +++ b/src/Legacy/Common/User.php @@ -232,7 +232,6 @@ class User } } - $this->data['user_birthday'] = $this->data['user_birthday']->format('Y-m-d'); return $this->data; } diff --git a/viewtopic.php b/viewtopic.php index 6e7a2b9d2..806327ded 100644 --- a/viewtopic.php +++ b/viewtopic.php @@ -565,7 +565,6 @@ for ($i = 0; $i < $total_posts; $i++) { $poster_from = ($postrow[$i]['user_from'] && !$poster_guest) ? $postrow[$i]['user_from'] : ''; $poster_joined = !$poster_guest ? $lang['JOINED'] . ': ' . bb_date($postrow[$i]['user_regdate'], 'Y-m-d H:i') : ''; $poster_longevity = !$poster_guest ? delta_time($postrow[$i]['user_regdate']) : ''; - $poster_birthday = $postrow[$i]['user_birthday']->format('Y-m-d'); $post_id = $postrow[$i]['post_id']; $mc_type = (int)$postrow[$i]['mc_type']; $mc_comment = $postrow[$i]['mc_comment']; @@ -716,7 +715,7 @@ for ($i = 0; $i < $total_posts; $i++) { 'DELETE' => $delpost_btn, 'IP' => $ip_btn, - 'POSTER_BIRTHDAY' => user_birthday_icon($poster_birthday, $postrow[$i]['user_id']), + 'POSTER_BIRTHDAY' => user_birthday_icon($postrow[$i]['user_birthday'], $postrow[$i]['user_id']), 'MC_COMMENT' => $mc_type ? bbcode2html($mc_comment) : '', 'MC_BBCODE' => $mc_type ? $mc_comment : '',