Index: trunk/kernel/include/image.php
===================================================================
diff -u -r832 -r889
--- trunk/kernel/include/image.php (.../image.php) (revision 832)
+++ trunk/kernel/include/image.php (.../image.php) (revision 889)
@@ -19,6 +19,21 @@
$this->LoadFromDatabase($id);
//$this->SetDebugLevel(0);
}
+
+ function DetectChanges($name, $value)
+ {
+ global $objSession;
+ //print_pre($_POST);
+
+ if ($this->Data[$name] != $value) {
+ //echo "$name Modified tt ".$this->Data[$name]." tt $value
";
+ if (!stristr($name, 'Resource') && !stristr($name, 'ImageId')) {
+ if ($objSession->GetVariable("HasChanges") != 1) {
+ $objSession->SetVariable("HasChanges", 2);
+ }
+ }
+ }
+ }
function GetFileName($thumb = 0)
{
Index: trunk/admin/users/group_select.php
===================================================================
diff -u -r724 -r889
--- trunk/admin/users/group_select.php (.../group_select.php) (revision 724)
+++ trunk/admin/users/group_select.php (.../group_select.php) (revision 889)
@@ -175,7 +175,8 @@
case "adduser_groups":
$SelectorType = "radio";
$ado = &GetADODBConnection();
- $sql = sprintf('SELECT GroupId FROM '.GetTablePrefix().'UserGroup WHERE PortalUserId = %s', $_GET["UserId"]);
+ //$sql = sprintf('SELECT GroupId FROM '.GetTablePrefix().'UserGroup WHERE PortalUserId = %s', $_GET["UserId"]);
+ $sql = sprintf('SELECT GroupId FROM '.$objSession->GetEditTable("UserGroup").' WHERE PortalUserId = %s', $_GET["UserId"]);
$inlist = $ado->GetCol($sql);
if($inlist !== false)
{
Index: trunk/kernel/include/syscache.php
===================================================================
diff -u -r13 -r889
--- trunk/kernel/include/syscache.php (.../syscache.php) (revision 13)
+++ trunk/kernel/include/syscache.php (.../syscache.php) (revision 889)
@@ -21,6 +21,11 @@
$this->LoadByName($name);
}
}
+
+ function DetectCahanges($name, $value)
+ {
+
+ }
function LoadFromDatabase($Id)
{
Index: trunk/globals.php
===================================================================
diff -u -r858 -r889
--- trunk/globals.php (.../globals.php) (revision 858)
+++ trunk/globals.php (.../globals.php) (revision 889)
@@ -208,7 +208,7 @@
$sql = preg_replace('/SELECT(.*)FROM[ \n\r](.*)/is','SELECT COUNT(*) AS TableCount FROM $2', $sql);
$sql = preg_replace('/(.*)LIMIT(.*)/is','$1', $sql);
$sql = preg_replace('/(.*)ORDER BY(.*)/is','$1', $sql);
-
+ echo $sql;
$db =& GetADODBConnection();
return $db->GetOne($sql);
}
Index: trunk/admin/advanced_view.php
===================================================================
diff -u -r843 -r889
--- trunk/admin/advanced_view.php (.../advanced_view.php) (revision 843)
+++ trunk/admin/advanced_view.php (.../advanced_view.php) (revision 889)
@@ -369,4 +369,9 @@
toggleTabB(default_tab,true);
}
-
\ No newline at end of file
+SetVariable("HasChanges", 0);
+int_footer();
+
+?>
\ No newline at end of file
Index: trunk/admin/browse.php
===================================================================
diff -u -r843 -r889
--- trunk/admin/browse.php (.../browse.php) (revision 843)
+++ trunk/admin/browse.php (.../browse.php) (revision 889)
@@ -174,8 +174,6 @@
if( GetVar('SearchWord') !== false ) $objSession->SetVariable('admin_seach_words', GetVar('SearchWord') );
$SearchWord = $objSession->GetVariable('admin_seach_words');
-$objSession->SetVariable("HasChanges", 0);
-
// where should all edit popups submit changes
$objSession->SetVariable("ReturnScript", basename($_SERVER['PHP_SELF']) );
/* page header */
@@ -471,4 +469,9 @@
}
-
\ No newline at end of file
+ SetVariable("HasChanges", 0);
+ int_footer();
+
+ ?>
\ No newline at end of file
Index: trunk/kernel/include/portalgroup.php
===================================================================
diff -u -r888 -r889
--- trunk/kernel/include/portalgroup.php (.../portalgroup.php) (revision 888)
+++ trunk/kernel/include/portalgroup.php (.../portalgroup.php) (revision 889)
@@ -526,10 +526,6 @@
$clear_old = false;
}
- if ($data["PortalUserId"] == 0) {
-
- }
-
$sql = "INSERT INTO ".$this->SourceTable." (PortalUserId, GroupId, PrimaryGroup) VALUES (".$data['PortalUserId'].", ".$data['GroupId'].", ".$data['PrimaryGroup'].")";
@$this->adodbConnection->Execute($sql);
Index: trunk/admin/logs/session_list.php
===================================================================
diff -u -r888 -r889
--- trunk/admin/logs/session_list.php (.../session_list.php) (revision 888)
+++ trunk/admin/logs/session_list.php (.../session_list.php) (revision 889)
@@ -217,7 +217,6 @@
$sql .= "AND ".$where;
}
-$itemcount = QueryCount($sql);
$orderBy = trim($objConfig->Get("Session_SortField")." ".$objConfig->Get("Session_SortOrder"));
if(strlen($orderBy))
@@ -233,6 +232,13 @@
$objUsers->Query_Item( $sql, $objListView->GetLimitSQL() );
+$itemcount = 0;
+
+foreach ($objUsers->Items as $value) {
+ $itemcount++;
+}
+
+
$objListView->SetListItems($objUsers);
$objListView->IdField = "SessionKey";
$objListView->PageLinkTemplate = $pathtoroot.$admin."/templates/user_page_link.tpl";
Index: trunk/kernel/include/category.php
===================================================================
diff -u -r875 -r889
--- trunk/kernel/include/category.php (.../category.php) (revision 875)
+++ trunk/kernel/include/category.php (.../category.php) (revision 889)
@@ -44,7 +44,22 @@
DeleteTagCache("m_itemcount","Category%");
DeleteTagCache("m_list_cats","",$env);
}
+
+ function DetectChanges($name, $value)
+ {
+ global $objSession;
+ //print_pre($_POST);
+ if ($this->Data[$name] != $value) {
+ //echo "$name Modified tt ".$this->Data[$name]." tt $value
";
+ if (!stristr($name, 'Modif') && !stristr($name, 'Created')) {
+ if ($objSession->GetVariable("HasChanges") != 1) {
+ $objSession->SetVariable("HasChanges", 2);
+ }
+ }
+ }
+ }
+
function Delete()
{
Index: trunk/kernel/include/theme.php
===================================================================
diff -u -r875 -r889
--- trunk/kernel/include/theme.php (.../theme.php) (revision 875)
+++ trunk/kernel/include/theme.php (.../theme.php) (revision 889)
@@ -18,7 +18,21 @@
$this->Contents = '';
if($id) $this->LoadFromDatabase($id);
}
+
+ function DetectChanges($name, $value)
+ {
+ global $objSession;
+ if ($this->Data[$name] != $value) {
+ //echo "$name Modified tt ".$this->Data[$name]." tt $value
";
+ if (!stristr($name, 'File') && !stristr($name, 'Theme')) {
+ if ($objSession->GetVariable("HasChanges") != 1) {
+ $objSession->SetVariable("HasChanges", 2);
+ }
+ }
+ }
+ }
+
function ThemeRoot()
{
if( !$this->Root )
Index: trunk/kernel/include/itemdb.php
===================================================================
diff -u -r887 -r889
--- trunk/kernel/include/itemdb.php (.../itemdb.php) (revision 887)
+++ trunk/kernel/include/itemdb.php (.../itemdb.php) (revision 889)
@@ -404,21 +404,14 @@
* @access private
*/
function DetectChanges($name, $value)
- {
- // Maris, don't try to create this method as universal
- // as possible, remove unneeded if statements here and
- // move them to those this class children's where they
- // are really needed.
-
+ {
global $objSession;
- //print_pre($_POST);
- //echo "$name: $value
";
- if ($this->Data[$name] != $value && !strstr($name, 'Modif') && !strstr($name, 'Created')) {
+
+ //echo "class: ".get_class($this)."
";
+ if ($this->Data[$name] != $value && $value != '') {
//echo "$name Modified tt ".$this->Data[$name]." tt $value
";
- if (!strstr($name, 'Hot') && !strstr($name, 'Pop') && !strstr($name, "Id") && !strstr($name, "ItemType")) {
- if ($objSession->GetVariable("HasChanges") != 1) {
- $objSession->SetVariable("HasChanges", 2);
- }
+ if ($objSession->GetVariable("HasChanges") != 1) {
+ $objSession->SetVariable("HasChanges", 2);
}
}
}