mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Add UserQuery entity
This commit is contained in:
@@ -414,36 +414,6 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
return $this->ACL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Query in the cache
|
||||
*
|
||||
* @param Application $app
|
||||
* @param string $query
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public static function saveQuery(Application $app, $query)
|
||||
{
|
||||
try {
|
||||
$sql = "INSERT INTO dsel (id, name, usr_id, query)
|
||||
VALUES (null, :name, :usr_id, :query)";
|
||||
$stmt = $app['phraseanet.appbox']->get_connection()->prepare($sql);
|
||||
$stmt->execute(array(
|
||||
':name' => $query,
|
||||
':usr_id' => $app['authentication']->getUser()->get_id(),
|
||||
':query' => $query
|
||||
));
|
||||
$stmt->closeCursor();
|
||||
|
||||
if ($app['authentication']->getUser()->getPrefs('start_page') == 'LAST_QUERY')
|
||||
$app['authentication']->getUser()->setPrefs('start_page_query', $query);
|
||||
} catch (Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
|
@@ -128,8 +128,6 @@ interface User_Interface
|
||||
|
||||
public static function getInstance($id, Application $app);
|
||||
|
||||
public static function saveQuery(Application $app, $query);
|
||||
|
||||
public static function get_usr_id_from_login(Application $app, $login);
|
||||
|
||||
public static function get_usr_id_from_email(Application $app, $email);
|
||||
|
Reference in New Issue
Block a user