Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Remove invalid todo's
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Sep 12, 2016
1 parent 78b4900 commit be95f98
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 62 deletions.
4 changes: 1 addition & 3 deletions core/src/plugins/access.ajxp_home/HomePagePlugin.php
Expand Up @@ -62,8 +62,6 @@ public function parseSpecificContributions(ContextInterface $ctx, \DOMNode &$con
/**
* @param ContextInterface $ctx
*/
protected function initRepository(ContextInterface $ctx)
{
// TODO: Implement initRepository() method.
protected function initRepository(ContextInterface $ctx){
}
}
43 changes: 1 addition & 42 deletions core/src/plugins/access.ftp/FtpAccessWrapper.php
Expand Up @@ -499,48 +499,7 @@ protected function parseUrl($url, $forceLogin = false)
* @param AJXP_Node $node
* @return array
*/
public static function getResolvedOptionsForNode($node)
{
/*
$context = $node->getContext();
$repository = $node->getRepository();
$credentials = MemorySafe::tryLoadingCredentialsFromSources($context);
$options = [
"TYPE" => "ftp",
"USER" => $credentials["user"],
"PASSWORD" => $credentials["password"]
];
$optKeys = ["FTP_HOST", "PATH", "FTP_SECURE", "FTP_PORT", "FTP_DIRECT", "CHARSET"];
if ($repository->getContextOption($node->getContext(), "DYNAMIC_FTP") == "TRUE" && isSet($_SESSION["AJXP_DYNAMIC_FTP_DATA"])){
$sessionData = $_SESSION["AJXP_DYNAMIC_FTP_DATA"];
foreach($optKeys as $key){
$options[$key] = $sessionData[$key];
}
}else{
foreach($optKeys as $key){
$options[$key] = $repository->getContextOption($context, $key);
}
}
$options["FTP_SECURE"] = ($options["FTP_SECURE"] === "TRUE");
$options["FTP_DIRECT"] = ($options["FTP_DIRECT"] === "TRUE");
$options["FTP_PORT"] = ($options["FTP_PORT"] !== null ? intval($options["FTP_PORT"]): $options["FTP_SECURE"] ? 22 : 21);
// Test Connexion and server features
// TODO: not working, we have to make the options more restful
global $_SESSION;
$cacheKey = $repository->getId()."_ftpCharset";
if (!isset($_SESSION[$cacheKey]) || !strlen($_SESSION[$cacheKey]) || $forceLogin) {
$features = $this->getServerFeatures($node->getContext());
$ctxCharset = SessionService::getContextCharset($node->getRepositoryId());
if(empty($ctxCharset)) {
SessionService::setContextCharset($node->getRepositoryId(), $features["charset"]);
$_SESSION[$cacheKey] = $features["charset"];
}else{
$_SESSION[$cacheKey] = $ctxCharset;
}
}
*/

public static function getResolvedOptionsForNode($node){
return ["TYPE" => "php"];
}

Expand Down
4 changes: 1 addition & 3 deletions core/src/plugins/access.inbox/InboxAccessWrapper.php
Expand Up @@ -427,9 +427,7 @@ public function url_stat($path, $flags)
* @param AJXP_Node $node
* @return array
*/
public static function getResolvedOptionsForNode($node)
{
// TODO: Should find node, and return associated repository real resolved options
public static function getResolvedOptionsForNode($node){
return ["TYPE" => "php"];
}
}
4 changes: 1 addition & 3 deletions core/src/plugins/access.jsapi/JsapiAccessDriver.php
Expand Up @@ -89,8 +89,6 @@ public function switchAction(ServerRequestInterface &$request, ResponseInterface
/**
* @param ContextInterface $ctx
*/
protected function initRepository(ContextInterface $ctx)
{
// TODO: Implement initRepository() method.
protected function initRepository(ContextInterface $ctx) {
}
}
4 changes: 1 addition & 3 deletions core/src/plugins/access.wms/WmsBrowser.php
Expand Up @@ -189,8 +189,6 @@ public function listLayers($host, &$NodesList, $nodeList, $xPath, $replaceCallba
/**
* @param ContextInterface $ctx
*/
protected function initRepository(ContextInterface $ctx)
{
// TODO: Implement initRepository() method.
protected function initRepository(ContextInterface $ctx) {
}
}
1 change: 0 additions & 1 deletion core/src/plugins/action.share/manifest.xml
Expand Up @@ -34,7 +34,6 @@
</client_settings>
<registry_contributions>
<actions>
<!-- TODO : handle action names and authorization (and disable sharing mask) -->
<action name="share_react">
<gui text="292" title="292" src="share.png" iconClass="mdi mdi-share-variant" hasAccessKey="false">
<context selection="true" dir="true" recycle="hidden" actionBar="true" actionBarGroup="get,info_panel_share" contextMenu="true"/>
Expand Down
6 changes: 1 addition & 5 deletions core/src/plugins/action.share/src/Legacy/LegacyPubliclet.php
Expand Up @@ -147,9 +147,7 @@ public static function publicletToJson(ContextInterface $ctx, $shareId, $shareMe
public static function migrateLegacyMeta(ContextInterface $ctx, $shareCenter, $shareStore, $shareRightManager, $dryRun = true){
$metaStoreDir = AJXP_DATA_PATH."/plugins/metastore.serial";
$publicFolder = ConfService::getGlobalConf("PUBLIC_DOWNLOAD_FOLDER");
// TODO 1: Check all metastores of all repositories?
// TODO 2: load $publicFolder/.ajxp_publiclet_counters.ser and reassign download counts
$metastores = glob($metaStoreDir."/ajxp_meta_0");
$metastores = glob($metaStoreDir."/ajxp_meta_*");
if($dryRun){
print("RUNNING A DRY RUN FOR META MIGRATION");
}
Expand All @@ -163,8 +161,6 @@ public static function migrateLegacyMeta(ContextInterface $ctx, $shareCenter, $s
$data = unserialize(file_get_contents($store));
foreach($data as $filePath => &$metadata){



foreach($metadata as $userName => &$meta){
if(!UsersService::userExists($userName)){
continue;
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/action.share/src/ShareCenter.php
Expand Up @@ -995,7 +995,7 @@ public function switchAction(ServerRequestInterface &$requestInterface, Response
$this->getShareStore()->getMetaManager()->setNodeMeta($ajxpNode, $metadata, true);
}
}else{
// TODO: testUserCanEditShare ?
$this->getShareStore()->testUserCanEditShare(($ctx->hasUser()?$ctx->getUser()->getId():null), $hash);
$this->getShareStore()->updateShareProperty($hash, $httpVars["p_name"], $httpVars["p_value"]);
}

Expand Down
6 changes: 5 additions & 1 deletion core/src/plugins/core.access/src/CoreAccessHandler.php
Expand Up @@ -40,9 +40,13 @@
*/
class CoreAccessHandler extends Plugin
{
/**
* @param ContextInterface $ctx
* @param array $options
*/
public function init(ContextInterface $ctx, $options = [])
{
parent::init($ctx, $options); // TODO: Change the autogenerated stub
parent::init($ctx, $options);
MetaStreamWrapper::register();
}

Expand Down

0 comments on commit be95f98

Please sign in to comment.