- Timestamp:
- 05/09/08 16:22:50 (7 months ago)
- Location:
- trunk
- Files:
-
- 5 modified
-
admin/plog-admin-functions.php (modified) (2 diffs)
-
admin/plog-import.php (modified) (1 diff)
-
gallery.php (modified) (5 diffs)
-
plog-functions.php (modified) (3 diffs)
-
plog-rss.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/plog-admin-functions.php
r536 r538 83 83 $result['errors'] .= sprintf(plog_tr('Could not create directory %s!'),$create_path); 84 84 return $result; 85 } ;85 } 86 86 87 87 if (is_uploaded_file($tmpname)) { … … 95 95 $result['errors'] .= sprintf(plog_tr('Could not move file! %s to %s'),$tmpname,$final_fqfn); 96 96 return $result; 97 } ;97 } 98 98 99 99 if (is_file($tmpname)){ 100 100 @unlink($tmpname); 101 101 } 102 $res = chmod($final_fqfn, 0755);102 $res = @chmod($final_fqfn, 0755); 103 103 104 104 // Get the EXIF data. -
trunk/admin/plog-import.php
r537 r538 61 61 $captions = $_POST['captions']; 62 62 $descriptions = $_POST['descriptions']; 63 $files = $_POST['files'];63 $files = isset($_POST['files']) ? $_POST['files'] : ''; 64 64 $selected = $_POST['Selected']; 65 65 -
trunk/gallery.php
r511 r538 18 18 if (isset($resolved_path['mode'])) { 19 19 $_GET['mode'] = $resolved_path['mode']; 20 } ;20 } 21 21 22 22 // get page number from url, if present … … 25 25 parse_str($parts["query"],$query_parts); 26 26 if (!empty($query_parts["plog_page"])) $_GET["plog_page"] = $query_parts["plog_page"]; 27 } ;27 } 28 28 $path = $parts["path"]; 29 } ;30 } ;29 } 30 } 31 31 32 32 // Set sorting session variables if they are passed 33 33 if (isset($_GET['sortby'])) { 34 34 $_SESSION['plogger_sortby'] = $_GET['sortby']; 35 } ;35 } 36 36 37 37 if (isset($_GET['sortdir'])) { 38 38 $_SESSION['plogger_sortdir'] = $_GET['sortdir']; 39 } ;39 } 40 40 41 41 // The three GET parameters that it accepts are … … 55 55 if (!in_array($GLOBALS['plogger_level'],$allowed_levels)) { 56 56 $GLOBALS['plogger_level'] = 'collections'; 57 } ;57 } 58 58 59 59 // Some Estonian remarks was here ?!? … … 85 85 } else { 86 86 $use_file = 'search.php'; 87 } ;87 } 88 88 } 89 89 elseif ($GLOBALS['plogger_level'] == "album") { … … 93 93 } else { 94 94 $use_file = 'album.php'; 95 } ;95 } 96 96 } 97 97 else if ($GLOBALS['plogger_level'] == "collection") { 98 98 $use_file = 'collection.php'; 99 } ;99 } 100 100 101 101 // if the theme does not have the requested file, then use the one from the default template -
trunk/plog-functions.php
r536 r538 1408 1408 1409 1409 // right now only single id is supported, maybe I want to specify multiple id-s as well 1410 $value = ( $arr['value'] > 0) ? $arr['value'] : -1;1410 $value = (isset($arr['value']) && $arr['value'] > 0) ? $arr['value'] : -1; 1411 1411 1412 1412 if ('collection' == $type) { … … 1987 1987 1988 1988 function plogger_get_picture_description() { 1989 return SmartStripSlashes($GLOBALS["current_picture"]["description"]); 1989 if (isset($GLOBALS['current_picture']['description'])){ 1990 return SmartStripSlashes($GLOBALS['current_picture']['description']); 1991 } else { 1992 return false; 1993 } 1990 1994 } 1991 1995 … … 2261 2265 $numresult = run_query($numquery); 2262 2266 return mysql_result($numresult, 'num_pictures'); 2267 } else { 2268 return 0; 2263 2269 } 2264 2270 } -
trunk/plog-rss.php
r536 r538 111 111 header("Content-Type: application/xml"); 112 112 113 $level = isset($_GET[ "level"]) ? $_GET["level"] : "";114 $id = isset($_GET[ "id"]) ? intval($_GET["id"]) : "";113 $level = isset($_GET['level']) ? $_GET['level'] : ""; 114 $id = isset($_GET['id']) ? intval($_GET['id']) : ""; 115 115 116 116 // process path here - is set if mod_rewrite is in use 117 117 118 118 // Some Estonian remarks was here 119 if (!empty($_REQUEST[ "path"])) {119 if (!empty($_REQUEST['path'])) { 120 120 // The following line calculates the path in the album and excludes any subdirectories if 121 121 // Plogger is installed in one … … 123 123 $resolved_path = resolve_path($path); 124 124 // there is no meaningful RSS feed for images 125 if (is_array($resolved_path) && $resolved_path["level"] != "picture") {126 $level = $resolved_path[ "level"];127 $id = $resolved_path[ "id"];128 } ;129 } ;125 if (is_array($resolved_path) && isset($resolved_path['level']) && $resolved_path['level'] != "picture") { 126 $level = $resolved_path['level']; 127 $id = $resolved_path['id']; 128 } 129 } 130 130 131 $parts = parse_url($_SERVER["REQUEST_URI"]); 132 parse_str($parts["query"],$query_parts); 133 if (isset($query_parts["searchterms"])) { 134 generate_RSS_feed($level, $id, $query_parts["searchterms"]); 131 $parts = parse_url($_SERVER['REQUEST_URI']); 132 if (isset($parts['query'])){ 133 parse_str($parts['query'],$query_parts); 134 } 135 if (isset($query_parts['searchterms'])) { 136 generate_RSS_feed($level, $id, $query_parts['searchterms']); 135 137 } else { 136 138 generate_RSS_feed($level, $id);
