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

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Oct 3, 2013
1 parent 9bb2a4d commit 44c3688
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 21 deletions.
2 changes: 1 addition & 1 deletion core/src/plugins/action.cart/manifest.xml
Expand Up @@ -38,7 +38,7 @@
if(tabulator){
var newLabel = window.prompt('Provide a label for this selection cart');
if(newLabel){
tabulator.addTab({"id":"new-cart","label":newLabel,"iconClass":"icon-suitcase", closeable:true}, {type:"widget", widgetClass:CartManager, widgetOptions:{}});
tabulator.addTab({"id":"new-cart","label":newLabel,"iconClass":"icon-suitcase", closeable:true, dontFocus:true}, {type:"widget", widgetClass:CartManager, widgetOptions:{}});
}
}
]]></clientCallback>
Expand Down
16 changes: 8 additions & 8 deletions core/src/plugins/feed.sql/class.AJXP_SqlFeedStore.php
Expand Up @@ -200,8 +200,8 @@ public function persistMetaObject($indexPath, $data, $repositoryId, $repositoryS
}
}

public function findMetaObjectsByIndexPath($repositoryId, $indexPath, $userId, $userGroup, $offset = 0, $limit = 20, $orderBy = "date", $orderDir = "desc"){

public function findMetaObjectsByIndexPath($repositoryId, $indexPath, $userId, $userGroup, $offset = 0, $limit = 20, $orderBy = "date", $orderDir = "desc")
{
if($this->sqlDriver["password"] == "XXXX") return array();
require_once(AJXP_BIN_FOLDER."/dibi.compact.php");
dibi::connect($this->sqlDriver);
Expand All @@ -225,26 +225,26 @@ public function findMetaObjectsByIndexPath($repositoryId, $indexPath, $userId, $
return $data;
}

public function updateMetaObject($repositoryId, $oldPath, $newPath = null, $copy = false){

if($oldPath != null && $newPath == null){// DELETE
public function updateMetaObject($repositoryId, $oldPath, $newPath = null, $copy = false)
{
if ($oldPath != null && $newPath == null) {// DELETE

if($this->sqlDriver["password"] == "XXXX") return array();
require_once(AJXP_BIN_FOLDER."/dibi.compact.php");
dibi::connect($this->sqlDriver);
dibi::query("DELETE FROM [ajxp_feed] WHERE [repository_id]=%s and [index_path] LIKE %s", $repositoryId, $oldPath."%");

}else if($oldPath != null && $newPath != null){ // MOVE or COPY
} else if ($oldPath != null && $newPath != null) { // MOVE or COPY

if($this->sqlDriver["password"] == "XXXX") return array();
require_once(AJXP_BIN_FOLDER."/dibi.compact.php");
dibi::connect($this->sqlDriver);

if($copy){
if ($copy) {

// ?? Do we want to duplicate metadata?
}else{
} else {

$starter = "__START__";
dibi::query("UPDATE [ajxp_feed] SET [index_path] = CONCAT(%s, [index_path]) WHERE [index_path] LIKE %s AND [repository_id]=%s", $starter, $oldPath."%", $repositoryId);
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer.js

Large diffs are not rendered by default.

Expand Up @@ -4137,6 +4137,7 @@ td.ip_geo_cell{
{
font-size: 11px;
padding: 5px 3px 3px 8px;
height: 18px;
letter-spacing: 1px;
background-color: #FFFFFF;
border-bottom: 1px solid rgb(187, 187, 187);
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/themes/vision/css/allz.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions core/src/plugins/gui.ajax/res/themes/vision/html/gui.html
Expand Up @@ -19,6 +19,9 @@
document.documentElement.className += " ajxp_theme_vision";
});
window.ajxpBootstrap = new AjxpBootstrap(startParameters);
window.onbeforeunload = function(){
return "Do you want to quit?";
};
</script>
<div id="ajxp_desktop" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height","fitParent":"window","fitMarginBottom":"$(\"optional_bottom_div\").getHeight()"}'></div>
<div id="all_forms">
Expand Down
20 changes: 10 additions & 10 deletions core/src/plugins/meta.comments/class.CommentsMetaManager.php
Expand Up @@ -30,10 +30,10 @@ public function initMeta($accessDriver)
{
$this->accessDriver = $accessDriver;
$feed = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("feed");
if($feed){
if ($feed) {
$this->storageMode = "FEED";
$this->feedStore = $feed;
}else{
} else {
$store = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("metastore");
if ($store === false) {
throw new Exception("The 'meta.comments' plugin requires at least one active 'metastore' plugin");
Expand Down Expand Up @@ -63,7 +63,7 @@ public function moveMeta($oldFile, $newFile = null, $copy = false)
{
if($oldFile == null) return;
$feedStore = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("feed");
if($feedStore !== false) {
if ($feedStore !== false) {
$feedStore->updateMetaObject(ConfService::getRepository()->getId(), $oldFile->getPath(), ($newFile!=null?$newFile->getPath():null), $copy);
return;
}
Expand Down Expand Up @@ -112,7 +112,7 @@ public function switchActions($actionName, $httpVars, $fileVars)
"content" => $httpVars["content"]
);
$existingFeed[] = $com;
if($feedStore!== false){
if ($feedStore!== false) {
$feedStore->persistMetaObject(
$uniqNode->getPath(),
base64_encode($com["content"]),
Expand All @@ -121,7 +121,7 @@ public function switchActions($actionName, $httpVars, $fileVars)
$uniqNode->getRepository()->getOwner(),
AuthService::getLoggedUser()->getId(),
AuthService::getLoggedUser()->getGroupPath());
}else{
} else {
$uniqNode->removeMetadata(AJXP_META_SPACE_COMMENTS, false);
$uniqNode->setMetadata(AJXP_META_SPACE_COMMENTS, $existingFeed, false);
}
Expand All @@ -134,10 +134,10 @@ public function switchActions($actionName, $httpVars, $fileVars)
case "load_comments_feed":

HTMLWriter::charsetHeader("application/json");
if($feedStore !== false){
if ($feedStore !== false) {
$data = $feedStore->findMetaObjectsByIndexPath(ConfService::getRepository()->getId(), $uniqNode->getPath(), AuthService::getLoggedUser()->getId(), AuthService::getLoggedUser()->getGroupPath(), 0, 20, "date", "asc");
$theFeed = array();
foreach($data as $stdObject){
foreach ($data as $stdObject) {
$rPath = substr($stdObject->path, strlen($uniqNode->getPath()));
if($rPath == false && $stdObject->path == $uniqNode->getPath()) $rPath = "";
$rPath = ltrim($rPath, "/");
Expand All @@ -149,16 +149,16 @@ public function switchActions($actionName, $httpVars, $fileVars)
"path" => $stdObject->path,
"rpath" => $rPath
);
if(isSet($previous) && $previous["author"] == $newItem["author"] && $previous["path"] == $newItem["path"] && $previous["hdate"] == $newItem["hdate"] ){
if (isSet($previous) && $previous["author"] == $newItem["author"] && $previous["path"] == $newItem["path"] && $previous["hdate"] == $newItem["hdate"] ) {
$theFeed[count($theFeed) - 1]["content"].= $newItem["content"];

}else{
} else {
$theFeed[] = $newItem;
}
$previous = $newItem;
}
echo json_encode($theFeed);
}else{
} else {
foreach ($existingFeed as &$item) {
$item["hdate"] = AJXP_Utils::relativeDate($item["date"], $mess);
}
Expand Down

0 comments on commit 44c3688

Please sign in to comment.