summaryrefslogtreecommitdiffstats
path: root/plugins/webinterface
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/webinterface')
-rw-r--r--plugins/webinterface/httpserver.cpp12
-rw-r--r--plugins/webinterface/php_handler.cpp4
-rw-r--r--plugins/webinterface/php_interface.cpp8
-rw-r--r--plugins/webinterface/www/coldmilk/rest.php2
-rw-r--r--plugins/webinterface/www/default/interface.php2
5 files changed, 14 insertions, 14 deletions
diff --git a/plugins/webinterface/httpserver.cpp b/plugins/webinterface/httpserver.cpp
index 06d8d34..d04449b 100644
--- a/plugins/webinterface/httpserver.cpp
+++ b/plugins/webinterface/httpserver.cpp
@@ -88,7 +88,7 @@ namespace kt
void HttpServer::slotSocketReadyToRead()
{
TQSocket* client = (TQSocket*)sender();
- HttpClientHandler* handler = clients.tqfind(client);
+ HttpClientHandler* handler = clients.find(client);
if (!handler)
{
client->deleteLater();
@@ -112,7 +112,7 @@ namespace kt
Uint8 h = (a.latin1() - (a.isNumber() ? '0' : 'a')) << 4;
Uint8 l = (b.latin1() - (b.isNumber() ? '0' : 'a'));
char r = (char) h | l; // combine them and cast to a char
- password.tqreplace(idx,3,r);
+ password.replace(idx,3,r);
return idx + 1;
}
@@ -134,7 +134,7 @@ namespace kt
// check for passwords with url encoded stuff in them and decode them if necessary
int idx = 0;
- while ((idx = password.tqfind('%',idx)) > 0)
+ while ((idx = password.find('%',idx)) > 0)
{
if (idx + 2 < password.length())
{
@@ -170,7 +170,7 @@ namespace kt
if (hdr.hasKey("Cookie"))
{
TQString cookie = hdr.value("Cookie");
- int idx = cookie.tqfind("KT_SESSID=");
+ int idx = cookie.find("KT_SESSID=");
if (idx == -1)
return false;
@@ -432,7 +432,7 @@ namespace kt
{
const char* ptr = data.data();
Uint32 len = data.size();
- int pos = TQString(data).tqfind("\r\n\r\n");
+ int pos = TQString(data).find("\r\n\r\n");
if (pos == -1 || pos + 4 >= len || ptr[pos + 4] != 'd')
{
@@ -540,7 +540,7 @@ namespace kt
bt::MMapFile* HttpServer::cacheLookup(const TQString & name)
{
- return cache.tqfind(name);
+ return cache.find(name);
}
void HttpServer::insertIntoCache(const TQString & name,bt::MMapFile* file)
diff --git a/plugins/webinterface/php_handler.cpp b/plugins/webinterface/php_handler.cpp
index 852f1fd..87c8acd 100644
--- a/plugins/webinterface/php_handler.cpp
+++ b/plugins/webinterface/php_handler.cpp
@@ -48,7 +48,7 @@ namespace kt
bool PhpHandler::executeScript(const TQString & path,const TQMap<TQString,TQString> & args)
{
TQByteArray php_s;
- if (!scripts.tqcontains(path))
+ if (!scripts.contains(path))
{
TQFile fptr(path);
if (!fptr.open(IO_ReadOnly))
@@ -66,7 +66,7 @@ namespace kt
output.resize(0);
- int firstphptag = TQCString(php_s).tqfind("<?php");
+ int firstphptag = TQCString(php_s).find("<?php");
if (firstphptag == -1)
return false;
diff --git a/plugins/webinterface/php_interface.cpp b/plugins/webinterface/php_interface.cpp
index 4206caa..fe98c00 100644
--- a/plugins/webinterface/php_interface.cpp
+++ b/plugins/webinterface/php_interface.cpp
@@ -114,13 +114,13 @@ namespace kt
out << TQString("\"leechers_connected_to\" => %1,\n").tqarg(stats.leechers_connected_to);
out << TQString("\"status\" => %1,\n").tqarg(stats.status);
out << TQString("\"running\" => %1,\n").tqarg(stats.running);
- out << TQString("\"trackerstatus\" => \"%1\",\n").tqarg(stats.trackerstatus.tqreplace("\\", "\\\\").tqreplace("\"", "\\\"").tqreplace("$", "\\$"));
+ out << TQString("\"trackerstatus\" => \"%1\",\n").tqarg(stats.trackerstatus.replace("\\", "\\\\").replace("\"", "\\\"").replace("$", "\\$"));
out << TQString("\"session_bytes_downloaded\" => %1,\n").tqarg(stats.session_bytes_downloaded);
out << TQString("\"session_bytes_uploaded\" => %1,\n").tqarg(stats.session_bytes_uploaded);
out << TQString("\"trk_bytes_downloaded\" => %1,\n").tqarg(stats.trk_bytes_downloaded);
out << TQString("\"trk_bytes_uploaded\" => %1,\n").tqarg(stats.trk_bytes_uploaded);
- out << TQString("\"torrent_name\" => \"%1\",\n").tqarg(stats.torrent_name.tqreplace("\\", "\\\\").tqreplace("\"", "\\\"").tqreplace("$", "\\$"));
- out << TQString("\"output_path\" => \"%1\",\n").tqarg(stats.output_path.tqreplace("\\", "\\\\").tqreplace("\"", "\\\"").tqreplace("$", "\\$"));
+ out << TQString("\"torrent_name\" => \"%1\",\n").tqarg(stats.torrent_name.replace("\\", "\\\\").replace("\"", "\\\"").replace("$", "\\$"));
+ out << TQString("\"output_path\" => \"%1\",\n").tqarg(stats.output_path.replace("\\", "\\\\").replace("\"", "\\\"").replace("$", "\\$"));
out << TQString("\"stopped_by_error\" => \"%1\",\n").tqarg(stats.stopped_by_error);
out << TQString("\"completed\" => \"%1\",\n").tqarg(stats.completed);
out << TQString("\"user_controlled\" => \"%1\",\n").tqarg(stats.user_controlled);
@@ -263,7 +263,7 @@ namespace kt
break;
case 'f':
//parse argument into torrent number and file number
- separator_loc=it.data().tqfind('-');
+ separator_loc=it.data().find('-');
parse=it.data();
torrent_num.append(parse.left(separator_loc));
file_num.append(parse.right(parse.length()-(separator_loc+1)));
diff --git a/plugins/webinterface/www/coldmilk/rest.php b/plugins/webinterface/www/coldmilk/rest.php
index a61cbfe..91b67a7 100644
--- a/plugins/webinterface/www/coldmilk/rest.php
+++ b/plugins/webinterface/www/coldmilk/rest.php
@@ -174,7 +174,7 @@ class RestInterface {
// Truncate long torrent name, and HTML escape it.
// This is a helper function for download_status.
private function _clean_name($name) {
- $name = str_tqreplace("'", "\'", $name);
+ $name = str_replace("'", "\'", $name);
if (strlen($name) > 30) {
$name = substr($name, 0, 27);
$name .= "...";
diff --git a/plugins/webinterface/www/default/interface.php b/plugins/webinterface/www/default/interface.php
index 929bd94..f34e651 100644
--- a/plugins/webinterface/www/default/interface.php
+++ b/plugins/webinterface/www/default/interface.php
@@ -118,7 +118,7 @@ function generate_button_code($img, $alt, $href='')
foreach ($stats as $torrent) {
echo "\t\t".'<tr>'."\n\t\t\t";
- $torrent_name = str_tqreplace("'", "\'", $torrent['torrent_name']);
+ $torrent_name = str_replace("'", "\'", $torrent['torrent_name']);
if($torrent['total_bytes_to_download']!=0) $perc = round(100.0 - ($torrent['bytes_left_to_download'] / $torrent['total_bytes_to_download']) * 100.0, 2);
else $perc = 0;
if(strlen($torrent['torrent_name'])>30) $display_name=substr($torrent['torrent_name'], 0, 30)." ...";