public function canDelete($pk = null, $joins = null)
	{
		// Deprecation warning.
		Log::debug('Hubzero\Database\Table::canDelete() is deprecated.');

		// Initialise variables.
		$k = $this->_tbl_key;
		$pk = (is_null($pk)) ? $this->$k : $pk;

		// If no primary key is given, return false.
		if ($pk === null)
		{
			return false;
		}

		if (is_array($joins))
		{
			// Get a query object.
			$query = $this->_db->getQuery();

			// Setup the basic query.
			$query->select($this->_tbl_key);
			$query->from($this->_tbl);
			$query->whereEquals($this->_tbl_key, $this->$k);
			$query->group($this->_tbl_key);

			// For each join add the select and join clauses to the query object.
			foreach ($joins as $table)
			{
				$query->select('COUNT(DISTINCT ' . $table['idfield'] . ')', $table['idfield']);
				$query->join($table['name'], $table['joinfield'], $k, 'left');
			}

			// Get the row object from the query.
			$this->_db->setQuery((string) $query->toString(), 0, 1);
			$row = $this->_db->loadObject();

			// Check for a database error.
			if ($this->_db->getErrorNum())
			{
				$this->setError($this->_db->getErrorMsg());

				return false;
			}

			$msg = array();
			$i = 0;

			foreach ($joins as $table)
			{
				$k = $table['idfield'] . $i;

				if ($row->$k)
				{
					$msg[] = Lang::txt($table['label']);
				}

				$i++;
			}

			if (count($msg))
			{
				$this->setError("noDeleteRecord" . ": " . implode(', ', $msg));

				return false;
			}
			else
			{
				return true;
			}
		}

		return true;
	}