Ejemplo n.º 1
0
 /**
  * Invalidate the cache for the given paper
  * @param  integer $paper_id ID of paper for which the cache should be invalidated
  */
 protected function invalidate_paper_cache($paper_id)
 {
     $properties = new PaperProperties($this->_mysqli);
     $properties->set_property_id($paper_id);
     $properties->load();
     $properties->set_recache_marks(1);
     $properties->save();
 }
Ejemplo n.º 2
0
 static function get_paper_properties_by_crypt_name($crypt_name, $db, $string, $exit_on_false = true)
 {
     $configObj = Config::get_instance();
     $notice = UserNotices::get_instance();
     $paper_property = new PaperProperties($db);
     $paper_property->set_crypt_name($crypt_name);
     if ($paper_property->load() !== false) {
         return $paper_property;
     } else {
         if ($exit_on_false) {
             $msg = sprintf($string['furtherassistance'], $configObj->get('support_email'), $configObj->get('support_email'));
             $notice->display_notice_and_exit($db, $string['pagenotfound'], $msg, $string['pagenotfound'], '../artwork/page_not_found.png', '#C00000', true, true);
         } else {
             return false;
         }
     }
 }