summaryrefslogtreecommitdiff
path: root/plugins/tasklist
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-11-21 09:03:18 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-11-21 09:03:18 (GMT)
commitac4f6e75622c76e32d6a34fcbfb7b57ead18fd92 (patch)
tree7004e44eff67616b8cbc306c8652809f885b7b8d /plugins/tasklist
parent5738a7a7eca4256f39b279918d77f354cb9d4e28 (diff)
downloadroundcubemail-plugins-kolab-ac4f6e75622c76e32d6a34fcbfb7b57ead18fd92.tar.gz
Avoid unused variables (also fixed some bugs) found in static code analysis
Diffstat (limited to 'plugins/tasklist')
-rw-r--r--plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php20
-rw-r--r--plugins/tasklist/tasklist.php4
2 files changed, 11 insertions, 13 deletions
diff --git a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
index be51d23..e94565e 100644
--- a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
+++ b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
@@ -92,7 +92,7 @@ class tasklist_kolab_driver extends tasklist_driver
$prefs = $this->rc->config->get('kolab_tasklists', array());
foreach ($folders as $folder) {
- $tasklist = $this->folder_props($folder, $delim, $prefs);
+ $tasklist = $this->folder_props($folder, $prefs);
$this->lists[$tasklist['id']] = $tasklist;
$this->folders[$tasklist['id']] = $folder;
@@ -103,7 +103,7 @@ class tasklist_kolab_driver extends tasklist_driver
/**
* Derive list properties from the given kolab_storage_folder object
*/
- protected function folder_props($folder, $delim, $prefs)
+ protected function folder_props($folder, $prefs)
{
if ($folder->get_namespace() == 'personal') {
$norename = false;
@@ -179,7 +179,7 @@ class tasklist_kolab_driver extends tasklist_driver
$lists = array();
foreach ($folders as $folder) {
- $list_id = $folder->id; #kolab_storage::folder_id($folder->name);
+ $list_id = $folder->id; // kolab_storage::folder_id($folder->name);
$imap_path = explode($delim, $folder->name);
// find parent
@@ -225,7 +225,7 @@ class tasklist_kolab_driver extends tasklist_driver
}
else {
if (!$this->lists[$list_id]) {
- $this->lists[$list_id] = $this->folder_props($folder, $delim, $prefs);
+ $this->lists[$list_id] = $this->folder_props($folder, $prefs);
$this->folders[$list_id] = $folder;
}
$this->lists[$list_id]['parent'] = $parent_id;
@@ -249,7 +249,7 @@ class tasklist_kolab_driver extends tasklist_driver
$folder = kolab_storage::get_folder(kolab_storage::id_decode($id));
if ($folder->type) {
$this->folders[$id] = $folder;
- $this->lists[$id] = $this->folder_props($folder, $this->rc->get_storage()->get_hierarchy_delimiter(), $this->rc->config->get('kolab_tasklists', array()));
+ $this->lists[$id] = $this->folder_props($folder, $this->rc->config->get('kolab_tasklists', array()));
}
}
@@ -295,7 +295,7 @@ class tasklist_kolab_driver extends tasklist_driver
}
else {
$folder = kolab_storage::get_folder($folder);
- $prop += $this->folder_props($folder, $this->rc->get_storage()->get_hierarchy_delimiter(), array());
+ $prop += $this->folder_props($folder, array());
}
return $id;
@@ -413,13 +413,11 @@ class tasklist_kolab_driver extends tasklist_driver
$this->search_more_results = false;
$this->lists = $this->folders = array();
- $delim = $this->rc->get_storage()->get_hierarchy_delimiter();
-
// find unsubscribed IMAP folders that have "event" type
if ($source == 'folders') {
foreach ((array)kolab_storage::search_folders('task', $query, array('other')) as $folder) {
$this->folders[$folder->id] = $folder;
- $this->lists[$folder->id] = $this->folder_props($folder, $delim, array());
+ $this->lists[$folder->id] = $this->folder_props($folder, array());
}
}
// search other user's namespace via LDAP
@@ -435,11 +433,11 @@ class tasklist_kolab_driver extends tasklist_driver
if (count($folders)) {
$userfolder = new kolab_storage_folder_user($user['kolabtargetfolder'], '', $user);
$this->folders[$userfolder->id] = $userfolder;
- $this->lists[$userfolder->id] = $this->folder_props($userfolder, $delim, array());
+ $this->lists[$userfolder->id] = $this->folder_props($userfolder, array());
foreach ($folders as $folder) {
$this->folders[$folder->id] = $folder;
- $this->lists[$folder->id] = $this->folder_props($folder, $delim, array());
+ $this->lists[$folder->id] = $this->folder_props($folder, array());
$count++;
}
}
diff --git a/plugins/tasklist/tasklist.php b/plugins/tasklist/tasklist.php
index 3f23c59..b39e78a 100644
--- a/plugins/tasklist/tasklist.php
+++ b/plugins/tasklist/tasklist.php
@@ -1605,7 +1605,7 @@ class tasklist extends rcube_plugin
/**
* Resolve the email message reference from the given URI
*/
- public function get_message_reference($uri, $resolve = false)
+ public function get_message_reference($uri)
{
if (strpos($uri, 'imap:///') === 0) {
$url = parse_url(substr($uri, 8));
@@ -1657,7 +1657,7 @@ class tasklist extends rcube_plugin
if ($uid && $mime_id) {
$part = $imap->get_message_part($uid, $mime_id);
- $headers = $imap->get_message_headers($uid);
+// $headers = $imap->get_message_headers($uid);
if ($part->ctype_parameters['charset']) {
$charset = $part->ctype_parameters['charset'];